Skip to content

composefs: Implement bootc edit - #20

Closed
cgwalters-bot wants to merge 2 commits into
mainfrom
bot/composefs-edit
Closed

cgwalters-bot wants to merge 2 commits into
mainfrom
bot/composefs-edit

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

bootc edit bailed on the composefs backend. It only supports two transitions, an image change and a boot order flip, and composefs already implements those as switch and rollback. 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 up switch_composefs.

On composefs, editing the image back to one that is already deployed fails on the identical fs-verity digest, just as bootc switch does.

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-driven test_validate_edited_spec, and just validate also 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 existing plan-36-rollback fails the same way, so it looks like an environment problem. It still needs a run in upstream CI (the composefs sealed matrix leg).

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.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lAHOAQ_SPs4Bj2Gizg8qa2E
  • Fork CI: off; the devspace testing described above is this PR's CI, and upstream CI runs once it is opened there

To review:

  • Approve, or comment /promote on a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.
  • Add a /draft line (in the same comment or before) to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are squashed into the commits they concern, with a reply here.

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>
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Signed off 2 commit(s) with Signed-off-by: Colin Walters <walters@verbum.org> for bootc-dev/bootc's DCO check, on cgwalters's approval #20 (review) of dc1d63897346. Same trees; the head is now 1bd98d8cc17a.

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Opened upstream as bootc-dev#2501. Closing this review draft.

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.

2 participants