Skip to main content

Module store

Module store 

Source
Expand description

The Storage type holds references to three different types of storage:

Β§OSTree

The default backend for the bootable container store; this lives in /ostree in the physical root.

Β§containers-storage:

Later, bootc gained support for Logically Bound Images. On ostree systems this is a containers-storage: instance that lives in /ostree/bootc/storage. On composefs systems the physical location is /composefs/bootc/storage with a compat symlink at ostree/bootc -> ../composefs/bootc.

Β§composefs

This lives in /composefs in the physical root.

StructsΒ§

BootedComposefs
Represents a composefs-based boot environment
BootedOstree
Represents an ostree-based boot environment
BootedStorage πŸ”’
Storage accessor for a booted system.
CachedImageStatus πŸ”’
Cached image status data used for optimization.
Storage πŸ”’
A reference to a physical filesystem root, plus accessors for the different types of container storage.

EnumsΒ§

BootedStorageKind πŸ”’
A system can boot via either ostree or composefs; this enum allows code to handle both cases while maintaining type safety.
Environment πŸ”’
Discriminated union representing the boot storage backend.

ConstantsΒ§

BOOTC_ROOT πŸ”’
The path to the bootc root directory, relative to the physical system root. On ostree systems this is a real directory; on composefs systems it is a symlink to ../composefs/bootc (see ensure_composefs_bootc_link).
COMPOSEFS
The toplevel composefs directory path
COMPOSEFS_BOOTC_ROOT πŸ”’
The β€œreal” bootc root for composefs-native systems, relative to the physical system root.
COMPOSEFS_MODE πŸ”’
The mode for the composefs directory; this is intentionally restrictive to avoid leaking information.
SYSROOT
Path to the physical root

FunctionsΒ§

ensure_composefs_bootc_link πŸ”’
On a composefs install the containers-storage lives under composefs/bootc/storage. To keep the rest of the code (and the /usr/lib/bootc/storage symlink which points through ostree/bootc) working, we create:
ensure_composefs_dir πŸ”’
Ensure the composefs directory exists in the given physical root with the correct permissions (mode 0700).
get_physical_root_and_run πŸ”’
Open the physical root (/sysroot) and /run directories for a booted system.

Type AliasesΒ§

ComposefsRepository
See https://github.com/containers/composefs-rs/issues/159