src/app-framework-main.git
5 years agoAdd ability to manage all widget/applications 80/20780/1 flounder
José Bollo [Tue, 19 Mar 2019 22:21:35 +0000 (23:21 +0100)]
Add ability to manage all widget/applications

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>
5 years agoMerge "docs: add yaml book" into flounder 6.0.4 6.0.5 flounder/6.0.4 flounder/6.0.5 flounder_6.0.4 flounder_6.0.5
Jan-Simon Moeller [Tue, 15 Jan 2019 21:00:14 +0000 (21:00 +0000)]
Merge "docs: add yaml book" into flounder

5 years agodocs: add yaml book 37/19537/1
Frederic Marec [Wed, 9 Jan 2019 14:13:55 +0000 (15:13 +0100)]
docs: add yaml book

Bug-AGL: SPEC-1988

Change-Id: Ic4d933f42ff0b98d997f8cc9504cb2539575a2d4
Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
5 years agoafm-user-setup service: disable start rate limit 29/19529/1
Stephane Desneux [Sun, 6 Jan 2019 14:13:27 +0000 (15:13 +0100)]
afm-user-setup service: disable start rate limit

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>
5 years agoonappid: retrieves the 'appid' with id field 67/18167/1 6.0.3 flounder/6.0.3 flounder_6.0.3
Clément Bénier [Wed, 21 Nov 2018 17:31:51 +0000 (18:31 +0100)]
onappid: retrieves the 'appid' with id field

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>
5 years agoTreat correctly running/not running status 79/17679/1 6.0.2 flounder/6.0.2 flounder_6.0.2
José Bollo [Mon, 5 Nov 2018 17:14:15 +0000 (18:14 +0100)]
Treat correctly running/not running status

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>
5 years agoafm-system-daemon: Improve error message report 09/17609/1
José Bollo [Wed, 31 Oct 2018 13:06:07 +0000 (14:06 +0100)]
afm-system-daemon: Improve error message report

Bug-AGL: SPEC-1872

Change-Id: I6e48baa05312b1490edd38ccf9231afe4aa6eb51
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoafm-util: Fix report of error 41/17541/1
José Bollo [Tue, 30 Oct 2018 20:39:40 +0000 (21:39 +0100)]
afm-util: Fix report of error

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>
5 years agoInstall afm-user-daemon with correct rights 83/17483/1
Jose Bollo [Mon, 29 Oct 2018 14:04:45 +0000 (15:04 +0100)]
Install afm-user-daemon with correct rights

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>
5 years agoafm-urun: Force scan of systemd units 79/17479/1
José Bollo [Sun, 28 Oct 2018 17:53:37 +0000 (18:53 +0100)]
afm-urun: Force scan of systemd units

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>
5 years agowgtpkg-install: Force uninstall 71/16671/1 6.0.0 6.0.1 flounder/6.0.0 flounder/6.0.1 flounder_6.0.0 flounder_6.0.1
Jose Bollo [Mon, 17 Sep 2018 09:06:33 +0000 (11:06 +0200)]
wgtpkg-install: Force uninstall

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>
5 years agoVersion 6.0.0 aka "Funky Flounder" 17/16517/2 5.99.7 flounder/5.99.7 flounder_5.99.7
Jose Bollo [Mon, 10 Sep 2018 07:58:50 +0000 (09:58 +0200)]
Version 6.0.0 aka "Funky Flounder"

Change-Id: If5a213cf0eeb898cd05bc4c51886f7d332cad6d5
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
5 years agoAdd gitreview file for flounder branch
Jan-Simon Möller [Mon, 10 Sep 2018 06:56:28 +0000 (08:56 +0200)]
Add gitreview file for flounder branch

Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
5 years agoVERSION 5.99.FFRC6 77/16477/2 5.99.6 flounder/5.99.6 flounder_5.99.6
Jose Bollo [Thu, 6 Sep 2018 08:55:14 +0000 (10:55 +0200)]
VERSION 5.99.FFRC6

Change-Id: I8239f3e1a81e99b9340865a7c2a468452bab6d94
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
5 years agoSet version to 5.99.FFRC4 27/16227/1 5.99.4 5.99.5 flounder/5.99.4 flounder/5.99.5 flounder_5.99.4 flounder_5.99.5
José Bollo [Wed, 22 Aug 2018 11:52:36 +0000 (13:52 +0200)]
Set version to 5.99.FFRC4

