summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb
diff options
context:
space:
mode:
authorLeon Anavi <leon.anavi@konsulko.com>2020-02-14 12:46:59 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-02-17 18:01:02 +0000
commitd642530b7e63a0eba77795ed712c8d7d6503ea39 (patch)
tree9d2a9066115879599cfac5f9ebd7c125f2b6b592 /meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb
parentdafb20687f840a37c16008c2560093eba69ae4f5 (diff)
agl-sota: Set initramfs fstype to cpio.gz
Set initramfs fstype to cpio.gz in 50_local.conf.inc (included in local.conf) when agl-sota is enabled. Bug-AGL: SPEC-3097, SPEC-3130 Change-Id: Iaa92d127aa6dddd6c6bc843cf3ee40e816d9e191 Suggested-by: Patrick Vacek <patrickvacek@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb')
0 files changed, 0 insertions, 0 deletions
7'>187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
;---------------------------------------------------------------------------------
; File:
;
;    afm-unit.conf
;
; Role:
;
;    Configure how installation of widget produces unit files for systemd
;
; Processing and format:
;
;    1. File load
;
;           Lines beginning with ; are firstly removed
;
;    2. File instantiation
;
;           Mustache (extended) substitutions are applied using JSON
;           data deduced from config.xml file of the widget.
;
;    3. Extraction of units
;
;           Extract produced units, pack it (remove empty lines and directives)
;
; Directives:
;
;    Any directive occupy one whole line starting with %
;
;     - %nl
;
;             produce an empty line at the end
;
;     - %begin systemd-unit
;     - %end systemd-unit
;
;             delimit the produced unit
;
;     - %systemd-unit user
;     - %systemd-unit system
;
;             tells the kind of unit (user/system)
;
;     - %systemd-unit service NAME
;     - %systemd-unit socket NAME
;
;             gives the name and type of the unit
;
;     - %systemd-unit wanted-by NAME
;
;             tells to install a link to unit in the wants of NAME
;
; Setting variables:
;
;    AFM uses the feature of systemd that completely ignores options prefixed
;    with X-
;
;    Consequently, options starting with X-AFM- are recorded as public data
;    about the application and options starting starting with X-AFM-- are
;    recorded as private data.
;
;    Examples:
;
;        X-AFM-description={{description}}
;
;              Records the description of the unit in the field "description"
;              of both the public and private object describing the unit.
;
;        X-AFM--wgtdir={{:#metadata.install-dir}}
;
;              Records the installation directory path in the field "wgtdir"
;              of the private object only.
;
;---------------------------------------------------------------------------------
{{#targets}}

;---------------------------------------------------------------------------------
;----        P R O V I D E D   U N I T S                                      ----
;---------------------------------------------------------------------------------
%begin systemd-unit

# auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}} of {{idaver}}
%nl

[Unit]
Description={{description}}
X-AFM-description={{description}}
X-AFM-name={{name.content}}
X-AFM-shortname={{name.short}}
X-AFM-id={{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
X-AFM-version={{version}}
X-AFM-author={{author.content}}
X-AFM-author-email={{author.email}}
X-AFM-width={{width}}
X-AFM-height={{height}}
X-AFM--ID={{id}}
X-AFM--target-name={{:#target}}
X-AFM--content={{content.src}}
X-AFM--type={{content.type}}
X-AFM--wgtdir={{:#metadata.install-dir}}
X-AFM--workdir={{&#metadata.app-data-dir}}/{{id}}
%nl

Wants=sockets.target

# Adds check to smack
ConditionSecurity=smack
%nl

# Automatic bound to required api
{{#required-api}}
{{#value=auto|ws}}
BindsTo=afm-api-ws-{{name}}.socket
After=afm-api-ws-{{name}}.socket
{{/value=auto|ws}}
{{/required-api}}
%nl

[Service]
EnvironmentFile=-@afm_confdir@/unit.env.d/*
SmackProcessLabel=User::App::{{id}}
SuccessExitStatus=0 SIGKILL

{{#required-permission}}
  {{#urn:AGL:permission::platform:no-oom}}      OOMScoreAdjust=-500             {{/urn:AGL:permission::platform:no-oom}}
  {{#urn:AGL:permission::partner:real-time}}    IOSchedulingClass=realtime      {{/urn:AGL:permission::partner:real-time}}
#  {{^urn:AGL:permission::partner:real-time}}    RestrictRealtime=on             {{/urn:AGL:permission::partner:real-time}}
  {{#urn:AGL:permission::public:display}}       SupplementaryGroups=display     {{/urn:AGL:permission::public:display}}
  {{^urn:AGL:permission::public:syscall:clock}} SystemCallFilter=~@clock        {{/urn:AGL:permission::public:syscall:clock}}
{{/required-permission}}
%nl

WorkingDirectory=-{{&#metadata.app-data-dir}}/{{id}}
ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}

%systemd-unit user
{{#required-permission.urn:AGL:permission::public:hidden}}\
%systemd-unit service afm-service-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
{{/required-permission.urn:AGL:permission::public:hidden}}\
{{^required-permission.urn:AGL:permission::public:hidden}}\
%systemd-unit service afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
{{/required-permission.urn:AGL:permission::public:hidden}}\

Environment=LD_LIBRARY_PATH=$ORIGIN/lib

SyslogIdentifier=afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
StandardInput=null
StandardOutput=journal
StandardError=journal

;---------------------------------------------------------------------------------
;----   text/html  application/vnd.agl.native  application/vnd.agl.service    ----
;---------------------------------------------------------------------------------
{{#content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}

{{^content.type=application/vnd.agl.service}}
X-AFM--http-port={{:#metadata.http-port}}
{{/content.type=application/vnd.agl.service}}

ExecStart=/usr/bin/afb-daemon \
	--name afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} \
	--rootdir={{:#metadata.install-dir}} \
	--workdir={{&#metadata.app-data-dir}}/{{id}} \
	{{#content.type=application/vnd.agl.service}}\
		--no-httpd \
	{{/content.type=application/vnd.agl.service}}\
	{{^content.type=application/vnd.agl.service}}\
		--port={{:#metadata.http-port}} \
		--random-token \
		{{#required-permission.urn:AGL:permission::public:no-htdocs}}\
			--roothttp=. \
		{{/required-permission.urn:AGL:permission::public:no-htdocs}}\
		{{^required-permission.urn:AGL:permission::public:no-htdocs}}\
			--roothttp=htdocs \
		{{/required-permission.urn:AGL:permission::public:no-htdocs}}\
	{{/content.type=application/vnd.agl.service}}\
	{{#required-permission.urn:AGL:permission::public:applications:read}}\
		--alias=/icons:{{:#metadata.icons-dir}} \
	{{/required-permission.urn:AGL:permission::public:applications:read}}\
	{{#required-api}}\
		{{#value=auto}}\
			--ws-client=unix:%t/apis/ws/{{name}} \
		{{/value=auto}}\
		{{#value=ws}}\
			--ws-client=unix:%t/apis/ws/{{name}} \
		{{/value=ws}}\
		{{#value=dbus}}\
			--dbus-client={{name}} \
		{{/value=dbus}}\
		{{#value=link}}\
			--binding=%t/apis/lib/{{name}} \
		{{/value=link}}\
		{{#value=cloud}}\
			--cloud-client={{name}} \
		{{/value=cloud}}\
		{{#value=local}}\
			--binding={{:#metadata.install-dir}}/{{name}} \
		{{/value=local}}\
	{{/required-api}}\
	{{#provided-api}}\
		{{#value=auto}}\
			{{^required-permission.urn:AGL:permission::partner:service:no-ws}}\
				--ws-server=sd:{{name}} \
			{{/required-permission.urn:AGL:permission::partner:service:no-ws}}\
			{{^required-permission.urn:AGL:permission::partner:service:no-dbus}}\
				--dbus-server={{name}} \
			{{/required-permission.urn:AGL:permission::partner:service:no-dbus}}\
		{{/value=auto}}\
		{{#value=ws}}\
			--ws-server=sd:{{name}} \
		{{/value=ws}}\
		{{#value=dbus}}\
			--dbus-server={{name}} \
		{{/value=dbus}}\
	{{/provided-api}}\
	{{#content.type=text/html}}\
		--exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t
	{{/content.type=text/html}}\
	{{#content.type=application/vnd.agl.native}}\
		--exec {{:#metadata.install-dir}}/{{content.src}} @p @t
	{{/content.type=application/vnd.agl.native}}

{{/content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}


;---------------------------------------------------------------------------------
;----                 application/x-executable                                ----
;---------------------------------------------------------------------------------
{{#content.type=application/x-executable}}

ExecStart={{:#metadata.install-dir}}/{{content.src}}

{{/content.type=application/x-executable}}

;---------------------------------------------------------------------------------
; auto start
;---------------------------------------------------------------------------------
{{#required-permission.urn:AGL:permission::system:run-by-default}}
%nl
[Install]
WantedBy=default.target
%systemd-unit wanted-by default.target
{{/required-permission.urn:AGL:permission::system:run-by-default}}

%end systemd-unit


;---------------------------------------------------------------------------------
;----        P R O V I D E D   A P I S                                        ----
;---------------------------------------------------------------------------------

{{#provided-api}}
{{#value=ws|auto}}

%begin systemd-unit

# auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}} of {{idaver}}
#
%systemd-unit user
%systemd-unit socket afm-api-ws-{{name}}

[Socket]
SmackLabel=*
ListenStream=%t/apis/ws/{{name}}
FileDescriptorName={{name}}

{{#required-permission.urn:AGL:permission::public:hidden}}\
Service=afm-service-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}.service
{{/required-permission.urn:AGL:permission::public:hidden}}\
{{^required-permission.urn:AGL:permission::public:hidden}}\
Service=afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}.service
{{/required-permission.urn:AGL:permission::public:hidden}}\

;---------------------------------------------------------------------------------
%nl
[Install]
WantedBy=sockets.target
%systemd-unit wanted-by sockets.target
;---------------------------------------------------------------------------------

%end systemd-unit

{{/value=ws|auto}}
{{/provided-api}}

{{/targets}}