Skip to content

Commit 26746a0

Browse files
krajrpurdie
authored andcommitted
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 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 6cffa73 commit 26746a0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

meta/recipes-core/seatd/seatd/init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ killproc() {
1515

1616
case "$1" in
1717
start)
18-
seatd -g video -n 1 > /tmp/seatd-start-notify &
18+
seatd -g seat -n 1 > /tmp/seatd-start-notify &
1919
[ -s /tmp/seatd-start-notify ] && exit 0
2020
sleep 0.1
2121
[ -s /tmp/seatd-start-notify ] && exit 0

meta/recipes-core/seatd/seatd_0.9.1.bb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \
1111
SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9"
1212
S = "${WORKDIR}/git"
1313

14-
inherit meson pkgconfig update-rc.d
14+
inherit meson pkgconfig systemd update-rc.d useradd
1515

1616
# https://www.openwall.com/lists/musl/2020/01/20/3
1717
CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow"
@@ -22,14 +22,21 @@ PACKAGECONFIG ?= " \
2222
"
2323

2424
PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled"
25-
PACKAGECONFIG[systemd] = ",,systemd"
25+
PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd"
2626

2727
do_install:append() {
2828
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
2929
install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd
30+
else
31+
install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service
3032
fi
3133
}
3234

35+
USERADD_PACKAGES = "${PN}"
36+
GROUPADD_PARAM:${PN} = "-r seat"
37+
3338
INITSCRIPT_NAME = "seatd"
3439
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
3540
INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"
41+
42+
SYSTEMD_SERVICE:${PN} = "seatd.service"

0 commit comments

Comments
 (0)