src/app-framework-main.git
7 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>
7 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>
7 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>
7 years agowgtpkg-unit: add management of wanted-by in unit descriptions
José Bollo [Tue, 14 Mar 2017 17:24:46 +0000 (18:24 +0100)]
wgtpkg-unit: add management of wanted-by in unit descriptions

This allows the automatic creation of the links in wants
subdirectories.

Change-Id: Ib948fb11abbbd902f733279136f51ad1649923ef
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-install: creates the systemd units
José Bollo [Tue, 14 Mar 2017 09:26:49 +0000 (10:26 +0100)]
wgtpkg-install: creates the systemd units

Change-Id: Ia3cdcb76a9f7b3bda77a9d9fcb38dfd85eb85804
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-unit: install/uninstall functions added
José Bollo [Tue, 14 Mar 2017 09:07:20 +0000 (10:07 +0100)]
wgtpkg-unit: install/uninstall functions added

Change-Id: Ib147de12d0b2c8e783ddb6aae2f9978f288d98fd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-unit.conf: adds type application/x-executable
José Bollo [Tue, 14 Mar 2017 15:05:22 +0000 (16:05 +0100)]
afm-unit.conf: adds type application/x-executable

Change-Id: Ie62113512094909bd02e7e89fd44b56a9df67d17
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFix issue in labelling files x-last-without-systemd
José Bollo [Fri, 17 Mar 2017 10:17:36 +0000 (11:17 +0100)]
Fix issue in labelling files

The current version of security manager put this tags

 - SECURITY_MANAGER_PATH_PRIVATE
 - SECURITY_MANAGER_PATH_RW

      User::App::XXXX

 - SECURITY_MANAGER_PATH_PUBLIC
 - SECURITY_MANAGER_PATH_RO

      User::Home

 - SECURITY_MANAGER_PATH_PUBLIC_RO

      _ (underscore or floor)

Putting floor is bad because it produces
files and directories that can't be removed.

Using SECURITY_MANAGER_PATH_RO instead of
SECURITY_MANAGER_PATH_PUBLIC_RO sets the
label "User::Home". It is valid because this
label is already read only for applications.
But it is writable by the "System" labelled
services at the opposite of "_".

Change-Id: I685fe366fddb95858c66b827e28acf6d005bcfc0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-run: improve error diagnostic
José Bollo [Thu, 16 Mar 2017 10:19:00 +0000 (11:19 +0100)]
afm-run: improve error diagnostic

Change-Id: Ic23bcc031fdc72e15675bffcbac619ef41a2f241
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-json: fix a warning when compiling
José Bollo [Tue, 14 Mar 2017 09:59:07 +0000 (10:59 +0100)]
utils-json: fix a warning when compiling

Change-Id: I3e354cb9e940798a995e79fe67d05607130c9714
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-unit.conf: connect to systemd sockets
José Bollo [Tue, 14 Mar 2017 09:33:29 +0000 (10:33 +0100)]
afm-unit.conf: connect to systemd sockets

Change-Id: I45d4ae48d47d8690f41222df4d05c04cd241ce37
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoSplits the widget validation function
José Bollo [Tue, 14 Mar 2017 09:04:41 +0000 (10:04 +0100)]
Splits the widget validation function

Change-Id: I543995c8bb64a859a7c0eb6cc09217d2f71ccc38
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-file: fix bug in writing
José Bollo [Tue, 14 Mar 2017 08:41:41 +0000 (09:41 +0100)]
utils-file: fix bug in writing

Change-Id: I7da9ee72992cba4c49c0d1286a38674d3f7ed4bc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoswitch to cmake 3.4.3 at least
José Bollo [Mon, 13 Mar 2017 13:13:43 +0000 (14:13 +0100)]
switch to cmake 3.4.3 at least

Change-Id: Ib63bd000abaabd4966519b75356668d31aed58f9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoimprove names in CMakeLists
José Bollo [Mon, 13 Mar 2017 13:05:20 +0000 (14:05 +0100)]
improve names in CMakeLists

Change-Id: If86544db50c5813868550338a68c0e11ea469a35
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-util: adds run-remote and start-remote commands
José Bollo [Fri, 3 Mar 2017 09:15:55 +0000 (10:15 +0100)]
afm-util: adds run-remote and start-remote commands

