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Β§

complete
Shell completion helpers for dynamic value completion via [clap_complete].
composefs_info
composefs-info - Query information from composefs images.
fuse
FUSE mount support for cfsctl.
mkcomposefs
mkcomposefs - Create composefs images from directories or dumpfiles.
mountcomposefs
mount.composefs - Mount helper for composefs images.
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.
MountOpts πŸ”’
Common options for mount commands (shared across regular, OCI, and ostree mount).
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.

FunctionsΒ§

copy_image
Copy an OCI image (and all its layers) from one repository to another using varlink connections.
default_repo_path πŸ”’
Resolve the default repository path based on the effective uid.
dump_files
Print file information from a composefs filesystem for the given paths
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 πŸ”’