src/app-framework-main.git
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>
6 years agoStart user units at the system level
José Bollo [Tue, 2 May 2017 16:13:23 +0000 (18:13 +0200)]
Start user units at the system level

When service name end with @ it means that the user
UID must be provided.

Change-Id: I6707df0151b7cab985cfc53a81fccf6a7150c9a3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: Rename generated systemd units
José Bollo [Tue, 2 May 2017 12:27:29 +0000 (14:27 +0200)]
afm-unit.conf: Rename generated systemd units

Uses a more uniform naming for units and allows to use
templating for some other purpose.

Change-Id: Ia99f84a8f4436fcce6cecf3b3720870d27e9e303
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-udb: remove comments and join lines of unit files
José Bollo [Tue, 10 Oct 2017 08:52:12 +0000 (10:52 +0200)]
afm-udb: remove comments and join lines of unit files

Change-Id: I9d901e074925a666190d5e3007a66aea81ef6253
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdded information to include external library 05/11205/1
Romain Forlot [Tue, 10 Oct 2017 14:36:35 +0000 (16:36 +0200)]
Added information to include external library

Describe default directories used by application
framework inside the apps.

Bug-AGL: SPEC-883

Change-Id: Iea0280197db6091b4963134f8b20b5dc10b9767b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
6 years agowgtpkg-unit: improve naming (minor)
José Bollo [Tue, 5 Sep 2017 15:45:31 +0000 (17:45 +0200)]
wgtpkg-unit: improve naming (minor)

Change-Id: I5dae72c8dd925646b18c30ab4ef60382e43c744b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRemove legacy mode without systemd
José Bollo [Tue, 5 Sep 2017 15:16:54 +0000 (17:16 +0200)]
Remove legacy mode without systemd

Change-Id: Id26322a1a46baa8b53b6d3c214477ae50a7c99f6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoExtend database values with arrays
José Bollo [Tue, 2 May 2017 14:08:35 +0000 (16:08 +0200)]
Extend database values with arrays

Change-Id: I9ab94413abce0d13102711091ec48a5894ccadd9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoInclude json description for callbacks
José Bollo [Tue, 2 May 2017 08:34:52 +0000 (10:34 +0200)]
Include json description for callbacks

This tiny modification is mainly for debugging.

Change-Id: Ieda90da49d365a7b092a02833227c869bd0397a4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoBump version to 4.99-EERC1
José Bollo [Tue, 19 Sep 2017 13:24:15 +0000 (15:24 +0200)]
Bump version to 4.99-EERC1

Change-Id: Icb0f8870fa646ed0e2e969eaa1a06505f8dec467
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoBump doc to 4.99-EERC1 57/10957/1
Sebastien Douheret [Mon, 18 Sep 2017 14:27:09 +0000 (16:27 +0200)]
Bump doc to 4.99-EERC1

Change-Id: I9181f557addc212224cc1bfe2da9a61b2c0cfb01
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agoUpdate version of tools 4.99.1 4.99.2 4.99.3 eel/4.99.1 eel/4.99.2 eel/4.99.3 eel_4.99.1 eel_4.99.2 eel_4.99.3
José Bollo [Tue, 5 Sep 2017 13:59:55 +0000 (15:59 +0200)]
Update version of tools

Change-Id: I82bb06d2be92beb377d6c3cafffae49c65e9f20b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoSet the url of the project
José Bollo [Tue, 5 Sep 2017 13:11:26 +0000 (15:11 +0200)]
Set the url of the project

Change-Id: Ib32eac8f5ebc9e6dea43fdba78b6130b59b319e4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix warnings 'implicit-fallthrough' of gcc 7
José Bollo [Tue, 5 Sep 2017 12:35:13 +0000 (14:35 +0200)]
Fix warnings 'implicit-fallthrough' of gcc 7

Change-Id: I32b42fd8db481fcbdce4b934fc990c118293850d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoUpgrade to afb-daemon (binder) version 4.0 at least
José Bollo [Tue, 5 Sep 2017 12:20:47 +0000 (14:20 +0200)]
Upgrade to afb-daemon (binder) version 4.0 at least

