Tools/provision.sh: add workarounds for c10s

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 <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-06-03 11:09:45 +02:00 committed by Tomáš Hozza
parent 607b65c67f
commit f9079ae39c

View file

@ -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