From patchwork Wed Jul 15 10:13:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 92470 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB312C44501 for ; Wed, 15 Jul 2026 10:13:59 +0000 (UTC) Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.3081.1784110428368245362 for ; Wed, 15 Jul 2026 03:13:49 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: pengutronix.de, ip: 185.203.200.13, mailfrom: l.stach@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 6311F20221B; Wed, 15 Jul 2026 12:13:45 +0200 (CEST) Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1wjwcb-001v6M-0r; Wed, 15 Jul 2026 12:13:45 +0200 From: Lucas Stach To: openembedded-core@lists.openembedded.org Cc: yocto@pengutronix.de Subject: [PATCH v2 1/2] readyfd2sd: add recipe Date: Wed, 15 Jul 2026 12:13:44 +0200 Message-ID: <20260715101345.274000-1-l.stach@pengutronix.de> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 15 Jul 2026 10:13:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240943 Some services, such as seatd, only implement the s6 init ready notifications. readyfd2sd translates those notifications to the systemd-notify format to make them usable with the systemd init system. Signed-off-by: Lucas Stach --- v2: - add maintainers entry - add check for systemd distro feature --- meta/conf/distro/include/maintainers.inc | 1 + meta/recipes-core/readyfd2sd/readyfd2sd_git.bb | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 meta/recipes-core/readyfd2sd/readyfd2sd_git.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 07e840ac34dc..bf1c15db6596 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -768,6 +768,7 @@ RECIPE_MAINTAINER:pn-quilt-native = "Robert Yang " RECIPE_MAINTAINER:pn-quota = "Unassigned " RECIPE_MAINTAINER:pn-re2c = "Khem Raj " RECIPE_MAINTAINER:pn-readline = "Hongxu Jia " +RECIPE_MAINTAINER:pn-readyfd2sd = "Lucas Stach " RECIPE_MAINTAINER:pn-repo = "Unassigned " RECIPE_MAINTAINER:pn-resolvconf = "Chen Qi " RECIPE_MAINTAINER:pn-rgb = "Unassigned " diff --git a/meta/recipes-core/readyfd2sd/readyfd2sd_git.bb b/meta/recipes-core/readyfd2sd/readyfd2sd_git.bb new file mode 100644 index 000000000000..4f16a0ee65e3 --- /dev/null +++ b/meta/recipes-core/readyfd2sd/readyfd2sd_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "s6 readyfd to systemd sd_notify adapter" +DESCRIPTION = "${SUMMARY}" +HOMEPAGE = "https://git.sr.ht/~kennylevinsen/readyfd2sd" +SECTION = "base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c50481d620cb912754d78d319eeec30a" + +REQUIRED_DISTRO_FEATURES = "systemd" +DEPENDS = "systemd" + +PV = "0.1+git" +SRC_URI = "git://git.sr.ht/~kennylevinsen/readyfd2sd;protocol=https;branch=master" +SRCREV = "87c99ce10dca3f3c3e5c3a0d994ee7892e952b61" + +inherit meson pkgconfig systemd features_check From patchwork Wed Jul 15 10:13:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 92469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC33EC4450C for ; Wed, 15 Jul 2026 10:13:49 +0000 (UTC) Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.3115.1784110428369005155 for ; Wed, 15 Jul 2026 03:13:49 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: pengutronix.de, ip: 185.203.200.13, mailfrom: l.stach@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 7024C20222E; Wed, 15 Jul 2026 12:13:45 +0200 (CEST) Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1wjwcb-001v6M-14; Wed, 15 Jul 2026 12:13:45 +0200 From: Lucas Stach To: openembedded-core@lists.openembedded.org Cc: yocto@pengutronix.de Subject: [PATCH v2 2/2] seatd: use readyfd2sd to get rid of systemd service startup races Date: Wed, 15 Jul 2026 12:13:45 +0200 Message-ID: <20260715101345.274000-2-l.stach@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260715101345.274000-1-l.stach@pengutronix.de> References: <20260715101345.274000-1-l.stach@pengutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 15 Jul 2026 10:13:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/240942 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 --- ...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 +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