Repository navigation
install: Reject --stateroot with the composefs backend - #2544
Merged
jeckersb merged 1 commit intoOct 6, 2026
Merged
Conversation
The composefs backend has a single stateroot: the shared /var lives at state/os/default/var and nothing in its install path reads the stateroot name. So `--stateroot myroot` together with `--composefs-backend` (or with an image that selects that backend itself) exited successfully and installed into `default` anyway. Fail early in InstallComposefsOpts::validate instead, the same way `--bootloader=none` is rejected. This covers to-disk, to-filesystem and to-existing-root, which all go through prepare_install. Passing `--stateroot default` names what the backend uses and stays accepted. Closes: bootc-dev#2542 Assisted-by: AI Signed-off-by: Andrew Dunn <andrew@dunn.dev>
cgwalters
approved these changes
Oct 5, 2026
cgwalters
left a comment
Collaborator
There was a problem hiding this comment.
Right thing to do now, though we do want to support this in the future
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.
bootc install to-disk --composefs-backend --stateroot myrootnow fails witherror: Installing to disk: --stateroot myroot is not supported with the composefs backend, which only uses default. Before this, it exited 0 and installed intostate/os/default.The check sits in
InstallComposefsOpts::validatebeside the--bootloader=noneone and runs fromprepare_install, so it covers to-disk, to-filesystem and to-existing-root.--stateroot defaultis still accepted, since composefs uses that name. A stateroot set in the install config TOML isn't checked, since an image may set one for its ostree installs.Testing:
make validatepasses, andcargo test -p bootc-libreports 286 passed and 1 ignored.test_composefs_opts_validategets stateroot cases, which fail with the check removed or withdefaultno longer exempted. In a VM,bootc install to-diskwith--stateroot myrootexited 1 and left no partition table, both with--composefs-backendand on an image that selects composefs itself. Composefs with--stateroot defaultor no flag installed intostate/os/default, and ostree with--stateroot myrootintoostree/deploy/myroot.The VM installs were run by hand; there's no new tmt test. Composefs installs from the
just buildimages fail withInvalid splitstream content typeeven without--stateroot, so those installs used the image squashed to one layer.Closes: #2542