Change-Id: I2c473cf1dbfc5bed738c9733694c833f12312a7b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoAdd the external binding feature 85/15985/3 5.99.3 flounder/5.99.3 flounder_5.99.3
José Bollo [Thu, 2 Aug 2018 16:48:57 +0000 (18:48 +0200)]
Add the external binding feature

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>
5 years agoCreates systemd service for APIs 57/15457/3
José Bollo [Thu, 19 Jul 2018 09:29:36 +0000 (11:29 +0200)]
Creates systemd service for APIs

Before this change, APIs were only provided as binder's
exported websockets. This forbade ability to use symbolic
links.

Allowing links is interesting for having platform sockets
and for linked api (not using socket).

The API afm-main is a platform API. It must run at system level
and must be available for all user clients. To achieve it, we
use a link.

Bug-AGL: SPEC-1592

Change-Id: I8753f83373755eb7fc2d2cc50251b8f738b61b03
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agowgtpkg-digsig: Add flag to accept/refuse a WGT without signature 23/15423/3
José Bollo [Tue, 17 Jul 2018 09:14:06 +0000 (11:14 +0200)]
wgtpkg-digsig: Add flag to accept/refuse a WGT without signature

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>
5 years agowgtpkg-digsig: Fix digital signature check 21/15421/2
José Bollo [Tue, 17 Jul 2018 08:42:04 +0000 (10:42 +0200)]
wgtpkg-digsig: Fix digital signature check

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>
5 years agoSet version to 5.99.FFRC3 19/15419/2
José Bollo [Tue, 17 Jul 2018 08:35:25 +0000 (10:35 +0200)]
Set version to 5.99.FFRC3

Change-Id: I5866cac1009e1c784c7a59a7892aca6aba14f257
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agowgtpkg-install: Fix SEGV when no icon in config file 95/15095/1 5.99.2 flounder/5.99.2 flounder_5.99.2
José Bollo [Sat, 7 Jul 2018 16:13:39 +0000 (18:13 +0200)]
wgtpkg-install: Fix SEGV when no icon in config file

Bug-AGL: SPEC-1573

Change-Id: I891c4edc3a7ded7848fe11cbc3ce3fe429650bf8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoUpdate version to 5.99.FFRC2 49/15049/1
José Bollo [Thu, 5 Jul 2018 18:42:59 +0000 (20:42 +0200)]
Update version to 5.99.FFRC2

Change-Id: I387ae7b6dd2e32b8072910e01e615b4cf4247ba3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoMerge changes from topic 'binding-v3' 5.99.1 flounder/5.99.1 flounder_5.99.1
José Bollo [Fri, 15 Jun 2018 07:35:28 +0000 (07:35 +0000)]
Merge changes from topic 'binding-v3'

* changes:
  afm-user-daemon: Update to future version of app-framework-binder
  wrap-json: sync with upstream
  afm-binding: use binding api v3
  gitignore: Ignore NetBean project
  afm-user-daemon: Update to binder changes for bindings v3

5 years agoMerge changes from topic 'binding-v3'
José Bollo [Thu, 14 Jun 2018 13:23:02 +0000 (13:23 +0000)]
Merge changes from topic 'binding-v3'

* changes:
  wrap-json: Update for y/Y
  afm-udb: refactor add_fields_of_content
  afm-udb: split read_unit_file
  afm-udb: improve comment
  afm-binding: fix author

5 years agoafm-user-daemon: Update to future version of app-framework-binder 89/14389/2
José Bollo [Fri, 1 Jun 2018 05:35:02 +0000 (07:35 +0200)]
afm-user-daemon: Update to future version of app-framework-binder

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>
5 years agowrap-json: Update for y/Y 79/14379/2
José Bollo [Tue, 15 May 2018 07:25:16 +0000 (09:25 +0200)]
wrap-json: Update for y/Y

Change-Id: Idca99ad19d5b6cee92ee77e7f5583cb83f5c9c53
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agowrap-json: sync with upstream 87/14387/2
José Bollo [Tue, 29 May 2018 17:39:40 +0000 (19:39 +0200)]
wrap-json: sync with upstream