Change-Id: I2c94d072886f4dd004ea13f7bf0c1ce61b757ca8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoTry to improves the error message after exec
José Bollo [Fri, 3 Mar 2017 08:51:23 +0000 (09:51 +0100)]
Try to improves the error message after exec

Change-Id: Ibaed600a85ce1b7c3e445ceb39c780e99ca61062
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoSet the workdir in afm/afm-unit.conf
José Bollo [Thu, 2 Mar 2017 16:21:47 +0000 (17:21 +0100)]
Set the workdir in afm/afm-unit.conf

I'm not sure that it will be still present at the end
but let go ahead with that.

Change-Id: I123035c29c049c780b71b4181c15bd2d3a96e7c7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds SIGKILL as normal exit status
José Bollo [Thu, 2 Mar 2017 15:57:38 +0000 (16:57 +0100)]
Adds SIGKILL as normal exit status

Change-Id: Ia67df22859b23d9da614d619d84900654bb2f7a0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoimproves matching of patterns for unit description
José Bollo [Thu, 2 Mar 2017 13:59:52 +0000 (14:59 +0100)]
improves matching of patterns for unit description

Change-Id: I2c3f9f0b45b79d5baa9ad5c19876f1412456c19d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdd comments
José Bollo [Thu, 2 Mar 2017 12:26:44 +0000 (13:26 +0100)]
Add comments

Change-Id: Icbbdbd4ed51db62c7619c6210842411b8d2e04a4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix a bug in mustach
José Bollo [Thu, 2 Mar 2017 10:45:17 +0000 (11:45 +0100)]
fix a bug in mustach

occured if closing before opening

Change-Id: I9c9515535d83f2c13bb75c0638e12c0a5a333413
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds 'run-by-default' permission
José Bollo [Thu, 2 Mar 2017 09:54:22 +0000 (10:54 +0100)]
adds 'run-by-default' permission

Change-Id: Ie327c0253ea12e8a0b837195653f0762b76c9f79
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds handling of JSON pointers (RFC 6901)
José Bollo [Thu, 2 Mar 2017 09:50:45 +0000 (10:50 +0100)]
Adds handling of JSON pointers (RFC 6901)

Change-Id: Ib2e1c75f81c32d0b6bc50af2ba48bb95a413842a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFix readdir that doesn't return dt_type
José Bollo [Thu, 23 Feb 2017 09:47:13 +0000 (10:47 +0100)]
Fix readdir that doesn't return dt_type

This is an incomplete fix. More readdir calls
exists that should be treated.

Change-Id: Ib80c9f4ac8fe7ce02d22968a9cf37f7841514f57
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFix readdir that doesn't return dt_type
José Bollo [Wed, 22 Feb 2017 17:47:48 +0000 (18:47 +0100)]
Fix readdir that doesn't return dt_type

This is an incomplete fix. More readdir calls
exists that should be treated.

Change-Id: Ic9ed98c7695a7c3d15136d0fe5eb9b5634f74d09
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoSet roothttp option for html app 95/8495/1
Sebastien Douheret [Thu, 16 Feb 2017 13:15:11 +0000 (14:15 +0100)]
Set roothttp option for html app

