Expand description
mkcomposefs - Create composefs images from directories or dumpfiles.
This is a Rust reimplementation of the C mkcomposefs tool, providing compatible command-line interface and output format.
ยงCompatibility status
See https://github.com/composefs/composefs/discussions/423 for context.
Implemented and tested (byte-for-byte match with C mkcomposefs):
--from-file,--print-digest,--print-digest-only--skip-devices,--skip-xattrs,--user-xattrs--min-version/--max-version(V1 compact inodes, BFS ordering, whiteout table)--digest-store(C-compatible flatXX/digestlayout via [FlatDigestStore])--threads(controls tokio worker threads and verity-computation concurrency)- Source from directory or dumpfile, output to file or stdout
Bit-for-bit compatible with the C mkcomposefs by default; use --hardlinks
to enable host hard-link deduplication (shared EROFS inodes, i_nlink > 1).
Structsยง
- Args ๐
- Create a composefs image from a source directory or dumpfile.
Functionsยง
- apply_
transformations ๐ - Apply filesystem transformations based on command-line flags.
- compute_
fsverity_ ๐digest - Compute the fsverity digest of the image.
- read_
directory ๐ - Read a filesystem tree from a directory path.
- read_
dumpfile ๐ - Read and parse a dumpfile from the given source.
- remove_
device_ ๐nodes - Remove all device nodes (block and character devices) from the filesystem.
- run
- Entry point for the mkcomposefs multi-call mode.
- run_
from_ args - Entry point when invoked as a hidden
cfsctl mkcomposefssubcommand. - run_
with_ ๐args - set_
all_ ๐mtimes_ to_ epoch - Set all modification times in the filesystem to Unix epoch (0).
- write_
image ๐ - Write the image to the specified path (or stdout if
-).