ci: use s3cmd from repositories instead of pip

s3cmd does not work properly with python 3.9 (used on Fedora 33):
  Problem: <class 'AttributeError: 'xml.etree.ElementTree.Element'
            object has no attribute 'getchildren'
  S3cmd:   2.1.0
  python:  3.9.0rc1 (default, Aug 12 2020, 00:00:00)

Use the one from the official repositories, which in case of F33
has a downstream fix for the error.

See rhbz#1884607 and s3tools/s3cmd#1137

Patch based on osbuild-composer commit 1a69a891 by Ondřej Budai.
This commit is contained in:
Christian Kellner 2020-10-22 18:01:33 +02:00 committed by Lars Karlitski
parent d7d84a8eb1
commit 7081f43153

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 are only available in EPEL for RHEL.
if [[ $ID == rhel ]]; 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 python3-pip rpm-build s3cmd
# Enable fastestmirror for mock on Fedora.
if [[ $ID == fedora ]]; then