Skip to content

Commit bddd8aa

Browse files
committed
ostree-ext: Add composefs-repo to ostree-commit synthesis
Add `container::composefs_import::import_from_composefs_repo`, which walks a composefs `FileSystem` tree (already populated by a composefs-rs OCI pull) and synthesizes an equivalent ostree commit, reflinking file content into the ostree bare repo so the same disk blocks back both stores. This is the inverse of libostree's ostree→EROFS path. To support exporting such synthesized commits back out, `store.rs` gains `export_commit` (export straight from a commit checksum rather than an image ref) and `for_each_file_checksum` (walk a commit's regular-file content checksums), `export_to_oci` is refactored to take a `LayeredImageState` so both ref- and commit-based exports share it, and `query_image_commit` learns to treat a composefs-synthesized merge commit as its own base. A few existing metadata constants and helpers are promoted to `pub`/`pub(crate)` for use by the new module. This is library plumbing for bootc's unified storage work; it is unused by any in-tree caller on its own and lands separately to keep that feature's change set reviewable. Includes a standalone integration test (`test_composefs_import_to_ostree`) that builds a small OCI image, imports it through a composefs repo into ostree, and verifies the result. Assisted-by: OpenCode (claude-opus-4-8)
1 parent 9c3e439 commit bddd8aa

6 files changed

Lines changed: 1401 additions & 50 deletions

File tree

0 commit comments

Comments
 (0)