Change-Id: Ie4e7e759c9bc2a745835b722c9d26e560608aedb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoafm-udb: refactor add_fields_of_content 77/14377/2
jobol [Tue, 3 Apr 2018 13:10:28 +0000 (15:10 +0200)]
afm-udb: refactor add_fields_of_content

Change-Id: Id59c92e18c7d3ed3fdd0df6dc2d46f64d58bdeee
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoafm-binding: use binding api v3 85/14385/2
José Bollo [Thu, 24 May 2018 13:56:44 +0000 (15:56 +0200)]
afm-binding: use binding api v3

Change-Id: Iac5140db95e473dc0954c70b5dc401380450e017
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoafm-udb: split read_unit_file 75/14375/2
jobol [Tue, 3 Apr 2018 10:09:36 +0000 (12:09 +0200)]
afm-udb: split read_unit_file

Change-Id: I4189bcc04b0a889d7f83576ea4b535e00a745e22
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agogitignore: Ignore NetBean project 83/14383/2
jobol [Wed, 23 May 2018 07:47:09 +0000 (09:47 +0200)]
gitignore: Ignore NetBean project

Change-Id: I22de627ab121fa83ea68896f413d649f2f72d455
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoafm-udb: improve comment 73/14373/2
jobol [Tue, 3 Apr 2018 10:08:03 +0000 (12:08 +0200)]
afm-udb: improve comment

Change-Id: Ibf639ffaccbcbffff367cec6e919cd516064ab9a
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoafm-user-daemon: Update to binder changes for bindings v3 81/14381/2
José Bollo [Tue, 22 May 2018 16:47:22 +0000 (18:47 +0200)]
afm-user-daemon: Update to binder changes for bindings v3

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>
5 years agoafm-binding: fix author 71/14371/2
jobol [Tue, 3 Apr 2018 08:27:09 +0000 (10:27 +0200)]
afm-binding: fix author

Change-Id: Iefb2b248b5a9b85b89cd5181b3297fe4390ab149
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoMerge changes from topic 'binding-v3'
José Bollo [Thu, 14 Jun 2018 13:14:02 +0000 (13:14 +0000)]
Merge changes from topic 'binding-v3'

* changes:
  afm-binding: Review of the permissions
  afm-binding: Improve comment and strings

5 years agoMerge "afm-system-daemon.service: Fix a typo"
José Bollo [Thu, 14 Jun 2018 13:12:23 +0000 (13:12 +0000)]
Merge "afm-system-daemon.service: Fix a typo"

5 years agoafm-binding: Review of the permissions 69/14369/1
jobol [Mon, 26 Mar 2018 12:25:02 +0000 (14:25 +0200)]
afm-binding: Review of the permissions

Change-Id: I1d3a36c69768901f205a47385d124b6483e60638
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoafm-binding: Improve comment and strings 67/14367/1
jobol [Mon, 26 Mar 2018 12:24:33 +0000 (14:24 +0200)]
afm-binding: Improve comment and strings

Change-Id: Ic70e2abf1301d11b0a610cdf5cfd783d21a5674f
Signed-off-by: jobol <jose.bollo@iot.bzh>
5 years agoafm-system-daemon.service: Fix a typo 65/14365/1
José Bollo [Thu, 24 May 2018 14:42:10 +0000 (16:42 +0200)]
afm-system-daemon.service: Fix a typo

Change-Id: I30c22bf90242035285ee12f3bc0db73d7fe31595
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoafm-system-daemon.service: Fix a typo 85/14085/1
José Bollo [Thu, 24 May 2018 14:42:10 +0000 (16:42 +0200)]
afm-system-daemon.service: Fix a typo

Change-Id: If9dcd49edad5a34ea9c7bdfcba7d7bc44bbafbeb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoCMakeLists: Fix library directories
jobol [Tue, 3 Apr 2018 11:58:13 +0000 (13:58 +0200)]
CMakeLists: Fix library directories

Change-Id: Id9c86eb2385224d657ac69e1b7b5acd07bf6d71d
Signed-off-by: jobol <jose.bollo@iot.bzh>
6 years agoafm-udb: Fix corrupted memory
jobol [Tue, 3 Apr 2018 12:46:15 +0000 (14:46 +0200)]
afm-udb: Fix corrupted memory

