From 61036b87bba6c7fcba2ccfd23e5ab94b5df56ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Thu, 18 Jul 2024 22:33:59 +0200 Subject: [PATCH] mockbuild.sh: temporarily base missing el10 mock template on el9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no RHEL-10 mock template yet. Let's base it on RHEL-9 template with a few tweaks. Signed-off-by: Tomáš Hozza --- schutzbot/mockbuild.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index d0f638f8c..27e575a3f 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -13,6 +13,21 @@ function template_override { greenprint "📋 Running on subscribed RHEL machine, no mock template override done." return 0 fi + + # TODO: remove this, once mock-core-configs ships a template for RHEL-10 + # Use RHEL-9 template as the baseline for now. + if [[ "$ID" == rhel && ${VERSION_ID%.*} == 10 ]]; then + TEMPLATE=${ID}-${VERSION_ID%.*}.tpl + sudo cp /etc/mock/templates/rhel-9.tpl /etc/mock/templates/"$TEMPLATE" + # change releasever to 10 + sudo sed -i "s/config_opts\['releasever'\] = '9'/config_opts\['releasever'\] = '10'/" /etc/mock/templates/"$TEMPLATE" + # disable bootstrap image for el10, as there is none yet + sudo sed -i "s/config_opts\['bootstrap_image_ready'\] = True/config_opts\['bootstrap_image_ready'\] = False/" /etc/mock/templates/"$TEMPLATE" + + sudo cp /etc/mock/rhel-{9,10}-"$(uname -m)".cfg + sudo sed -i "s/rhel-9/rhel-10/" "/etc/mock/rhel-10-$(uname -m).cfg" + fi + if [[ "$ID" == rhel ]]; then TEMPLATE=${ID}-${VERSION_ID%.*}.tpl # disable subscription for nightlies