Skip to content

Commit 5d1b3bb

Browse files
committed
bootc: Update revdep test for current bootc main
bootc now depends only on the cfsctl crate, which re-exports the other composefs-rs crates. Simplify the patch to only override cfsctl. Also pass all four required arguments through to bootc's test-composefs target (bootloader, filesystem, boot_type, seal_state), defaulting to the sealed UKI configuration that build-sealed produces. Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 6503023 commit 5d1b3bb

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

bootc/Justfile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,23 @@ patch: clone
5353

5454
echo "Patching bootc Cargo.toml to use $_COMPOSEFS_SRC"
5555

56-
# Add [patch] section with the real local path
56+
# Add [patch] section with the real local path.
57+
# bootc only depends on `cfsctl` which re-exports the other composefs-rs crates.
5758
# bootc's Justfile will auto-detect this via `cargo xtask local-rust-deps`
5859
# and bind-mount it into the container build (mapping /home -> /var/home as needed)
5960
{
6061
echo ''
6162
echo '# Patched by composefs-rs CI to test against local composefs-rs'
62-
echo '[patch."https://github.com/containers/composefs-rs"]'
63-
echo "composefs = { path = \"$_COMPOSEFS_SRC/crates/composefs\" }"
64-
echo "composefs-boot = { path = \"$_COMPOSEFS_SRC/crates/composefs-boot\" }"
65-
echo "composefs-oci = { path = \"$_COMPOSEFS_SRC/crates/composefs-oci\" }"
63+
echo '[patch."https://github.com/composefs/composefs-rs"]'
64+
echo "cfsctl = { path = \"$_COMPOSEFS_SRC/crates/cfsctl\" }"
6665
} >> Cargo.toml
6766

6867
# Patch the workspace lints to allow missing_docs for composefs-rs crates
6968
# bootc has workspace.lints.rust.missing_docs = "deny" but composefs-rs has undocumented items
7069
sed -i 's/missing_docs = "deny"/missing_docs = "allow"/' Cargo.toml
7170

7271
# Update Cargo.lock so the patch is recognized by cargo xtask local-rust-deps
73-
cargo update composefs composefs-boot composefs-oci
72+
cargo update cfsctl
7473

7574
echo "bootc patched successfully"
7675

@@ -85,12 +84,13 @@ build: patch
8584

8685
# Run bootc composefs tests using local composefs-rs
8786
# Since the patch uses real local paths, no symlinks or special env vars needed
88-
test: build
87+
# Parameters match bootc's test-composefs target signature
88+
test bootloader="systemd" filesystem="ext4" boot_type="uki" seal_state="sealed": build
8989
#!/bin/bash
9090
set -euo pipefail
9191
cd "$COMPOSEFS_BOOTC_PATH"
92-
echo "Running bootc composefs tests..."
93-
just test-composefs
92+
echo "Running bootc composefs tests (bootloader={{bootloader}}, filesystem={{filesystem}}, boot_type={{boot_type}}, seal_state={{seal_state}})..."
93+
just test-composefs {{bootloader}} {{filesystem}} {{boot_type}} {{seal_state}}
9494

9595
# Clean the bootc checkout and any patches
9696
clean:
@@ -120,6 +120,11 @@ config:
120120
COMPOSEFS_BOOTC_REF - Override bootc git ref (branch/tag/PR)
121121
COMPOSEFS_BOOTC_REPO - Override bootc git repository
122122

123+
Test Parameters:
124+
just bootc/test # Default: systemd + ext4 + uki + sealed
125+
just bootc/test grub ext4 bls unsealed # grub + ext4 + BLS (unsealed)
126+
just bootc/test systemd btrfs uki sealed # systemd-boot + btrfs + UKI (sealed)
127+
123128
Example Usage:
124129
just bootc/build # Clone main, patch, and build
125130
COMPOSEFS_BOOTC_REF=v1.2.0 just bootc/build # Use specific tag

0 commit comments

Comments
 (0)