repo: Support reading and upgrading from older composefs-rs repos#285
Merged
cgwalters merged 1 commit intocomposefs:mainfrom Apr 27, 2026
Merged
repo: Support reading and upgrading from older composefs-rs repos#285cgwalters merged 1 commit intocomposefs:mainfrom
cgwalters merged 1 commit intocomposefs:mainfrom
Conversation
efb2d6c to
b95b1a0
Compare
Production bootc (pinned at composefs-rs 2203e8f) predates three format changes: - ce66285 repository: Add meta.json for repo metadata and cfsctl init - b7dc270 Add repr(c) for SplitStream header structs - d5ec81d oci: Generate composefs EROFS at pull time, track via config refs This commit adds transparent backward compatibility and a non-destructive upgrade path. The splitstream reader detects old-layout headers (where the Rust compiler reordered SplitstreamHeader fields) and converts them on the fly. Repository::open_upgrade() infers the algorithm and verity mode from existing objects when meta.json is missing, writes it, and opens normally — replacing the destructive --reset-metadata flow. upgrade_repo() walks all tagged images and generates EROFS for any that lack it, rewriting config and manifest splitstreams in the current format. Layer splitstreams stay old-format on disk since the reader handles them transparently. The CLI uses open_upgrade by default (opt out with --no-upgrade). An integration test pulls a real image with an old cfsctl binary (requires CFSCTL_PATH_OLD) to verify the full upgrade path. Assisted-by: OpenCode (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
b95b1a0 to
2c91bec
Compare
cgwalters
added a commit
to cgwalters/bootc
that referenced
this pull request
Apr 24, 2026
Update composefs-rs to rev b95b1a0b2f which adds support for reading splitstreams written by bootc <= 1.15.x. Those builds were missing #[repr(C)] on SplitstreamHeader, causing the Rust compiler to reorder fields for alignment. The new composefs-rs detects this old layout and translates the header transparently. Switch the initramfs from init_path() to open_upgrade(), which handles the meta.json migration non-destructively: it infers the algorithm and verity mode from existing objects instead of requiring them as arguments. See: composefs/composefs-rs#285 Assisted-by: OpenCode (Claude Opus 4)
cgwalters
added a commit
to cgwalters/bootc
that referenced
this pull request
Apr 29, 2026
Add unified storage support to the composefs path, leveraging the new support for containers-storage. See: composefs/composefs-rs#285 Assisted-by: OpenCode (Claude Opus 4) Assisted-by: OpenCode (Claude Sonnet 4.6) Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters
added a commit
to cgwalters/bootc
that referenced
this pull request
Apr 29, 2026
Add unified storage support to the composefs path, leveraging the new support for containers-storage. See: composefs/composefs-rs#285 Assisted-by: OpenCode (Claude Opus 4) Assisted-by: OpenCode (Claude Sonnet 4.6) Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters
added a commit
to cgwalters/bootc
that referenced
this pull request
May 1, 2026
Add unified storage support to the composefs path, leveraging the new support for containers-storage. See: composefs/composefs-rs#285 Assisted-by: OpenCode (Claude Opus 4) Assisted-by: OpenCode (Claude Sonnet 4.6) Signed-off-by: Colin Walters <walters@verbum.org>
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.
Production bootc (pinned at composefs-rs 2203e8f) predates three format changes:
This commit adds transparent backward compatibility and a non-destructive upgrade path.
The splitstream reader detects old-layout headers (where the Rust compiler reordered SplitstreamHeader fields) and converts them on the fly. Repository::open_upgrade() infers the algorithm and verity mode from existing objects when meta.json is missing, writes it, and opens normally — replacing the destructive --reset-metadata flow. upgrade_repo() walks all tagged images and generates EROFS for any that lack it, rewriting config and manifest splitstreams in the current format. Layer splitstreams stay old-format on disk since the reader handles them transparently.
The CLI uses open_upgrade by default (opt out with --no-upgrade). An integration test pulls a real image with an old cfsctl binary (requires CFSCTL_PATH_OLD) to verify the full upgrade path.
Assisted-by: OpenCode (Claude Opus 4)