Skip to content

Commit

Permalink
mockbuild.sh: temporarily base missing el10 mock template on el9
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thozza authored and achilleas-k committed Jul 23, 2024
1 parent 9c9a3b7 commit 61036b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions schutzbot/mockbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61036b8

Please sign in to comment.