There is no EPEL for EL10 yet so use a custom COPR repository

This commit is contained in:
Alexander Todorov 2024-07-16 14:09:08 +03:00 committed by Alexander Todorov
parent 9006836afc
commit 39d91bcb4e

View file

@ -12,12 +12,18 @@ function greenprint {
}
source /etc/os-release
# s3cmd is in epel, add if it's not present
if [[ $ID == rhel || $ID == centos ]] && ! rpm -q epel-release; then
# TODO: Adjust this condition, once EPEL-10 is enabled
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 EPEL-10 is enabled
if [[ ($ID == rhel || $ID == centos) && ${VERSION_ID%.*} == 10 ]]; then
sudo dnf copr enable -y @osbuild/centpkg "centos-stream-10-$(uname -m)"
fi
sudo dnf -y install s3cmd
greenprint "Job artifacts will be uploaded to: $S3_URL"