@@ -18,11 +18,15 @@ base_img := "localhost/bootc"
1818# Synthetic upgrade image for testing
1919upgrade_img := base_img + " -upgrade"
2020
21- # Build variant: ostree (default) or composefs-sealeduki-sdboot (sealed UKI)
21+ # Build variant: ostree (default) or composefs
2222variant := env (" BOOTC_variant" , " ostree" )
2323bootloader := env (" BOOTC_bootloader" , " grub" )
2424# Only used for composefs tests
2525filesystem := env (" BOOTC_filesystem" , " ext4" )
26+ # Only used for composefs tests
27+ boot_type := env (" BOOTC_boot_type" , " bls" )
28+ # Only used for composefs tests
29+ seal_state := env (" BOOTC_seal_state" , " unsealed" )
2630# Base container image to build from
2731base := env (" BOOTC_base" , " quay.io/centos-bootc/centos-bootc:stream10" )
2832# Buildroot base image
@@ -45,6 +49,8 @@ base_buildargs := generic_buildargs + " " + _extra_src_args \
4549 + " --build-arg=base=" + base \
4650 + " --build-arg=variant=" + variant \
4751 + " --build-arg=bootloader=" + bootloader \
52+ + " --build-arg=boot_type=" + boot_type \
53+ + " --build-arg=seal_state=" + seal_state \
4854 + " --build-arg=filesystem=" + filesystem # required for bootc container ukify to allow missing fsverity
4955buildargs := base_buildargs \
5056 + " --cap-add=all --security-opt=label=type:container_runtime_t --device /dev/fuse" \
@@ -75,15 +81,15 @@ list-variants:
7581 Standard bootc image using ostree backend.
7682 This is the traditional, production-ready configuration.
7783
78- composefs-sealeduki-sdboot
79- Sealed composefs image with:
80- - Unified Kernel Image (UKI) containing kernel + initramfs + cmdline
81- - Secure Boot signing (using keys in target/ test-secureboot/ )
82- - systemd-boot bootloader
83- - composefs digest embedded in kernel cmdline for verified boot
84+ composefs (bootloader, filesystem, boot_type, seal_state)
85+ Build Composefs image with:
86+ - The specified bootloader (grub/ systemd)
87+ - The specified filesystem (ext4,btrfs,xfs)
88+ - The specified boot type (BLS/ UKI)
89+ - The specified seal state (sealed/ unsealed) determining whether we sign the UKI and
90+ use secure boot or not
8491
85- Use ` just build-sealed ` as a shortcut, or:
86- just variant=composefs-sealeduki-sdboot build
92+ Use ` just build-sealed ` as shortcut to build a sealed composefs image with systemd-boot as the bootloader
8793
8894 Current Configuration
8995 ==================== =
@@ -96,7 +102,7 @@ list-variants:
96102# Build a sealed composefs image (alias for variant=composefs-sealeduki-sdboot)
97103[group (' core' )]
98104build-sealed :
99- @ just --justfile {{ justfile ()}} variant=composefs-sealeduki-sdboot build
105+ @ just --justfile {{ justfile ()}} variant=composefs bootloader=systemd boot_type=uki seal_state=sealed build
100106
101107# Run tmt integration tests in VMs (e.g. `just test-tmt readonly`)
102108[group (' core' )]
@@ -110,28 +116,29 @@ test-container: build build-units
110116 podman run --rm --read -only localhost/ bootc-units / usr/ bin/ bootc-units
111117 podman run --rm --env =BOOTC_variant={{ variant}} --env =BOOTC_base={{ base}} {{ base_img}} bootc-integration-tests container
112118
113- # Build and test sealed composefs images
114119[group (' core' )]
115- test-composefs-sealeduki-sdboot filesystem :
116- just variant=composefs-sealeduki-sdboot filesystem={{ filesystem}} test-tmt readonly local-upgrade-reboot
120+ test-composefs bootloader filesystem boot_type seal_state :
121+ @ if [ " {{ seal_state}} " = " sealed" ] && [ " {{ filesystem}} " = " xfs" ]; then \
122+ echo " Invalid combination: sealed requires filesystem that supports fs-verity (ext4, btrfs)" ; \
123+ exit 1 ; \
124+ fi
117125
118- [group (' core' )]
119- test-composefs bootloader filesystem :
120- just variant=composefs bootloader={{ bootloader}} filesystem={{ filesystem}} \
121- test-tmt --composefs-backend \
122- - -bootloader {{ bootloader}} \
123- - -filesystem {{ filesystem}} \
124- integration
125-
126- # Build and test composefs images booted using Type1 boot entries and systemd-boot as the bootloader
127- [group (' core' )]
128- test-composefs-sdboot filesystem :
129- just test-composefs systemd {{ filesystem}}
126+ @ if [ " {{ seal_state}} " = " sealed" ] && [ " {{ boot_type}} " != " uki" ]; then \
127+ echo " Invalid combination: sealed requires boot_type=uki" ; \
128+ exit 1 ; \
129+ fi
130130
131- # Build and test composefs images booted using Type1 boot entries and grub as the bootloader
132- [group (' core' )]
133- test-composefs-grub filesystem :
134- just test-composefs grub {{ filesystem}}
131+ just variant=composefs \
132+ bootloader={{ bootloader}} \
133+ filesystem={{ filesystem}} \
134+ boot_type={{ boot_type}} \
135+ seal_state={{ seal_state}} \
136+ test-tmt-nobuild --composefs-backend \
137+ - -bootloader={{ bootloader}} \
138+ - -filesystem={{ filesystem}} \
139+ - -seal-state={{ seal_state}} \
140+ - -boot-type={{ boot_type}} \
141+ $(if [ " {{ boot_type}} " = " uki" ]; then echo " readonly" ; else echo " integration" ; fi)
135142
136143# Run cargo fmt and clippy checks in container
137144[group (' core' )]
0 commit comments