From f9079ae39c5707eb2362cb3d2c6eba41041d96d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 3 Jun 2024 11:09:45 +0200 Subject: [PATCH] Tools/provision.sh: add workarounds for c10s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no EPEL for RHEL-10 at this moment. Use our own COPR repository with c10s builds of some packages required by our tests. Signed-off-by: Tomáš Hozza --- tools/provision.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/provision.sh b/tools/provision.sh index 2b2f5dbd7..1c6eca8de 100755 --- a/tools/provision.sh +++ b/tools/provision.sh @@ -29,12 +29,19 @@ fi # koji and ansible are not in RHEL repositories. Depending on them in the spec # file breaks RHEL gating (see OSCI-1541). Therefore, we need to enable epel # and install koji and ansible here. -if [[ $ID == rhel || $ID == centos ]] && ! rpm -q epel-release; then +# +# TODO: Adjust the c10s condition, once EPEL-10 is available. +if [[ $ID == rhel || ($ID == centos && ${VERSION_ID%.*} -lt 10) ]] && ! rpm -q epel-release; then curl -Ls --retry 5 --output /tmp/epel.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-"${VERSION_ID%.*}".noarch.rpm sudo rpm -Uvh /tmp/epel.rpm fi +# TODO: Remove this workaround, once koji is in EPEL-10 +if [[ $ID == centos && ${VERSION_ID%.*} == 10 ]]; then + sudo dnf copr enable -y @osbuild/centpkg "centos-stream-10-$(uname -m)" +fi + # RHEL 8.6+ and CentOS 9 require different handling for ansible if [[ "$VERSION_ID" == "8.4" ]]; then sudo dnf install -y ansible koji