seatd: Create seat user and package systemd service
PATCH 1/2 seatd: Create seat user and package systemd service
With latest version seatd does not work properly if user access permissions are not correctly set, therefore create 'seat' group and package the seatd.service file and enable it by default with systemd distro feature
set logind to systemd when using systemd as default init system
--- meta/recipes-core/seatd/seatd_0.9.1.bb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
meta/recipes-core/seatd/seatd_0.9.1.bb +9 -2
@@ -11,7 +11,7 @@ SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \ SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9" S = "${WORKDIR}/git" -inherit meson pkgconfig update-rc.d +inherit meson pkgconfig systemd update-rc.d useradd # https://www.openwall.com/lists/musl/2020/01/20/3 CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow"
@@ -22,14 +22,21 @@ PACKAGECONFIG ?= " \ " PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled" -PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd" do_install:append() { if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd + else + install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service fi } +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r seat" + INITSCRIPT_NAME = "seatd" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" + +SYSTEMD_SERVICE:${PN} = "seatd.service"
PATCH 2/2 weston-init: Make weston user member of seat group
This enables weston launch to access the seatd socket /run/seatd.sock to communicate properly to acquire seat
--- meta/recipes-graphics/wayland/weston-init.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-graphics/wayland/weston-init.bb +1 -2
@@ -102,6 +102,5 @@ FILES:${PN} += "\ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" -USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,seat,wayland weston" GROUPADD_PARAM:${PN} = "-r wayland; -r render" -
Re: [OE-core] [PATCH 2/2] weston-init: Make weston user member of seat group
Quoted 18 lines · Khem Raj via lists.openembedded.org
This enables weston launch to access the seatd socket
/run/seatd.sockto communicate properly to acquire seatSigned-off-by Khem Raj <[email protected]>---
meta/recipes-graphics/wayland/weston-init.bb | 3 +--1 file changed, 1 insertion(+), 2 deletions(-)meta/recipes-graphics/wayland/weston-init.bb +0
-0@@ -102,6 +102,5 @@ FILES:${PN} += "\CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"meta/recipes-graphics/wayland/weston-init.bb +1
-1-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,seat,wayland weston"
Quoted 3 lines
GROUPADD_PARAM:${PN} = "-r wayland; -r render"
-
https://valkyrie.yoctoproject.org/#/builders/3/builds/558/steps/11/logs/stdio
Cheers,
Richard
Re: [OE-core] [PATCH 2/2] weston-init: Make weston user member of seat group
Quoted 17 lines · Richard Purdie
Quoted 15 lines · Khem Raj via lists.openembedded.org
This enables weston launch to access the seatd socket
/run/seatd.sockto communicate properly to acquire seatSigned-off-by Khem Raj <[email protected]>--- meta/recipes-graphics/wayland/weston-init.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)meta/recipes-graphics/wayland/weston-init.bb +0
-0@@ -102,6 +102,5 @@ FILES:${PN} += "\ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
Quoted 10 lines
meta/recipes-graphics/wayland/weston-init.bb FILES:${PN} += "\ · line 107
Quoted 6 lines
meta/recipes-graphics/wayland/weston-init.bb +1
-2SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" -USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,seat,wayland weston" GROUPADD_PARAM:${PN} = "-r wayland; -r render" -https://valkyrie.yoctoproject.org/#/builders/3/builds/558/steps/11/logs/stdio
yeah saw that in my CI as well overnight, I have sent a v2 to address it.
Quoted 4 lines
Cheers,
Richard
Hello,
Quoted 46 lines · Khem Raj via lists.openembedded.org
With latest version seatd does not work properly if user access permissions are not correctly set, therefore create 'seat' group and package the seatd.service file and enable it by default with systemd distro feature
set logind to systemd when using systemd as default init system
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-core/seatd/seatd_0.9.1.bb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)meta/recipes-core/seatd/seatd_0.9.1.bb +1
-1@@ -11,7 +11,7 @@ SRC_URI = "git:// git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \ SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9" S = "${WORKDIR}/git" -inherit meson pkgconfig update-rc.d +inherit meson pkgconfig systemd update-rc.d useradd # https://www.openwall.com/lists/musl/2020/01/20/3CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow"
meta/recipes-core/seatd/seatd_0.9.1.bb +0
-0@@ -22,14 +22,21 @@ PACKAGECONFIG ?= " \ " PACKAGECONFIG[libseat-builtin] ="-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled"
meta/recipes-core/seatd/seatd_0.9.1.bb +1
-1-PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd" do_install:append() { if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then install -Dm755 ${UNPACKDIR}/init${D}/${sysconfdir}/init.d/seatd
meta/recipes-core/seatd/seatd_0.9.1.bb +2
-0+ else + install -Dm644 ${S}/contrib/systemd/seatd.service${D}${systemd_unitdir}/system/seatd.service
fi
}
meta/recipes-core/seatd/seatd_0.9.1.bb PACKAGECONFIG ?= " \ · line 36
Quoted 2 lines
meta/recipes-core/seatd/seatd_0.9.1.bb +2
-0+USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r seat"
This new group needs to be added to the static id list (meta-selftest/files/static-group ?) or will break the reproducibility tests.
The reproducibility test builds with:
USERADDEXTENSION = "useradd-staticids" USERADD_ERROR_DYNAMIC = "skip"
Then, with this patch, I get this error:
ERROR: Nothing PROVIDES 'seatd'
seatd was skipped: Recipe seatd, package seatd: system groupname "seat"
does not have a static ID defined. USERADD_GID_TABLES file(s) not found in
BBPATH: files/group
Quoted 20 lines
+
INITSCRIPT_NAME= "seatd"
INITSCRIPT_PARAMS= "start 9 5 2 . stop 20 0 1 6 ."INHIBIT_UPDATERCD_BBCLASS=
"${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"meta/recipes-core/seatd/seatd_0.9.1.bb +2
-1+ +SYSTEMD_SERVICE:${PN} = "seatd.service" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group. View/Reply Online (#207890):
https://lists.openembedded.org/g/openembedded-core/message/207890
Mute This Topic: https://lists.openembedded.org/mt/109799901/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Yoann Congal Smile ECS - Tech expert
Quoted 63 lines · Yoann Congal via lists.openembedded.org
Hello,
Le mer. 27 nov. 2024 à 01:51, Khem Raj via lists.openembedded.org <[email protected]> a écrit :
Quoted 48 lines
With latest version seatd does not work properly if user access permissions are not correctly set, therefore create 'seat' group and package the seatd.service file and enable it by default with systemd distro feature
set logind to systemd when using systemd as default init system
Signed-off-by Khem Raj <[email protected]>---
meta/recipes-core/seatd/seatd_0.9.1.bb | 11 +++++++++--1 file changed, 9 insertions(+), 2 deletions(-)meta/recipes- renamed from meta/recipes-core/seatd/seatd_0.9.1.bb +0
-0core/seatd/seatd_0.9.1.bb
index8da57acc567..8ee43a3dc8f100644meta/recipes-core/seatd/seatd_0.9.1.bb +0
-0@@ -11,7 +11,7 @@ SRC_URI ="
git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master\
SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9"
S = "${WORKDIR}/git"meta/recipes-core/seatd/seatd_0.9.1.bb +1
-1-inherit meson pkgconfig update-rc.d +inherit meson pkgconfig systemd update-rc.d useradd# https://www.openwall.com/lists/musl/2020/01/20/3
CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow"meta/recipes-core/seatd/seatd_0.9.1.bb +0
-0@@ -22,14 +22,21 @@ PACKAGECONFIG ?= " \"
PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,- Dlibseat-builtin=disabled"
meta/recipes-core/seatd/seatd_0.9.1.bb +1
-1-PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd"do_install:append() {
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd
+ else
+ install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service
fi
}meta/recipes-core/seatd/seatd_0.9.1.bb PACKAGECONFIG ?= " \ · line 36
Quoted 2 lines
meta/recipes-core/seatd/seatd_0.9.1.bb +2
-0+USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r seat"This new group needs to be added to the static id list (meta- selftest/files/static-group ?) or will break the reproducibility tests.
The reproducibility test builds with:
USERADDEXTENSION = "useradd-staticids"USERADD_ERROR_DYNAMIC= "skip"
Quoted 5 lines
Then, with this patch, I get this error:
ERROR: Nothing PROVIDES 'seatd'
seatd was skipped: Recipe seatd, package seatd: system groupname "seat" does not have a static ID defined.USERADD_GID_TABLESfile(s) not found in BBPATH: files/group
Thanks, I was in the process of reviewing things so I've added a change to try and cover this.
Cheers,
Richard