lints: Don't require ostree bits on composefs-native images - #4
cgwalters-bot wants to merge 1 commit into
Conversation
d636979 to
158812e
Compare
The baseimage-root lint insists on an /ostree -> sysroot/ostree symlink, and baseimage-composefs warns unless ostree's prepare-root.conf enables composefs. Both are meaningless for images that are only ever deployed with the composefs backend, and just force them to carry ostree cruft. Use the presence of /usr/lib/composefs/setup-root-conf.toml (even if empty) as the signal that an image is composefs-native, mirroring how prepare-root.conf signals ostree. If /ostree is present anyway it is still validated, and /sysroot is still required since both backends mount the physical root there. Closes: bootc-dev#2256 Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
158812e to
e0c7aa7
Compare
|
Signed off 1 commit(s) with |
e0c7aa7 to
957336b
Compare
|
Opened upstream as bootc-dev#2500. Closing this review draft. |
|
Signed off 1 commit(s) with |
|
Signed off 5 commit(s) with |
|
Signed off 1 commit(s) with |
|
Signed off 2 commit(s) with |
|
Signed off 1 commit(s) with |
|
Signed off 1 commit(s) with |
bootc container lintrequires an/ostree -> sysroot/ostreesymlink (thefatal
baseimage-rootlint) and warns unless ostree'sprepare-root.confenables composefs (
baseimage-composefs). Both are meaningless for imagesthat are only ever deployed with the composefs backend, and force them to
carry ostree cruft. Of the options discussed in bootc-dev#2256, detecting
/usr/lib/composefs/setup-root-conf.toml(even if empty) is the one that isactionable now, and it mirrors how
prepare-root.confsignals ostree.So when that file exists, a missing
/ostreeis accepted and theprepare-root.confcheck is skipped. If/ostreeis present anyway it isstill validated, and
/sysrootis still required since both backends mountthe physical root there. The lint descriptions, bootc-images.md (which
called the
/ostreerequirement a bug) and bootc-setup-root-conf.toml(5)now describe the file as the composefs-native marker.
Testing: extended the
baseimage-rootunit test to cover a composefs-nativeimage without
/ostree, with a bogus/ostreedirectory, and without/sysroot, and thebaseimage-composefstest to cover a composefs-nativeimage whose
prepare-root.confdisables composefs. On a 16-core RHEL 10devspace, rebased on current main:
cargo test -p bootc-lib(271passed, the same count as main since existing tests were extended) and
just validatepassed.CI note (2026-09-24): the
test-integration (fedora-44, composefs, ext4, grub, bls, unsealed)failure is unrelated to this change: the container testinstall configfailed withLoading configuration: No such file or directory, a race with the concurrently runningprintconfig --alltest, which creates and deletes/run/bootc/install/10-test.tomlwhileprint-configurationscans that directory. The same leg passed on other PRs with the same base. Failed jobs will be rerun once the run completes.bootc requires DCO: the commits have no
Signed-off-by, so a maintainer must sign off before merging (e.g.git rebase --signoff <base>and force-push).Closes: bootc-dev#2256
Generated-by: https://github.com/cgwalters/#llms
Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.
bootc-dev/bootc, basemainPVTI_lAHOAQ_SPs4Bj2Gizg8P4RITo review:
/draft, then approve, to open it upstream as a draft (/readyundoes that).