Change-Id: Ib78b0843f819f232b05ac45124fe888c784f65d4
Signed-off-by: jobol <jose.bollo@iot.bzh>
6 years agoafm-udb: fix refcounting error
jobol [Tue, 3 Apr 2018 10:09:08 +0000 (12:09 +0200)]
afm-udb: fix refcounting error

Change-Id: Ib5a7c398f9f07a88af05b01e08fdab97e123e374
Signed-off-by: jobol <jose.bollo@iot.bzh>
6 years agoRefactor user session management
José Bollo [Wed, 28 Feb 2018 19:07:23 +0000 (20:07 +0100)]
Refactor user session management

Change-Id: Ib6ba886df110d8a23e3760e1818263ec757b9c7c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoprovided.inc: Fix smack label of sockets
José Bollo [Tue, 27 Feb 2018 18:32:15 +0000 (19:32 +0100)]
provided.inc: Fix smack label of sockets

Change-Id: I53d3cac7136e4d169acd8e3e3de5ea8439dd0192
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-user-session: Start target from user session
José Bollo [Tue, 27 Feb 2018 18:15:28 +0000 (19:15 +0100)]
afm-user-session: Start target from user session

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>
6 years agoUpdate date of copyright notices
José Bollo [Tue, 27 Feb 2018 14:10:08 +0000 (15:10 +0100)]
Update date of copyright notices

Change-Id: Ia4ef2a6e3c07616ccd756933a82f0806844c4faf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdd configuration variables for runtime socket dirs
José Bollo [Tue, 27 Feb 2018 14:07:54 +0000 (15:07 +0100)]
Add configuration variables for runtime socket dirs

2 new configuration variables:

 - afm_platform_rundir  (default /run/platform)

     Path to location of platform runtime sockets

 - afm_users_rundir     (default /run/user)

     Path to location of users runtime sockets

Change-Id: I65007fee1ca2ce6f1247a67ba0b121f97c08f209
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoProvision argument for handling language
José Bollo [Tue, 27 Feb 2018 11:02:36 +0000 (12:02 +0100)]
Provision argument for handling language

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>
6 years agoafm-user-session: Create afm-user-session
José Bollo [Mon, 22 Jan 2018 09:07:42 +0000 (10:07 +0100)]
afm-user-session: Create afm-user-session

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>
6 years agoBump version to 5.99-FFRC0
José Bollo [Fri, 19 Jan 2018 09:16:14 +0000 (10:16 +0100)]
Bump version to 5.99-FFRC0

Change-Id: I255b669036672b3728f0e60a62eca90716367178

6 years agoafm-binding: Allow use of appid instead of runid
José Bollo [Mon, 18 Dec 2017 11:26:41 +0000 (12:26 +0100)]
afm-binding: Allow use of appid instead of runid

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>
6 years agoafm-binding: Common code getting application id
José Bollo [Mon, 18 Dec 2017 11:23:35 +0000 (12:23 +0100)]
afm-binding: Common code getting application id

Repeated code is made common to the verbs
detail, start, once.

Change-Id: I9bc15bf22aeb7156d0892e71f56f86f3930866f6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agodocs: Add an history
José Bollo [Thu, 14 Dec 2017 11:27:37 +0000 (12:27 +0100)]
docs: Add an history

Change-Id: Ib7ea7aa11c63492fe874368e3a0d539ab613a2a0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agowgt-json: Add comments
José Bollo [Thu, 14 Dec 2017 10:59:00 +0000 (11:59 +0100)]
wgt-json: Add comments

Change-Id: If75c3089c9506219601d35b49c132a9b670c026e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoUpdate of src/README.md
José Bollo [Thu, 14 Dec 2017 10:58:25 +0000 (11:58 +0100)]
Update of src/README.md

Change-Id: Id806a36fbc58df8dccb89f02fa86575c2aafd63e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agogendocs.sh: Fix tabulations
José Bollo [Thu, 14 Dec 2017 09:48:57 +0000 (10:48 +0100)]
gendocs.sh: Fix tabulations

