From d87c60857c9394df2924dfbf4a78d107a4668690 Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Wed, 15 Jun 2022 15:59:27 +0200 Subject: [PATCH] mockbuild: update mockbuild script after RHEL-9 GA Removing rhel-9 templates as they are shipped upstream already and making necessary modifications to mockbuild.sh --- schutzbot/el9-mock-configs/rhel-9-aarch64.cfg | 4 -- schutzbot/el9-mock-configs/rhel-9-x86_64.cfg | 4 -- .../el9-mock-configs/templates/rhel-9.tpl | 56 ------------------- schutzbot/mockbuild.sh | 8 +-- 4 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 schutzbot/el9-mock-configs/rhel-9-aarch64.cfg delete mode 100644 schutzbot/el9-mock-configs/rhel-9-x86_64.cfg delete mode 100644 schutzbot/el9-mock-configs/templates/rhel-9.tpl diff --git a/schutzbot/el9-mock-configs/rhel-9-aarch64.cfg b/schutzbot/el9-mock-configs/rhel-9-aarch64.cfg deleted file mode 100644 index 786f30a13..000000000 --- a/schutzbot/el9-mock-configs/rhel-9-aarch64.cfg +++ /dev/null @@ -1,4 +0,0 @@ -include('templates/rhel-9.tpl') - -config_opts['target_arch'] = 'aarch64' -config_opts['legal_host_arches'] = ('aarch64',) diff --git a/schutzbot/el9-mock-configs/rhel-9-x86_64.cfg b/schutzbot/el9-mock-configs/rhel-9-x86_64.cfg deleted file mode 100644 index 477c1a330..000000000 --- a/schutzbot/el9-mock-configs/rhel-9-x86_64.cfg +++ /dev/null @@ -1,4 +0,0 @@ -include('templates/rhel-9.tpl') - -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) diff --git a/schutzbot/el9-mock-configs/templates/rhel-9.tpl b/schutzbot/el9-mock-configs/templates/rhel-9.tpl deleted file mode 100644 index 9f936c2a0..000000000 --- a/schutzbot/el9-mock-configs/templates/rhel-9.tpl +++ /dev/null @@ -1,56 +0,0 @@ -# inspired by https://gitlab.com/redhat/centos-stream/ci-cd/zuul/jobs/-/blob/master/playbooks/files/centos-stream9-x86_64.cfg - -config_opts['root'] = 'rhel-9-{{ target_arch }}' - - -config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config redhat-release which xz sed make bzip2 gzip gcc coreutils unzip shadow-utils diffutils cpio bash gawk rpm-build info patch util-linux findutils grep' -config_opts['dist'] = 'el8' # only useful for --resultdir variable subst -config_opts['releasever'] = '8' -config_opts['package_manager'] = 'dnf' -config_opts['extra_chroot_dirs'] = [ '/run/lock', ] -config_opts['bootstrap_image'] = 'registry-proxy.engineering.redhat.com/rh-osbs/ubi9' - -config_opts['dnf.conf'] = """ -[main] -keepcache=1 -debuglevel=2 -reposdir=/dev/null -logfile=/var/log/yum.log -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -mdpolicy=group:primary -best=1 -protected_packages= -module_platform_id=platform:el9 -user_agent={{ user_agent }} - -[rhel9-baseos] -name=RHEL 9 BaseOS -baseurl=http://download.devel.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.0/compose/BaseOS/$basearch/os/ -enabled=1 -gpgcheck=0 - -[rhel9-appstream] -name=RHEL 9 AppStream -baseurl=http://download.devel.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.0/compose/AppStream/$basearch/os/ -enabled=1 -gpgcheck=0 - -[rhel9-crb] -name=RHEL 9 CRB -baseurl=http://download.devel.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.0/compose/CRB/$basearch/os/ -enabled=1 -gpgcheck=0 - -[rhel9-buildroot] -name=RHEL 9 Buildroot -baseurl=http://download.eng.brq.redhat.com/rhel-9/nightly/BUILDROOT-9/latest-BUILDROOT-9.0-RHEL-9/compose/Buildroot/$basearch/os - -enabled=1 -gpgcheck=0 -""" - diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 48a59322f..378cef715 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -15,12 +15,8 @@ function template_override { fi if [[ "$ID" == rhel ]]; then TEMPLATE=${ID}-${VERSION_ID%.*}.tpl - if [[ ${VERSION_ID%.*} == 8 ]]; then - sudo sed -i "s/config_opts\['redhat_subscription_required'\] = True/config_opts['redhat_subscription_required'] = False/" /etc/mock/templates/rhel-8.tpl - elif [[ ${VERSION_ID%.*} == 9 ]]; then - greenprint "📋 Inserting $ID-$VERSION_ID mock template" - sudo cp -r schutzbot/el9-mock-configs/* /etc/mock/ - fi + # disable subscription for nightlies + sudo sed -i "s/config_opts\['redhat_subscription_required'\] = True/config_opts['redhat_subscription_required'] = False/" /etc/mock/templates/"$TEMPLATE" elif [[ "$ID" == fedora ]]; then TEMPLATE=fedora-branched.tpl elif [[ "$ID" == centos ]]; then