Skip to main content

Crate bootc_internal_utils

Crate bootc_internal_utils 

Source
Expand description

The inevitable catchall “utils” crate. Generally only add things here that only depend on the standard library and “core” crates.

Modules§

chroot 🔒
Builder for running commands inside a target os tree using a mount namespace + chroot. Requires CAP_SYS_ADMIN.
command 🔒
Helpers intended for std::process::Command and related structures.
iterators 🔒
path 🔒
reexec
Re-execute the current process
result_ext 🔒
timestamp 🔒
tracing_util 🔒
Helpers related to tracing, used by main entrypoints

Structs§

ChrootCmd
Builder for running commands inside a target directory using a mount namespace + chroot.
PathQuotedDisplay
Helper to format a path.

Constants§

NAME
The name of our binary

Traits§

AsyncCommandRunExt
Helpers intended for [tokio::process::Command].
CommandRunExt
Helpers intended for std::process::Command.
ExitStatusExt
Helpers intended for std::process::ExitStatus.
ResultExt
Extension trait for Result types that provides logging capabilities

Functions§

collect_until
Gather the first N items, and provide the count of the remaining items. The max count cannot be zero as that’s a pathological case.
initialize_tracing
Initialize tracing with the default configuration.
iterator_split
Given an iterator that’s cloneable, split it into two iterators at a given maximum number of elements.
podman_bin
Return the podman binary path, honouring the BOOTC_EXP_EXTERNAL_CONTAINER_TOOL environment variable so callers can substitute an alternative tool (e.g. dtool) without hard-linking it as /usr/bin/podman. The _EXP prefix indicates this interface is experimental and subject to change.
run_main
Intended for use in main, calls an inner function and handles errors by printing them.
skopeo_bin
Return the skopeo binary path, honouring the BOOTC_EXP_EXTERNAL_CONTAINER_TOOL environment variable so callers can substitute an alternative tool (e.g. dtool) without hard-linking it as /usr/bin/skopeo. The _EXP prefix indicates this interface is experimental and subject to change.
try_deserialize_timestamp
Try to parse an RFC 3339, warn on error.