Change-Id: I6d2a6e7e2781f0b2b3471f698912990961d84865
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoUpdate CMake required version
José Bollo [Tue, 5 Sep 2017 12:00:32 +0000 (14:00 +0200)]
Update CMake required version

Change-Id: I8d45e9d0430600444a25d923412dd8e385b91470
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit-debug.conf: Move monitoring option
José Bollo [Fri, 1 Sep 2017 08:09:23 +0000 (10:09 +0200)]
afm-unit-debug.conf: Move monitoring option

Put it in the same place that other unconditionnal
options

Change-Id: I75fc5503db6fd9776299564b4a559a5bbf889952
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit-debug.conf: Increase the verbosity in debug
José Bollo [Fri, 1 Sep 2017 07:08:16 +0000 (09:08 +0200)]
afm-unit-debug.conf: Increase the verbosity in debug

Latest version of the binder separated the verbosity levels
of WARNING and NOTICE. This commits asks for notice report
by default in debug.

Change-Id: Ibdaf16560384c7f2576066250e42c44074501ebb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: improve setting of names
José Bollo [Thu, 31 Aug 2017 15:09:08 +0000 (17:09 +0200)]
afm-unit.conf: improve setting of names

The names are now prefixed by "afbd-" to clearly
identify the binder daemon.

Change-Id: I0dbd0a5dd68260a6315599e18e3e2f4a6be3efc5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: use option --name for setting binder name
José Bollo [Tue, 29 Aug 2017 09:40:41 +0000 (11:40 +0200)]
afm-unit.conf: use option --name for setting binder name

Also enforce output to journal

Change-Id: I85957cfb8cc7e2264c9146ca18c352a0af347934
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit-debug.conf: add --monitoring option
José Bollo [Tue, 29 Aug 2017 06:54:38 +0000 (08:54 +0200)]
afm-unit-debug.conf: add --monitoring option

Change-Id: I3174738bf4c164513bb6a0399584784548b22c2c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit-debug.conf: provides a default token
José Bollo [Tue, 29 Aug 2017 06:57:12 +0000 (08:57 +0200)]
afm-unit-debug.conf: provides a default token

The default token is set to HELLO

Change-Id: I275c8d91633f4b6aa596c6195b90f1ad7c1b0cde
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafn-unit.conf: Fix bug for option --no-httpd
José Bollo [Tue, 29 Aug 2017 06:49:57 +0000 (08:49 +0200)]
afn-unit.conf: Fix bug for option --no-httpd

The option --no-httpd is applied for applications of
type 'application/vnd.agl.service' but the option
was misplaced in the command line.

On an other hand, setting --no-httpd makes option
--roothttp irrevelant.

Also, the option is currently not to be applied
when AGL_DEVEL (pulling afm-unit-debug.in) is
required.

Change-Id: I05b15fa2a847a5564d7c88ce7ac47cd8a2a29f40
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-unit.conf: refactor LD_LIBRARY_PATH value
José Bollo [Tue, 8 Aug 2017 13:35:32 +0000 (15:35 +0200)]
afm-unit.conf: refactor LD_LIBRARY_PATH value

Changes from

  LD_LIBRARY_PATH=$ORIGIN/$LIB

to

  LD_LIBRARY_PATH=$ORIGIN/lib

because $LIB isn't univoque for integrators
while lib is.

Change-Id: Ic4b2f8bb1410c35f75eb957a0ebc10141f995aba
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agowgtpkg-install: search in subdir "htdocs" also
José Bollo [Tue, 8 Aug 2017 07:33:01 +0000 (09:33 +0200)]
wgtpkg-install: search in subdir "htdocs" also

For widgets that are fully HTML, the search of the content
was not checking the subdirectory "htdocs" that is enforced
elsewhere.

This commits add the search of the content in the subdirectory
"htdocs". This is a temporarily fix. A better complete solution
has to be delivered later.

Bug-AGL: SPEC-808

Change-Id: I8bef7c4a31ff919827ceca05e203c2b277cf7657
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoSet explicit path for services and units
José Bollo [Mon, 7 Aug 2017 16:43:28 +0000 (18:43 +0200)]
Set explicit path for services and units

This patch removes references to /usr/local and
add reference to the installation directory.

The companion programs can be run using path
relatives to the installation directory.

