Skip to main content

mount_composefs

Function mount_composefs 

Source
pub fn mount_composefs(
    deployment: &Dir,
    repo: &Dir,
    name: &str,
    config: Option<&KeyFile>,
) -> Result<Option<OwnedFd>>
Expand description

Mount a deployment’s composefs image the way ostree-prepare-root does in the initramfs: an overlayfs of COMPOSEFS_IMAGE whose file content comes from the repository’s objects directory.

config is the deployment’s prepare-root configuration. Returns a detached, read-only mount, or None if composefs is disabled there, or if the deployment has no image and the configuration does not require one.

This differs from ostree-prepare-root in two ways. An unset composefs.enabled uses the image when there is one (ostree-prepare-root treats unset as off), and signed only requires fs-verity: neither the commit signature nor the image digest is checked, as the public key lives in the initramfs. Kernel arguments are not consulted.