From: Patrick Williams <patrick@stwcx.xyz>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: mns@gomspace.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] Issues enabling systemd template service using WantedBy construct (Styhead -> Walnascar)
Date: Tue, 27 May 2025 23:38:48 -0400 [thread overview]
Message-ID: <aDaFSOfqodNDGXUV@heinlein> (raw)
In-Reply-To: <CANNYZj_Fs1-_RHJgojgKPkobKe1eOCK4iwWGSXf+b1kuYr8O=Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]
On Mon, May 12, 2025 at 02:19:14PM +0200, Alexander Kanavin wrote:
> On Mon, 12 May 2025 at 14:12, Martin Siegumfeldt via
> lists.openembedded.org <mns=gomspace.com@lists.openembedded.org>
> wrote:
>
> > As mentioned, it appears to be a regression during the styhead -> walnascar development. I notice that the systemctl-native is now built from the systemd sources - is this correct? Should I consequently report this through systemd?
>
> Yes, we've transitioned to using systemd's implementation rather than our own.
>
I'm running into this same problem and I think there is a serious flaw
with walnascar / master. We are using IPKs and what is happening is
that the `postinst` is not running correctly. The `systemd_postinst` is
where all of the unit files are enabled (based on the SYSTEMD_SERVICE
variable). If this doesn't run correctly, the image is missing all of
the default enabled services and templates.
The `systemd_postinst` has a guard "if systemctl >/dev/null 2>/dev/null"
and if this fails, none of the unit file enable code is ran. The thing
is, `systemctl` will always fail because it by default is the same thing
as `systemctl list-units`, which needs to access the systemd bus
connection.
I modified systemd.bbclass as follows:
```
systemd_postinst() {
+systemctl || echo "It failed for some reason"
if systemctl >/dev/null 2>/dev/null; then
OPTS=""
```
After this, my `log.do_rootfs` is full of:
```
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)
It failed for some reason
```
I think there needs to be some change in systemd_postinst to run
something other than the equivalent of `systemctl list-units` to
determine if the executable is valid.
--
Patrick Williams
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-05-28 3:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 12:12 Issues enabling systemd template service using WantedBy construct (Styhead -> Walnascar) Martin Siegumfeldt
2025-05-12 12:19 ` [OE-core] " Alexander Kanavin
2025-05-28 3:38 ` Patrick Williams [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=aDaFSOfqodNDGXUV@heinlein \
--to=patrick@stwcx.xyz \
--cc=alex.kanavin@gmail.com \
--cc=mns@gomspace.com \
--cc=openembedded-core@lists.openembedded.org \
/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