Skip to content

Commit 226227f

Browse files
authored
Merge pull request #243 from cgwalters/man-improvements
Man improvements
2 parents 95ccd5c + cb8ee17 commit 226227f

File tree

10 files changed

+102
-39
lines changed

10 files changed

+102
-39
lines changed

lib/src/cli.rs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,49 @@ pub(crate) enum TestingOpts {
152152
#[clap(rename_all = "kebab-case")]
153153
#[allow(clippy::large_enum_variant)]
154154
pub(crate) enum Opt {
155-
/// Look for updates to the booted container image.
155+
/// Download and queue an updated container image to apply.
156+
///
157+
/// This does not affect the running system; updates operate in an "A/B" style by default.
158+
///
159+
/// A queued update is visible as `staged` in `bootc status`.
160+
///
161+
/// Currently by default, the update will be applied at shutdown time via `ostree-finalize-staged.service`.
162+
/// There is also an explicit `bootc upgrade --apply` verb which will automatically take action (rebooting)
163+
/// if the system has changed.
164+
///
165+
/// However, in the future this is likely to change such that reboots outside of a `bootc upgrade --apply`
166+
/// do *not* upgrade.
156167
#[clap(alias = "update")]
157168
Upgrade(UpgradeOpts),
158169
/// Target a new container image reference to boot.
170+
///
171+
/// This operates in a very similar fashion to `upgrade`, but changes the container image reference
172+
/// instead.
159173
Switch(SwitchOpts),
160-
/// Change host specification
174+
/// Apply full changes to the host specification.
175+
///
176+
/// This command operates very similarly to `kubectl apply`; if invoked interactively,
177+
/// then the current host specification will be presented in the system default `$EDITOR`
178+
/// for interactive changes.
179+
///
180+
/// It is also possible to directly provide new contents via `bootc edit --filename`.
181+
///
182+
/// Only changes to the `spec` section are honored.
161183
Edit(EditOpts),
162184
/// Display status
163185
///
164186
/// This will output a YAML-formatted object using a schema intended to match a Kubernetes resource
165-
/// that describes the state of the booted container.
187+
/// that describes the state of the booted system.
188+
///
166189
/// The exact API format is not currently declared stable.
167190
Status(StatusOpts),
168191
/// Add a transient writable overlayfs on `/usr` that will be discarded on reboot.
169192
#[clap(alias = "usroverlay")]
170193
UsrOverlay,
171-
/// Install the running container to a target
194+
/// Install the running container to a target.
195+
///
196+
/// This has two main sub-commands `to-disk` (which expects an empty block device) and `to-filesystem`
197+
/// which supports installation to an already extant filesystem.
172198
#[clap(subcommand)]
173199
#[cfg(feature = "install")]
174200
Install(InstallOpts),

manpages-md/bootc-edit.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NAME
22

3-
bootc-edit - Change host specification
3+
bootc-edit - Apply full changes to the host specification
44

55
# SYNOPSIS
66

@@ -9,7 +9,16 @@ bootc-edit - Change host specification
99

1010
# DESCRIPTION
1111

12-
Change host specification
12+
Apply full changes to the host specification.
13+
14+
This command operates very similarly to \`kubectl apply\`; if invoked
15+
interactively, then the current host specification will be presented in
16+
the system default \`\$EDITOR\` for interactive changes.
17+
18+
It is also possible to directly provide new contents via \`bootc edit
19+
\--filename\`.
20+
21+
Only changes to the \`spec\` section are honored.
1322

1423
# OPTIONS
1524

@@ -23,7 +32,7 @@ Change host specification
2332

2433
**-h**, **\--help**
2534

26-
: Print help
35+
: Print help (see a summary with -h)
2736

2837
**-V**, **\--version**
2938

manpages-md/bootc-install-to-disk.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ bootc-install-to-disk - Install to the target block device
66

77
**bootc-install-to-disk** \[**\--wipe**\] \[**\--block-setup**\]
88
\[**\--filesystem**\] \[**\--root-size**\] \[**\--target-transport**\]
9-
\[**\--target-imgref**\] \[**\--target-no-signature-verification**\]
9+
\[**\--target-imgref**\] \[**\--enforce-container-sigpolicy**\]
1010
\[**\--target-ostree-remote**\] \[**\--skip-fetch-check**\]
1111
\[**\--disable-selinux**\] \[**\--karg**\] \[**\--generic-image**\]
1212
\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] \<*DEVICE*\>
@@ -53,9 +53,12 @@ By default, all remaining space on the disk will be used.
5353

5454
: Specify the image to fetch for subsequent updates
5555

56-
**\--target-no-signature-verification**
56+
**\--enforce-container-sigpolicy**
5757

58-
: Explicitly opt-out of requiring any form of signature verification
58+
: This is the inverse of the previous
59+
\`\--target-no-signature-verification\` (which is now a no-op).
60+
Enabling this option enforces that \`/etc/containers/policy.json\`
61+
includes a default policy which requires signatures
5962

6063
**\--target-ostree-remote**=*TARGET_OSTREE_REMOTE*
6164

@@ -68,11 +71,9 @@ By default, all remaining space on the disk will be used.
6871
suppresses the check; use this when you know the issues it might
6972
find are addressed.
7073

71-
Two main reasons this might fail:
72-
73-
\- Forgetting \`\--target-no-signature-verification\` if needed - Using
74-
a registry which requires authentication, but not embedding the pull
75-
secret in the image.
74+
A common reason this may fail is when one is using an image which
75+
requires registry authentication, but not embedding the pull secret in
76+
the image so that updates can be fetched by the installed OS \"day 2\".
7677

7778
**\--disable-selinux**
7879

manpages-md/bootc-install-to-filesystem.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ bootc-install-to-filesystem - Install to the target filesystem
77
**bootc-install-to-filesystem** \[**\--root-mount-spec**\]
88
\[**\--root-options**\] \[**\--boot-mount-spec**\] \[**\--replace**\]
99
\[**\--target-transport**\] \[**\--target-imgref**\]
10-
\[**\--target-no-signature-verification**\]
11-
\[**\--target-ostree-remote**\] \[**\--skip-fetch-check**\]
12-
\[**\--disable-selinux**\] \[**\--karg**\] \[**\--generic-image**\]
13-
\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] \<*ROOT_PATH*\>
10+
\[**\--enforce-container-sigpolicy**\] \[**\--target-ostree-remote**\]
11+
\[**\--skip-fetch-check**\] \[**\--disable-selinux**\] \[**\--karg**\]
12+
\[**\--generic-image**\] \[**-h**\|**\--help**\]
13+
\[**-V**\|**\--version**\] \<*ROOT_PATH*\>
1414

1515
# DESCRIPTION
1616

@@ -62,9 +62,12 @@ be used.
6262

6363
: Specify the image to fetch for subsequent updates
6464

65-
**\--target-no-signature-verification**
65+
**\--enforce-container-sigpolicy**
6666

67-
: Explicitly opt-out of requiring any form of signature verification
67+
: This is the inverse of the previous
68+
\`\--target-no-signature-verification\` (which is now a no-op).
69+
Enabling this option enforces that \`/etc/containers/policy.json\`
70+
includes a default policy which requires signatures
6871

6972
**\--target-ostree-remote**=*TARGET_OSTREE_REMOTE*
7073

@@ -77,11 +80,9 @@ be used.
7780
suppresses the check; use this when you know the issues it might
7881
find are addressed.
7982

80-
Two main reasons this might fail:
81-
82-
\- Forgetting \`\--target-no-signature-verification\` if needed - Using
83-
a registry which requires authentication, but not embedding the pull
84-
secret in the image.
83+
A common reason this may fail is when one is using an image which
84+
requires registry authentication, but not embedding the pull secret in
85+
the image so that updates can be fetched by the installed OS \"day 2\".
8586

8687
**\--disable-selinux**
8788

manpages-md/bootc-install.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ bootc-install - Install the running container to a target
99

1010
# DESCRIPTION
1111

12-
Install the running container to a target
12+
Install the running container to a target.
13+
14+
This has two main sub-commands \`to-disk\` (which expects an empty block
15+
device) and \`to-filesystem\` which supports installation to an already
16+
extant filesystem.
1317

1418
# OPTIONS
1519

1620
**-h**, **\--help**
1721

18-
: Print help
22+
: Print help (see a summary with -h)
1923

2024
**-V**, **\--version**
2125

manpages-md/bootc-status.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Display status
1313

1414
This will output a YAML-formatted object using a schema intended to
1515
match a Kubernetes resource that describes the state of the booted
16-
container. The exact API format is not currently declared stable.
16+
system.
17+
18+
The exact API format is not currently declared stable.
1719

1820
# OPTIONS
1921

manpages-md/bootc-switch.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ bootc-switch - Target a new container image reference to boot
55
# SYNOPSIS
66

77
**bootc-switch** \[**\--quiet**\] \[**\--transport**\]
8-
\[**\--no-signature-verification**\] \[**\--ostree-remote**\]
8+
\[**\--enforce-container-sigpolicy**\] \[**\--ostree-remote**\]
99
\[**\--retain**\] \[**-h**\|**\--help**\] \[**-V**\|**\--version**\]
1010
\<*TARGET*\>
1111

1212
# DESCRIPTION
1313

14-
Target a new container image reference to boot
14+
Target a new container image reference to boot.
15+
16+
This operates in a very similar fashion to \`upgrade\`, but changes the
17+
container image reference instead.
1518

1619
# OPTIONS
1720

@@ -23,9 +26,13 @@ Target a new container image reference to boot
2326

2427
: The transport; e.g. oci, oci-archive. Defaults to \`registry\`
2528

26-
**\--no-signature-verification**
29+
**\--enforce-container-sigpolicy**
30+
31+
: This is the inverse of the previous
32+
\`\--target-no-signature-verification\` (which is now a no-op).
2733

28-
: Explicitly opt-out of requiring any form of signature verification
34+
Enabling this option enforces that \`/etc/containers/policy.json\`
35+
includes a default policy which requires signatures.
2936

3037
**\--ostree-remote**=*OSTREE_REMOTE*
3138

@@ -37,7 +44,7 @@ Target a new container image reference to boot
3744

3845
**-h**, **\--help**
3946

40-
: Print help
47+
: Print help (see a summary with -h)
4148

4249
**-V**, **\--version**
4350

manpages-md/bootc-upgrade.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NAME
22

3-
bootc-upgrade - Look for updates to the booted container image
3+
bootc-upgrade - Download and queue an updated container image to apply
44

55
# SYNOPSIS
66

@@ -10,7 +10,20 @@ bootc-upgrade - Look for updates to the booted container image
1010

1111
# DESCRIPTION
1212

13-
Look for updates to the booted container image
13+
Download and queue an updated container image to apply.
14+
15+
This does not affect the running system; updates operate in an \"A/B\"
16+
style by default.
17+
18+
A queued update is visible as \`staged\` in \`bootc status\`.
19+
20+
Currently by default, the update will be applied at shutdown time via
21+
\`ostree-finalize-staged.service\`. There is also an explicit \`bootc
22+
upgrade \--apply\` verb which will automatically take action (rebooting)
23+
if the system has changed.
24+
25+
However, in the future this is likely to change such that reboots
26+
outside of a \`bootc upgrade \--apply\` do \*not\* upgrade.
1427

1528
# OPTIONS
1629

manpages-md/bootc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Changes in \`/etc\` and \`/var\` persist.
2929

3030
bootc-upgrade(8)
3131

32-
: Look for updates to the booted container image
32+
: Download and queue an updated container image to apply
3333

3434
bootc-switch(8)
3535

3636
: Target a new container image reference to boot
3737

3838
bootc-edit(8)
3939

40-
: Change host specification
40+
: Apply full changes to the host specification
4141

4242
bootc-status(8)
4343

xtask/src/xtask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn man2markdown(sh: &Shell) -> Result<()> {
103103
.file_stem()
104104
.and_then(|name| name.to_str())
105105
.ok_or_else(|| anyhow!("Expected filename in {path:?}"))?;
106-
let target = format!("docs/man/{filename}.md");
106+
let target = format!("manpages-md/{filename}.md");
107107
cmd!(
108108
sh,
109109
"pandoc --from=man --to=markdown --output={target} {path}"

0 commit comments

Comments
 (0)