From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Patrick Williams" <patrick@stwcx.xyz>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] systemd.bbclass: fix postinst for real systemd-systemctl-native
Date: Wed, 28 May 2025 14:33:34 +0200 [thread overview]
Message-ID: <DA7SP4NN2WXR.1NUSV0GI05ZO5@bootlin.com> (raw)
In-Reply-To: <20250528035625.1262266-1-patrick@stwcx.xyz>
On Wed May 28, 2025 at 5:56 AM CEST, Patrick Williams wrote:
> The commit 7a580800db39 switched from a small Python implementation
> of `systemctl` to using the real systemctl executable from the
> systemd package. In the systemd.bbclass, systemd-systemctl-native
> is used to default-enable services, based on the SYSTEMD_SERVICES
> variable, but this was only done if `systemctl` can be executed
> without error. The problem is that the real systemctl executable
> treats a zero argument call as if `systemctl list-units` were ran.
> This cannot be done when cross-compiling and yields:
>
> ```
> Failed to connect to system scope bus via local transport: Operation
> not permitted (consider using --machine=<user>@.host --user to
> connect to bus of other user)
> ```
>
> The end result is that the `systemd_postinst` effectively turns into
> a silent no-op and services are not correctly enabled.
>
> Switch the systemd.bbclass to use `systemctl --help` instead, which
> does not require any dbus access to be functional.
>
> Fixes: 7a580800db39 ("systemd: Build the systemctl executable")
> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
> ---
Hi Patrick,
Thanks for your patch.
It looks like this is breaking postinstall in some configurations, with
the following error:
ERROR: core-image-sato-1.0-r0 do_rootfs: Postinstall scriptlets of ['bluez5', 'ofono', 'connman', 'xserver-nodm-init', 'avahi-daemon', 'rpcbind', 'run-postinsts'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget:${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.
https://autobuilder.yoctoproject.org/valkyrie/#/builders/26/builds/1704
Looking at the build, I believe following configuration should be enough
to reproduce on core-image-sato or even core-image-minimal.
INIT_MANAGER = 'systemd'
DISTRO_FEATURES_BACKFILL_CONSIDERED:remove = 'sysvinit'
TEST_SUITES:append = ' systemd'
Can you have a look at the source of this issue please?
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2025-05-28 12:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 3:56 [PATCH] systemd.bbclass: fix postinst for real systemd-systemctl-native Patrick Williams
2025-05-28 9:07 ` [OE-core] " Alexander Kanavin
2025-05-28 19:47 ` Patrick Williams
2025-05-30 11:19 ` Alexander Kanavin
2025-05-30 13:04 ` Patrick Williams
2025-05-28 12:33 ` Mathieu Dubois-Briand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DA7SP4NN2WXR.1NUSV0GI05ZO5@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=patrick@stwcx.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox