mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
build-sys: A lot more manpage followups
- Remove duplicated logic between xtask and makefile for converting markdown; it needs to be in xtask as we handle the version substitution there and some other tweaks - Really just make the developer entrypoint `just update-generated` in general - Fix the rendering of booleans - Remove unnecessary emoji from prints Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
27
Makefile
27
Makefile
@@ -15,22 +15,9 @@ all: bin manpages
|
||||
bin:
|
||||
cargo build --release --features "$(CARGO_FEATURES)"
|
||||
|
||||
# Generate man pages from markdown sources
|
||||
MAN5_SOURCES := $(wildcard docs/src/man/*.5.md)
|
||||
MAN8_SOURCES := $(wildcard docs/src/man/*.8.md)
|
||||
TARGETMAN := target/man
|
||||
MAN5_TARGETS := $(patsubst docs/src/man/%.5.md,$(TARGETMAN)/%.5,$(MAN5_SOURCES))
|
||||
MAN8_TARGETS := $(patsubst docs/src/man/%.8.md,$(TARGETMAN)/%.8,$(MAN8_SOURCES))
|
||||
|
||||
$(TARGETMAN)/%.5: docs/src/man/%.5.md
|
||||
@mkdir -p $(TARGETMAN)
|
||||
go-md2man -in $< -out $@
|
||||
|
||||
$(TARGETMAN)/%.8: docs/src/man/%.8.md
|
||||
@mkdir -p $(TARGETMAN)
|
||||
go-md2man -in $< -out $@
|
||||
|
||||
manpages: $(MAN5_TARGETS) $(MAN8_TARGETS)
|
||||
.PHONY: manpages
|
||||
manpages:
|
||||
cargo run --package xtask -- manpages
|
||||
|
||||
STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage)
|
||||
install:
|
||||
@@ -41,12 +28,8 @@ install:
|
||||
ln -s "$(STORAGE_RELATIVE_PATH)" "$(DESTDIR)$(prefix)/lib/bootc/storage"
|
||||
install -D -m 0755 crates/cli/bootc-generator-stub $(DESTDIR)$(prefix)/lib/systemd/system-generators/bootc-systemd-generator
|
||||
install -d $(DESTDIR)$(prefix)/lib/bootc/install
|
||||
if [ -n "$(MAN5_TARGETS)" ]; then \
|
||||
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man5 $(MAN5_TARGETS); \
|
||||
fi
|
||||
if [ -n "$(MAN8_TARGETS)" ]; then \
|
||||
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 $(MAN8_TARGETS); \
|
||||
fi
|
||||
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man5 target/man/*.5; \
|
||||
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 target/man/*.8; \
|
||||
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
|
||||
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
|
||||
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
|
||||
|
||||
@@ -13,6 +13,7 @@ pub struct CliOption {
|
||||
pub help: String,
|
||||
pub possible_values: Vec<String>,
|
||||
pub required: bool,
|
||||
pub is_boolean: bool,
|
||||
}
|
||||
|
||||
/// Representation of a CLI command for JSON export
|
||||
@@ -73,16 +74,27 @@ pub fn command_to_json(cmd: &Command) -> CliCommand {
|
||||
|
||||
let help = arg.get_help().map(|h| h.to_string()).unwrap_or_default();
|
||||
|
||||
// For boolean flags, don't show a value name
|
||||
// Boolean flags use SetTrue or SetFalse actions and don't take values
|
||||
let is_boolean = matches!(
|
||||
arg.get_action(),
|
||||
clap::ArgAction::SetTrue | clap::ArgAction::SetFalse
|
||||
);
|
||||
let value_name = if is_boolean {
|
||||
None
|
||||
} else {
|
||||
arg.get_value_names()
|
||||
.and_then(|names| names.first())
|
||||
.map(|s| s.to_string())
|
||||
};
|
||||
|
||||
options.push(CliOption {
|
||||
long: arg
|
||||
.get_long()
|
||||
.map(String::from)
|
||||
.unwrap_or_else(|| id.to_string()),
|
||||
short: arg.get_short().map(|c| c.to_string()),
|
||||
value_name: arg
|
||||
.get_value_names()
|
||||
.and_then(|names| names.first())
|
||||
.map(|s| s.to_string()),
|
||||
value_name,
|
||||
default: arg
|
||||
.get_default_values()
|
||||
.first()
|
||||
@@ -91,6 +103,7 @@ pub fn command_to_json(cmd: &Command) -> CliCommand {
|
||||
help,
|
||||
possible_values,
|
||||
required: arg.is_required_set(),
|
||||
is_boolean,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ pub struct CliOption {
|
||||
pub possible_values: Vec<String>,
|
||||
/// Whether the option is required
|
||||
pub required: bool,
|
||||
/// Whether this is a boolean flag
|
||||
pub is_boolean: bool,
|
||||
}
|
||||
|
||||
/// Represents a CLI command from the JSON dump
|
||||
@@ -132,7 +134,8 @@ fn format_options_as_markdown(options: &[CliOption], positionals: &[CliPositiona
|
||||
// Add long flag
|
||||
flag_line.push_str(&format!("**--{}**", opt.long));
|
||||
|
||||
// Add value name if option takes argument
|
||||
// Add value name if option takes argument (but not for boolean flags)
|
||||
// Boolean flags are detected by having no value_name (set to None in cli_json.rs)
|
||||
if let Some(value_name) = &opt.value_name {
|
||||
flag_line.push_str(&format!("=*{}*", value_name));
|
||||
}
|
||||
@@ -140,8 +143,8 @@ fn format_options_as_markdown(options: &[CliOption], positionals: &[CliPositiona
|
||||
result.push_str(&format!("{}\n\n", flag_line));
|
||||
result.push_str(&format!(" {}\n\n", opt.help));
|
||||
|
||||
// Add possible values for enums
|
||||
if !opt.possible_values.is_empty() {
|
||||
// Add possible values for enums (but not for boolean flags)
|
||||
if !opt.possible_values.is_empty() && !opt.is_boolean {
|
||||
result.push_str(" Possible values:\n");
|
||||
for value in &opt.possible_values {
|
||||
result.push_str(&format!(" - {}\n", value));
|
||||
@@ -191,10 +194,12 @@ pub fn update_markdown_with_subcommands(
|
||||
before, begin_marker, generated_subcommands, end_marker, after
|
||||
);
|
||||
|
||||
fs::write(markdown_path, new_content)
|
||||
.with_context(|| format!("Writing to {}", markdown_path))?;
|
||||
|
||||
println!("Updated subcommands in {}", markdown_path);
|
||||
// Only write if content has changed to avoid updating mtime unnecessarily
|
||||
if new_content != content {
|
||||
fs::write(markdown_path, new_content)
|
||||
.with_context(|| format!("Writing to {}", markdown_path))?;
|
||||
println!("Updated subcommands in {}", markdown_path);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -238,10 +243,12 @@ pub fn update_markdown_with_options(
|
||||
format!("{}\n\n{}\n{}{}", before, begin_marker, end_marker, after)
|
||||
};
|
||||
|
||||
fs::write(markdown_path, new_content)
|
||||
.with_context(|| format!("Writing to {}", markdown_path))?;
|
||||
|
||||
println!("Updated {}", markdown_path);
|
||||
// Only write if content has changed to avoid updating mtime unnecessarily
|
||||
if new_content != content {
|
||||
fs::write(markdown_path, new_content)
|
||||
.with_context(|| format!("Writing to {}", markdown_path))?;
|
||||
println!("Updated {}", markdown_path);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -374,21 +381,6 @@ pub fn sync_all_man_pages(sh: &Shell) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Test the sync workflow
|
||||
pub fn test_sync_workflow(sh: &Shell) -> Result<()> {
|
||||
println!("🧪 Testing man page sync workflow...");
|
||||
|
||||
// Create a backup of current files
|
||||
let test_dir = "target/test-sync";
|
||||
sh.create_dir(test_dir)?;
|
||||
|
||||
// Run sync
|
||||
sync_all_man_pages(sh)?;
|
||||
|
||||
println!("✅ Sync workflow test completed successfully");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Generate man pages from hand-written markdown sources
|
||||
pub fn generate_man_pages(sh: &Shell) -> Result<()> {
|
||||
let man_src_dir = Utf8Path::new("docs/src/man");
|
||||
@@ -432,18 +424,31 @@ pub fn generate_man_pages(sh: &Shell) -> Result<()> {
|
||||
let content = fs::read_to_string(&path)?;
|
||||
let content_with_version = content.replace("<!-- VERSION PLACEHOLDER -->", &version);
|
||||
|
||||
// Create temporary file with version-replaced content
|
||||
let temp_path = format!("{}.tmp", path.display());
|
||||
fs::write(&temp_path, content_with_version)?;
|
||||
// Check if we need to regenerate by comparing input and output modification times
|
||||
let should_regenerate = if let (Ok(input_meta), Ok(output_meta)) =
|
||||
(fs::metadata(&path), fs::metadata(&output_file))
|
||||
{
|
||||
input_meta.modified().unwrap_or(std::time::UNIX_EPOCH)
|
||||
> output_meta.modified().unwrap_or(std::time::UNIX_EPOCH)
|
||||
} else {
|
||||
// If output doesn't exist or we can't get metadata, regenerate
|
||||
true
|
||||
};
|
||||
|
||||
cmd!(sh, "go-md2man -in {temp_path} -out {output_file}")
|
||||
.run()
|
||||
.with_context(|| format!("Converting {} to man page", path.display()))?;
|
||||
if should_regenerate {
|
||||
// Create temporary file with version-replaced content
|
||||
let temp_path = format!("{}.tmp", path.display());
|
||||
fs::write(&temp_path, content_with_version)?;
|
||||
|
||||
// Clean up temporary file
|
||||
fs::remove_file(&temp_path)?;
|
||||
cmd!(sh, "go-md2man -in {temp_path} -out {output_file}")
|
||||
.run()
|
||||
.with_context(|| format!("Converting {} to man page", path.display()))?;
|
||||
|
||||
println!("Generated {}", output_file);
|
||||
// Clean up temporary file
|
||||
fs::remove_file(&temp_path)?;
|
||||
|
||||
println!("Generated {}", output_file);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply post-processing fixes for apostrophe handling
|
||||
@@ -495,9 +500,9 @@ pub fn update_manpages(sh: &Shell) -> Result<()> {
|
||||
// Check each command and create man page if missing
|
||||
for command_parts in commands_to_check {
|
||||
let filename = if command_parts.len() == 1 {
|
||||
format!("bootc-{}.md", command_parts[0])
|
||||
format!("bootc-{}.8.md", command_parts[0])
|
||||
} else {
|
||||
format!("bootc-{}.md", command_parts.join("-"))
|
||||
format!("bootc-{}.8.md", command_parts.join("-"))
|
||||
};
|
||||
|
||||
let filepath = format!("docs/src/man/{}", filename);
|
||||
@@ -511,6 +516,23 @@ pub fn update_manpages(sh: &Shell) -> Result<()> {
|
||||
let command_name_full = format!("bootc {}", command_parts.join(" "));
|
||||
let command_description = cmd.about.as_deref().unwrap_or("TODO: Add description");
|
||||
|
||||
// Generate SYNOPSIS line with proper arguments
|
||||
let mut synopsis = format!("**{}** \\[*OPTIONS...*\\]", command_name_full);
|
||||
|
||||
// Add positional arguments
|
||||
for positional in &cmd.positionals {
|
||||
if positional.required {
|
||||
synopsis.push_str(&format!(" <*{}*>", positional.name.to_uppercase()));
|
||||
} else {
|
||||
synopsis.push_str(&format!(" \\[*{}*\\]", positional.name.to_uppercase()));
|
||||
}
|
||||
}
|
||||
|
||||
// Add subcommand if this command has subcommands
|
||||
if !cmd.subcommands.is_empty() {
|
||||
synopsis.push_str(" <*SUBCOMMAND*>");
|
||||
}
|
||||
|
||||
let template = format!(
|
||||
r#"# NAME
|
||||
|
||||
@@ -518,7 +540,7 @@ pub fn update_manpages(sh: &Shell) -> Result<()> {
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**{}** [*OPTIONS*]
|
||||
{}
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -549,19 +571,19 @@ TODO: Add practical examples showing how to use this command.
|
||||
std::fs::write(&filepath, template)
|
||||
.with_context(|| format!("Writing template to {}", filepath))?;
|
||||
|
||||
println!("✓ Created man page template: {}", filepath);
|
||||
println!("Created man page template: {}", filepath);
|
||||
created_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if created_count > 0 {
|
||||
println!("✓ Created {} new man page templates", created_count);
|
||||
println!("Created {} new man page templates", created_count);
|
||||
} else {
|
||||
println!("✓ All commands already have man pages");
|
||||
println!("All commands already have man pages");
|
||||
}
|
||||
|
||||
println!("🔄 Syncing OPTIONS sections...");
|
||||
println!("Syncing OPTIONS sections...");
|
||||
sync_all_man_pages(sh)?;
|
||||
|
||||
println!("Man pages updated.");
|
||||
@@ -585,6 +607,13 @@ fn apply_man_page_fixes(sh: &Shell, dir: &Utf8Path) -> Result<()> {
|
||||
.and_then(|s| s.to_str())
|
||||
.map_or(false, |e| e.chars().all(|c| c.is_numeric()))
|
||||
{
|
||||
// Check if the file already has the fix applied
|
||||
let content = fs::read_to_string(&path)?;
|
||||
if content.starts_with(".ds Aq \\(aq\n") {
|
||||
// Already fixed, skip
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply the same sed fixes as before
|
||||
let groffsub = r"1i .ds Aq \\(aq";
|
||||
let dropif = r"/\.g \.ds Aq/d";
|
||||
|
||||
@@ -36,9 +36,6 @@ fn main() {
|
||||
#[allow(clippy::type_complexity)]
|
||||
const TASKS: &[(&str, fn(&Shell) -> Result<()>)] = &[
|
||||
("manpages", man::generate_man_pages),
|
||||
("sync-manpages", man::sync_all_man_pages),
|
||||
("test-sync-manpages", man::test_sync_workflow),
|
||||
("update-json-schemas", update_json_schemas),
|
||||
("update-generated", update_generated),
|
||||
("package", package),
|
||||
("package-srpm", package_srpm),
|
||||
@@ -47,17 +44,21 @@ const TASKS: &[(&str, fn(&Shell) -> Result<()>)] = &[
|
||||
];
|
||||
|
||||
fn try_main() -> Result<()> {
|
||||
// Ensure our working directory is the toplevel
|
||||
// Ensure our working directory is the toplevel (if we're in a git repo)
|
||||
{
|
||||
let toplevel_path = Command::new("git")
|
||||
if let Ok(toplevel_path) = Command::new("git")
|
||||
.args(["rev-parse", "--show-toplevel"])
|
||||
.output()
|
||||
.context("Invoking git rev-parse")?;
|
||||
if !toplevel_path.status.success() {
|
||||
anyhow::bail!("Failed to invoke git rev-parse");
|
||||
{
|
||||
if toplevel_path.status.success() {
|
||||
let path = String::from_utf8(toplevel_path.stdout)?;
|
||||
std::env::set_current_dir(path.trim()).context("Changing to toplevel")?;
|
||||
}
|
||||
}
|
||||
// Otherwise verify we're in the toplevel
|
||||
if !Utf8Path::new("ADOPTERS.md").try_exists()? {
|
||||
anyhow::bail!("Not in toplevel")
|
||||
}
|
||||
let path = String::from_utf8(toplevel_path.stdout)?;
|
||||
std::env::set_current_dir(path.trim()).context("Changing to toplevel")?;
|
||||
}
|
||||
|
||||
let task = std::env::args().nth(1);
|
||||
@@ -393,11 +394,20 @@ fn update_json_schemas(sh: &Shell) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Update generated files using the new sync approach
|
||||
/// Update all generated files
|
||||
/// This is the main command developers should use to update generated content.
|
||||
/// It handles:
|
||||
/// - Creating new man page templates for new commands
|
||||
/// - Syncing CLI options to existing man pages
|
||||
/// - Updating JSON schema files
|
||||
#[context("Updating generated files")]
|
||||
fn update_generated(sh: &Shell) -> Result<()> {
|
||||
// Update man pages (create new templates + sync options)
|
||||
man::update_manpages(sh)?;
|
||||
|
||||
// Update JSON schemas
|
||||
update_json_schemas(sh)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ checks as part of a container build
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc container lint** [*OPTIONS...*]
|
||||
**bootc container lint** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -24,34 +24,22 @@ part of a build process; it will error if any problems are detected.
|
||||
|
||||
Default: /
|
||||
|
||||
**--fatal-warnings**=*FATAL_WARNINGS*
|
||||
**--fatal-warnings**
|
||||
|
||||
Make warnings fatal
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--list**=*LIST*
|
||||
**--list**
|
||||
|
||||
Instead of executing the lints, just print all available lints. At the current time, this will output in YAML format because it's reasonably human friendly. However, there is no commitment to maintaining this exact format; do not parse it via code or scripts
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--skip**=*SKIP*
|
||||
|
||||
Skip checking the targeted lints, by name. Use `--list` to discover the set of available lints
|
||||
|
||||
**--no-truncate**=*NO_TRUNCATE*
|
||||
**--no-truncate**
|
||||
|
||||
Don't truncate the output. By default, only a limited number of entries are shown for each lint, followed by a count of remaining entries
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# VERSION
|
||||
|
||||
@@ -5,7 +5,7 @@ container build
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc container** [*OPTIONS...*] <*SUBCOMMAND*>
|
||||
**bootc container** \[*OPTIONS...*\] <*SUBCOMMAND*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-edit - Apply full changes to the host specification
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc edit** [*OPTIONS...*]
|
||||
**bootc edit** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -26,14 +26,10 @@ Only changes to the `spec` section are honored.
|
||||
|
||||
Use filename to edit system specification
|
||||
|
||||
**--quiet**=*QUIET*
|
||||
**--quiet**
|
||||
|
||||
Don't display progress
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# VERSION
|
||||
|
||||
@@ -5,7 +5,7 @@ are performing an ostree-based installation, not bootc
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install ensure-completion** [*OPTIONS...*]
|
||||
**bootc install ensure-completion** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ installation using `install to-filesystem`
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install finalize** [*OPTIONS...*] <*ROOT_PATH*>
|
||||
**bootc install finalize** \[*OPTIONS...*\] <*ROOT_PATH*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ discover the desired root filesystem type from the container image
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install print-configuration** [*OPTIONS...*]
|
||||
**bootc install print-configuration** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-install-to-disk - Install to the target block device
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install to-disk** [*OPTIONS...*] <*DEVICE*>
|
||||
**bootc install to-disk** \[*OPTIONS...*\] <*DEVICE*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -28,14 +28,10 @@ more complex such as RAID, LVM, LUKS etc.
|
||||
|
||||
This argument is required.
|
||||
|
||||
**--wipe**=*WIPE*
|
||||
**--wipe**
|
||||
|
||||
Automatically wipe all existing data on device
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--block-setup**=*BLOCK_SETUP*
|
||||
|
||||
Target root block device setup
|
||||
@@ -71,38 +67,22 @@ more complex such as RAID, LVM, LUKS etc.
|
||||
|
||||
Specify the image to fetch for subsequent updates
|
||||
|
||||
**--enforce-container-sigpolicy**=*ENFORCE_CONTAINER_SIGPOLICY*
|
||||
**--enforce-container-sigpolicy**
|
||||
|
||||
This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op). Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--run-fetch-check**=*RUN_FETCH_CHECK*
|
||||
**--run-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--skip-fetch-check**=*SKIP_FETCH_CHECK*
|
||||
**--skip-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--disable-selinux**=*DISABLE_SELINUX*
|
||||
**--disable-selinux**
|
||||
|
||||
Disable SELinux in the target (installed) system
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--karg**=*KARG*
|
||||
|
||||
Add a kernel argument. This option can be provided multiple times
|
||||
@@ -111,14 +91,10 @@ more complex such as RAID, LVM, LUKS etc.
|
||||
|
||||
The path to an `authorized_keys` that will be injected into the `root` account
|
||||
|
||||
**--generic-image**=*GENERIC_IMAGE*
|
||||
**--generic-image**
|
||||
|
||||
Perform configuration changes suitable for a "generic" disk image. At the moment:
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--bound-images**=*BOUND_IMAGES*
|
||||
|
||||
How should logically bound images be retrieved
|
||||
@@ -134,14 +110,10 @@ more complex such as RAID, LVM, LUKS etc.
|
||||
|
||||
The stateroot name to use. Defaults to `default`
|
||||
|
||||
**--via-loopback**=*VIA_LOOPBACK*
|
||||
**--via-loopback**
|
||||
|
||||
Instead of targeting a block device, write to a file via loopback
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-install-to-existing-root - Install to the host root filesystem
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install to-existing-root** [*OPTIONS...*] [*ROOT_PATH*]
|
||||
**bootc install to-existing-root** \[*OPTIONS...*\] \[*ROOT_PATH*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -47,38 +47,22 @@ to be cleaned up if desired when rebooted into the new root.
|
||||
|
||||
Specify the image to fetch for subsequent updates
|
||||
|
||||
**--enforce-container-sigpolicy**=*ENFORCE_CONTAINER_SIGPOLICY*
|
||||
**--enforce-container-sigpolicy**
|
||||
|
||||
This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op). Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--run-fetch-check**=*RUN_FETCH_CHECK*
|
||||
**--run-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--skip-fetch-check**=*SKIP_FETCH_CHECK*
|
||||
**--skip-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--disable-selinux**=*DISABLE_SELINUX*
|
||||
**--disable-selinux**
|
||||
|
||||
Disable SELinux in the target (installed) system
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--karg**=*KARG*
|
||||
|
||||
Add a kernel argument. This option can be provided multiple times
|
||||
@@ -87,14 +71,10 @@ to be cleaned up if desired when rebooted into the new root.
|
||||
|
||||
The path to an `authorized_keys` that will be injected into the `root` account
|
||||
|
||||
**--generic-image**=*GENERIC_IMAGE*
|
||||
**--generic-image**
|
||||
|
||||
Perform configuration changes suitable for a "generic" disk image. At the moment:
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--bound-images**=*BOUND_IMAGES*
|
||||
|
||||
How should logically bound images be retrieved
|
||||
@@ -110,22 +90,14 @@ to be cleaned up if desired when rebooted into the new root.
|
||||
|
||||
The stateroot name to use. Defaults to `default`
|
||||
|
||||
**--acknowledge-destructive**=*ACKNOWLEDGE_DESTRUCTIVE*
|
||||
**--acknowledge-destructive**
|
||||
|
||||
Accept that this is a destructive action and skip a warning timer
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--cleanup**=*CLEANUP*
|
||||
**--cleanup**
|
||||
|
||||
Add the bootc-destructive-cleanup systemd service to delete files from the previous install on first boot
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# VERSION
|
||||
|
||||
@@ -5,7 +5,7 @@ filesystem structure
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install to-filesystem** [*OPTIONS...*] <*ROOT_PATH*>
|
||||
**bootc install to-filesystem** \[*OPTIONS...*\] <*ROOT_PATH*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -41,22 +41,14 @@ is currently expected to be empty by default.
|
||||
- wipe
|
||||
- alongside
|
||||
|
||||
**--acknowledge-destructive**=*ACKNOWLEDGE_DESTRUCTIVE*
|
||||
**--acknowledge-destructive**
|
||||
|
||||
If the target is the running system's root filesystem, this will skip any warnings
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--skip-finalize**=*SKIP_FINALIZE*
|
||||
**--skip-finalize**
|
||||
|
||||
The default mode is to "finalize" the target filesystem by invoking `fstrim` and similar operations, and finally mounting it readonly. This option skips those operations. It is then the responsibility of the invoking code to perform those operations
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--source-imgref**=*SOURCE_IMGREF*
|
||||
|
||||
Install the system from an explicitly given source
|
||||
@@ -71,38 +63,22 @@ is currently expected to be empty by default.
|
||||
|
||||
Specify the image to fetch for subsequent updates
|
||||
|
||||
**--enforce-container-sigpolicy**=*ENFORCE_CONTAINER_SIGPOLICY*
|
||||
**--enforce-container-sigpolicy**
|
||||
|
||||
This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op). Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--run-fetch-check**=*RUN_FETCH_CHECK*
|
||||
**--run-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--skip-fetch-check**=*SKIP_FETCH_CHECK*
|
||||
**--skip-fetch-check**
|
||||
|
||||
Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--disable-selinux**=*DISABLE_SELINUX*
|
||||
**--disable-selinux**
|
||||
|
||||
Disable SELinux in the target (installed) system
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--karg**=*KARG*
|
||||
|
||||
Add a kernel argument. This option can be provided multiple times
|
||||
@@ -111,14 +87,10 @@ is currently expected to be empty by default.
|
||||
|
||||
The path to an `authorized_keys` that will be injected into the `root` account
|
||||
|
||||
**--generic-image**=*GENERIC_IMAGE*
|
||||
**--generic-image**
|
||||
|
||||
Perform configuration changes suitable for a "generic" disk image. At the moment:
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--bound-images**=*BOUND_IMAGES*
|
||||
|
||||
How should logically bound images be retrieved
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-install - Install the running container to a target
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc install** [*OPTIONS...*] <*SUBCOMMAND*>
|
||||
**bootc install** \[*OPTIONS...*\] <*SUBCOMMAND*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-rollback - Change the bootloader entry ordering
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc rollback** [*OPTIONS...*]
|
||||
**bootc rollback** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -34,14 +34,10 @@ merges happen when new deployments are created.
|
||||
# OPTIONS
|
||||
|
||||
<!-- BEGIN GENERATED OPTIONS -->
|
||||
**--apply**=*APPLY*
|
||||
**--apply**
|
||||
|
||||
Restart or reboot into the rollback image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--soft-reboot**=*SOFT_REBOOT*
|
||||
|
||||
Configure soft reboot behavior
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-status - Display status
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc status** [*OPTIONS...*]
|
||||
**bootc status** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -40,22 +40,14 @@ Invoke e.g. `bootc status --json`, and check if `status.booted` is not `null`.
|
||||
|
||||
The desired format version. There is currently one supported version, which is exposed as both `0` and `1`. Pass this option to explicitly request it; it is possible that another future version 2 or newer will be supported in the future
|
||||
|
||||
**--booted**=*BOOTED*
|
||||
**--booted**
|
||||
|
||||
Only display status for the booted deployment
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**-v**, **--verbose**=*VERBOSE*
|
||||
**-v**, **--verbose**
|
||||
|
||||
Include additional fields in human readable format
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-switch - Target a new container image reference to boot
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc switch** [*OPTIONS...*] <*TARGET*>
|
||||
**bootc switch** \[*OPTIONS...*\] <*TARGET*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -41,22 +41,14 @@ Soft reboot allows faster system restart by avoiding full hardware reboot when p
|
||||
|
||||
This argument is required.
|
||||
|
||||
**--quiet**=*QUIET*
|
||||
**--quiet**
|
||||
|
||||
Don't display progress
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--apply**=*APPLY*
|
||||
**--apply**
|
||||
|
||||
Restart or reboot into the new target image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--soft-reboot**=*SOFT_REBOOT*
|
||||
|
||||
Configure soft reboot behavior
|
||||
@@ -71,22 +63,14 @@ Soft reboot allows faster system restart by avoiding full hardware reboot when p
|
||||
|
||||
Default: registry
|
||||
|
||||
**--enforce-container-sigpolicy**=*ENFORCE_CONTAINER_SIGPOLICY*
|
||||
**--enforce-container-sigpolicy**
|
||||
|
||||
This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op)
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--retain**=*RETAIN*
|
||||
**--retain**
|
||||
|
||||
Retain reference to currently booted image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
<!-- END GENERATED OPTIONS -->
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
@@ -4,7 +4,7 @@ bootc-upgrade - Download and queue an updated container image to apply
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc upgrade** [*OPTIONS...*]
|
||||
**bootc upgrade** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -41,30 +41,18 @@ Soft reboot allows faster system restart by avoiding full hardware reboot when p
|
||||
# OPTIONS
|
||||
|
||||
<!-- BEGIN GENERATED OPTIONS -->
|
||||
**--quiet**=*QUIET*
|
||||
**--quiet**
|
||||
|
||||
Don't display progress
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--check**=*CHECK*
|
||||
**--check**
|
||||
|
||||
Check if an update is available without applying it
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--apply**=*APPLY*
|
||||
**--apply**
|
||||
|
||||
Restart or reboot into the new target image
|
||||
|
||||
Possible values:
|
||||
- true
|
||||
- false
|
||||
|
||||
**--soft-reboot**=*SOFT_REBOOT*
|
||||
|
||||
Configure soft reboot behavior
|
||||
|
||||
@@ -5,7 +5,7 @@ will be discarded on reboot
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc usr-overlay** [*OPTIONS...*]
|
||||
**bootc usr-overlay** \[*OPTIONS...*\]
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ images
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**bootc** [*OPTIONS...*] <*SUBCOMMAND*>
|
||||
**bootc** \[*OPTIONS...*\] <*SUBCOMMAND*>
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user