aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-02-28Refactor ALLOW_NO_SIGNATURE compile flagJose Bollo3-11/+23
Fix a tiny bug and minor improvements Bug-AGL: SPEC-2840 Change-Id: I9b74a8fd604980615d5669219cb5de801de61163 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2020-02-28Rename source files and improve readabilityJosé Bollo6-35/+59
Also rename wgtpkg-installer tools as wgtpkg-install. Shorter and obvious. Bug-AGL: SPEC-2840 Change-Id: Ifed072bfef488700807613dd61875a30a4041d7a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2020-02-14Remove distinction of widget's versionJose Bollo3-1/+20
This removes the distinction between the different versions of a widget. The boolean CMAKE option DISTINCT_VERSIONS allows to switch between the two possibilities: DISTINCT_VERSIONS=OFF (default) Widget installed in {afm_appdir}/{id} Ids of applications have no version part: {id} DISTINCT_VERSIONS=ON (legacy, old default) Widget installed in {afm_appdir}/{id}/{ver} Ids of applications have no version part: {id}@{ver} Bug-AGL: SPEC-2538 Change-Id: I7cb54d4b296b740c553be8a627e66175107e5a4b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2020-01-08Update copyrightJosé Bollo65-70/+70
Change-Id: I1d68e07563d9f0f139d1bc8128e09a5da0a648af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-12-20wgtpkg-install: Fix allocation of IDsicefish_8.99.4icefish/8.99.48.99.4Jose Bollo1-3/+9
The framework wasn't correctly attributing application ids because scanning existing applications was broken. Bug-AGL: SPEC-3068 Change-Id: I01aa736c0ea072b5e4141fb5faa1981be81048ce Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-12-03Enforce numeric application IDsJosé Bollo5-60/+72
This change allows to index applications numerically. This can be used for various purposes. One of it is to compute the HTTP port. Bug-AGL: SPEC-2968 Change-Id: I74531781f3a39d5d4b09eeb907f57f36822e38f0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-12-03wgtpkg-install: Add default permissionsJosé Bollo1-0/+14
Only one default permission is used now: "urn:AGL:token:valid" that is used to check token validity. This adds in the cynagora database the rule SMACKID * * urn:AGL:token:valid yes forever That means that applications having a smack label installed by the framework behave as if they have a valid token, a token without any scope/permission but just valid. This is needed during the transition to token based permission policy. Bug-AGL: SPEC-2968 Change-Id: Ia5b1cc50e8308bfc29906346c5b159dca889519b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-14afm-user-daemon: Remove it by defaultJosé Bollo1-3/+5
The daemon afm-user-daemon is deprecated. To be cleaner, it is removed from the compilation and the installation. It is still kept a again for little time in the unexpected case where it could be useful to compile it. Bug-AGL: SPEC-2437 Change-Id: Ifccee49eb14ceff5f7a78fb299260918a585bf93 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-23afm-user-session: moves in libexec directoryJosé Bollo1-1/+1
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-23Use definition of afm_prefixJosé Bollo2-12/+12
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-04-30Allow setting of libexec locationJosé Bollo1-1/+1
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-03-21Add ability to manage all widget/applicationsJosé Bollo5-65/+108
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é Bollo65-70/+70
Change-Id: Ie2ff321f78c59913373e2ffb2820297fd423d6f4 Signed-off-by: José Bollo <jose.bollo@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>
2018-12-18afm-unit: Fix http port multi allocationJosé Bollo5-13/+29
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-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-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-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-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-09-17wgtpkg-install: Force uninstallJose Bollo1-0/+11
This commit forces uninstall of the previous installed version instead of reinstall to get around a bug in cynara. Bug-AGL: SPEC-1230 Change-Id: Id29fc59794aed7386e0a32df43f9fbacc25c0863 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-16Add the external binding featureflounder_5.99.3flounder/5.99.35.99.3José Bollo3-0/+30
This commit introduce two new features: <urn:AGL:widget:provided-binding> <param "name"="public-name" "value"="relative-path-to-the-binding"/> <urn:AGL:widget:required-binding> <param "name"="public-name" "value"="extern"> <param "name"="relative-path-to-the-binding" "value"="local"> TODO: manage security by setting correct Smack label to the exported files Bugs-AGL: SPEC-1439 Bugs-AGL: SPEC-1663 Change-Id: I70aad7d523ece7a2ae0058b79708a02ef81144e2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-17wgtpkg-digsig: Add flag to accept/refuse a WGT without signatureJosé Bollo4-7/+14
This flag allows with a single function to check the signature and the case that a not signed widget is to be refused in the same way that the signature is wrong. The CMAKE boolean ALLOW_NO_SIGNATURE can be used to control the default behavior at compile time. By default its value is OFF meaning that install will refuse widgets without signature. Relates to Bug-AGL: SPEC-1590 Change-Id: I403109272759454696a1e5d9913879aaea7676e6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-17wgtpkg-digsig: Fix digital signature checkJosé Bollo1-1/+1
The compute of the return code was wrong: it always returned 0 even in case of error. Installation of a widget with an error in its signature was possible due to this error. Bug-AGL: SPEC-1590 Change-Id: Ibefd74aafd6a00dea32e52d471460cbe08a380ab Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-07wgtpkg-install: Fix SEGV when no icon in config fileflounder_5.99.2flounder/5.99.25.99.2José Bollo1-1/+1
Bug-AGL: SPEC-1573 Change-Id: I891c4edc3a7ded7848fe11cbc3ce3fe429650bf8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14afm-user-daemon: Update to future version of app-framework-binderJosé Bollo1-0/+5
It will become necessarily to perform actions on behlf of the client, not for its own credentials. Change-Id: Ie2f50dd84df8b0b673772575f5c21ebec8a317f8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14wrap-json: sync with upstreamJosé Bollo2-6/+103
Change-Id: Ie4e7e759c9bc2a745835b722c9d26e560608aedb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14afm-binding: use binding api v3José Bollo1-49/+109
Change-Id: Iac5140db95e473dc0954c70b5dc401380450e017 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14afm-user-daemon: Update to binder changes for bindings v3José Bollo1-10/+16
The bindings v3 are now allowed to return an object with errors. To enforce taking that change into account, the signature of the object changed. It implies some change in clients. Change-Id: I810b625c7e3abec8dcce7fba44e3b4d7ac7f5473 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14wrap-json: Update for y/YJosé Bollo2-12/+272
Change-Id: Idca99ad19d5b6cee92ee77e7f5583cb83f5c9c53 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-14afm-udb: refactor add_fields_of_contentjobol1-6/+15
Change-Id: Id59c92e18c7d3ed3fdd0df6dc2d46f64d58bdeee Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-14afm-udb: split read_unit_filejobol1-48/+60
Change-Id: I4189bcc04b0a889d7f83576ea4b535e00a745e22 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-14afm-udb: improve commentjobol1-0/+3
Change-Id: Ibf639ffaccbcbffff367cec6e919cd516064ab9a Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-14afm-binding: fix authorjobol1-1/+1
Change-Id: Iefb2b248b5a9b85b89cd5181b3297fe4390ab149 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-13afm-binding: Review of the permissionsjobol1-22/+49
Change-Id: I1d3a36c69768901f205a47385d124b6483e60638 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-13afm-binding: Improve comment and stringsjobol1-4/+30
Change-Id: Ic70e2abf1301d11b0a610cdf5cfd783d21a5674f Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-04-05CMakeLists: Fix library directoriesjobol1-1/+7
Change-Id: Id9c86eb2385224d657ac69e1b7b5acd07bf6d71d Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-04-05afm-udb: Fix corrupted memoryjobol1-1/+1
Change-Id: Ib78b0843f819f232b05ac45124fe888c784f65d4 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-04-05afm-udb: fix refcounting errorjobol1-2/+2
Change-Id: Ib5a7c398f9f07a88af05b01e08fdab97e123e374 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-02-28afm-user-session: Start target from user sessionJosé Bollo2-13/+10
Start the afm-user-session@%i.target from the user session after pam_sytemd session started. Change-Id: I5aeb8f01426b3cee2cbfad6ba30ecf37fe21abca Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-28Update date of copyright noticesJosé Bollo64-64/+64
Change-Id: Ia4ef2a6e3c07616ccd756933a82f0806844c4faf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Provision argument for handling languageJosé Bollo3-11/+52
The requests 'runnables' and 'detail' accept a parameter 'lang' to -in future- get localized data about apps. Change-Id: I5f1804870c6b3c0d1aedf1a75cde1e2c09a5a605 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-22afm-user-session: Create afm-user-sessionJosé Bollo2-0/+41
This new executable is the simplest user session manager: it waits the signal SIGTERM to stop and thus release the session. Change-Id: I557f27386c19ca3e2b28b21dd6a58918e9ca47be Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-19afm-binding: Allow use of appid instead of runidJosé Bollo3-6/+47
This facility avoid the double call 'ps', 'kill' and allow a single call to 'kill' with the application id. Bug-AGL: SPEC-1189 Change-Id: I71861c06847e855b05dc8294ab1ea6785f555416 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-19afm-binding: Common code getting application idJosé Bollo1-22/+37
Repeated code is made common to the verbs detail, start, once. Change-Id: I9bc15bf22aeb7156d0892e71f56f86f3930866f6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-14wgt-json: Add commentsJosé Bollo1-46/+126
Change-Id: If75c3089c9506219601d35b49c132a9b670c026e Signed-off-by: José Bollo <jose.bollo@iot.bzh>