Bug-AGL: SPEC-384

Change-Id: I7e10be1d0df1b62f3be0104f88d1787dd849d152
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoHandle file-properties for setting eXecutable flag
José Bollo [Mon, 7 Aug 2017 16:07:26 +0000 (18:07 +0200)]
Handle file-properties for setting eXecutable flag

This commits introduce the feature "urn:AGL:widget:file-properties".

This feature actually only allows to set execution flag to files
of the widget.

Example:
  <feature name="urn:AGL:widget:file-properties">
    <param name="flite" value="executable" />
    <param name="jtalk" value="executable" />
  </feature>

Bug-AGL: SPEC-384

Change-Id: If13ca3b1015576317fd52cb9540b77d0e2675f67
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix socket dependency for afb service 93/10493/2
Ronan Le Martret [Thu, 3 Aug 2017 12:02:28 +0000 (14:02 +0200)]
Fix socket dependency for afb service

Change-Id: Icb65d7165e1f1c0811f170effe148606bc367872
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
6 years agoExecuting /bin/bash explicitly 83/10483/1
Tadao Tanikawa [Wed, 2 Aug 2017 09:21:20 +0000 (18:21 +0900)]
Executing /bin/bash explicitly

Although 'afm-util' uses PIPESTATUS[] to catch error from
dbus-send, it doesn't require executing /bin/bash.

Change-Id: I45b8a19b3dcdf789103472e16de64e0d50351548
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
6 years agoclean markdown documentation 45/10445/1
Ronan Le Martret [Fri, 28 Jul 2017 10:29:28 +0000 (12:29 +0200)]
clean markdown documentation

Change-Id: I1b0a1628b42097c47a844aa0c8030d4534428421
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
6 years agoAdd service debugging support (afm-debug).
Sebastien Douheret [Thu, 13 Jul 2017 20:02:20 +0000 (22:02 +0200)]
Add service debugging support (afm-debug).

Add necessary tools/scripts, such as afm-debug, to allow service binding.
These tools are only available in develvopment (AGL_DEVEL is set).

Change-Id: I4e946146af985c74c8bd97d8c118b932394bbc5e
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoDon't list terminated processes
José Bollo [Tue, 11 Jul 2017 15:31:42 +0000 (17:31 +0200)]
Don't list terminated processes

Listing processes that are terminated
might be disturbing. So it is now removed.

In some future, it should be good to return on
option even terminated processes with an indication
of their termination status.

Bug-AGL: SPEC-728

Change-Id: I6d5c892bc5e618830cb41de7d664c2443525af96
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAllow to install widget with no icon
José Bollo [Tue, 11 Jul 2017 15:06:06 +0000 (17:06 +0200)]
Allow to install widget with no icon

This patch allows a widget to not specify any icon
but it still enforce when an icon is specified to
specify only one icon and to provide the attribute
"src".

Bug-AGL: SPEC-702

Change-Id: I916b7581ac1f486a4a1d5774d0885c3711029f69
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agounit.conf: Allow service to run by default
José Bollo [Fri, 7 Jul 2017 11:50:23 +0000 (13:50 +0200)]
unit.conf: Allow service to run by default

Change-Id: Ifc2d1795041d0254af7db518f64c988bb747200c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-util: make output more readable
José Bollo [Thu, 6 Jul 2017 15:22:49 +0000 (17:22 +0200)]
afm-util: make output more readable

Change-Id: Idfa35a60f3ee6268d2f08304e5ad2248777d2002
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoinstall: improve port detection
José Bollo [Mon, 3 Jul 2017 11:09:11 +0000 (13:09 +0200)]
install: improve port detection

Check any existing X-AFM-http-port or
X-AFM--http-port.

Change-Id: I1111095664535c849c76870f2e5104fb07099ab4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix bad error reporting
José Bollo [Wed, 28 Jun 2017 16:05:18 +0000 (18:05 +0200)]
Fix bad error reporting

The use of %m was buggy due to the implementation
of 'vverbose': it always returned ENOTTY

   Inappropriate ioctl for device

