Skip to main content

Module repo

Module repo 

Source
Expand description

Composefs repository lifecycle and OCI pull paths.

This module owns how OCI images get into the composefs object store. There are two pull paths, selected by the use_unified flag:

§Direct pull (use_unified = false)

pull_composefs_direct fetches from the source transport (registry, OCI dir, etc.) straight into the composefs repo via composefs_oci::pull with default options. No containers-storage involvement.

§Unified pull (use_unified = true)

pull_composefs_unified is the two-stage path that populates all three stores (see crate::store for the architecture overview):

Stage 1 — Pull into bootc-owned containers-storage via CStorage::pull_with_progress (or pull_from_host_storage if the image already exists in the default podman store, saving a network round-trip).

Stage 2composefs_oci::pull with LocalFetchOpt::ZeroCopy and storage_root pointing at the containers-storage directory. composefs-ctl walks the overlay diff/ directories and FICLONEs each file into the composefs object store keyed by its SHA-512 fsverity digest. On a reflink-capable filesystem this is near-instantaneous and consumes no additional disk space.

The caller provides storage_path as an absolute filesystem path string (not a Dir fd) because composefs-ctl passes it to a child skopeo process. It is derived from the physical root fd via /proc/self/fd/{fd} readlink.

§Entry points

Structs§

PullRepoResult 🔒
Result of pulling a composefs repository, including the OCI manifest digest needed to reconstruct image metadata from the local composefs repo.

Functions§

bootc_tag_for_manifest 🔒
Create a composefs OCI tag name for the given manifest digest.
initialize_composefs_repository 🔒
open_composefs_repo 🔒
pull_composefs_direct 🔒
Pull an image directly into the composefs repository via skopeo.
pull_composefs_repo 🔒
Pulls an image into a composefs repository at /sysroot.
pull_composefs_unified 🔒
Pull an image via unified storage: first into bootc-owned containers-storage, then from there into the composefs repository via cstor (zero-copy reflink/hardlink).