Conversation
7ce65e4 to
fb929fa
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-daemonto the ostree planner. This skips all runtimesystemctl calls but still installs the systemd units so the daemon
starts after boot.
--initis not exposed because ostree always needssystemd for the
/nixbind mount.Remove the unused OstreeError enum. Add a Fedora 42 container test.
Closes: #155