Change-Id: I0b7dd4c2f4ce5a45611042a8b9ba3e6db0e60803
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoMoves handling of reloads
José Bollo [Tue, 27 Jun 2017 13:54:07 +0000 (15:54 +0200)]
Moves handling of reloads

The new version ensures that the daemons are responsibles
of reloading the units. This is no more done by default.

Change-Id: I9ff33a628dfc05e429dbc7bf127d641691f2a3b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafm-util: report correctly error status of dbus-send
José Bollo [Mon, 26 Jun 2017 08:29:17 +0000 (10:29 +0200)]
afm-util: report correctly error status of dbus-send

Bug-AGL: SPEC-699

Change-Id: I8398f9dedefbe02a1ba57ed3725fa680a8db3cfa
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix socket (de)activation at (de)install
José Bollo [Fri, 23 Jun 2017 21:00:02 +0000 (23:00 +0200)]
Fix socket (de)activation at (de)install

When installing or deinstalling, it is needed to
issue a "systemctl (--user) restart sockets.target"

This patch implement it on user side.

To be improved.

Change-Id: I152eb6a1cf5df50b1fe3143837d6d42ee6619349
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix daemon reload (to be improved)
José Bollo [Fri, 23 Jun 2017 12:06:02 +0000 (14:06 +0200)]
Fix daemon reload (to be improved)

Change-Id: Ica099aa439e6c022de4982a58b0990065d932b0b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix socket activation
José Bollo [Fri, 23 Jun 2017 12:05:16 +0000 (14:05 +0200)]
Fix socket activation

Change-Id: Ic511bf717c61105003d750235229bfc50ee7fccd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix infinite loop in wgt_info_param
José Bollo [Fri, 23 Jun 2017 12:03:33 +0000 (14:03 +0200)]
Fix infinite loop in wgt_info_param

Change-Id: I8a623a40e48108c8999083667dae1230da2d206f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agodocs: fix book.json (headers/footers)
Stephane Desneux [Tue, 20 Jun 2017 09:38:12 +0000 (11:38 +0200)]
docs: fix book.json (headers/footers)

Change-Id: I7d997b9a8c17caa83e0e9c4f4611e0aac04be6b4
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
6 years agoMerge "Auto generate cover from book.json fields."
Stéphane Desneux [Tue, 20 Jun 2017 09:25:03 +0000 (09:25 +0000)]
Merge "Auto generate cover from book.json fields."

6 years agodocs: add document revision
Stephane Desneux [Tue, 20 Jun 2017 09:21:38 +0000 (11:21 +0200)]
docs: add document revision

Change-Id: Ib98fae58d8a95dceea42347a5e46d6d39d565852
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
6 years agoAuto generate cover from book.json fields. 71/9771/1
Sebastien Douheret [Tue, 20 Jun 2017 07:47:53 +0000 (09:47 +0200)]
Auto generate cover from book.json fields.

Change-Id: I8203040b759289b08d5311a74e6df557fe8250bd
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agodocs: remove incomplete docs from book
Stephane Desneux [Mon, 19 Jun 2017 21:48:30 +0000 (23:48 +0200)]
docs: remove incomplete docs from book

Change-Id: I1ed6c95a906c086a010b302eca6a48c2a3ac3eef
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
6 years agoFix pdf paging and make-units rendering (svg to png). 63/9763/1
Sebastien Douheret [Mon, 19 Jun 2017 15:32:33 +0000 (17:32 +0200)]
Fix pdf paging and make-units rendering (svg to png).

Change-Id: I60b5ab02602b993d8d92504b25f0a35d340d5444
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agoFix spelling and images size. 61/9761/1
Sebastien Douheret [Mon, 19 Jun 2017 15:11:16 +0000 (17:11 +0200)]
Fix spelling and images size.

Change-Id: I01c6342fa9f6b16753ed5f48645538e48af09a5a
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agoRe-order doc chapters 59/9759/1
Sebastien Douheret [Mon, 19 Jun 2017 14:52:06 +0000 (16:52 +0200)]
Re-order doc chapters

Change-Id: I44cf2054fa06816480e26fc19b45c6f8a464a708
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agoRemove proposal statement. 57/9757/1
Sebastien Douheret [Mon, 19 Jun 2017 13:59:21 +0000 (15:59 +0200)]
Remove proposal statement.

