X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl-core%2Frecipes-graphics%2Fwayland%2Fweston-init_aglcore.inc;h=8966700ac2d04b5fc7a571c22e1717581b29b27d;hb=4c2a3dbe7b652e679c9228d7d8c81aa641bd968b;hp=51c59ae4d6ec0f54d6dcff8423d459f594ccac03;hpb=1c3c06842ac1b9c089d0a08e91c60f44e4844fac;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 51c59ae4d..8966700ac 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc +++ b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc @@ -1,6 +1,54 @@ -do_install_append() { +SYSTEMD_AUTO_ENABLE = "enable" + +do_install:append() { # Remove upstream weston.ini to avoid conflict with weston-ini-conf package rm -f ${D}${sysconfdir}/xdg/weston/weston.ini } -SYSTEMD_AUTO_ENABLE = "enable" +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"