summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08wgtpkg-install: search in subdir "htdocs" alsodab_4.0.3dab_4.0.2dab_4.0.1dab/4.0.3dab/4.0.2dab/4.0.14.0.34.0.24.0.1dabJosé Bollo1-0/+11
For widgets that are fully HTML, the search of the content was not checking the subdirectory "htdocs" that is enforced elsewhere. This commits add the search of the content in the subdirectory "htdocs". This is a temporarily fix. A better complete solution has to be delivered later. Bug-AGL: SPEC-808 Change-Id: I8bef7c4a31ff919827ceca05e203c2b277cf7657 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-08Handle file-properties for setting eXecutable flagJosé Bollo1-0/+34
This commits introduce the feature "urn:AGL:widget:file-properties". This feature actually only allows to set execution flag to files of the widget. Example: <feature name="urn:AGL:widget:file-properties"> <param name="flite" value="executable" /> <param name="jtalk" value="executable" /> </feature> Bug-AGL: SPEC-384 Change-Id: If13ca3b1015576317fd52cb9540b77d0e2675f67 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-11Don't list terminated processesdab_3.99.3dab/3.99.33.99.3José Bollo1-7/+8
Listing processes that are terminated might be disturbing. So it is now removed. In some future, it should be good to return on option even terminated processes with an indication of their termination status. Bug-AGL: SPEC-728 Change-Id: I89bff7f880e6a5717c1572e3ee80cfe7dec8e594 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-11Allow to install widget with no iconJosé Bollo2-7/+11
This patch allows a widget to not specify any icon but it still enforce when an icon is specified to specify only one icon and to provide the attribute "src". Bug-AGL: SPEC-702 Change-Id: Ieeb17e4de8885a3a525b35ae365e51b421d39f83 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-05install: improve port detectionJosé Bollo1-10/+52
Check any existing X-AFM-http-port or X-AFM--http-port. Change-Id: I1111095664535c849c76870f2e5104fb07099ab4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-28Fix bad error reportingdab_3.99.2dab/3.99.23.99.2José Bollo1-0/+3
The use of %m was buggy due to the implementation of 'vverbose': it always returned ENOTTY Inappropriate ioctl for device Change-Id: I0b7dd4c2f4ce5a45611042a8b9ba3e6db0e60803 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-28Moves handling of reloadsJosé Bollo3-39/+21
The new version ensures that the daemons are responsibles of reloading the units. This is no more done by default. Change-Id: I9ff33a628dfc05e429dbc7bf127d641691f2a3b9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-23Fix socket (de)activation at (de)installJosé Bollo3-0/+47
When installing or deinstalling, it is needed to issue a "systemctl (--user) restart sockets.target" This patch implement it on user side. To be improved. Change-Id: I152eb6a1cf5df50b1fe3143837d6d42ee6619349 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-23Fix daemon reload (to be improved)José Bollo2-1/+5
Change-Id: Ica099aa439e6c022de4982a58b0990065d932b0b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-23Fix infinite loop in wgt_info_paramJosé Bollo1-0/+1
Change-Id: I8a623a40e48108c8999083667dae1230da2d206f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-12fix binding version to 1José Bollo1-0/+1
Change-Id: I98e6de97e170b8cbb51b48e0e3cf7e52e6def7f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-12Fix lack of error message on mustach issueJosé Bollo1-1/+24
Change-Id: I16139c133d7031e38f4c63ff6369f1d7478fc86f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Check content existing and fix executableJosé Bollo1-14/+72
Change-Id: I4060334cb9c677df1ce86c99a1cb37abc007f3c7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Fix lack of message when setting exec bitJosé Bollo1-3/+7
Nothing was telling that the content couldn't be set as executable. Note that nothing is made to check that a content (executable or not) exist. Also note that installing several executables for one widget isn't possible now. Change-Id: I10373fa27cd8d1d90c292e3529d8a5eec62bb8f0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-02Rework on parsing units confdab_3.99.1dab/3.99.13.99.1José Bollo1-37/+64
Change-Id: Ia95dae65e74a42f9f49154c9421391421f9ca1c0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-02Implement deinstallation of unitsJosé Bollo1-1/+19
Change-Id: I7d9812211bb75f34d55b4035d5b4a3b7ea66f461 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-02Use structures for generating unitsJosé Bollo4-92/+119
Change-Id: I7258a494d62ef22219c973048d052965cb5fea28 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-03Handle systemd's "inactive" state as transientJosé Bollo1-1/+1
Inactive is returned sometimes but it means that the service is not started yet not that it failed to start. AGL-Issue: SPEC-520 Change-Id: I3b39b983b45a0f6ee449958100595c5c486cbfdd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-21Allows or in mustache instanciationJosé Bollo1-2/+33
This allows to simplify the configuration file afm-unit.conf. Restore the type application/vnd.agl.service Change-Id: Iaadde2c2d96155cea6d1b8bee4d3c78e885cf44a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-20Provide unit in config.xml and documentationJosé Bollo4-42/+38
This commit remove urn:AGL:widget:provided-application in favour of urn:AGL:widget:provided-unit. In the same time, the feature urn:AGL:widget:provided-api must be attached to a unit. This will enable to export more than one API for a unit if needed. Change-Id: I17ade3651db2cd61402875333d063ee05cf57a10 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17wgtpkg-install: choose the portJosé Bollo1-1/+64
The installer now chooses a port for an installed application. This choose is made by consulting the previously installed applications and by getting the lowest port available in the range 1024..32767. Change-Id: Iab4238b4d52447a2d261d87d45bbb02f0b7a35e5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: implement start/stop of unitsx-first-with-systemdJosé Bollo6-32/+788
This implementation is very basic and must be improved. Change-Id: Id1540e646c83285c61849092bbd8fb645c0954ed Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Allows to compile without libsystemdJosé Bollo2-36/+56
This fixes a problem with bitbake when building native packages. Change-Id: I28586720010237db578ec55cb5254212c88240e7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Switch to use systemd databaseJosé Bollo4-2/+527
Installation now creates unit files. This commits use these created unit files to fill the application database of afm-user-daemon. Change-Id: Ice39d3ff51b6afe41609f3ce4ff0e89b2f3a0ca7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: provide enumeration of unitsJosé Bollo2-18/+119
This enumeration is based on the filesystem, units are listed from the configured directory. This is necessarily because not all units can be loaded by systemd but all can be started. Change-Id: Ic4d1331c8c54f5bbaa747ff8084da2b0c5a65c55 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Use the same dbus connectionJosé Bollo2-3/+3
Opening one connection per part of the program doesn't make sense and waste resources. Using a common one is much better. Change-Id: I74dc3cd7ae41d7bfa2f03f4a252495e8f5f81578 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17wgtpkg-unit: fix last empty continuationJosé Bollo1-3/+3
Change-Id: Id0a9581032add095756141a4373b34cee3cd6f80 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Emits reload to systemd when neededJosé Bollo4-66/+133
The current implementation enforce the reload when a 'wants' target is created or deleted. This should work well for system units. However, for system units, this behaviour isn't enought when more that a user is active because only the user that installs the application will be updated. For this reason, a paralelle mechanism has to be defined. Also note that systemd is henceforth required for tools because wgtpkg-installer needs it now. Change-Id: I4fc03a44dbc58c2374ea21dbf6b436f646d04e00 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: introduction of systemd interfaceJosé Bollo4-36/+118
Isolate the interface to systemd. Change-Id: I03ea654da9fab2df0e6eec980b0e5623487d1b73 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17wgtpkg-unit: add management of wanted-by in unit descriptionsJosé Bollo2-31/+112
This allows the automatic creation of the links in wants subdirectories. Change-Id: Ib948fb11abbbd902f733279136f51ad1649923ef Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17wgtpkg-install: creates the systemd unitsJosé Bollo1-21/+33
Change-Id: Ia3cdcb76a9f7b3bda77a9d9fcb38dfd85eb85804 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17wgtpkg-unit: install/uninstall functions addedJosé Bollo2-1/+129
Change-Id: Ib147de12d0b2c8e783ddb6aae2f9978f288d98fd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Fix issue in labelling filesx-last-without-systemdJosé Bollo2-2/+4
The current version of security manager put this tags - SECURITY_MANAGER_PATH_PRIVATE - SECURITY_MANAGER_PATH_RW User::App::XXXX - SECURITY_MANAGER_PATH_PUBLIC - SECURITY_MANAGER_PATH_RO User::Home - SECURITY_MANAGER_PATH_PUBLIC_RO _ (underscore or floor) Putting floor is bad because it produces files and directories that can't be removed. Using SECURITY_MANAGER_PATH_RO instead of SECURITY_MANAGER_PATH_PUBLIC_RO sets the label "User::Home". It is valid because this label is already read only for applications. But it is writable by the "System" labelled services at the opposite of "_". Change-Id: I685fe366fddb95858c66b827e28acf6d005bcfc0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-16afm-run: improve error diagnosticJosé Bollo1-0/+1
Change-Id: Ic23bcc031fdc72e15675bffcbac619ef41a2f241 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-14utils-json: fix a warning when compilingJosé Bollo1-1/+1
Change-Id: I3e354cb9e940798a995e79fe67d05607130c9714 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-14Splits the widget validation functionJosé Bollo1-2/+12
Change-Id: I543995c8bb64a859a7c0eb6cc09217d2f71ccc38 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-14utils-file: fix bug in writingJosé Bollo1-1/+0
Change-Id: I7da9ee72992cba4c49c0d1286a38674d3f7ed4bc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-14switch to cmake 3.4.3 at leastJosé Bollo1-6/+2
Change-Id: Ib63bd000abaabd4966519b75356668d31aed58f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-14improve names in CMakeListsJosé Bollo1-11/+11
Change-Id: If86544db50c5813868550338a68c0e11ea469a35 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-03Try to improves the error message after execJosé Bollo1-0/+1
Change-Id: Ibaed600a85ce1b7c3e445ceb39c780e99ca61062 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-02improves matching of patterns for unit descriptionJosé Bollo1-63/+156
Change-Id: I2c3f9f0b45b79d5baa9ad5c19876f1412456c19d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-02Add commentsJosé Bollo1-0/+9
Change-Id: Icbbdbd4ed51db62c7619c6210842411b8d2e04a4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-02fix a bug in mustachJosé Bollo1-2/+2
occured if closing before opening Change-Id: I9c9515535d83f2c13bb75c0638e12c0a5a333413 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-02Adds handling of JSON pointers (RFC 6901)José Bollo1-28/+52
Change-Id: Ib2e1c75f81c32d0b6bc50af2ba48bb95a413842a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-02-23Fix readdir that doesn't return dt_typeJosé Bollo1-0/+8
This is an incomplete fix. More readdir calls exists that should be treated. Change-Id: Ib80c9f4ac8fe7ce02d22968a9cf37f7841514f57 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-02-22Fix readdir that doesn't return dt_typeJosé Bollo1-0/+10
This is an incomplete fix. More readdir calls exists that should be treated. Change-Id: Ic9ed98c7695a7c3d15136d0fe5eb9b5634f74d09 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-02-14Fix bug in mustach.cJosé Bollo1-1/+1
Change-Id: I353ae1cc33795ba8ffd98fcec503125ec9d455a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-02-03Rename binding to api in config.xmljobol5-24/+24
Signed-off-by: jobol <jose.bollo@iot.bzh>
2017-01-26Prepare the Integration with systemdJosé Bollo16-6/+1788
This is an intermediate commit providing basic functionnalities for setting up integration of the framework with systemd. - file afm-unit.conf is a mustache template - translation of config.xml to json object - mustache (extended) application of the json to the template - post processing of the result for extracting unit files This processing is currently available as a test (and a tool) and will be integrated after more developement, test and validation. Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-26Get the install directoryJosé Bollo1-9/+21
The function 'move_widget' was the only one that worried about the name of the installation directory. This commit split the function in two and enforce to get the name of the install directory. Change-Id: I6d89b4c94b2898a6ba95a3045b3f5db23d54c499 Signed-off-by: José Bollo <jose.bollo@iot.bzh>