Bug 15378 - systemd-systemctl-native.bb creates /etc/machine-id called from.image.bbclass
Summary: systemd-systemctl-native.bb creates /etc/machine-id called from.image.bbclass
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 4.0.20
Hardware: All Multiple
: Medium+ normal
Target Milestone: 5.0 M3
Assignee: David
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-01-31 18:45 UTC by David
Modified: 2024-02-21 12:37 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2024-01-31 18:45:33 UTC
Hi!

When calling the [sysctl script](https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd-systemctl/systemctl) with preset-all command, it will create an empty /etc/machine-id file.

This is required on readonly filesystem to make the system bootable, but on read-write rootfs it prevents the systemd services to met with the *ConditionFirstBoot=yes* condition, unless implicitly deleted.

The function is called from the image.bbclass during rootfs creation.

David
Comment 1 Randy MacLeod 2024-02-01 15:45:31 UTC
David are you able to send a patch to the oe-core email list?
Comment 2 David 2024-02-05 16:41:42 UTC
(In reply to Randy MacLeod from comment #1)
> David are you able to send a patch to the oe-core email list?

Okay, I will create one.
Comment 3 David 2024-02-21 12:37:51 UTC
Created a patch and forwarded it, but based on the reply looks like there is no bug. An easier solution to this problem, was to add stateless-rootfs to IMAGE_FEATURES.

This ticket can be closed based on this.