Change-Id: If9b06695c874f861859793b621264121d2152f11
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agomkdocs: Restore mkdocs feature
José Bollo [Mon, 11 Dec 2017 17:18:58 +0000 (18:18 +0100)]
mkdocs: Restore mkdocs feature

Change-Id: Iac70ac21a0d88e973aa5859a692515d4e683b2c9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Fix Smack permission on api ws
José Bollo [Mon, 11 Dec 2017 12:55:10 +0000 (13:55 +0100)]
unit.conf: Fix Smack permission on api ws

The Smack permission to write on the websocket of the API
must be set to something that allows the communication!

Here the chosen value is *

Change-Id: Ia276219b232e33bd35353d8feb333513b340e75c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agodocs: identify revision file
José Bollo [Fri, 8 Dec 2017 12:37:30 +0000 (13:37 +0100)]
docs: identify revision file

Change-Id: Iae13361c16b056f8619a9a75a08ae63d66f85daf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoClean unused afm-main-binding... files
José Bollo [Fri, 8 Dec 2017 12:05:48 +0000 (13:05 +0100)]
Clean unused afm-main-binding... files

Change-Id: Ifc8da473e3454f10bfd1aad2500db579a732b43e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRemove deprecated file afm.h
José Bollo [Fri, 8 Dec 2017 09:44:43 +0000 (10:44 +0100)]
Remove deprecated file afm.h

Change-Id: Ie524342b69d386c2d6f667dde7cde0d68a0d29c8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.cont: Refactor PATH and LD_LIBRARY_PATH
jobol [Thu, 7 Dec 2017 15:49:03 +0000 (16:49 +0100)]
unit.cont: Refactor PATH and LD_LIBRARY_PATH

Change-Id: Ic6da02c0039421fd5656238f5fa812574af1c268
Signed-off-by: jobol <jose.bollo@iot.bzh>
6 years agosimplify afm-user-session process
José Bollo [Fri, 24 Nov 2017 15:34:42 +0000 (16:34 +0100)]
simplify afm-user-session process

Change-Id: If2739fd2c5a19d7cd31e117e1e79c0b51451552b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoImprove afm-user-session setup
José Bollo [Fri, 24 Nov 2017 08:33:43 +0000 (09:33 +0100)]
Improve afm-user-session setup

Change-Id: I4dfb0939afc871e93874cf021548db2e85d3656c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAvoid implicit Before socket.target
José Bollo [Thu, 23 Nov 2017 21:52:46 +0000 (22:52 +0100)]
Avoid implicit Before socket.target

Change-Id: I493c49a80ebb1fa85f586d0b0704b5682f0c3613
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoConfig for afm-user-session
José Bollo [Thu, 23 Nov 2017 21:30:53 +0000 (22:30 +0100)]
Config for afm-user-session

Change-Id: I6567b58fa0a6dd17deba4c7cccbf3b9f441730eb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-user-startup.service: Fix type
José Bollo [Thu, 23 Nov 2017 16:21:00 +0000 (17:21 +0100)]
afm-user-startup.service: Fix type

Change-Id: I8ecddbc5be346441f002ef8c50dd733fec0e6ef2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Fix target name
José Bollo [Thu, 23 Nov 2017 16:19:36 +0000 (17:19 +0100)]
unit.conf: Fix target name

Change-Id: I144bcd47b65b86dd07ca5de71514a0032166b3a6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdd a PAM config file
José Bollo [Thu, 23 Nov 2017 15:14:56 +0000 (16:14 +0100)]
Add a PAM config file

Change-Id: I27f726cd3cec7c0e499086c5ac3de1a736ef108c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRework on systemd start of user sessions
José Bollo [Thu, 23 Nov 2017 14:44:24 +0000 (15:44 +0100)]
Rework on systemd start of user sessions

Change-Id: Iad46596435eebdc5c521b572fd8320b52a61d197
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-binding: Fix bug in evaluation of runid
José Bollo [Thu, 23 Nov 2017 13:38:54 +0000 (14:38 +0100)]
afm-binding: Fix bug in evaluation of runid

Change-Id: I7a87a75d2effb7ad959b7a5c495402701f505529
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Bound start to agl-user-session
José Bollo [Tue, 21 Nov 2017 13:58:00 +0000 (14:58 +0100)]
unit.conf: Bound start to agl-user-session

