weston-init: Redefine weston service and add socket activation option
PATCH v2 1/1 weston-init: Redefine weston service and add socket activation option
Currently, weston when autolauched with systemd ends up with seat0 related errors because its launched before seat0 is assigned.
Fixes
[05:16:09.357] logind: failed to get session seat
[05:16:09.358] logind: cannot setup systemd-logind helper (-61), using legacy fallback
The above error results in ptest failures in parselogs, even though weston has started ok using fallback methods, these errors are still seen in logs
Also fixes weston ptests
RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: PASSED (8.58s)
Signed-off-by Khem Raj <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Henning Heinold <[email protected]>
---
v2: Improve commit msg
meta/recipes-graphics/wayland/weston-init.bb | 8 ++- .../wayland/weston-init/weston-autologin | 11 +++ .../wayland/weston-init/[email protected] | 69 ++++++++++++++++--- .../wayland/weston-init/[email protected] | 10 +++ 4 files changed, 87 insertions(+), 11 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston-init/weston-autologin create mode 100644 meta/recipes-graphics/wayland/weston-init/[email protected]
meta/recipes-graphics/wayland/weston-init.bb +7 -1
@@ -8,7 +8,9 @@ SRC_URI = "file://init \ file://weston.env \ file://weston.ini \ file://[email protected] \ + file://[email protected] \ file://71-weston-drm.rules \ + file://weston-autologin \ file://weston-start" S = "${WORKDIR}"
@@ -20,6 +22,10 @@ do_install() { # Install Weston systemd service and accompanying udev rule install -D -p -m0644 ${WORKDIR}/[email protected] ${D}${systemd_system_unitdir}/[email protected] + install -D -p -m0644 ${WORKDIR}/[email protected] ${D}${systemd_system_unitdir}/[email protected] + 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 \
@@ -50,7 +56,7 @@ RDEPENDS_${PN} = "weston kbd" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." -FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/[email protected] ${sysconfdir}/default/weston" +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/[email protected] ${systemd_system_unitdir}/[email protected] ${sysconfdir}/default/weston ${sysconfdir}/pam.d/" CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
meta/recipes-graphics/wayland/weston-init/weston-autologin new file +11 -0
@@ -0,0 +1,11 @@ +auth required pam_nologin.so +auth required pam_unix.so try_first_pass nullok + +account required pam_nologin.so +account required pam_unix.so + +session required pam_env.so +session required pam_unix.so +-session optional pam_systemd.so type=wayland class=user desktop=weston +-session optional pam_loginuid.so +
meta/recipes-graphics/wayland/weston-init/[email protected] +59 -10
74 lines not on this page · raw message
meta/recipes-graphics/wayland/weston-init/[email protected] new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=Weston Wayland socket [email protected] + +[Socket] +ListenStream=/run/user/1000/wayland-%I + +[Install] +WantedBy=sockets.target +
Signature · 1 line
2.28.0