Skip to content

Justfile fixups - #2611

Open
Rolv-Apneseth wants to merge 2 commits into
bootc-dev:mainfrom
Rolv-Apneseth:justfile
Open

Rolv-Apneseth wants to merge 2 commits into
bootc-dev:mainfrom
Rolv-Apneseth:justfile

Conversation

@Rolv-Apneseth

Copy link
Copy Markdown
Contributor
justfile: forward build settings to nested recipes

`just` cmdline overrides apply to a single invocation, with only
environment variables propagating to nested invocations.

test-tmt, for example, calls nested recipes for _build-upgrade-image and
test-tmt-nobuild, so both ran with the default settings. `just
test-composefs systemd ext4 uki sealed` then built the main image as a
sealed UKI but the upgrade image as bls and unsealed (default). The
upgrade image kept a stale UKI whose embedded composefs digest no longer
matched its rootfs, and upgrades to it failed. CI never hit this because
it exports the BOOTC_* env vars, which are propagated.

Let's just forward settings explicitly when we have nested recipes to
avoid this issue. Achieved with a new variable holding the current build
settings as cmdline overrides, which is then passed to every recipe
which invokes another. Recipes which need to override a setting (e.g.
variant=composefs) just pass it after this variable and the last
override wins.

justfile: fix tmt-vm-cleanup to use bcvk libvirt rm-all

`bcvk libvirt rm` takes a single domain name and has no --label option.
The recipe passed --label, so it was failing (on
bcvk-0.21.0-1.fc44.x86_64 at least).

Use `rm-all` which accepts --label and removes every matching domain.

`bcvk libvirt rm` takes a single domain name and has no --label option.
The recipe passed --label, so it was failing (on
bcvk-0.21.0-1.fc44.x86_64 at least).

Use `rm-all` which accepts --label and removes every matching domain.

Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
`just` cmdline overrides apply to a single invocation, with only
environment variables propagating to nested invocations.

test-tmt, for example, calls nested recipes for _build-upgrade-image and
test-tmt-nobuild, so both ran with the default settings. `just
test-composefs systemd ext4 uki sealed` then built the main image as a
sealed UKI but the upgrade image as bls and unsealed (default). The
upgrade image kept a stale UKI whose embedded composefs digest no longer
matched its rootfs, and upgrades to it failed. CI never hit this because
it exports the BOOTC_* env vars, which are propagated.

Let's just forward settings explicitly when we have nested recipes to
avoid this issue. Achieved with a new variable holding the current build
settings as cmdline overrides, which is then passed to every recipe
which invokes another. Recipes which need to override a setting (e.g.
variant=composefs) just pass it after this variable and the last
override wins.

Assited-by: llm
Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant