Skip to content

composefs: Read manifest+config from composefs repo instead of .imginfo#2044

Draft
cgwalters wants to merge 2 commits intobootc-dev:mainfrom
cgwalters:prep-composefs-manifest
Draft

composefs: Read manifest+config from composefs repo instead of .imginfo#2044
cgwalters wants to merge 2 commits intobootc-dev:mainfrom
cgwalters:prep-composefs-manifest

Conversation

@cgwalters
Copy link
Collaborator

Sticking this as draft for now

composefs-rs now provides pull_image() which returns a PullResult
containing both the manifest and config digests/verities. Switch
from the older pull() which only returned the config information.

Log the full pull result (manifest+config digests and verity hashes)
via structured journal fields for both install and upgrade paths.

Assisted-by: OpenCode (Claude Opus 4)
composefs-rs stores the OCI manifest and config as splitstreams in
the repository during pull. Use this to eliminate the redundant
.imginfo sidecar files that bootc was maintaining separately.

Store the OCI manifest digest in the .origin file under an [image]
section, and use OciImage::open() to retrieve the full manifest+config
from the local composefs repo when needed (status, GC, export). This
avoids both the sidecar files and the surprising network-fetch fallback
that the old get_imginfo() would do if no .imginfo file existed.

For backwards compatibility, get_imginfo() falls back to reading
legacy .imginfo files for deployments created before this change.

The do_upgrade() and write_composefs_state() functions no longer need
ImgConfigManifest passed through, since the data is retrieved from
the repo on demand rather than written at deploy time.

get_container_manifest_and_config() is retained for is_image_pulled()
which checks the remote registry to determine if an update is available.

Assisted-by: OpenCode (Claude Opus 4)
@github-actions github-actions bot added the area/install Issues related to `bootc install` label Mar 4, 2026
@bootc-bot bootc-bot bot requested a review from gursewak1997 March 4, 2026 21:18
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors how container image manifest and configuration are handled for composefs deployments. Instead of storing them in a separate .imginfo file, the manifest digest is now stored in the .origin file, and the manifest/config are read directly from the composefs repository. This is a good improvement that centralizes image metadata storage. The changes are consistent across the codebase, and backward compatibility for older deployments with .imginfo files is maintained. I've found one area for improvement regarding repository handling efficiency.

Comment on lines 152 to 153
let mut repo = open_composefs_repo(&rootfs_dir)?;
repo.set_insecure(allow_missing_fsverity);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The repository is being opened and configured for a second time here. The first time is before the composefs_oci_pull_image call on line 131. This is inefficient as it involves redundant I/O and setup.

It would be better to open the repository only once at the beginning of the function. You can wrap it in an Arc for the pull operation, and then continue to use the same Arc<repo> for subsequent operations like create_composefs_filesystem. At the end of the function, you can use Arc::try_unwrap to get back the owned repo to be returned in PullRepoResult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant