Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] seatd: fix packaging error with systemd DISTRO_FEATURES
@ 2025-06-06 16:16 Gyorgy Sarvari
  2025-06-10  8:03 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Gyorgy Sarvari @ 2025-06-06 16:16 UTC (permalink / raw)
  To: openembedded-core

The systemd unit file for this recipe is only installed in case
the target system's init system is not sysvinit (the recipe assumes
that in this case it is systemd). It is achieved by inspecting the
VIRTUAL-RUNTIME_init_manager variable.

However the systemd class was inherited unconditionally. This caused
a failure in do_package task, in case systemd is present in the
DISTRO_FEATURES but the system's init manager is sysvinit: in this case
the systemd unit file is not installed, however systemd.bbclass is
still trying to register is as a startup service. At this point
it failed:

ERROR: seatd-0.9.1-r0 do_package: Didn't find service unit 'seatd.service', specified in SYSTEMD_SERVICE:seatd.

To avoid this, inherit systemd bbclass only in case the init system is
specified as systemd.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 meta/recipes-core/seatd/seatd_0.9.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/seatd/seatd_0.9.1.bb b/meta/recipes-core/seatd/seatd_0.9.1.bb
index 87e1c3b67d..ef9364dc3c 100644
--- a/meta/recipes-core/seatd/seatd_0.9.1.bb
+++ b/meta/recipes-core/seatd/seatd_0.9.1.bb
@@ -11,7 +11,7 @@ SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \
 SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9"
 S = "${WORKDIR}/git"
 
-inherit meson pkgconfig systemd update-rc.d useradd
+inherit meson pkgconfig update-rc.d useradd ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd',  d)}
 
 # https://www.openwall.com/lists/musl/2020/01/20/3
 CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-10  8:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 16:16 [PATCH] seatd: fix packaging error with systemd DISTRO_FEATURES Gyorgy Sarvari
2025-06-10  8:03 ` [OE-core] " Alexander Kanavin
2025-06-10  8:33   ` Gyorgy Sarvari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox