pub(crate) enum Command {
Show 18 variants
Init {
algorithm: Algorithm,
path: Option<PathBuf>,
insecure: bool,
reset_metadata: bool,
erofs_version: Option<ErofsVersion>,
},
Transaction,
Cat {
name: String,
},
GC {
root: Vec<String>,
dry_run: bool,
},
ImportImage {
reference: String,
},
Oci {
cmd: OciCommand,
},
Ostree {
cmd: OstreeCommand,
},
Mount {
name: String,
mountpoint: String,
upperdir: Option<PathBuf>,
workdir: Option<PathBuf>,
read_write: bool,
},
CreateImage {
fs_opts: FsReadOptions,
image_name: Option<String>,
},
ComputeId {
fs_opts: FsReadOptions,
},
ComputeKarg {
path: PathBuf,
no_propagate_usr_to_root: bool,
},
CreateDumpfile {
fs_opts: FsReadOptions,
},
ImageObjects {
name: String,
},
DumpFiles {
image_name: String,
files: Vec<PathBuf>,
backing_path_only: bool,
},
Fsck {
json: bool,
metadata_only: bool,
},
Varlink {
address: Option<PathBuf>,
},
Mkcomposefs {
args: Vec<OsString>,
},
ComposefsInfo {
args: Vec<OsString>,
},
}Variants§
Init
Initialize a new composefs repository with a metadata file.
Creates the repository directory (if it doesn’t exist) and writes
a meta.json recording the digest algorithm. By default fs-verity
is enabled on meta.json, signaling that all objects require
verity. Use --insecure to skip (e.g. on tmpfs).
Fields
algorithm: AlgorithmThe fs-verity algorithm identifier.
Format: fsverity-
path: Option<PathBuf>Path to the repository directory (created if it doesn’t exist). If omitted, uses –repo/–user/–system location.
reset_metadata: boolMigrate an old-format repository: remove streams/ and images/ (which encode the algorithm) but keep objects/, then write fresh meta.json. Streams and images will need to be re-imported after migration.
erofs_version: Option<ErofsVersion>Default EROFS format version for images in this repository.
V1 is compatible with C mkcomposefs 1.0.8; V2 is the native format.
If omitted, falls back to the global --erofs-version flag, then defaults to V2.
Transaction
Take a transaction lock on the repository. This prevents garbage collection from occurring.
Cat
Reconstitutes a split stream and writes it to stdout
Fields
GC
Perform garbage collection
Fields
ImportImage
Imports a composefs image (unsafe!)
Oci
Commands for dealing with OCI images and layers
Fields
cmd: OciCommandOstree
Fields
cmd: OstreeCommandMount
Mounts a composefs image, possibly enforcing fsverity of the image
Fields
CreateImage
Read rootfs located at a path, add all files to the repo, then create the composefs image of the rootfs, commit it to the repo, and print its image object ID
Fields
fs_opts: FsReadOptionsComputeId
Read rootfs located at a path and compute the composefs image object id of the rootfs. Note that this does not create or commit the composefs image itself, and does not store any file objects in the repository.
Fields
fs_opts: FsReadOptionsComputeKarg
Read rootfs located at a path and compute the composefs kernel argument string.
Like compute-id but outputs the full kernel argument rather than the bare digest, choosing the argument name based on the EROFS format version:
V1: composefs.digest=v1-sha256-12:
Use –erofs-version to select the format. The boot transformation (SELinux relabeling, empty /boot and /sysroot) is always applied — this command produces a karg for a sealed boot image.
Example (in a Containerfile): cfsctl –erofs-version 1 compute-karg /mnt/base > /etc/kernel/cmdline
Fields
CreateDumpfile
Read rootfs located at a path and dump full content of the rootfs to a composefs dumpfile, writing to stdout. Does not store any file objects in the repository.
Fields
fs_opts: FsReadOptionsImageObjects
Lists all object IDs referenced by an image
Fields
DumpFiles
Extract file information from a composefs image for specified files or directories
By default, outputs information in composefs dumpfile format
Fields
image_name: StringThe name of the composefs image to read from, either an object ID digest or prefixed with ‘ref/’
Fsck
Check repository integrity
Verifies fsverity digests of all objects, validates stream and image symlinks, and checks splitstream internal consistency. Exits with a non-zero status if corruption is found.
Fields
Varlink
Serve the varlink RPC API on a Unix socket or systemd socket.
A single service answers both the org.composefs.Repository and (when
the oci feature is enabled) org.composefs.Oci interfaces on one
socket.
Fields
Mkcomposefs
Run mkcomposefs (C-compatible image builder); hidden, also available via argv0 dispatch.
ComposefsInfo
Run composefs-info (C-compatible image inspector); hidden, also available via argv0 dispatch.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more