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