schutzbot: use s3cmd from repositories

s3cmd from pip doesn't work with Python 3.9. Fortunately, s3cmd in Fedora has
a downstream patch to fix it.

See rhbz#1884607 and https://github.com/s3tools/s3cmd/pull/1137
This commit is contained in:
Ondřej Budai 2020-10-02 13:18:34 +02:00 committed by msehnout
parent a67baf5a4d
commit 1a69a8919b

View file

@ -10,7 +10,7 @@ function greenprint {
source /etc/os-release
ARCH=$(uname -m)
# Mock is only available in EPEL for RHEL.
# Mock and s3cmd is only available in EPEL for RHEL.
if [[ $ID == rhel ]] && ! rpm -q epel-release; then
greenprint "📦 Setting up EPEL repository"
curl -Ls --retry 5 --output /tmp/epel.rpm \
@ -27,13 +27,7 @@ fi
# Install requirements for building RPMs in mock.
greenprint "📦 Installing mock requirements"
sudo dnf -y install createrepo_c make mock python3-pip rpm-build
# Install s3cmd if it is not present.
if ! s3cmd --version > /dev/null 2>&1; then
greenprint "📦 Installing s3cmd"
sudo pip3 -q install s3cmd
fi
sudo dnf -y install createrepo_c make mock rpm-build s3cmd
# Jenkins sets a workspace variable as the root of its working directory.
WORKSPACE=${WORKSPACE:-$(pwd)}