Skip to content

Commit

Permalink
ci: use s3cmd from repositories instead of pip
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gicmo committed Oct 22, 2020
1 parent bb13783 commit 28c68c0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions schutzbot/mockbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 28c68c0

Please sign in to comment.