Change-Id: I5d63279149c46e095afeec97bfad3c61e40fedee
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agoAdd gitbook documentation (support PDF generation). 55/9755/1
Sebastien Douheret [Mon, 19 Jun 2017 13:48:58 +0000 (15:48 +0200)]
Add gitbook documentation (support PDF generation).

To generate PDF doc:
     ./gendocs.sh pdf

To generate HTML doc (local webserver):
     ./gendocs.sh serve

Change-Id: Ib9b195814f4596a5cf5233d6a331d206e76c9bae
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
6 years agodocs: minor enhancements, typo fixes
Stephane Desneux [Mon, 19 Jun 2017 11:58:42 +0000 (13:58 +0200)]
docs: minor enhancements, typo fixes

Change-Id: Ic2cb29cb96e6542405736628f2d0cce995cb21ce
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
6 years agoFix service name within socket units
José Bollo [Mon, 12 Jun 2017 17:42:11 +0000 (19:42 +0200)]
Fix service name within socket units

Change-Id: Ic8e562dd31a9bf7e3f1e22f0cda8e381242e3468
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agofix binding version to 1
José Bollo [Mon, 12 Jun 2017 17:08:22 +0000 (19:08 +0200)]
fix binding version to 1

Change-Id: I98e6de97e170b8cbb51b48e0e3cf7e52e6def7f9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix lack of error message on mustach issue
José Bollo [Mon, 12 Jun 2017 17:02:12 +0000 (19:02 +0200)]
Fix lack of error message on mustach issue

Change-Id: I16139c133d7031e38f4c63ff6369f1d7478fc86f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoCheck content existing and fix executable
José Bollo [Wed, 31 May 2017 12:12:08 +0000 (14:12 +0200)]
Check content existing and fix executable

Change-Id: I4060334cb9c677df1ce86c99a1cb37abc007f3c7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoFix lack of message when setting exec bit
José Bollo [Tue, 30 May 2017 15:19:11 +0000 (17:19 +0200)]
Fix lack of message when setting exec bit

Nothing was telling that the content couldn't be
set as executable. Note that nothing is made to check
that a content (executable or not) exist.
Also note that installing several executables for
one widget isn't possible now.

Change-Id: I10373fa27cd8d1d90c292e3529d8a5eec62bb8f0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRework on parsing units conf 3.99.1 dab/3.99.1 dab_3.99.1
José Bollo [Fri, 28 Apr 2017 14:33:25 +0000 (16:33 +0200)]
Rework on parsing units conf

Change-Id: Ia95dae65e74a42f9f49154c9421391421f9ca1c0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoImplement deinstallation of units
José Bollo [Fri, 28 Apr 2017 12:15:53 +0000 (14:15 +0200)]
Implement deinstallation of units

Change-Id: I7d9812211bb75f34d55b4035d5b4a3b7ea66f461
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoUse structures for generating units
José Bollo [Fri, 28 Apr 2017 12:10:52 +0000 (14:10 +0200)]
Use structures for generating units

Change-Id: I7258a494d62ef22219c973048d052965cb5fea28
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImprove environment setting
José Bollo [Wed, 19 Apr 2017 09:32:23 +0000 (11:32 +0200)]
Improve environment setting

Some environment variable were set in the configuration files.
This wasn't a valuable solution. Allowing now system tning to
put environment variables in files of /etc/afm/unit.env.d
is much more flexible.

Change-Id: I1796061c9055a2860f0bbab340aa3a6e7b85dd3d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoHandle systemd's "inactive" state as transient
José Bollo [Mon, 3 Apr 2017 10:16:43 +0000 (12:16 +0200)]
Handle systemd's "inactive" state as transient

Inactive is returned sometimes but it means that
the service is not started yet not that it failed
to start.

AGL-Issue: SPEC-520

Change-Id: I3b39b983b45a0f6ee449958100595c5c486cbfdd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoImprove afm-unit.conf
José Bollo [Fri, 24 Mar 2017 14:46:11 +0000 (15:46 +0100)]
Improve afm-unit.conf

This commit introduces a common clear name for
services bound to websockets.

It also improves the formating of commands to
be run by afb-daemon.

