Skip to content

Commit 16c3759

Browse files
committed
ci: Work around broken grub2-2.12-47 in CentOS Stream 10 compose
The CentOS Stream 10 compose updated grub2 from 2.12-45 to 2.12-47 on 2026-06-03. The new version installs successfully but produces a bootloader that fails to boot (VM stays frozen at ~5s CPU time while 2.12-45 boots normally). Add BOOTC_COMPOSE_EXCLUDE support to enable-compose-repos, allowing specific packages to be excluded from the compose repos so they fall back to the base image version. Plumb it through the Dockerfile and Justfile, and set it in CI to exclude grub2* until CentOS ships a fix. Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com> Assisted-by: OpenCode (Claude Opus 4.6)
1 parent 9c3e439 commit 16c3759

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323

2424
env:
2525
CARGO_TERM_COLOR: always
26+
# Workaround: CentOS Stream 10 compose ships grub2-2.12-47 which fails to boot.
27+
# Exclude it so builds fall back to the base image's grub2-2.12-45.
28+
# TODO: Remove once CentOS ships a fixed grub2 build.
29+
BOOTC_COMPOSE_EXCLUDE: "grub2*"
2630
# Something seems to be setting this in the default GHA runners, which breaks bcvk
2731
# as the default runner user doesn't have access
2832
LIBVIRT_DEFAULT_URI: "qemu:///session"

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp --mount=type=c
4848
FROM $base as target-base
4949
# Handle version skew between base image and mirrors for CentOS Stream
5050
# xref https://gitlab.com/redhat/centos-stream/containers/bootc/-/issues/1174
51+
# BOOTC_COMPOSE_EXCLUDE: exclude broken packages from compose repos (e.g. "grub2*")
52+
ARG BOOTC_COMPOSE_EXCLUDE=""
5153
RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
5254
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
53-
/run/packaging/enable-compose-repos
55+
BOOTC_COMPOSE_EXCLUDE="${BOOTC_COMPOSE_EXCLUDE}" /run/packaging/enable-compose-repos
5456
RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp /usr/libexec/bootc-base-imagectl build-rootfs --manifest=standard /target-rootfs
5557

5658
FROM scratch as fetch

Justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ buildroot_base := env("BOOTC_buildroot_base", "quay.io/centos/centos:stream10")
5454
extra_src := env("BOOTC_extra_src", "")
5555
# Set to "1" to disable auto-detection of local Rust dependencies
5656
no_auto_local_deps := env("BOOTC_no_auto_local_deps", "")
57+
# Exclude specific packages from CentOS compose repos (e.g. "grub2*" to work around broken composes)
58+
compose_exclude := env("BOOTC_COMPOSE_EXCLUDE", "")
5759

5860
# Internal variables
5961
nocache := env("BOOTC_nocache", "")
@@ -72,7 +74,8 @@ base_buildargs := generic_buildargs + " " + _extra_src_args \
7274
+ " --build-arg=boot_type=" + boot_type \
7375
+ " --build-arg=seal_state=" + seal_state \
7476
+ " --build-arg=filesystem=" + filesystem \
75-
+ " --build-arg=baseconfigs=" + baseconfigs
77+
+ " --build-arg=baseconfigs=" + baseconfigs \
78+
+ " --build-arg=BOOTC_COMPOSE_EXCLUDE=" + compose_exclude
7679
buildargs := base_buildargs \
7780
+ " --cap-add=all --security-opt=label=type:container_runtime_t --device /dev/fuse" \
7881
+ " --secret=id=secureboot_key,src=target/test-secureboot/db.key --secret=id=secureboot_cert,src=target/test-secureboot/db.crt"

contrib/packaging/enable-compose-repos

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ case "${ID}" in
1919
exit 1
2020
fi
2121

22+
# BOOTC_COMPOSE_EXCLUDE: space-separated list of package globs to exclude
23+
# from the compose repos. Useful when a compose ships a broken package
24+
# (e.g. grub2) that needs to fall back to the base image version.
25+
compose_exclude="${BOOTC_COMPOSE_EXCLUDE:-}"
26+
exclude_line=""
27+
if [[ -n "${compose_exclude}" ]]; then
28+
exclude_line="exclude=${compose_exclude}"
29+
echo "Excluding from compose repos: ${compose_exclude}"
30+
fi
31+
2232
cat > /etc/yum.repos.d/centos-compose.repo << EOF
2333
[compose-baseos]
2434
name=CentOS Stream \$releasever Compose BaseOS
@@ -27,6 +37,7 @@ gpgcheck=1
2737
enabled=1
2838
priority=1
2939
gpgkey=${gpgkey}
40+
${exclude_line}
3041
3142
[compose-appstream]
3243
name=CentOS Stream \$releasever Compose AppStream
@@ -35,6 +46,7 @@ gpgcheck=1
3546
enabled=1
3647
priority=1
3748
gpgkey=${gpgkey}
49+
${exclude_line}
3850
EOF
3951
echo "Enabled CentOS Stream compose repos (gpgkey: ${gpgkey})"
4052
;;

0 commit comments

Comments
 (0)