* [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* Re: [OE-core] [PATCH] seatd: fix packaging error with systemd DISTRO_FEATURES
2025-06-06 16:16 [PATCH] seatd: fix packaging error with systemd DISTRO_FEATURES Gyorgy Sarvari
@ 2025-06-10 8:03 ` Alexander Kanavin
2025-06-10 8:33 ` Gyorgy Sarvari
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2025-06-10 8:03 UTC (permalink / raw)
To: skandigraun; +Cc: openembedded-core
On Fri, 6 Jun 2025 at 18:16, Gyorgy Sarvari via lists.openembedded.org
<skandigraun=gmail.com@lists.openembedded.org> wrote:
>
> 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.
> +inherit meson pkgconfig update-rc.d useradd ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
Conditional inherits are best avoided. There are plenty of recipes
that inherit systemd unconditionally, and they do not require similar
fixes. Perhaps we should install the service file unconditionally?
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [OE-core] [PATCH] seatd: fix packaging error with systemd DISTRO_FEATURES
2025-06-10 8:03 ` [OE-core] " Alexander Kanavin
@ 2025-06-10 8:33 ` Gyorgy Sarvari
0 siblings, 0 replies; 3+ messages in thread
From: Gyorgy Sarvari @ 2025-06-10 8:33 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
On 6/10/25 10:03, Alexander Kanavin wrote:
> On Fri, 6 Jun 2025 at 18:16, Gyorgy Sarvari via lists.openembedded.org
> <skandigraun=gmail.com@lists.openembedded.org> wrote:
>> 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.
>> +inherit meson pkgconfig update-rc.d useradd ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
> Conditional inherits are best avoided. There are plenty of recipes
> that inherit systemd unconditionally, and they do not require similar
> fixes. Perhaps we should install the service file unconditionally?
>
> Alex
Thanks for the feedback - I don't have particularly strong feelings for
this patch. Will send v2 soon.
^ permalink raw reply [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