It also removes an unsupported key (commented).

Change-Id: I4e6e74eef50b89ba82d2c33d4c94faab8f07b587
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAllows or in mustache instanciation
José Bollo [Tue, 21 Mar 2017 16:54:30 +0000 (17:54 +0100)]
Allows or in mustache instanciation

This allows to simplify the configuration file
afm-unit.conf.

Restore the type application/vnd.agl.service

Change-Id: Iaadde2c2d96155cea6d1b8bee4d3c78e885cf44a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoProvide unit in config.xml and documentation
José Bollo [Fri, 17 Mar 2017 22:43:41 +0000 (23:43 +0100)]
Provide unit in config.xml and documentation

This commit remove urn:AGL:widget:provided-application
in favour of urn:AGL:widget:provided-unit.
In the same time, the feature urn:AGL:widget:provided-api
must be attached to a unit. This will enable to export
more than one API for a unit if needed.

Change-Id: I17ade3651db2cd61402875333d063ee05cf57a10
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-install: choose the port
José Bollo [Fri, 17 Mar 2017 16:03:01 +0000 (17:03 +0100)]
wgtpkg-install: choose the port

The installer now chooses a port for an installed application.

This choose is made by consulting the previously installed
applications and by getting the lowest port available in the
range 1024..32767.

Change-Id: Iab4238b4d52447a2d261d87d45bbb02f0b7a35e5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-systemd: implement start/stop of units x-first-with-systemd
José Bollo [Thu, 16 Mar 2017 08:39:08 +0000 (09:39 +0100)]
utils-systemd: implement start/stop of units

This implementation is very basic and
must be improved.

Change-Id: Id1540e646c83285c61849092bbd8fb645c0954ed
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAllows to compile without libsystemd
José Bollo [Thu, 16 Mar 2017 09:10:58 +0000 (10:10 +0100)]
Allows to compile without libsystemd

This fixes a problem with bitbake when building
native packages.

Change-Id: I28586720010237db578ec55cb5254212c88240e7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoSwitch to use systemd database
José Bollo [Thu, 16 Mar 2017 08:36:13 +0000 (09:36 +0100)]
Switch to use systemd database

Installation now creates unit files.
This commits use these created unit files
to fill the application database of
afm-user-daemon.

Change-Id: Ice39d3ff51b6afe41609f3ce4ff0e89b2f3a0ca7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-systemd: provide enumeration of units
José Bollo [Thu, 16 Mar 2017 08:27:41 +0000 (09:27 +0100)]
utils-systemd: provide enumeration of units

This enumeration is based on the filesystem,
units are listed from the configured directory.
This is necessarily because not all units can be
loaded by systemd but all can be started.

Change-Id: Ic4d1331c8c54f5bbaa747ff8084da2b0c5a65c55
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoUse the same dbus connection
José Bollo [Thu, 16 Mar 2017 08:21:40 +0000 (09:21 +0100)]
Use the same dbus connection

Opening one connection per part of the
program doesn't make sense and waste resources.
Using a common one is much better.

Change-Id: I74dc3cd7ae41d7bfa2f03f4a252495e8f5f81578
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-unit: fix last empty continuation
José Bollo [Wed, 15 Mar 2017 18:49:40 +0000 (19:49 +0100)]
wgtpkg-unit: fix last empty continuation

Change-Id: Id0a9581032add095756141a4373b34cee3cd6f80
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoEmits reload to systemd when needed
José Bollo [Wed, 15 Mar 2017 10:49:29 +0000 (11:49 +0100)]
Emits reload to systemd when needed

The current implementation enforce the reload
when a 'wants' target is created or deleted.
This should work well for system units.
However, for system units, this behaviour isn't
enought when more that a user is active because
only the user that installs the application will
be updated. For this reason, a paralelle mechanism
has to be defined.

Also note that systemd is henceforth required for
tools because wgtpkg-installer needs it now.

Change-Id: I4fc03a44dbc58c2374ea21dbf6b436f646d04e00
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-systemd: introduction of systemd interface
José Bollo [Wed, 15 Mar 2017 09:17:41 +0000 (10:17 +0100)]
utils-systemd: introduction of systemd interface

Isolate the interface to systemd.

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