1 SUMMARY = "AGL user session"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6 file://agl-session@.service \
7 file://agl-session.target \
8 file://50-xdg-data-dirs.sh \
11 inherit systemd allarch useradd
13 USERADD_PACKAGES = "${PN}"
14 USERADDEXTENSION = "useradd-staticids"
15 GROUPADD_PARAM:${PN} = "\
19 -g 1001 agl-driver ; \
20 -g 1003 applaunchd ; \
22 # agl-driver user needs to be part of applaunchd group for D-Bus activation to still work
23 # should be removed after everything is converted to gRPC for enhanced security
24 USERADD_PARAM:${PN} = "\
25 -g 1001 -u 1001 -G video,display,pipewire,applaunchd -o -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
26 -g 1003 -u 1003 -o -d / -K PASS_MAX_DAYS=-1 applaunchd ; \
29 SYSTEMD_PACKAGES = "${PN}"
30 # Instantiate session for the 'agl-driver' user, so we don't have to hardcode
31 # the user name/ID in the service file itself
32 SYSTEMD_SERVICE:${PN} = "agl-session@agl-driver.service"
33 SYSTEMD_AUTO_ENABLE:${PN} = "enable"
36 install -d ${D}${systemd_system_unitdir}
37 install -m 0644 ${WORKDIR}/agl-session@.service ${D}${systemd_system_unitdir}
39 install -d ${D}${systemd_user_unitdir}
40 install -m 0644 ${WORKDIR}/agl-session.target ${D}${systemd_user_unitdir}
42 install -d ${D}${libdir}/systemd/user-environment-generators
43 install -m 0755 ${WORKDIR}/50-xdg-data-dirs.sh ${D}${libdir}/systemd/user-environment-generators/
47 ${systemd_system_unitdir} \
48 ${systemd_user_unitdir} \
49 ${libdir}/systemd/user-environment-generators/ \