aboutsummaryrefslogtreecommitdiffstats
path: root/conf/unit/afm-unit-debug.conf.in
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-08-02 18:48:57 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-08-16 13:49:16 +0000
commit6caade489f8bd15dccdde6c69452d920ead2201e (patch)
treefd04aca394c42225aa235a6453c560f2eb6761a6 /conf/unit/afm-unit-debug.conf.in
parent8c7132a146aa744f167ea2fc45dcd8d53018ecc0 (diff)
Add the external binding featureflounder_5.99.3flounder/5.99.35.99.3
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>
Diffstat (limited to 'conf/unit/afm-unit-debug.conf.in')
-rw-r--r--conf/unit/afm-unit-debug.conf.in36
1 files changed, 33 insertions, 3 deletions
diff --git a/conf/unit/afm-unit-debug.conf.in b/conf/unit/afm-unit-debug.conf.in
index 55af22d..01d3c2e 100644
--- a/conf/unit/afm-unit-debug.conf.in
+++ b/conf/unit/afm-unit-debug.conf.in
@@ -111,6 +111,12 @@ After=user@%i.service
ConditionSecurity=smack
%nl
# Automatic bound to required api
+{{#required-binding}}
+{{#value=extern}}
+BindsTo=afm-link-{{name}}@%i.service
+After=afm-link-{{name}}@%i.service
+{{/value=extern}}
+{{/required-binding}}
{{#required-api}}
{{#value=auto|ws}}
BindsTo=afm-api-{{name}}@%i.service
@@ -119,8 +125,8 @@ After=afm-api-{{name}}@%i.service
{{/required-api}}
{{#provided-api}}
{{#value=ws|auto}}
-Requires=afm-api-{{name}}@%i.service
-After=afm-api-{{name}}@%i.service
+Requires=afm-api-{{name}}@%i.socket
+After=afm-api-{{name}}@%i.socket
{{/value=ws|auto}}
{{/provided-api}}
%nl
@@ -174,10 +180,13 @@ ExecStart=/usr/bin/afb-daemon \
{{#required-api}} \
{{#value=auto|ws}}--ws-client=unix:@afm_users_rundir@/%i/apis/ws/{{name}}{{/value=auto|ws}} \
{{#value=dbus}}--dbus-client={{name}}{{/value=dbus}} \
- {{#value=link}}--binding=@afm_users_rundir@/%i/apis/lib/{{name}}{{/value=link}} \
{{#value=cloud}}--cloud-client={{name}}{{/value=cloud}} \
{{#value=local}}--binding={{:#metadata.install-dir}}/{{name}}{{/value=local}} \
{{/required-api}} \
+ {{#required-binding}} \
+ {{#value=local}}--binding={{:#metadata.install-dir}}/{{name}}{{/value=local}} \
+ {{#value=extern}}--binding=@afm_users_rundir@/%i/apis/link/{{name}}{{/value=extern}} \
+ {{/required-binding}} \
{{#provided-api}} \
{{#value=auto|ws}}--ws-server=sd:{{name}}{{/value=auto|ws}} \
{{#value=dbus}}--dbus-server={{name}}{{/value=dbus}} \
@@ -250,6 +259,27 @@ Service=afm-{{#required-permission.urn:AGL:permission::public:hidden}}service{{/
%end systemd-unit
{{/value=ws|auto}}
{{/provided-api}}
+;-------------------------------------------------------------------------------
+;---- P R O V I D E D B I N D I N G ----
+;-------------------------------------------------------------------------------
+{{#provided-binding}}
+;-------------------------------------------------------------------------------
+;---- T H E S E R V I C E O F T H E B I N D I N G ----
+;-------------------------------------------------------------------------------
+%begin systemd-unit
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+%systemd-unit system
+%systemd-unit service afm-link-{{name}}@
+[Unit]
+Description=Provides binding {{name}} for user %i
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/ln -s {{:#metadata.install-dir}}/{{value}} @afm_users_rundir@/%i/apis/link/{{name}}
+%end systemd-unit
+{{/provided-binding}}
{{/targets}}
;---------------------------------------------------------------------------------
; End of file afm-unit.conf mode DEVEL