Skip to main content

Crate composefs_ctl

Crate composefs_ctl 

Source
Expand description

Library for cfsctl command line utility

This crate also re-exports all composefs-rs library crates, so downstream consumers can take a single dependency on cfsctl instead of listing each crate individually.

use composefs_ctl::composefs::repository::Repository;
use composefs_ctl::composefs::fsverity::Sha256HashValue;

let repo = Repository::<Sha256HashValue>::open_path(
    rustix::fs::CWD,
    "/nonexistent",
);
assert!(repo.is_err());

Re-exportsΒ§

pub use composefs;
pub use composefs_boot;
pub use composefs_oci;

ModulesΒ§

composefs_info
composefs-info - Query information from composefs images.
mkcomposefs
mkcomposefs - Create composefs images from directories or dumpfiles.
varlink
Varlink RPC service exposing repository operations over a Unix socket. Varlink RPC service for cfsctl.

StructsΒ§

App
cfsctl
FsReadOptions πŸ”’
Common options for reading a filesystem from a path
IndicatifReporter πŸ”’
An indicatif-backed [ProgressReporter] for use in the CLI.
OCIConfigFilesystemOptions πŸ”’
Common options for operations using OCI config manifest streams that may transform the image rootfs
OCIConfigOptions πŸ”’
Common options for operations using OCI config manifest streams

EnumsΒ§

Command πŸ”’
ErofsVersion
The EROFS format version used when generating images.
HashType
The Hash algorithm used for FsVerity computation
LocalFetchCli πŸ”’
CLI representation of [composefs_oci::LocalFetchOpt].
OciCommand πŸ”’
OciReference πŸ”’
A reference to an OCI image: either a content digest or a named ref.
OstreeCommand πŸ”’

FunctionsΒ§

default_repo_path πŸ”’
Resolve the default repository path based on the effective uid.
dump_file_impl πŸ”’
get_mount_options πŸ”’
load_filesystem_from_oci_image πŸ”’
load_filesystem_from_ondisk_fs πŸ”’
open_repo
Open a repo, auto-upgrading old-format repos unless --no-upgrade was passed.
open_repo_at πŸ”’
Open a repo at an explicit path, auto-upgrading old-format repos unless no_upgrade is set.
resolve_hash_type πŸ”’
Determine the effective hash type for a repository.
resolve_oci_config πŸ”’
Resolve an OciReference to a config digest and optional verity.
resolve_oci_image πŸ”’
Resolve an OciReference to an [OciImage].
resolve_repo_path πŸ”’
Resolve the repository path from CLI args without opening it.
run_app
Top-level dispatch: handle init specially, otherwise open repo and run.
run_cmd_with_repo
Run with cmd
run_cmd_without_repo
Run commands that don’t require a repository.
run_from_iter
Acts as a proxy for the cfsctl CLI by executing the CLI logic programmatically
run_if_socket_activated
If the process was started bare via systemd socket activation, serve the varlink API on the activated socket and return Ok(true). Otherwise return Ok(false) so the caller falls through to normal CLI parsing.
run_init πŸ”’
Handle cfsctl init
verity_opt πŸ”’