Change-Id: Ic9731dbc9ee71872198ad70995dbaced8a7aa683
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Remove unset of capabilities
José Bollo [Tue, 21 Nov 2017 10:39:44 +0000 (11:39 +0100)]
unit.conf: Remove unset of capabilities

Remove the unsetting of capabilities because it
currently breaks the image. To be reworked.

Change-Id: I69a1d9c23f463a36edebb7993aa94fae14fb60e8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: binder's service of type notify
José Bollo [Mon, 20 Nov 2017 15:08:19 +0000 (16:08 +0100)]
unit.conf: binder's service of type notify

Change-Id: Ibb80974c65f48d7473b8aa56604154bf70a49e14
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Fix remaining %t
José Bollo [Mon, 20 Nov 2017 15:07:09 +0000 (16:07 +0100)]
unit.conf: Fix remaining %t

Change-Id: If9c1c0d8b805e7de6490c75f0465d3455e84eb36
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-util: don't reload if afm-install
José Bollo [Fri, 17 Nov 2017 09:08:25 +0000 (10:08 +0100)]
afm-util: don't reload if afm-install

Change-Id: I5c73d80ee2dd02a8d7260e8dcd5f52e8ef84b34b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agogenconf: set filetype and syntax
José Bollo [Fri, 17 Nov 2017 08:39:36 +0000 (09:39 +0100)]
genconf: set filetype and syntax

Change-Id: Ibcff5a513c4559c84ddfca1ef9449b1eff544006
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: Fix missing @ in service name
José Bollo [Fri, 17 Nov 2017 07:53:57 +0000 (08:53 +0100)]
afm-unit.conf: Fix missing @ in service name

Regression introduced by commit:
 c7db705 Generate afm-unit.conf using m4

Change-Id: Ibeeaf14b697e79cb2a95154b50b2ac775f93d529
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-util/install: use of web socket connection
José Bollo [Thu, 16 Nov 2017 16:38:26 +0000 (17:38 +0100)]
afm-util/install: use of web socket connection

Change-Id: I8bda689a377d676c4b190e1b54cdc115006c9829
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agowgtpkg-unit: remove metadata.app-data-dir variable
José Bollo [Thu, 16 Nov 2017 11:51:41 +0000 (12:51 +0100)]
wgtpkg-unit: remove metadata.app-data-dir variable

Change-Id: I51cbbad8ecdc371f457a008808c8c0f63501ac2b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-udb: add comments
José Bollo [Thu, 16 Nov 2017 10:59:06 +0000 (11:59 +0100)]
afm-udb: add comments

Change-Id: I03d560a8fca3a064fa526afb55c951062fa7a78e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoGenerate afm-unit.conf using m4
José Bollo [Wed, 15 Nov 2017 15:20:28 +0000 (16:20 +0100)]
Generate afm-unit.conf using m4

The use of m4 to generate the afm-unit.conf and
afm-unit-debug.conf files has benefits:

 - the sync between debug versus not debug is mechanical

 - it allows easier maintainance by improving readability
   and writability (ex: macros TARGET or UNIT_NAME_BASE)

Change-Id: Ic0427bedf4f8a5b174318562336603077f174fa5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: remove invocation of PAM
José Bollo [Mon, 16 Oct 2017 16:50:31 +0000 (18:50 +0200)]
afm-unit.conf: remove invocation of PAM

Change-Id: I2b446907b0c68b3bdb1c59227427e237f429ed8e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: Add XDG dirs definitions
José Bollo [Fri, 13 Oct 2017 14:06:42 +0000 (16:06 +0200)]
afm-unit.conf: Add XDG dirs definitions

Change-Id: I40d73de059e955256d90ca7831870815c7d90481
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: Add slice indication
José Bollo [Fri, 13 Oct 2017 14:06:18 +0000 (16:06 +0200)]
afm-unit.conf: Add slice indication

Change-Id: I50c2166ffab106988fa4ac1e68c14ea56c5b3145
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-binding: Restore previous return for 'start'
José Bollo [Fri, 13 Oct 2017 13:30:38 +0000 (15:30 +0200)]
afm-binding: Restore previous return for 'start'

