summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-05-23gitignore: Add ignore of EXTERNALSRC's artifactsJosé Bollo1-0/+3
This tiny change allows to use EXTERNALSRC when building debugging images without having its git status polluted. Bug-AGL: SPEC-2006 Change-Id: Ic6556a34c487012471ed456c6b4467d686fee816 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23afm-unit.conf: cleanup of generationJosé Bollo8-138/+144
The generation files are reworked to improve their evolution and maintainability: - the Makefile now refers to any .inc file - the macros are isolated from the skeleton - main iterators are managed in the skeleton - improve management of UNIT_NAME_BASE Bug-AGL: SPEC-2436 Change-Id: I0877eb0149c9362be3290ed2c146cc69fc6bf718 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23afm-unit: Simplify the MakefileJosé Bollo2-9/+4
The use of AFM_CONFIG_DIR brings nothing except confusion. Bug-AGL: SPEC-2436 Change-Id: I21a18ad98349bf6799b72061523bc353ad3d6c3f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23afm-user-session: moves in libexec directoryJosé Bollo5-14/+5
Having the binary 'afm-user-session' in /usr/bin brings nothing. It is better to keep it in private area. Bug-AGL: SPEC-2367 Change-Id: I8ef517f599c02e18d8987278a6652a065ee6f0b6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23afm-unit conf: Remove useless testsJosé Bollo3-13/+0
The tests were not needed because they were in the body of a conditional part ruled by the same test. Bug-AGL: SPEC-2436 Change-Id: Ia5cd1157dde6fc2b5aa1153aa375568b39639caf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23Use definition of afm_prefixJosé Bollo5-35/+35
The prefix of the URN for AGL features should be settable. Bug-AGL: SPEC-2436 Change-Id: I49e9634ebc6a280c28caa6e6764e543a7e78253c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23Remove unused definitionsJosé Bollo1-2/+0
The definitions FWK_PREFIX_BINDING and afm_prefix_binding aren't used so removing it is better. Bug-AGL: SPEC-2436 Change-Id: Ia90b75983f052b9b3c17832e968b0d457d0f7802 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-14Refactor of system and user setuphalibut_7.99.1halibut/7.99.17.99.1José Bollo7-26/+71
Since a long time, the creation of the user and system run environment was made by a sub-optimal, hardly maintainable and false-error generating. This change puts the user and system setup in separate shell scripts. This makes them more easy to maintain, update or tune. This facility will useful for further evolution. Bug-AGL: SPEC-1016 Change-Id: Iede81a659eacf4e5c21c561a33d300408e1bd058 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-14Fix outdated application path.Li Xiaoming1-3/+2
Bug-AGL: SPEC-2360 Change-Id: I7907f8433cfdaf269004d6bc667f082a009b5cbd Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
2019-04-30Allow setting of libexec locationJosé Bollo3-2/+3
The location of the framework binding could not be tuned but is fixed. The default location is good but it is important to be able to tune that location. This at least has the good effect that the location is set at one point in the build system instead of at multiple points as today. Bug-AGL: SPEC-2367 Change-Id: Ib06fdff56d1828eacd0d1f82c2e1308d0b36fa5e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-04-26afm-unit: Restore removal of capabilitiesJosé Bollo4-4/+4
This removes capabilities to any application installed and launched. Also fixes a tiny bug in setup of user environment. Bug-AGL: SPEC-2006 Change-Id: I2c0d85cc2c2d389247ad9ce728f4d9e8e3d74616 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-04-17API Reference Overview: Removed old "kristi" file, updated bookScott Rifenbark2-57/+0
Removed the old 0-kristi* file and updated the app-services-book.yml file to remove the redundant file from the contents. Change-Id: If0c01d5c39ae9660909d531335158b54168bc47a Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2019-04-16API Overview: Changes to the file that introduces APIs.Scott Rifenbark1-1/+3
Updates to wording. Change-Id: If91bfd17f786f39a2feedb70919af959222b59ff Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2019-04-09afm-util: Remove legacy commands stop/resumeJosé Bollo1-16/+0
The command stop was linked to the SIGSTOP of processes. It came in deprecation. Keeping it is confusing. Bug-AGL: SPEC-2247 Bug-AGL: SPEC-2248 Change-Id: Iad6af317ba4fd6466f306ef493ef8dd62d8de778 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-28afm-unit.conf: Add widget specific environmentJosé Bollo4-0/+4
This change allow to set environment specific to a widget in ${afm_confdir}/widget.env.d/ID/* files where ID is the ID of the widget. Setting specific environment for a given widget was not possible (except in devel/debug) before. Change-Id: I8ef9349fda9adb8eecf330ce97cc7ebcd21bf399 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-21Add ability to manage all widget/applicationsJosé Bollo9-67/+122
For system uses -like automatic testing-, it is needed to include tha ability to list ALL installed widgets and ALL running instance of installed widgets. This change adds the option -a or --all to the commands 'list' and 'runners' for the purpose of listing any installed widgets, even those requiring to be hidden. Example: afm-util ps -a Bug-AGL: SPEC-2272 Bug-AGL: SPEC-1850 Change-Id: I216ec9c63efea1b3af58e1d2d7723d986e04551e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-02-07Update date in copyrightssandbox/scottrif29/scottdocsJosé Bollo74-79/+79
Change-Id: Ie2ff321f78c59913373e2ffb2820297fd423d6f4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-07Set version to 8.0.0José Bollo1-1/+1
Change-Id: If6524976b05ab104acee52f0cce1a7feea5e9d48 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-06Revert "afm-unit: Restore removal of capabilities"halibut_7.90.0halibut/7.90.07.90.0Stephane Desneux3-9/+6
This reverts commit f2a2f1357a5268b614528feeba0a91f4ea04a7aa. Change-Id: I7ff68f27b75c9ddb887470c5579e7b9277aa3613 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2019-02-06wgtpkg-unit: Fix Segmentation faultJose Bollo1-4/+8
This fixes a segmentation fault raised when uninstalling a widget. This regression was introduced by the commit f8b0495. Bug-AGL: SPEC-2144 Change-Id: Ie10eb97a4d2f2663d73f83b210ef2b17717ed2e6 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-02-06wgtpkg-pack: Ensure packing relative filesJose Bollo2-3/+13
When running external ZIP program, ensures that the files are stored with a path relative to the root directory by changing the directory first. Also, tiny improvement in working directory handling. Change-Id: I3470c6c933aea9cd93dac197ff7f5e8a0ed86b23 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-02-06wgtpkg-zip: Ensure zip will not complainJose Bollo1-2/+3
The invoked program ZIP may complain that the target zip file is not valid. It happens either when it is really invalid or when it is empty. Change-Id: I8b123019175fab45c6539c1d5938656afd9c7643 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-06afm-user-setup service: disable start rate limitguppy_6.99.4guppy/6.99.46.99.4Stephane Desneux1-0/+2
The service afm-user-setup is invoked each time an app is started. If the user starts apps too quickly (3 apps in less than 10secs by default), then afm-user-setup will fail and the last app is not started. This patch removes the rate limitation coming from systemd default config. Change-Id: Ief6af726c58866e2fc6d3fa170e5f6c6afbee987 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2018-12-20Merge "Revert "afm-unit: add autoapi in required-api feature""guppy_6.99.3guppy/6.99.36.99.3Jan-Simon Moeller3-3/+0
2018-12-20Revert "afm-unit: add autoapi in required-api feature"José Bollo3-3/+0
This reverts commit 2b6e13bd5812dc1d7efe338a163f6dd253bbe15b. Change-Id: I5e2493669da8d45150ed46257b06a5dae005e0bd
2018-12-20Merge "Fixed book.yml file"Jan-Simon Moeller1-10/+8
2018-12-20Merge "afm-unit: add autoapi in required-api feature"Jan-Simon Moeller3-0/+3
2018-12-19Fixed book.yml fileSebastien Douheret1-10/+8
- remove useless %lang% prefix - remove unwanted (copy/paste error) "API Reference" chapter Change-Id: I2c46f93093eed6950cfbb7319e7cfd47fcd8b8b7 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-18afm-unit: Restore removal of capabilitiesJosé Bollo3-6/+9
This removes capabilities to any application installed and launched. Also applications are added by default to the display group, meaning that it can be displayed. Bug-AGL: SPEC-2006 Change-Id: Ia0b2d0df3ec1c74f37ca176fc9f0e8db96de3566 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-18afm-unit: Fix http port multi allocationJosé Bollo8-21/+37
When serveral targets were set in the widget file, the framework allocated the same HTTP port to each. This lead to impossibility to run all targets or to a systemd conflict. This should fix the issue by allocating an HTTP port for each target installed by the widget. To achieves that goal, the afm-unit.conf tag for the port is moved from '#metadata.http-port' to '#metatarget.http-port'. Bug-AGL: SPEC-2068 Change-Id: I5376d6f052e0ffc5c77cc80041528637777aed1e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-18wrap-json: Upgrade to latest versionJosé Bollo2-51/+384
Change-Id: Iaaf302aa13650390bc8536f19187708dd67fa174 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-14afm-unit: add autoapi in required-api featureClément Bénier3-0/+3
- required-api feature: add autoapi value - start the daemon with --auto-api option to the websocket directory Change-Id: Ia36d0edb4bfa22d07feafed580373cda21dd5b35 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-12-13book doc: add book yaml fileClément Bénier1-0/+37
SPEC-1988 Change-Id: Ie68d715f04338bf8917792f0f1ae6e36d1602553 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-11-29wgtpkg-install: Improve port allocationguppy_6.99.2guppy/6.99.26.99.2José Bollo1-20/+58
The algorithm that allocates ports is improved by: - allocating ports in the range 31000...32759 - avoiding systematic rescan Change-Id: I72771cf3f361f4977edc7b59c75921e71f5b470b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-28Merge "API Landing Page: Test landing page for all APIs"Stéphane Desneux1-0/+45
2018-11-28API Landing Page: Test landing page for all APIsScott Rifenbark1-0/+45
Change-Id: I5c8b843fc2c31d45cafbf25eef156a94e9fd0f1c Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2018-11-21onappid: retrieves the 'appid' with id fieldguppy_6.99.1guppy/6.99.16.99.1Clément Bénier1-1/+1
the value of id field shoud be a string not an integer so {si} is replaced by {ss} Change-Id: Ief8a1e56295085cfe818301fd0073399a3ae6315 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-11-08afm-unit: Export new variablesJosé Bollo7-6/+16
Export the new variables: - AFM_ID: the identifier of the application - AFM_WORKDIR: the workdir of the application - AFM_WSAPI_DIR: the directory where APIs can be accessed Change-Id: I79b46754f84161a36d9a13dd79bc94e777c854fe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-05Treat correctly running/not running statusJosé Bollo2-3/+17
Systemd returns 0 for services that don't run. It wasn't checked well causing weird effect: trying to terminate an application not running killed afm-system-daemon because kill(0) kills all processes of the group of the caller. Bug-AGL: SPEC-1836 Change-Id: I1bd64faf871ecd42aaaa5449312e8b8cb26ee9dd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-31afm-system-daemon: Improve error message reportJosé Bollo2-11/+14
Bug-AGL: SPEC-1872 Change-Id: I6e48baa05312b1490edd38ccf9231afe4aa6eb51 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-30afm-util: Fix report of errorJosé Bollo1-1/+1
The script afm-util wasn't reporting correctly errors. The use of the output status of afb-client-demo was possible but this solution is simplest to output the error message. Bug-AGL: SPEC-1863 Change-Id: I5ac919e615ed5c0f21589292e94a9c3d6209a83f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-29Install afm-user-daemon with correct rightsJose Bollo1-1/+3
Install afm-user-daemon with rwx-r-xr-x instead of --x--x--x as before. Bug-AGL: SPEC-1846 Change-Id: Ie48d379f5f4cfe8ddf3192ebee85580b05e35b36 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-28afm-urun: Force scan of systemd unitsJosé Bollo1-13/+7
It was previously assumed that only launched units had to be scanned. But it was buggy because the uninstall/install of application rebuilds the database without taking care of the running applications. Nevertheless changing the behaviour of the rebuild of application's database is not the best solution for two reasons. The fist is that it will complicates the code. The second, much better, is that it would allow to track also applications launched automaticaly -and/or manually in devel-. Bug-AGL: SPEC-1836 Change-Id: I5fb2bb712ce43be9c851251be6b794a007b1ea6f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-23Merge "afm-unit.conf: Enforce starting after network"José Bollo3-0/+3
2018-10-23Merge "afm-unit.conf: Restrict service for APIs"José Bollo3-3/+3
2018-10-19afm-unit.conf: Enforce starting after networkJose Bollo3-0/+3
This solves issues encountered when starting remote services. It delays all services until completion of network initialisation. Delaying every services is not selective. Further optimisation may improve that issue. Bug-AGL: SPEC-1650 Change-Id: I5742a4cd514c86c724a8e7a86c7e0a5dde6a8c67 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-19Add the ability to access binding through tcpJosé Bollo4-47/+65
This commit introduce "tcp", a new type of provided/required api. It appears in the config.xml as below: <urn:AGL:widget:provided-api> <param "name"="HOST:PORT/API" "value"="tcp"> <urn:AGL:widget:required-api> <param "name"="HOST:PORT/API" "value"="tcp"> This implementation is a draft. The service exposed can not start automatically. Use it with the permission urn:AGL:permission::system:run-by-default. Change-Id: Ic593f0d891692ca0c777c49057ec54c37fc55cc0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-19afm-unit.conf: Restrict service for APIsJose Bollo3-3/+3
Forbids exportation of service apis for apis that are not exported as 'ws' or 'auto'. Bug-AGL: SPEC-1650 Change-Id: I0681bdb0632d9f331036abc1ff1e1b2bb37933cd Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-11Merge "docs: Improve documentating 'required-binding'"Stéphane Desneux1-4/+59
2018-10-10docs: Improve documentating 'required-binding'Jose Bollo1-4/+59
The documentation was not clear because the headers wasn't set correctly. Bug-AGL: SPEC-1800 Change-Id: Ibb5ecf3becdaad1b560e6718d41b81fdf55fe9df Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>