Skip to content

Commit 38b9111

Browse files
author
Paul Whalen
committed
fix: specify Copr chroot for CentOS/RHEL bootc builds
On CentOS Stream 10, dnf copr defaults to epel-10-x86_64 which does not exist in the Copr project. Similarly RHEL maps to non-existent chroots. Explicitly pass the correct centos-stream chroot name for CentOS and RHEL builds. Initialize COPR_CHROOT to empty for Fedora where auto-detection works. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
1 parent d0348b8 commit 38b9111

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

tests/greenboot-bootc-anaconda-iso.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ EDGE_USER=core
3434
EDGE_USER_PASSWORD=foobar
3535
CONSOLE_LOG=/tmp/vm-console.log
3636

37+
COPR_CHROOT=""
3738
case "${ID}-${VERSION_ID}" in
3839
"fedora-43")
3940
OS_VARIANT="fedora-unknown"
@@ -58,19 +59,22 @@ case "${ID}-${VERSION_ID}" in
5859
BASE_IMAGE_URL="quay.io/centos-bootc/centos-bootc:stream10"
5960
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
6061
BOOT_ARGS="uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"
62+
COPR_CHROOT="centos-stream-10-${ARCH}"
6163
;;
6264
"rhel-9.8")
6365
OS_VARIANT="rhel9-unknown"
6466
BASE_IMAGE_URL="registry.stage.redhat.io/rhel9/rhel-bootc:9.8"
6567
BIB_URL="registry.stage.redhat.io/rhel9/bootc-image-builder:9.8"
6668
BOOT_ARGS="uefi"
69+
COPR_CHROOT="centos-stream-9-${ARCH}"
6770
sed -i "s/REPLACE_ME_HERE/${DOWNLOAD_NODE}/g" files/rhel-9-8.repo
6871
;;
6972
"rhel-10.2")
7073
OS_VARIANT="rhel10-unknown"
7174
BASE_IMAGE_URL="registry.stage.redhat.io/rhel10/rhel-bootc:10.2"
7275
BIB_URL="registry.stage.redhat.io/rhel10/bootc-image-builder:10.2"
7376
BOOT_ARGS="uefi"
77+
COPR_CHROOT="centos-stream-10-${ARCH}"
7478
sed -i "s/REPLACE_ME_HERE/${DOWNLOAD_NODE}/g" files/rhel-10-2.repo
7579
;;
7680
*)
@@ -194,7 +198,7 @@ podman login registry.stage.redhat.io -u ${STAGE_REDHAT_IO_USERNAME} -p ${STAGE_
194198
tee Containerfile > /dev/null << EOF
195199
FROM ${BASE_IMAGE_URL}
196200
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
197-
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} && \
201+
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
198202
dnf install -y greenboot greenboot-default-health-checks && \
199203
systemctl enable greenboot-healthcheck.service
200204
RUN sed -i "s/GREENBOOT_MAX_BOOT_ATTEMPTS=3/GREENBOOT_MAX_BOOT_ATTEMPTS=5/g" /etc/greenboot/greenboot.conf

tests/greenboot-bootc-qcow2.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ EDGE_USER=core
3434
EDGE_USER_PASSWORD=foobar
3535
CONSOLE_LOG=/tmp/vm-console.log
3636

37+
COPR_CHROOT=""
3738
case "${ID}-${VERSION_ID}" in
3839
"fedora-43")
3940
OS_VARIANT="fedora-unknown"
@@ -58,19 +59,22 @@ case "${ID}-${VERSION_ID}" in
5859
BASE_IMAGE_URL="quay.io/centos-bootc/centos-bootc:stream10"
5960
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
6061
BOOT_ARGS="uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"
62+
COPR_CHROOT="centos-stream-10-${ARCH}"
6163
;;
6264
"rhel-9.8")
6365
OS_VARIANT="rhel9-unknown"
6466
BASE_IMAGE_URL="registry.stage.redhat.io/rhel9/rhel-bootc:9.8"
6567
BIB_URL="registry.stage.redhat.io/rhel9/bootc-image-builder:9.8"
6668
BOOT_ARGS="uefi"
69+
COPR_CHROOT="centos-stream-9-${ARCH}"
6770
sed -i "s/REPLACE_ME_HERE/${DOWNLOAD_NODE}/g" files/rhel-9-8.repo
6871
;;
6972
"rhel-10.2")
7073
OS_VARIANT="rhel10-unknown"
7174
BASE_IMAGE_URL="registry.stage.redhat.io/rhel10/rhel-bootc:10.2"
7275
BIB_URL="registry.stage.redhat.io/rhel10/bootc-image-builder:10.2"
7376
BOOT_ARGS="uefi"
77+
COPR_CHROOT="centos-stream-10-${ARCH}"
7478
sed -i "s/REPLACE_ME_HERE/${DOWNLOAD_NODE}/g" files/rhel-10-2.repo
7579
;;
7680
*)
@@ -194,7 +198,7 @@ podman login registry.stage.redhat.io -u ${STAGE_REDHAT_IO_USERNAME} -p ${STAGE_
194198
tee Containerfile > /dev/null << EOF
195199
FROM ${BASE_IMAGE_URL}
196200
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
197-
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} && \
201+
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
198202
dnf install -y greenboot greenboot-default-health-checks && \
199203
systemctl enable greenboot-healthcheck.service
200204
RUN sed -i "s/GREENBOOT_MAX_BOOT_ATTEMPTS=3/GREENBOOT_MAX_BOOT_ATTEMPTS=5/g" /etc/greenboot/greenboot.conf

0 commit comments

Comments
 (0)