Skip to content

cli: Only allow some arguments if composefs-backend is true#1990

Open
Johan-Liebert1 wants to merge 1 commit intobootc-dev:mainfrom
Johan-Liebert1:cfs-options-fix
Open

cli: Only allow some arguments if composefs-backend is true#1990
Johan-Liebert1 wants to merge 1 commit intobootc-dev:mainfrom
Johan-Liebert1:cfs-options-fix

Conversation

@Johan-Liebert1
Copy link
Collaborator

@Johan-Liebert1 Johan-Liebert1 commented Feb 7, 2026

Currently the cli accepts --insecure, --bootloader, --uki-addon for ostree installs as well, which is not quite right as in the best case scenario they won't do anything and in the worst case scenario they might leave the install in undefined state

Also, update the bootloader docs to specify systemd-boot is only
available for composefs backend

Xref: #1989

@github-actions github-actions bot added area/install Issues related to `bootc install` area/documentation Updates to the documentation labels Feb 7, 2026
@bootc-bot bootc-bot bot requested a review from jeckersb February 7, 2026 05:08
Currently the cli accepts `--insecure`, `--bootloader`, `--uki-addon`
for ostree installs as well, which is not quite right as in the best
case scenario they won't do anything and in the worst case scenario they
might leave the install in undefined state

Also, update the bootloader docs to specify systemd-boot is only
available for composefs backend

Xref: bootc-dev#1989

Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly restricts the --insecure, --bootloader, and --uki-addon CLI arguments to be used only with --composefs-backend. This is a good improvement as it leverages clap's validation capabilities, providing earlier and clearer feedback to the user. The removal of the now-redundant manual validation code simplifies the implementation. The accompanying documentation update is also helpful. I have one minor suggestion to further improve the clarity of the documentation.

Comment on lines 18 to 19
If bootupd is not present in the input container image, then systemd-boot will be used
by default (except on s390x).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This sentence could be slightly confusing. While it's true that systemd-boot is the fallback if bootupd is not present, for ostree-based installs this will result in an error. It might be clearer to explicitly state that this default behavior applies to composefs installs to avoid any ambiguity.

For example:

For composefs-based installations, if `bootupd` is not present in the input container image, then `systemd-boot` will be used by default (except on s390x).
Suggested change
If bootupd is not present in the input container image, then systemd-boot will be used
by default (except on s390x).
For composefs-based installations, if `bootupd` is not present in the input container image, then systemd-boot will be used
by default (except on s390x).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant