composefs: Implement bootc edit - #2501
Open
cgwalters-bot wants to merge 2 commits into
Open
cgwalters-bot wants to merge 2 commits into
cgwalters-bot wants to merge 2 commits into
Conversation
Prep for implementing `bootc edit` on composefs, which needs the same staging logic with a target image that comes from an edited spec rather than from `SwitchOpts`. The journal record drops `bootc.from_downloaded`, which was always false there since that case returns earlier. Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
`bootc edit` bailed on the composefs backend, one of the gaps listed for stabilizing it. The ostree logic maps over directly: the only transitions `edit` supports are an image change or a boot order flip, and composefs already has both as `switch` and `rollback`. So parse and validate the edited spec in a helper shared by both backends, and dispatch to the composefs switch or rollback code. Like `bootc switch` on composefs, editing the image back to one that is already deployed (e.g. the booted image while another is staged) errors on the identical fs-verity digest, where ostree would stage it again. The new tmt test runs on both backends, since the ostree path had no integration coverage either. Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
Contributor
Author
|
Rebased onto main; 2 commits, no content change. Generated-by: https://github.com/cgwalters/#llms |
cgwalters-bot
force-pushed
the
bot/composefs-edit
branch
from
September 26, 2026 03:00
1bd98d8 to
8cb79b6
Compare
This branch has not been deployed
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 editbailed on the composefs backend. It only supports two transitions, an image change and a boot order flip, and composefs already implements those asswitchandrollback. This change shares the edited-spec parsing and validation between the two backends and dispatches to those. The first commit is a prep commit that splits upswitch_composefs.On composefs, editing the image back to one that is already deployed fails on the identical fs-verity digest, just as
bootc switchdoes.Testing: a new tmt test,
plan-50-edit, covers a no-op edit, an image+rollback edit that must be rejected, an image change, and a boot order flip across reboots. It passed on composefs with GRUB and BLS (unsealed, ext4) and on ostree. Unit tests, including a new table-driventest_validate_edited_spec, andjust validatealso passed. Everything ran on a 16-core RHEL 10 devspace. Sealed UKI with systemd-boot is still unverified: there the guest times out on reboot, and the existingplan-36-rollbackfails the same way, so it looks like an environment problem. It still needs a run in upstream CI (the composefs sealed matrix leg).The
Signed-off-by: Colin Walters <walters@verbum.org>on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#20 (review)Generated-by: https://github.com/cgwalters/#llms