X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl-core%2Frecipes-graphics%2Fwayland%2Fweston-init_aglcore.inc;fp=meta-agl-core%2Frecipes-graphics%2Fwayland%2Fweston-init_aglcore.inc;h=070f5f8b53e6f2cd10c2a6205582f333a0f30c11;hb=b1b652ff976655d0c1fcb170fb3f6795e56cd947;hp=896f1eafb1cb32ce5cfc23db4474c047b1e9e14e;hpb=d468ce3b3d602f7c8a88d67126a32900b76fd433;p=AGL%2Fmeta-agl.git diff --git a/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc index 896f1eafb..070f5f8b5 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc +++ b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc @@ -6,3 +6,49 @@ do_install:append() { } RDEPENDS:${PN} += "weston-ini" + +# Temporary effective backport of upstream commit ccdaab97 +# This gets us on the same page as upstream with respect to running +# weston as non-root, and should make migrating to 3.5/Kirkstone +# easier. + +FILESEXTRAPATHS:prepend := "${THISDIR}/weston-init:" + +SRC_URI += " \ + file://weston.service \ + file://weston.socket \ + file://weston-autologin \ +" + +do_install:append() { + rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules + rm -f ${D}${systemd_system_unitdir}/weston@.service + rm -f ${D}${systemd_system_unitdir}/weston@.socket + + install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service + install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then + install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin + fi + + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_system_unitdir}/weston.service + + install -dm 755 -o weston -g weston ${D}/home/weston +} + +inherit useradd + +USERADD_PACKAGES = "${PN}" + +FILES_${PN} += "\ + ${systemd_system_unitdir}/weston.service \ + ${systemd_system_unitdir}/weston.socket \ + /home/weston \ +" + +SYSTEMD_SERVICE_${PN} = "weston.service weston.socket" +USERADD_PARAM_${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston" +GROUPADD_PARAM_${PN} = "-r wayland"