Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,14 @@ jobs:
seal_state: ["sealed", "unsealed"]

exclude:
# https://github.com/bootc-dev/bootc/issues/1812
# centos-9 composefs: only sealed UKI is supported (V1 EROFS).
# BLS and unsealed modes require newer dracut/systemd features.
- test_os: centos-9
variant: composefs
boot_type: bls
- test_os: centos-9
variant: composefs
seal_state: unsealed
- seal_state: "sealed"
boot_type: bls
- seal_state: "sealed"
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ ARG variant
ARG filesystem
ARG seal_state
ARG boot_type
ARG erofs_version=v1
# Install our bootc package (only needed for the compute-composefs-digest command)
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
--mount=type=bind,from=packages,src=/,target=/run/packages \
Expand Down Expand Up @@ -374,7 +375,8 @@ if test "${boot_type}" = "uki"; then
--secrets /run/secrets \
"${allow_missing_verity[@]}" \
--kernel-dir "/run/kernel/$kver" \
--seal-state $seal_state
--seal-state $seal_state \
--erofs-version $erofs_version
fi
EORUN

Expand Down
6 changes: 5 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ filesystem := env("BOOTC_filesystem", "ext4")
boot_type := env("BOOTC_boot_type", "bls")
# Only used for composefs tests
seal_state := env("BOOTC_seal_state", "unsealed")
# Only used for composefs UKI tests: "v1" or "v2"
erofs_version := env("BOOTC_erofs_version", "v1")
# Baseconfigs to inject into the image for testing (e.g. "etc-transient" or "root-transient")
baseconfigs := env("BOOTC_baseconfigs", "")
# Base container image to build from
Expand Down Expand Up @@ -72,6 +74,7 @@ base_buildargs := generic_buildargs + " " + _extra_src_args \
+ " --build-arg=boot_type=" + boot_type \
+ " --build-arg=seal_state=" + seal_state \
+ " --build-arg=filesystem=" + filesystem \
+ " --build-arg=erofs_version=" + erofs_version \
+ " --build-arg=baseconfigs=" + baseconfigs
buildargs := base_buildargs \
+ " --cap-add=all --security-opt=label=type:container_runtime_t --device /dev/fuse" \
Expand Down Expand Up @@ -274,7 +277,7 @@ test-container-export: build
# Run tmt tests without rebuilding (for fast iteration)
[group('testing')]
test-tmt-nobuild *ARGS:
cargo xtask run-tmt --env=BOOTC_variant={{variant}} {{_baseconfigs_env}} --upgrade-image={{upgrade_img}} {{base_img}} {{ARGS}}
cargo xtask run-tmt --env=BOOTC_variant={{variant}} --env=BOOTC_erofs_version={{erofs_version}} {{_baseconfigs_env}} --upgrade-image={{upgrade_img}} {{base_img}} {{ARGS}}

# Run readonly tests with a baseconfig baked into the image at build time.
# Requires composefs variant. Example: just variant=composefs test-tmt-baseconfig root-transient
Expand Down Expand Up @@ -492,6 +495,7 @@ _build-upgrade-image:
--build-arg "boot_type={{boot_type}}" \
--build-arg "seal_state={{seal_state}}" \
--build-arg "filesystem={{filesystem}}" \
--build-arg "erofs_version={{erofs_version}}" \
--secret=id=secureboot_key,src=target/test-secureboot/db.key \
--secret=id=secureboot_cert,src=target/test-secureboot/db.crt \
"${extra_args[@]}" \
Expand Down
11 changes: 10 additions & 1 deletion contrib/packaging/seal-uki
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -xeuo pipefail

missing_verity=()
# EROFS format version to pass to bootc container ukify (optional, default: v1)
erofs_version=v1

while [ ! -z "${1:-}" ]; do
case "$1" in
Expand Down Expand Up @@ -45,6 +47,13 @@ while [ ! -z "${1:-}" ]; do
shift
;;

# EROFS format version to pass to bootc container ukify
"--erofs-version")
erofs_version="$2"
shift
shift
;;

* )
echo "Argument $1 not understood"
exit 1
Expand Down Expand Up @@ -85,4 +94,4 @@ containerukifyargs=(--rootfs "${target}")

# Build the UKI using bootc container ukify
# This computes the composefs digest, reads kargs from kargs.d, and invokes ukify
bootc container ukify "${containerukifyargs[@]}" "${kernel_params[@]}" "${missing_verity[@]}" -- "${ukifyargs[@]}"
bootc container ukify "${containerukifyargs[@]}" "${kernel_params[@]}" "${missing_verity[@]}" --erofs-version="${erofs_version}" -- "${ukifyargs[@]}"
3 changes: 2 additions & 1 deletion crates/initramfs/bootc-root-setup.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Description=bootc setup root
Documentation=man:bootc(1)
DefaultDependencies=no
ConditionKernelCommandLine=composefs
ConditionKernelCommandLine=|composefs
ConditionKernelCommandLine=|composefs.digest
ConditionPathExists=/etc/initrd-release
After=sysroot.mount
After=ostree-prepare-root.service
Expand Down
Loading
Loading