@@ -27,6 +27,7 @@ if [[ -n "${TARGET_DISTRO:-}" ]]; then
2727fi
2828
2929# Setup variables
30+ ARCH=$( uname -m)
3031TEST_UUID=anaconda-$(( 1 + RANDOM % 1000000 ))
3132TEMPDIR=$( mktemp -d)
3233GUEST_ADDRESS=192.168.100.50
@@ -74,21 +75,55 @@ case "${ID}-${VERSION_ID}" in
7475 BIB_URL=" registry.stage.redhat.io/rhel9/bootc-image-builder:9.8"
7576 BOOT_ARGS=" uefi"
7677 COPR_CHROOT=" centos-stream-9-${ARCH} "
78+ { set +x; } 2> /dev/null
7779 sed -i " s/REPLACE_ME_HERE/${DOWNLOAD_NODE} /g" files/rhel-9-8.repo
80+ sed -i " s/REPLACE_ARCH_HERE/${ARCH} /g" files/rhel-9-8.repo
7881 if [[ " ${USE_COMPOSE_RPMS} " == true ]]; then
79- GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-9/composes/RHEL-9/${COMPOSE_ID} /compose/AppStream/x86_64 /os/Packages/"
82+ GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-9/composes/RHEL-9/${COMPOSE_ID} /compose/AppStream/${ARCH} /os/Packages/"
8083 fi
84+ set -x
85+ ;;
86+ " rhel-9.9" )
87+ OS_VARIANT=" rhel9-unknown"
88+ BASE_IMAGE_URL=" registry.stage.redhat.io/rhel9/rhel-bootc:9.9"
89+ BIB_URL=" registry.stage.redhat.io/rhel9/bootc-image-builder:9.9"
90+ BOOT_ARGS=" uefi"
91+ COPR_CHROOT=" centos-stream-9-${ARCH} "
92+ { set +x; } 2> /dev/null
93+ sed -i " s/REPLACE_ME_HERE/${DOWNLOAD_NODE} /g" files/rhel-9-9.repo
94+ sed -i " s/REPLACE_ARCH_HERE/${ARCH} /g" files/rhel-9-9.repo
95+ if [[ " ${USE_COMPOSE_RPMS} " == true ]]; then
96+ GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-9/composes/RHEL-9/${COMPOSE_ID} /compose/AppStream/${ARCH} /os/Packages/"
97+ fi
98+ set -x
8199 ;;
82100 " rhel-10.2" )
83101 OS_VARIANT=" rhel10-unknown"
84102 BASE_IMAGE_URL=" registry.stage.redhat.io/rhel10/rhel-bootc:10.2"
85103 BIB_URL=" registry.stage.redhat.io/rhel10/bootc-image-builder:10.2"
86104 BOOT_ARGS=" uefi"
87105 COPR_CHROOT=" centos-stream-10-${ARCH} "
106+ { set +x; } 2> /dev/null
88107 sed -i " s/REPLACE_ME_HERE/${DOWNLOAD_NODE} /g" files/rhel-10-2.repo
108+ sed -i " s/REPLACE_ARCH_HERE/${ARCH} /g" files/rhel-10-2.repo
89109 if [[ " ${USE_COMPOSE_RPMS} " == true ]]; then
90- GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-10/composes/RHEL-10/${COMPOSE_ID} /compose/AppStream/x86_64 /os/Packages/"
110+ GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-10/composes/RHEL-10/${COMPOSE_ID} /compose/AppStream/${ARCH} /os/Packages/"
91111 fi
112+ set -x
113+ ;;
114+ " rhel-10.3" )
115+ OS_VARIANT=" rhel10-unknown"
116+ BASE_IMAGE_URL=" registry.stage.redhat.io/rhel10/rhel-bootc:10.3"
117+ BIB_URL=" registry.stage.redhat.io/rhel10/bootc-image-builder:10.3"
118+ BOOT_ARGS=" uefi"
119+ COPR_CHROOT=" centos-stream-10-${ARCH} "
120+ { set +x; } 2> /dev/null
121+ sed -i " s/REPLACE_ME_HERE/${DOWNLOAD_NODE} /g" files/rhel-10-3.repo
122+ sed -i " s/REPLACE_ARCH_HERE/${ARCH} /g" files/rhel-10-3.repo
123+ if [[ " ${USE_COMPOSE_RPMS} " == true ]]; then
124+ GREENBOOT_PACKAGES_URL=" https://${DOWNLOAD_NODE} /rhel-10/composes/RHEL-10/${COMPOSE_ID} /compose/AppStream/${ARCH} /os/Packages/"
125+ fi
126+ set -x
92127 ;;
93128 * )
94129 echo " unsupported distro: ${ID} -${VERSION_ID} "
@@ -242,6 +277,31 @@ tee Containerfile > /dev/null << EOF
242277FROM ${BASE_IMAGE_URL}
243278EOF
244279
280+ # RHEL repo is always needed: Copr path uses it for dnf deps,
281+ # anaconda-iso BIB uses it for depsolve
282+ case " ${ID} -${VERSION_ID} " in
283+ " rhel-9.8" )
284+ tee -a Containerfile > /dev/null << EOF
285+ COPY files/rhel-9-8.repo /etc/yum.repos.d/rhel-9-8.repo
286+ EOF
287+ ;;
288+ " rhel-9.9" )
289+ tee -a Containerfile > /dev/null << EOF
290+ COPY files/rhel-9-9.repo /etc/yum.repos.d/rhel-9-9.repo
291+ EOF
292+ ;;
293+ " rhel-10.2" )
294+ tee -a Containerfile > /dev/null << EOF
295+ COPY files/rhel-10-2.repo /etc/yum.repos.d/rhel-10-2.repo
296+ EOF
297+ ;;
298+ " rhel-10.3" )
299+ tee -a Containerfile > /dev/null << EOF
300+ COPY files/rhel-10-3.repo /etc/yum.repos.d/rhel-10-3.repo
301+ EOF
302+ ;;
303+ esac
304+
245305if [[ " ${USE_COMPOSE_RPMS} " == true && -n " ${GREENBOOT_PACKAGES_URL} " ]]; then
246306 tee -a Containerfile > /dev/null << EOF
247307COPY greenboot-*.rpm /tmp/
@@ -250,18 +310,6 @@ RUN dnf install -y /tmp/greenboot-*.rpm && \
250310 systemctl enable greenboot-healthcheck.service
251311EOF
252312else
253- if [[ " ${ID} -${VERSION_ID} " == " rhel-9.8" ]]; then
254- tee -a Containerfile > /dev/null << EOF
255- COPY files/rhel-9-8.repo /etc/yum.repos.d/rhel-9-8.repo
256- EOF
257- fi
258-
259- if [[ " ${ID} -${VERSION_ID} " == " rhel-10.2" ]]; then
260- tee -a Containerfile > /dev/null << EOF
261- COPY files/rhel-10-2.repo /etc/yum.repos.d/rhel-10-2.repo
262- EOF
263- fi
264-
265313 tee -a Containerfile > /dev/null << EOF
266314RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
267315 dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
0 commit comments