roothttp option (see commit dc011f99aed9407c8319b1b70a81f56ad2f02bc8) must be
set to a valid directory (for example . that's mean roodir) in order to serve
static files of html5 app.

Change-Id: I13a17f6699298a80a346dbb6b4c3ecb6ab236bd6
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoIgnore vscode project 63/8463/1
Sebastien Douheret [Wed, 15 Feb 2017 10:49:33 +0000 (11:49 +0100)]
Ignore vscode project

Change-Id: I9040f9fb6a8875a7e0e5bab08ce23db5557ef433
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoFix typos in docs 61/8461/1
Sebastien Douheret [Wed, 15 Feb 2017 10:48:57 +0000 (11:48 +0100)]
Fix typos in docs

Change-Id: I901ff5bb6f22ba7076914c7cbe92f69b4b89cb0e
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
7 years agoFix bug in mustach.c
José Bollo [Tue, 14 Feb 2017 10:36:57 +0000 (11:36 +0100)]
Fix bug in mustach.c

Change-Id: I353ae1cc33795ba8ffd98fcec503125ec9d455a3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoRename binding to api in config.xml
jobol [Fri, 3 Feb 2017 22:23:53 +0000 (23:23 +0100)]
Rename binding to api in config.xml

Signed-off-by: jobol <jose.bollo@iot.bzh>
7 years agoImproves names
José Bollo [Tue, 31 Jan 2017 15:08:47 +0000 (16:08 +0100)]
Improves names

The name binding is related to an internal
concept of the binder. The term API is more
generic. Dont forget that an API can be provided
by more than one binding (but only one at a given
time).

Change-Id: I91b2f3d96de6aace5fcb434cf64df7e8ed61630f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoPrepare the Integration with systemd
José Bollo [Tue, 11 Oct 2016 15:07:16 +0000 (17:07 +0200)]
Prepare the Integration with systemd

This is an intermediate commit providing
basic functionnalities for setting up
integration of the framework with systemd.

 - file afm-unit.conf is a mustache template
 - translation of config.xml to json object
 - mustache (extended) application of the json to the template
 - post processing of the result for extracting unit files

This processing is currently available as a test
(and a tool) and will be integrated after more
developement, test and validation.

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoGet the install directory
José Bollo [Thu, 26 Jan 2017 20:28:17 +0000 (21:28 +0100)]
Get the install directory

The function 'move_widget' was the only one
that worried about the name of the installation
directory. This commit split the function in two
and enforce to get the name of the install
directory.

Change-Id: I6d89b4c94b2898a6ba95a3045b3f5db23d54c499
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoFix a possible access to uninitialized memory
José Bollo [Thu, 26 Jan 2017 20:13:11 +0000 (21:13 +0100)]
Fix a possible access to uninitialized memory

Change-Id: Ica1cf7d81b561ce34039e5212ed6578950f1bfdd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdd utils-file and provide json-c
José Bollo [Thu, 26 Jan 2017 18:05:28 +0000 (19:05 +0100)]
Add utils-file and provide json-c

This is an intermediate commit providing
new features for common utils.

Change-Id: Ide92167d8e4e5013ddadd718c02071ea837938e3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoMake utils-json handle dot keys
José Bollo [Thu, 26 Jan 2017 17:56:19 +0000 (18:56 +0100)]
Make utils-json handle dot keys

Change-Id: I8b9b91accc0e30726e3be7f287b8312b0d7f3d02
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoUpdate date in headers
José Bollo [Thu, 26 Jan 2017 17:52:37 +0000 (18:52 +0100)]
Update date in headers

Also update .gitignore

Change-Id: I9d3e82c59318d983243ffce6d0a726ad5186fa2d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoPut strings in one place
José Bollo [Mon, 9 Jan 2017 12:41:16 +0000 (13:41 +0100)]
Put strings in one place

Change-Id: I79afd4fa18996e7879db4c11480a5400637dad2d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoSet application id when forking
José Bollo [Mon, 9 Jan 2017 10:32:50 +0000 (11:32 +0100)]
Set application id when forking

This improvement should make log message more clear.

Change-Id: Ifc78f7d913a1798a43b54df6b2bf9b52232d328a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoRemove use of deprecated readdir_r
José Bollo [Thu, 5 Jan 2017 16:09:55 +0000 (17:09 +0100)]
Remove use of deprecated readdir_r

Change-Id: I55bd335f1a731e3a02fdb598c8bd869686269aab
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds 2017 to copyrights
José Bollo [Tue, 3 Jan 2017 10:07:48 +0000 (11:07 +0100)]
Adds 2017 to copyrights

Change-Id: I3fcd64a038c6c5bca3d70186e2e68604aa392ed4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agotemporary grant requested permissions
José Bollo [Tue, 20 Dec 2016 12:59:43 +0000 (13:59 +0100)]
temporary grant requested permissions

Change-Id: If9a7d2a183aa8b0c0ed531b4d915443e199b488b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoconf/afm-launch.conf: use --roothttp=htdocs only for HTML5 applications
Stephane Desneux [Wed, 14 Dec 2016 15:28:37 +0000 (16:28 +0100)]
conf/afm-launch.conf: use --roothttp=htdocs only for HTML5 applications

Change-Id: Ieaa7b9f6f320610a56d020c9ac10fca313d892f9
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
7 years agoafm-db: Search applications case insensitively
José Bollo [Wed, 14 Dec 2016 10:20:26 +0000 (11:20 +0100)]
afm-db: Search applications case insensitively

Makes the identifier of the application case insensitive.

Being case correct is the fast track.
Having the wrong case is not an error but just less efficient.

Change-Id: Id18f1cfcf49c9f9f336947ebb08bba335a0adc6a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgt-info: Enforce lower case ids and version
José Bollo [Wed, 14 Dec 2016 10:17:47 +0000 (11:17 +0100)]
wgt-info: Enforce lower case ids and version

This will be used next to avoid faking identity
of applications using the case difference.

Change-Id: I13cbdd5124b58b2a72c15054df6f3cd0e11a2cc5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-install: set exec flag for application/vnd.agl.native
José Bollo [Wed, 14 Dec 2016 09:27:13 +0000 (10:27 +0100)]
wgtpkg-install: set exec flag for application/vnd.agl.native

This is needed for executable having a binder.

Also conforming to RFC 2045, mime types are made
case insensitive.

Change-Id: I065c8eada5ec044daca73b3bf994b0d6f3587414
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agofix html link 53/7553/1
Ronan [Mon, 12 Dec 2016 21:22:37 +0000 (22:22 +0100)]
fix html link

Change-Id: Ia1be9d8370620e4dcfd00130108928daef61a7ed
Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
7 years agofix svg path for gen html 19/7519/1
Ronan [Fri, 9 Dec 2016 14:27:43 +0000 (15:27 +0100)]
fix svg path for gen html

Change-Id: Ib91a405a5a7d49ad6f6c752aef6cb6cadee9ab9f
Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
7 years agoDoc reworked, relifted 27/7327/2
Romain Forlot [Thu, 17 Nov 2016 16:36:51 +0000 (17:36 +0100)]
Doc reworked, relifted

Change-Id: If41313a44cb66c0aa0f315b264284d081ff87f8e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
7 years agodocs: fix smallest typo, ever
Stephane Desneux [Thu, 17 Nov 2016 00:10:42 +0000 (01:10 +0100)]
docs: fix smallest typo, ever

Change-Id: Ibe47587fc1971de44e46147b110f2605b262c639
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
7 years agowgtpkg-install: set the exec flag
José Bollo [Wed, 16 Nov 2016 10:48:39 +0000 (11:48 +0100)]
wgtpkg-install: set the exec flag

Change-Id: Iae3acfcd12f1b01ebf47225af72220e61a24767f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-launch: avoid warnings
José Bollo [Wed, 16 Nov 2016 10:32:17 +0000 (11:32 +0100)]
afm-launch: avoid warnings

Change-Id: I8e650af2eccb99f8b97395a66aba839f4b5802b7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadd variable AFM_APP_INSTALL_DIR to environment
José Bollo [Wed, 16 Nov 2016 10:29:49 +0000 (11:29 +0100)]
add variable AFM_APP_INSTALL_DIR to environment

Change-Id: I1558ed87124750a87a4bf0359d9fb974617a8c42
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-launch: allows variable in environment
José Bollo [Wed, 16 Nov 2016 10:24:36 +0000 (11:24 +0100)]
afm-launch: allows variable in environment

Change-Id: I57e45894ffb4e4e32e4560f8a15adc54335067d0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agowgtpkg-zip: fix implicit conversions
José Bollo [Tue, 15 Nov 2016 06:49:36 +0000 (07:49 +0100)]
wgtpkg-zip: fix implicit conversions

Change-Id: Ib3e3a31090361e4c0dd24c2d936dc8695a491030
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-user-daemon: Adds method "once"
José Bollo [Mon, 14 Nov 2016 10:43:46 +0000 (11:43 +0100)]
afm-user-daemon: Adds method "once"

Adds the method "once" that is intended to start
an application in local mode if it doesn't already
run. Returns the state of the running application.

Change-Id: I4dfff06fa2d3e95f13a2436a2f1af9174799ddcf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-run: adds helper functions
José Bollo [Mon, 14 Nov 2016 10:40:58 +0000 (11:40 +0100)]
afm-run: adds helper functions

Adds function to summarize state of runners:
is_running, is_paused, is_alive, is_dead

Change-Id: I2a46be3c3a2079a5e43cde5f8ed18aab391ea05b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-run: minor fixes
José Bollo [Mon, 14 Nov 2016 10:38:36 +0000 (11:38 +0100)]
afm-run: minor fixes

fix a wrong comment of the returned value.
fix the location of the variable runner (probablyy a cut&paste error)

Change-Id: If8320410ff81576a72746cd703e8b1207672eaa2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agobinding: remove unused string
José Bollo [Mon, 14 Nov 2016 10:36:06 +0000 (11:36 +0100)]
binding: remove unused string

Change-Id: I3dc927c6e23b72dc628efe9b48b9d2a8196b5620
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoadds introspection files for dbus
José Bollo [Tue, 8 Nov 2016 12:43:17 +0000 (13:43 +0100)]
adds introspection files for dbus

Change-Id: I8602eadc2399588030a44aa98593556c38b0754a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agorenaming of verbs
José Bollo [Tue, 8 Nov 2016 12:31:50 +0000 (13:31 +0100)]
renaming of verbs

The verbs 'stop' and 'continue' are now renamed
as respectively 'pause' and 'resume'.

Change-Id: I2f82105103884fc07f3c67e08c696e435aed28e1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoafm-user-daemon: returns the pids of the processes
José Bollo [Tue, 8 Nov 2016 12:06:28 +0000 (13:06 +0100)]
afm-user-daemon: returns the pids of the processes

Asking for the state now returns the pids of the launched
processes when this processes are still alive.

Change-Id: I69348d8089581247465c3bd1ab83f86decad25ae
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoutils-json: add facility for arrays
José Bollo [Tue, 8 Nov 2016 12:01:05 +0000 (13:01 +0100)]
utils-json: add facility for arrays

Change-Id: I6d536d730af71b18e78720839522b82aed63c0d4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
7 years agoAdds a pkgconfig file for directories
José Bollo [Tue, 8 Nov 2016 11:56:05 +0000 (12:56 +0100)]
Adds a pkgconfig file for directories

Change-Id: Icbd3c7bc52232ca0fec6f4c69694bfaa0b64ef8e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agodoc: switch to mkdocs
José Bollo [Wed, 26 Oct 2016 16:24:13 +0000 (18:24 +0200)]
doc: switch to mkdocs

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoupdate dates of headers
José Bollo [Wed, 26 Oct 2016 11:36:38 +0000 (13:36 +0200)]
update dates of headers

Change-Id: Ie82326a91ff61f079421239ffa83428f552194ab
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoafm-user-daemon: accept bus address with arguments
José Bollo [Thu, 20 Oct 2016 13:54:25 +0000 (15:54 +0200)]
afm-user-daemon: accept bus address with arguments

It might be necessary to pass the address as an argument because
library systemd uses secure_getenv to retrieves the default
addresses and secure_getenv might return NULL in some cases.

Change-Id: Iea14a0494f39875f0a501e53a2711b0df96bab3c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoafm-run: set smack attributes to user directory
José Bollo [Thu, 20 Oct 2016 08:35:08 +0000 (10:35 +0200)]
afm-run: set smack attributes to user directory

The home directory for applications of a user
that was created by the daemon also gets a
security label and encures that there is no
transmutation.

It also simplifies allocation of the directory string.

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agobuild: improve simulation of security
José Bollo [Thu, 20 Oct 2016 09:12:06 +0000 (11:12 +0200)]
build: improve simulation of security

This commits allows to simulates either the security-manager
and the smack LSM.

These simulations are used for developping purpose.

Change-Id: I138d7351511ca2663498bfacca28811fc81b8c55
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoMinor improvements
José Bollo [Tue, 11 Oct 2016 14:34:46 +0000 (16:34 +0200)]
Minor improvements

- Clean cmake files
- Fix orthograph and vocabulary

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoFix very bad typo
José Bollo [Tue, 18 Oct 2016 07:28:54 +0000 (09:28 +0200)]
Fix very bad typo

The previous commit had CAP_DAC_OVERRIDE
instead of CAP_MAC_OVERRIDE.

Change-Id: I36988cd7771b6e25dbcf8d858ee3598bd12176b4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoRefactor of service for systemd 229
José Bollo [Wed, 12 Oct 2016 08:34:20 +0000 (10:34 +0200)]
Refactor of service for systemd 229

Since introduction of ambient capabilities,
systemd deprecated the use of Capabilities.
With systemd 229 activated with krogoth,
the use of Capabilities does nothing.

This commits avoids to use SecureBits and Capabilities.
It now relies on the fact that post installations are
setting the capabilities to the file:

 - setcap cap_mac_override,cap_dac_override=ep          afm-system-daemon
 - setcap cap_mac_override,cap_mac_admin,cap_setgid=ep  afm-user-daemon

Using p (permitted) instead of i (inherited) that was
previously used.

Change-Id: I17d51da07adf775d47a7f44551d8b8ebbc6eacb9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agodocumentation: improve namings
José Bollo [Mon, 19 Sep 2016 15:59:52 +0000 (17:59 +0200)]
documentation: improve namings

Change-Id: I188c3246f7492e82cb00a1a1f6cefe56495d9224
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agodocumentation: adds required-binding entry
José Bollo [Mon, 19 Sep 2016 10:34:51 +0000 (12:34 +0200)]
documentation: adds required-binding entry

Change-Id: Id8a62f5f6d9e54399fc12e10e922bf1ca121eb49
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoDescribes the permissions in the config file
José Bollo [Mon, 12 Sep 2016 15:23:36 +0000 (17:23 +0200)]
Describes the permissions in the config file

Change-Id: I9f786ed0ae552354383796c4137a82b6116ad016
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agocleanup of the code
José Bollo [Mon, 12 Sep 2016 13:21:19 +0000 (15:21 +0200)]
cleanup of the code

The lines removed were not used and were in conflict with
future developements.

Change-Id: Ib1cc2d4e8ef18b37f9b68066258d002062db4eb6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoFix installation of more than one widget
José Bollo [Mon, 12 Sep 2016 13:20:06 +0000 (15:20 +0200)]
Fix installation of more than one widget

Using command line tool, it is possible to install
more than just one widget. Before this commit, the
list of requested permission was not cleaned.

Change-Id: Ic9311754f51f12d6231d1f08a55eb4b4aef0c74e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoAvoid to exit in setting permission list
José Bollo [Mon, 12 Sep 2016 12:52:30 +0000 (14:52 +0200)]
Avoid to exit in setting permission list

Change-Id: I623546a8c134b54f7b62b42a980f603202e42868
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoadd documentation & ideas about config.xml
José Bollo [Mon, 12 Sep 2016 12:08:33 +0000 (14:08 +0200)]
add documentation & ideas about config.xml

Also enforce the strings for 'id' and 'version' to be not
empty in config.xml

Change-Id: I510b62891885033e0b750fac5f5de5e0fd25d75d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoUse of the new 'roothttp' option
José Bollo [Wed, 31 Aug 2016 12:44:04 +0000 (14:44 +0200)]
Use of the new 'roothttp' option

The new option 'roothttp' set the root directory that the
HTTP part of the binder serves. Its default value is ".".

Using this option, the content accessible through HTTP can be
a subdirectory of the root and in the same time, the application
data are available in the root directory.

Change-Id: I30d5f78eb2fe500b840fe0f4869d3e54be69c3cf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoconfig: allows "standard" types 43/6143/2 2.0.1 2.0.2 blowfish_2.0.1 blowfish_2.0.2
José Bollo [Tue, 19 Jul 2016 08:43:54 +0000 (10:43 +0200)]
config: allows "standard" types

The standard types for HTML (text/html) and QML (text/vnd.qt.qml)
should be available.

This is needed for 3 reasons:
 - installing existing demos
 - installing almost standard HTML widgets
 - the current default type is text/html

Change-Id: I9fa418b1c995663ac4120d3e0bdb42def3ab166e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
8 years agoafm-launch.conf: handle URL, native, QML and hybrid types 25/6125/1
Manuel Bachmann [Fri, 15 Jul 2016 10:30:02 +0000 (10:30 +0000)]
afm-launch.conf: handle URL, native, QML and hybrid types

Provide a generic layout for all the application types and
usecases that developers may want to use, and that we are
going to provide as templates.

Change-Id: I3f8100a16ea64262e0cb7a0e1ee38a24eab776e8
Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
8 years agoafm-launch.conf: handle services through application/vnd.agl.service mimetype
Stephane Desneux [Sun, 10 Jul 2016 12:58:19 +0000 (14:58 +0200)]
afm-launch.conf: handle services through application/vnd.agl.service mimetype

Change-Id: Icb19b5d5036168b3e74f8e684ec4a2909d0feeb7
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
8 years agocmake: handle build for SDK
Stephane Desneux [Fri, 8 Jul 2016 17:22:22 +0000 (19:22 +0200)]
cmake: handle build for SDK

When building for SDK, only the wgtpkg tools should be built

Change-Id: I2f935bae1b26d1d0e8b9513ade85703f8f49cf9d
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
8 years agoupgrading documentation to new usage
José Bollo [Fri, 24 Jun 2016 14:07:04 +0000 (16:07 +0200)]
upgrading documentation to new usage

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