Change-Id: I28cd41391d207b59d74d2ff661e5981b9947c716
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoDon't rely on features available for user units
José Bollo [Thu, 12 Oct 2017 20:47:07 +0000 (22:47 +0200)]
Don't rely on features available for user units

Change-Id: I117b8de2eec6cba9f475e18b794f90347bc184f8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAvoid polkit and bug
José Bollo [Thu, 12 Oct 2017 20:45:45 +0000 (22:45 +0200)]
Avoid polkit and bug

Accessing systemd/system with DBUS from
a user not root make systemd use polkit.
It doesn't work for us because:
 - at the end systemd crashes (sigsegv)
 - we don't want polkit here

Change-Id: I206edd108b8b659c8c6a3a68f61500cb114995d4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoremove secure-bit directives
José Bollo [Thu, 12 Oct 2017 20:43:05 +0000 (22:43 +0200)]
remove secure-bit directives

Doesn't work after dropping capabilities!

Change-Id: I748a8de9bb04006c14cba09cc6c4469da06c1b5d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agobug fixes and improvements
José Bollo [Thu, 12 Oct 2017 20:42:00 +0000 (22:42 +0200)]
bug fixes and improvements

Change-Id: I2fc3de0a84e471e8e87f43170c20f8d6d0d05fdc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoprovide access to systemd system
José Bollo [Thu, 12 Oct 2017 20:40:35 +0000 (22:40 +0200)]
provide access to systemd system

Change-Id: I1e3d2dc780a1449f2bfc894baa1f26a94be61cd8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRestore compilation of native-sdk
José Bollo [Thu, 12 Oct 2017 20:39:51 +0000 (22:39 +0200)]
Restore compilation of native-sdk

Change-Id: I3855854407ad47c2b9a2288b8425513de5ae94d3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRemove afm-system-daemon
José Bollo [Thu, 12 Oct 2017 08:58:40 +0000 (10:58 +0200)]
Remove afm-system-daemon

Change-Id: I1e6c0488b7183724a65fcc06fd3cf6909e0efd53
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agourun/udb: integration of user UID
José Bollo [Wed, 11 Oct 2017 20:43:41 +0000 (22:43 +0200)]
urun/udb: integration of user UID

Managing user applications at the system
levels requires to manage the user application
in a single process.

This process must manage the user identity
(UID).

Change-Id: I1ce8c9ca66ed0f916ecb2931ae014b08b113fa23
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-user-daemon: rewriten to use direct API
José Bollo [Wed, 11 Oct 2017 15:33:27 +0000 (17:33 +0200)]
afm-user-daemon: rewriten to use direct API

The coming version of afm-system-daemon will no
more use DBUS but will provide a websocket API.

Change-Id: I5ff0488ff5ec5b2b9a193d869efe8a9c5896516f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-binding: provide afm as a unique binding
José Bollo [Mon, 7 Aug 2017 15:20:37 +0000 (17:20 +0200)]
afm-binding: provide afm as a unique binding

This is the first stone (not fully tested) to
implment the afm-main as a binding. At the end,
this component will replace afm-user-daemon and
afm-system-daemon.

Change-Id: I6eafa7d26800f45ae58dd51aa9ff8008cdb3ff59
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoutils-systemd: Offer way to set systemd's buses
José Bollo [Wed, 11 Oct 2017 13:28:43 +0000 (15:28 +0200)]
utils-systemd: Offer way to set systemd's buses

Change-Id: I8035c10e8f769b7912046b432d43f97297c039b2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-udb: keep looking at valid units
José Bollo [Tue, 10 Oct 2017 15:09:14 +0000 (17:09 +0200)]
afm-udb: keep looking at valid units

Returning an error when a unit is not valid has
drawbacks. With this commit, bogus units are
ignored. The benefit is to be able of using valid
units instead of using none because in the previous
case, all the DB was cancelled.

Change-Id: Id1e4d6d5efd4af7e118b9d549238bd5e3d6c52d7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: Removes capabilities of applications
José Bollo [Tue, 10 Oct 2017 09:05:36 +0000 (11:05 +0200)]
afm-unit.conf: Removes capabilities of applications

Change-Id: I081e8a8f9ea344d47ae007a4d6c9e72663f82fcf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>