Currently systemd has no insight into the startup state of the seatd server
process, so it might start dependant services too early, causing them to
fail due to being unable to connect to seatd.

Use the readyfd2sd adapter to convert the seatd s6 ready notification to
systemd-notify and switch the service to the notify type to allow systemd
to defer dependant service startup until seatd is ready to accept requests.

Signed-off-by: Lucas Stach <[email protected]>
---
 ...yfd2sd-to-notify-systemd-about-servi.patch | 34 +++++++++++++++++++
 meta/recipes-core/seatd/seatd_0.9.3.bb        |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-core/seatd/seatd/0001-systemd-use-readyfd2sd-to-notify-systemd-about-servi.patch

diff --git 
a/meta/recipes-core/seatd/seatd/0001-systemd-use-readyfd2sd-to-notify-systemd-about-servi.patch
 
b/meta/recipes-core/seatd/seatd/0001-systemd-use-readyfd2sd-to-notify-systemd-about-servi.patch
new file mode 100644
index 000000000000..59b880bb6f13
--- /dev/null
+++ 
b/meta/recipes-core/seatd/seatd/0001-systemd-use-readyfd2sd-to-notify-systemd-about-servi.patch
@@ -0,0 +1,34 @@
+From b4aa488bd43577ebbf4df5eb1272c724b32bffa9 Mon Sep 17 00:00:00 2001
+From: Lucas Stach <[email protected]>
+Date: Fri, 7 Nov 2025 21:37:01 +0100
+Subject: [PATCH] systemd: use readyfd2sd to notify systemd about service
+ startup
+
+Currently the example systemd service is racy, as systemd has no insight
+into the startup state of the seatd process. Use the readyfd2sd adapter
+in the service file to let systemd know when seatd is operational.
+
+Upstream-Status: Submitted 
[https://lists.sr.ht/~kennylevinsen/seatd-devel/patches/70377]
+---
+ contrib/systemd/seatd.service | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/systemd/seatd.service b/contrib/systemd/seatd.service
+index 0460e9e20644..d0b45933b463 100644
+--- a/contrib/systemd/seatd.service
++++ b/contrib/systemd/seatd.service
+@@ -3,9 +3,9 @@ Description=Seat management daemon
+ Documentation=man:seatd(1)
+ 
+ [Service]
+-Type=simple
++Type=notify
+ # Specify the group you'd like to grant access to seatd
+-ExecStart=seatd -g seat
++ExecStart=readyfd2sd -- seatd -g seat -n %%n
+ Restart=always
+ RestartSec=1
+ 
+-- 
+2.47.3
+
diff --git a/meta/recipes-core/seatd/seatd_0.9.3.bb 
b/meta/recipes-core/seatd/seatd_0.9.3.bb
index d0802eee6041..304f72ab0846 100644
--- a/meta/recipes-core/seatd/seatd_0.9.3.bb
+++ b/meta/recipes-core/seatd/seatd_0.9.3.bb
@@ -7,6 +7,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=715a99d2dd552e6188e74d4ed2914d5a"
 
 SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \
+           
file://0001-systemd-use-readyfd2sd-to-notify-systemd-about-servi.patch \
            file://init"
 SRCREV = "daa8196e10b180b8b0caeafa8e5f860eb1bd6706"
 
@@ -29,7 +30,7 @@ PACKAGECONFIG ?= " \
 "
 
 PACKAGECONFIG[libseat-builtin] = 
"-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled"
-PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd"
+PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd,readyfd2sd"
 
 do_install:append() {
         if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#240066): 
https://lists.openembedded.org/g/openembedded-core/message/240066
Mute This Topic: https://lists.openembedded.org/mt/120087765/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to