src/app-framework-main.git
4 years agoEnsure home and workir to widget of scope-platform 58/23358/1 8.99.3 icefish/8.99.3 icefish_8.99.3
José Bollo [Fri, 13 Dec 2019 15:47:45 +0000 (16:47 +0100)]
Ensure home and workir to widget of scope-platform

The widget requesting the permission to run at
platform scope: urn:AGL:permission::partner:scope-platform
should be able to record data and state.
This change provides a default place to achieve it.

Bug-AGL: SPEC-2998

Change-Id: I148a670d3e08e36603ebd318b533ea1e1a695750
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoIntroduce localuser interface for applications 46/23146/1 8.99.2 icefish/8.99.2 icefish_8.99.2
José Bollo [Tue, 3 Dec 2019 14:04:02 +0000 (15:04 +0100)]
Introduce localuser interface for applications

This change make use of nss-localuser hostname
family (see https://git.automotivelinux.org/src/nss-localuser/)
to separate applications and users, each running its
own IP address and hostname.

The intended behaviour is to use existing browser policy to
ensure privacy of applications and users.

Bug-AGL: SPEC-2968

Change-Id: Ie1a3c7331fd43e8747afae2cd338df461bac1454
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoEnforce numeric application IDs 45/23145/1
José Bollo [Tue, 3 Dec 2019 14:02:57 +0000 (15:02 +0100)]
Enforce numeric application IDs

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>
4 years agoRemove tokens 44/23144/1
José Bollo [Tue, 3 Dec 2019 13:54:48 +0000 (14:54 +0100)]
Remove tokens

Tokens are no more managed by the binder.

Bug-AGL: SPEC-2968

Change-Id: Iabcbc6e900811cd88729f007bb16ba493d0c0651
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agowgtpkg-install: Add default permissions 43/23143/1
José Bollo [Tue, 26 Nov 2019 20:27:44 +0000 (21:27 +0100)]
wgtpkg-install: Add default permissions

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>
4 years agoAdd discovery of API 90/22590/4 8.99.1 icefish/8.99.1 icefish_8.99.1
José Bollo [Tue, 8 Oct 2019 17:05:39 +0000 (19:05 +0200)]
Add discovery of API

This change allows binders to use API not declared in
the config.xml file.

This behaviour is allowed by the platform permission

    urn:AGL:permission::platform:apis:auto-ws

It allows a binding to use started bindings not listed
in their config.xml file. But it does not allow to start
them or to discover them.

Bug-AGL: SPEC-2871

Change-Id: Iff0ec8417541171d446254e538201b7f6c7887ea
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoAdd WAIT_FOR_HOST_SERVICE envvar to unit files for webapps 59/22559/2
Jacobo Aragunde Pérez [Wed, 2 Oct 2019 20:44:54 +0000 (22:44 +0200)]
Add WAIT_FOR_HOST_SERVICE envvar to unit files for webapps

This envvar will make the application launcher wait for the WebAppMgr
service to be fully running before attempting to launch the app.
Otherwise, launcher would resort to running the app in standalone
mode, which would conflict with the WebAppMgr service when it's
finally running.

It will be useful for webapps that are auto-started, like the future
homescreen or the html5-launcher.

Bug-AGL: SPEC-2793

Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Change-Id: I97f927c856b0dd2643f8b7492dff06b2c459761d

4 years agoconf/system: fix shebang not absolute. 88/22588/1
Romain Forlot [Tue, 8 Oct 2019 08:36:24 +0000 (10:36 +0200)]
conf/system: fix shebang not absolute.

Wrong shebang in some shell script prevents packaging to ends correctly.

Bugs-AGL: SPEC-2863

Change-Id: I63ae56ddc88f9f9dfa0734efff69c26c87800a07
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
4 years agoRevert "Make source files relative" 20/22420/1
José Bollo [Fri, 13 Sep 2019 11:36:45 +0000 (13:36 +0200)]
Revert "Make source files relative"

This reverts commit 37d9652ee0011eff9346a54c33bd459b53e29d0f.

Revert looks good because the issue has to be adressed by
the build environment.

Bug-AGL: SPEC-2801

Change-Id: I51cd51344fc6c6d602f6636c2ffe3af094a78c52
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoMake source files relative 75/22375/1
José Bollo [Tue, 10 Sep 2019 15:08:19 +0000 (17:08 +0200)]
Make source files relative

It is intended to enhance reproducibility
of produced binaries as unmeaning prefixes
are removed.

Bug-AGL: SPEC-2801

Change-Id: Ic406e4477e47c313757c00932db0f129e1d3d01f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoMerge "afm-user-daemon: Remove it by default" 7.99.2 7.99.3 8.0.0 halibut/7.99.2 halibut/7.99.3 halibut/8.0.0 halibut_7.99.2 halibut_7.99.3 halibut_8.0.0
Jan-Simon Moeller [Wed, 19 Jun 2019 13:07:20 +0000 (13:07 +0000)]
Merge "afm-user-daemon: Remove it by default"

4 years agoFix synchronisation of user setup 44/21644/1
José Bollo [Thu, 6 Jun 2019 10:11:14 +0000 (12:11 +0200)]
Fix synchronisation of user setup

The user setup takes care of populating correctly the
directory /run/user/UID with needed items BEFORE
user services start.

Bug-AGL: SPEC-1015

Change-Id: I6f942d73bf241d593c960dbf3bc6a038f1746fe0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoIntroduce platform services 43/21643/1
José Bollo [Wed, 15 May 2019 18:49:14 +0000 (20:49 +0200)]
Introduce platform services

The platform services are services that run
at the global platform scope as opposite to
services that run in the context of the user.

Bug-AGL: SPEC-1015

Change-Id: I08c2d47715cbc7436e67781d5e638386be531520
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoIntroduce dbus config of services 42/21642/1
José Bollo [Tue, 4 Jun 2019 11:20:34 +0000 (13:20 +0200)]
Introduce dbus config of services

The files conf/dbus/afm-permissions-*.conf
are introduced to grant the permission to
access specific services.

At the moment the same permission is used:

  http://tizen.org/privilege/internal/dbus

But the idea is to replace it by a set of
different permissions.

Bug-AGL: SPEC-1016

Change-Id: Ide54e7fd9ae328ff17a877e4ec04b18ad32fb899
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoafm-user-daemon: Remove it by default 41/21641/1
José Bollo [Thu, 23 May 2019 16:38:45 +0000 (18:38 +0200)]
afm-user-daemon: Remove it by default

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>
4 years agoafm-user-daemon: Remove it by default 86/21486/1
José Bollo [Thu, 23 May 2019 16:38:45 +0000 (18:38 +0200)]
afm-user-daemon: Remove it by default

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: I164de87dd006570671543204dab5233fca40e538
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
4 years agoafm-unit.conf: Refactor its generation 00/21400/2
José Bollo [Wed, 15 May 2019 18:49:14 +0000 (20:49 +0200)]
afm-unit.conf: Refactor its generation

The process of generating the file /etc/afm-unit.conf
had be reworked to be more straight forward.

Before that commit, a manual operation (a "make") had
to be done before committing the repository. This was
not efficient, error prone and kept temporary files in
conf.

That commit changes it by calling m4 through cmake.

Bug-AGL: SPEC-2436

Change-Id: Ia32a810286471dde8a01387d157e33277d67411d
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
4 years agoMerge "gitignore: Add ignore of EXTERNALSRC's artifacts"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "gitignore: Add ignore of EXTERNALSRC's artifacts"

4 years agoMerge "afm-unit.conf: cleanup of generation"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "afm-unit.conf: cleanup of generation"

4 years agoMerge "afm-unit: Simplify the Makefile"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "afm-unit: Simplify the Makefile"

4 years agoMerge "afm-user-session: moves in libexec directory"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "afm-user-session: moves in libexec directory"

4 years agoMerge "afm-unit conf: Remove useless tests"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "afm-unit conf: Remove useless tests"

4 years agoMerge "Use definition of afm_prefix"
José Bollo [Mon, 3 Jun 2019 16:06:29 +0000 (16:06 +0000)]
Merge "Use definition of afm_prefix"

4 years agogitignore: Add ignore of EXTERNALSRC's artifacts 99/21399/1
José Bollo [Fri, 17 May 2019 15:32:31 +0000 (17:32 +0200)]
gitignore: Add ignore of EXTERNALSRC's artifacts

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>
4 years agoafm-unit.conf: cleanup of generation 98/21398/1
José Bollo [Thu, 16 May 2019 07:13:59 +0000 (09:13 +0200)]
afm-unit.conf: cleanup of generation

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>
4 years agoafm-unit: Simplify the Makefile 97/21397/1
José Bollo [Wed, 15 May 2019 15:38:08 +0000 (17:38 +0200)]
afm-unit: Simplify the Makefile

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>
4 years agoafm-user-session: moves in libexec directory 96/21396/1
José Bollo [Wed, 15 May 2019 15:17:41 +0000 (17:17 +0200)]
afm-user-session: moves in libexec directory

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>
4 years agoafm-unit conf: Remove useless tests 95/21395/1
José Bollo [Wed, 15 May 2019 13:20:49 +0000 (15:20 +0200)]
afm-unit conf: Remove useless tests

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>
4 years agoUse definition of afm_prefix 94/21394/1
José Bollo [Wed, 15 May 2019 11:55:45 +0000 (13:55 +0200)]
Use definition of afm_prefix

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>
4 years agoRemove unused definitions 93/21393/1
José Bollo [Wed, 15 May 2019 11:53:42 +0000 (13:53 +0200)]
Remove unused definitions

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>
4 years agoRefactor of system and user setup 05/21305/2 7.99.1 halibut/7.99.1 halibut_7.99.1
José Bollo [Fri, 3 May 2019 16:43:21 +0000 (18:43 +0200)]
Refactor of system and user setup

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>
4 years agoFix outdated application path. 02/21302/1
Li Xiaoming [Tue, 14 May 2019 02:34:14 +0000 (10:34 +0800)]
Fix outdated application path.

Bug-AGL: SPEC-2360

Change-Id: I7907f8433cfdaf269004d6bc667f082a009b5cbd
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
4 years agoAllow setting of libexec location 99/21199/1
José Bollo [Tue, 30 Apr 2019 08:00:35 +0000 (10:00 +0200)]
Allow setting of libexec location

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>
4 years agoafm-unit: Restore removal of capabilities 56/21156/2
José Bollo [Mon, 10 Dec 2018 07:07:39 +0000 (08:07 +0100)]
afm-unit: Restore removal of capabilities

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>
5 years agoAPI Reference Overview: Removed old "kristi" file, updated book 72/21072/1
Scott Rifenbark [Wed, 17 Apr 2019 17:37:59 +0000 (10:37 -0700)]
API Reference Overview: Removed old "kristi" file, updated book

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>
5 years agoAPI Overview: Changes to the file that introduces APIs. 18/21018/2
Scott Rifenbark [Wed, 20 Feb 2019 18:27:57 +0000 (10:27 -0800)]
API Overview: Changes to the file that introduces APIs.

Updates to wording.

Change-Id: If91bfd17f786f39a2feedb70919af959222b59ff
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
5 years agoafm-util: Remove legacy commands stop/resume 65/20965/1
José Bollo [Tue, 9 Apr 2019 15:15:57 +0000 (17:15 +0200)]
afm-util: Remove legacy commands stop/resume

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>
5 years agoafm-unit.conf: Add widget specific environment 42/20842/1
José Bollo [Thu, 28 Mar 2019 10:36:05 +0000 (11:36 +0100)]
afm-unit.conf: Add widget specific environment

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>
5 years agoAdd ability to manage all widget/applications 61/20761/1
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 agoUpdate date in copyrights 75/19975/1 sandbox/scottrif29/scottdocs
José Bollo [Thu, 7 Feb 2019 08:54:09 +0000 (09:54 +0100)]
Update date in copyrights

Change-Id: Ie2ff321f78c59913373e2ffb2820297fd423d6f4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoSet version to 8.0.0 73/19973/1
José Bollo [Thu, 7 Feb 2019 08:41:48 +0000 (09:41 +0100)]
Set version to 8.0.0

Change-Id: If6524976b05ab104acee52f0cce1a7feea5e9d48
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoRevert "afm-unit: Restore removal of capabilities" 63/19963/2 7.90.0 halibut/7.90.0 halibut_7.90.0
Stephane Desneux [Wed, 6 Feb 2019 16:31:14 +0000 (17:31 +0100)]
Revert "afm-unit: Restore removal of capabilities"

This reverts commit f2a2f1357a5268b614528feeba0a91f4ea04a7aa.

Change-Id: I7ff68f27b75c9ddb887470c5579e7b9277aa3613
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
5 years agowgtpkg-unit: Fix Segmentation fault 57/19957/1
Jose Bollo [Wed, 6 Feb 2019 15:11:42 +0000 (16:11 +0100)]
wgtpkg-unit: Fix Segmentation fault

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>
5 years agowgtpkg-pack: Ensure packing relative files 55/19955/1
Jose Bollo [Wed, 6 Feb 2019 14:07:56 +0000 (15:07 +0100)]
wgtpkg-pack: Ensure packing relative files

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>
5 years agowgtpkg-zip: Ensure zip will not complain 53/19953/1
Jose Bollo [Wed, 6 Feb 2019 13:29:11 +0000 (14:29 +0100)]
wgtpkg-zip: Ensure zip will not complain

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>
5 years agoafm-user-setup service: disable start rate limit 17/19517/1 6.99.4 guppy/6.99.4 guppy_6.99.4
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 agoMerge "Revert "afm-unit: add autoapi in required-api feature"" 6.99.3 guppy/6.99.3 guppy_6.99.3
Jan-Simon Moeller [Thu, 20 Dec 2018 21:17:45 +0000 (21:17 +0000)]
Merge "Revert "afm-unit: add autoapi in required-api feature""

5 years agoRevert "afm-unit: add autoapi in required-api feature" 97/19297/1
José Bollo [Thu, 20 Dec 2018 20:41:58 +0000 (20:41 +0000)]
Revert "afm-unit: add autoapi in required-api feature"

This reverts commit 2b6e13bd5812dc1d7efe338a163f6dd253bbe15b.

Change-Id: I5e2493669da8d45150ed46257b06a5dae005e0bd

5 years agoMerge "Fixed book.yml file"
Jan-Simon Moeller [Thu, 20 Dec 2018 20:08:49 +0000 (20:08 +0000)]
Merge "Fixed book.yml file"

5 years agoMerge "afm-unit: add autoapi in required-api feature"
Jan-Simon Moeller [Thu, 20 Dec 2018 20:07:09 +0000 (20:07 +0000)]
Merge "afm-unit: add autoapi in required-api feature"

5 years agoFixed book.yml file 63/19163/1
Sebastien Douheret [Wed, 19 Dec 2018 22:13:34 +0000 (23:13 +0100)]
Fixed book.yml file

- remove useless %lang% prefix
- remove unwanted (copy/paste error) "API Reference" chapter

Change-Id: I2c46f93093eed6950cfbb7319e7cfd47fcd8b8b7
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
5 years agoafm-unit: Restore removal of capabilities 71/18871/2
José Bollo [Mon, 10 Dec 2018 07:07:39 +0000 (08:07 +0100)]
afm-unit: Restore removal of capabilities

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>
5 years agoafm-unit: Fix http port multi allocation 93/18993/1
José Bollo [Tue, 18 Dec 2018 09:58:25 +0000 (10:58 +0100)]
afm-unit: Fix http port multi allocation

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>
5 years agowrap-json: Upgrade to latest version 91/18991/1
José Bollo [Fri, 14 Dec 2018 17:37:10 +0000 (18:37 +0100)]
wrap-json: Upgrade to latest version

Change-Id: Iaaf302aa13650390bc8536f19187708dd67fa174
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
5 years agoafm-unit: add autoapi in required-api feature 01/18901/1
Clément Bénier [Fri, 14 Dec 2018 02:55:29 +0000 (03:55 +0100)]
afm-unit: add autoapi in required-api feature

- 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>
5 years agobook doc: add book yaml file 31/18731/2
Clément Bénier [Wed, 12 Dec 2018 08:38:06 +0000 (09:38 +0100)]
book doc: add book yaml file

SPEC-1988

Change-Id: Ie68d715f04338bf8917792f0f1ae6e36d1602553
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
5 years agowgtpkg-install: Improve port allocation 19/18419/1 6.99.2 guppy/6.99.2 guppy_6.99.2
José Bollo [Thu, 29 Nov 2018 12:37:11 +0000 (13:37 +0100)]
wgtpkg-install: Improve port allocation

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>
5 years agoMerge "API Landing Page: Test landing page for all APIs"
Stéphane Desneux [Wed, 28 Nov 2018 17:15:30 +0000 (17:15 +0000)]
Merge "API Landing Page:  Test landing page for all APIs"

5 years agoAPI Landing Page: Test landing page for all APIs 73/18373/1
Scott Rifenbark [Wed, 21 Nov 2018 17:10:32 +0000 (09:10 -0800)]
API Landing Page:  Test landing page for all APIs

Change-Id: I5c8b843fc2c31d45cafbf25eef156a94e9fd0f1c
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
5 years agoonappid: retrieves the 'appid' with id field 49/18149/1 6.99.1 guppy/6.99.1 guppy_6.99.1
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 agoafm-unit: Export new variables 09/17809/1
José Bollo [Thu, 8 Nov 2018 13:47:10 +0000 (14:47 +0100)]
afm-unit: Export new variables

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>
5 years agoTreat correctly running/not running status 77/17677/1
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 07/17607/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 37/17537/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 81/17481/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 75/17475/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 agoMerge "afm-unit.conf: Enforce starting after network"
José Bollo [Tue, 23 Oct 2018 09:23:15 +0000 (09:23 +0000)]
Merge "afm-unit.conf: Enforce starting after network"

5 years agoMerge "afm-unit.conf: Restrict service for APIs"
José Bollo [Tue, 23 Oct 2018 09:23:15 +0000 (09:23 +0000)]
Merge "afm-unit.conf: Restrict service for APIs"

5 years agoafm-unit.conf: Enforce starting after network 47/17347/1
Jose Bollo [Thu, 27 Sep 2018 10:42:51 +0000 (12:42 +0200)]
afm-unit.conf: Enforce starting after network

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>
5 years agoAdd the ability to access binding through tcp 43/17343/1
José Bollo [Fri, 3 Aug 2018 13:10:53 +0000 (15:10 +0200)]
Add the ability to access binding through tcp

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>
5 years agoafm-unit.conf: Restrict service for APIs 45/17345/1
Jose Bollo [Thu, 13 Sep 2018 12:02:47 +0000 (14:02 +0200)]
afm-unit.conf: Restrict service for APIs

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>
5 years agoMerge "docs: Improve documentating 'required-binding'"
Stéphane Desneux [Thu, 11 Oct 2018 08:29:27 +0000 (08:29 +0000)]
Merge "docs: Improve documentating 'required-binding'"

5 years agodocs: Improve documentating 'required-binding' 33/17033/2
Jose Bollo [Tue, 9 Oct 2018 09:37:12 +0000 (11:37 +0200)]
docs: Improve documentating 'required-binding'

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>
5 years agoafm-unit.conf: force symbolic link on update 59/16959/4
Romain Forlot [Fri, 5 Oct 2018 14:29:51 +0000 (16:29 +0200)]
afm-unit.conf: force symbolic link on update

Forcing symbolic link update ensures that if the value changes
the link will be overwriten. Otherwise the link always
keeps the old path until a system reboot or a manual removal
of the link file.

Change-Id: Ib9d8f267a8665edd75ce04f77eb70c4b0a4b8e9f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
5 years agodoc: Changed doc to new format 15/16715/1 6.90.0 guppy/6.90.0 guppy_6.90.0
Sebastien Douheret [Thu, 20 Sep 2018 16:43:07 +0000 (18:43 +0200)]
doc: Changed doc to new format

- fixed image width setting
- split book.json to match new format
- changed description in README.md
- remove useless files

Change-Id: I9b0b863715585659f32a9f6c3005c1bbf15009f4
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
5 years agowgtpkg-install: Force uninstall 69/16669/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 agoCMakeLists: Use AGLVERSION if set 03/16603/1
José Bollo [Wed, 12 Sep 2018 12:32:06 +0000 (14:32 +0200)]
CMakeLists: Use AGLVERSION if set

And default the version to the next version of AGL
pre-guppy: 6.90.0

Change-Id: Ia86295efd42f42dd302aa61f072b325afa60e56c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
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"