Skip to main content

Module cli

Module cli 

Source
Expand description

Β§Bootable container image CLI

Command line tool to manage bootable ostree-based containers.

StructsΒ§

ApplyFromDownloadedOpts πŸ”’
ComposefsFinalizeStagedOpts πŸ”’
Finalize a staged composefs deployment.
DownloadOnlyOpts πŸ”’
EditOpts πŸ”’
Perform an edit operation
ProgressOptions πŸ”’
Shared progress options
RollbackOpts πŸ”’
Options controlling rollback
SetOptionsForSourceOpts πŸ”’
Options for the set-options-for-source subcommand.
StatusOpts πŸ”’
Perform an status operation
SwitchOpts πŸ”’
Perform an switch operation
UpgradeOpts πŸ”’
Perform an upgrade operation
UsrOverlayOpts πŸ”’
Add a transient overlayfs on /usr

EnumsΒ§

BlockdevOpts πŸ”’
Subcommands for bootc internals blockdev.
BootArtifactErofsVersionArg πŸ”’
EROFS format and compatibility arguments to embed in a boot artifact.
CliExitStatus
The outcome of executing the CLI.
ContainerOpts πŸ”’
Subcommands which can be executed as part of a container build.
ErofsVersionArg πŸ”’
EROFS format version for computing a composefs digest.
ExportFormat πŸ”’
ExportSelinuxMode πŸ”’
FsverityOpts πŸ”’
Options for consistency checking
ImageCmdOpts πŸ”’
Subcommands which operate on images.
ImageListFormat πŸ”’
ImageListType πŸ”’
ImageOpts πŸ”’
Subcommands which operate on images.
InstallOpts πŸ”’
InternalsOpts πŸ”’
Hidden, internal only options
LoaderEntriesOpts πŸ”’
Operations on Boot Loader Specification (BLS) entries.
Opt πŸ”’
Deploy and transactionally in-place with bootable container images.
OutputFormat πŸ”’
SchemaType πŸ”’
SelinuxOpts πŸ”’
Subcommands for bootc internals selinux.
SoftRebootMode πŸ”’
StateOpts πŸ”’
UkiAddonCliOpts πŸ”’
UkiAddonScope πŸ”’
UkiSubcommands πŸ”’

ConstantsΒ§

EXIT_UNAVAILABLE
Exit status when a subcommand is unavailable because the running host lacks the feature behind it (see host_feature_gate_rejects). Distinct from a usage error (2) and a runtime failure (1) so that a caller probing for the feature, as TuneD does with bootc loader-entries set-options-for-source --help, can tell β€œnot supported here” from β€œfailed”. 77 is the status test harnesses use for β€œskipped”.
LOADER_ENTRIES_SUBCOMMAND πŸ”’
The name of the bootc loader-entries subcommand.

FunctionsΒ§

apply_from_downloaded_ostree πŸ”’
apply_host_feature_gates πŸ”’
Hide subcommands whose backing functionality is missing on the running host from --help. Invoking one is rejected before parsing by host_feature_gate_rejects.
callname_from_argv0 πŸ”’
Find the base binary name from argv0 (without a full path). The empty string is never returned; instead a fallback string is used. If the input is not valid UTF-8, a default is used.
edit πŸ”’
Implementation of the bootc edit CLI command.
edit_ostree πŸ”’
Implementation of the bootc edit CLI command for ostree backend.
ensure_self_unshared_mount_namespace πŸ”’
Ensure we’ve entered a mount namespace, so that we can remount /sysroot read-write TODO use https://github.com/ostreedev/ostree/pull/2779 once we can depend on a new enough ostree
get_storage πŸ”’
Load global storage state, expecting that we’re booted into a bootc system. This prepares the process for write operations (re-exec, mount namespace, etc).
global_init
Perform process global initialization. This should be called as early as possible in the standard main function.
handle_soft_reboot πŸ”’
Handle soft reboot based on the configured mode
handle_staged_soft_reboot πŸ”’
Handle soft reboot for staged deployments (used by upgrade and switch)
has_soft_reboot_capability πŸ”’
Check if a deployment has soft reboot capability
host_feature_gate_rejects πŸ”’
Whether args (argv, including argv0) invoke a subcommand that apply_host_feature_gates made unavailable. The top-level command has no options that take a value, so the first non-option argument is the subcommand name.
imgref_for_switch πŸ”’
is_unlabeled_exit_status πŸ”’
join_host_ipc_namespace πŸ”’
Join the host IPC namespace if we’re in an isolated one and have sufficient privileges. The default for podman run is a separate IPC namespace, which for e.g. bootc install can cause failures where tools like udev/cryptsetup expect semaphores to be in sync with the host. While we do want callers to pass --ipc=host, we don’t want to force them to need to either.
parse_absolute_path πŸ”’
prepare_for_write πŸ”’
A few process changes that need to be made for writing. IMPORTANT: This may end up re-executing the current process, so anything that happens before this should be idempotent.
prepare_soft_reboot πŸ”’
Prepare a soft reboot for the given deployment
require_root πŸ”’
rollback πŸ”’
Implementation of the bootc rollback CLI command.
rollback_ostree πŸ”’
Implementation of the bootc rollback CLI command for ostree backend.
run_from_iter
Parse the provided arguments and execute. Calls [clap::Error::exit] on failure, printing the error message and aborting the program.
run_from_opt πŸ”’
Internal (non-generic/monomorphized) primary CLI entrypoint
soft_reboot_rollback πŸ”’
Perform a soft reboot for a rollback deployment
soft_reboot_staged πŸ”’
Perform a soft reboot for a staged deployment
switch πŸ”’
Implementation of the bootc switch CLI command.
switch_ostree πŸ”’
Implementation of the bootc switch CLI command for ostree backend.
upgrade πŸ”’
Implementation of the bootc upgrade CLI command.
usroverlay πŸ”’
Implementation of bootc usroverlay