]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: Make powertools repo case insensitive 38001/head
authorBrad Hubbard <bhubbard@redhat.com>
Mon, 9 Nov 2020 23:43:45 +0000 (09:43 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Tue, 10 Nov 2020 22:28:38 +0000 (08:28 +1000)
It looks like CentOS 8.3 will see all repos converted to lower case and
this has been pre-empted in the CentOS stream repos so we need to be
able to enable a repo called 'PowerTools' or 'powertools'

See https://git.centos.org/rpms/centos-repos/c/b759b17

Fixes: https://tracker.ceph.com/issues/48174
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
install-deps.sh

index 146ae7189c63f52c608104b10f5d3db548b5a6b1..2735291f78d74cb1c2257b20d32c7f170a31a599 100755 (executable)
@@ -328,7 +328,8 @@ else
                 $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
                 $SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
                if test $ID = centos -a $MAJOR_VERSION = 8 ; then
-                    $SUDO dnf config-manager --set-enabled PowerTools
+                    # Enable 'powertools' or 'PowerTools' repo
+                    $SUDO dnf config-manager --set-enabled $(dnf repolist --all 2>/dev/null|gawk 'tolower($0) ~ /^powertools\s/{print $1}')
                    # before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies
                     $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
                     $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save