Skip to content

add a bootc target#157

Draft
Mic92 wants to merge 2 commits intomainfrom
bootc
Draft

add a bootc target#157
Mic92 wants to merge 2 commits intomainfrom
bootc

Conversation

@Mic92
Copy link
Member

@Mic92 Mic92 commented Mar 4, 2026

The ostree planner always started the daemon, making it impossible to
install Nix during bootc container builds where systemd is not running.

Add --no-start-daemon to the ostree planner. This skips all runtime
systemctl calls but still installs the systemd units so the daemon
starts after boot. --init is not exposed because ostree always needs
systemd for the /nix bind mount.

Remove the unused OstreeError enum. Add a Fedora 42 container test.

Closes: #155

@Mic92 Mic92 force-pushed the bootc branch 4 times, most recently from 7ce65e4 to fb929fa Compare March 4, 2026 10:20
@Mic92 Mic92 changed the title ostree: allow --no-start-daemon and --init none ostree: allow --no-start-daemon Mar 4, 2026
@Mic92 Mic92 changed the title ostree: allow --no-start-daemon ostree: support --no-start-daemon for bootc container builds Mar 4, 2026
Mic92 added 2 commits March 4, 2026 12:55
The profile tests hardcoded /nix/var/nix/profiles/default/ as
nix_store_path, which doesn't exist on systems where nix is installed
via a user profile. Resolve the actual store path by canonicalizing
the nix binary found in PATH.
bootc container images are built without a running systemd and with a
restricted filesystem layout: /var, /home, and /root do not exist during
the build. The ostree planner assumes all of these are available, so it
cannot be used for bootc image builds.

Introduce a bootc planner that understands the full bootc lifecycle:
Nix is installed into /nix at build time, moved to /usr/lib/nix for the
image layer, and on first boot systemd-tmpfiles seeds /var/lib/nix while
a bind-mount exposes it at /nix. sysusers.d ensures build users survive
across boots since /etc/passwd entries from the build may not persist.

Auto-detection checks for /usr/bin/bootc before the ostree check since
bootc images are also ostree-based and would otherwise match the wrong
planner.

Closes: #155
@Mic92 Mic92 marked this pull request as draft March 4, 2026 12:05
@Mic92 Mic92 marked this pull request as draft March 4, 2026 12:05
@Mic92 Mic92 changed the title ostree: support --no-start-daemon for bootc container builds add a bootc target Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootc and ostree native containers need --no-start-daemon option in the ostree plan.

1 participant