Add a systemd template unit for Flutter based applications to the
applaunchd recipe.
Bug-AGL: SPEC-4466
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ia7cb24d27beebf7c7e4bcfb7a256bd45ffa432ce
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27838
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
ci-image-boot-test: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
--- /dev/null
+[Unit]
+Description=%I
+
+[Service]
+Type=simple
+User=agl-driver
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=/usr/bin/flutter --b=/usr/share/flutter/%I --app-id=%I
git://gerrit.automotivelinux.org/gerrit/src/applaunchd;protocol=https;branch=${AGL_BRANCH} \
file://agl-app@.service \
file://agl-app-web@.service \
git://gerrit.automotivelinux.org/gerrit/src/applaunchd;protocol=https;branch=${AGL_BRANCH} \
file://agl-app@.service \
file://agl-app-web@.service \
+ file://agl-app-flutter@.service \
file://no-network.conf \
file://private-tmp.conf \
"
file://no-network.conf \
file://private-tmp.conf \
"
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/agl-app@.service ${D}${systemd_system_unitdir}/
install -m 644 ${WORKDIR}/agl-app-web@.service ${D}${systemd_system_unitdir}/
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/agl-app@.service ${D}${systemd_system_unitdir}/
install -m 644 ${WORKDIR}/agl-app-web@.service ${D}${systemd_system_unitdir}/
+ install -m 644 ${WORKDIR}/agl-app-flutter@.service ${D}${systemd_system_unitdir}/
# Install individual sandboxing overrides/drop-ins to be used by apps
install -d ${D}${systemd_system_unitdir}/sandboxing
# Install individual sandboxing overrides/drop-ins to be used by apps
install -d ${D}${systemd_system_unitdir}/sandboxing
install -m 644 ${WORKDIR}/private-tmp.conf ${D}${systemd_system_unitdir}/sandboxing/
}
install -m 644 ${WORKDIR}/private-tmp.conf ${D}${systemd_system_unitdir}/sandboxing/
}
-PACKAGE_BEFORE_PN += "${PN}-template-agl-app ${PN}-template-agl-app-web"
+PACKAGE_BEFORE_PN += "${PN}-template-agl-app ${PN}-template-agl-app-web ${PN}-template-agl-app-flutter"
FILES:${PN} += "${systemd_system_unitdir} ${datadir}/dbus-1/"
FILES:${PN} += "${systemd_system_unitdir} ${datadir}/dbus-1/"
FILES:${PN}-template-agl-app-web = "${systemd_system_unitdir}/agl-app-web@.service"
FILES:${PN}-template-agl-app-web = "${systemd_system_unitdir}/agl-app-web@.service"
+FILES:${PN}-template-agl-app-flutter = "${systemd_system_unitdir}/agl-app-flutter@.service"
+
RDEPENDS:${PN} += " \
agl-session \
polkit-rule-agl-app \
RDEPENDS:${PN} += " \
agl-session \
polkit-rule-agl-app \
RDEPENDS:${PN}-template-agl-app = "${PN}"
RDEPENDS:${PN}-template-agl-app-web = "${PN}"
RDEPENDS:${PN}-template-agl-app = "${PN}"
RDEPENDS:${PN}-template-agl-app-web = "${PN}"
+
+RDEPENDS:${PN}-template-agl-app-flutter = "${PN}"