]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
install-deps.sh: always use dnf on RHEL/CentOS
authorKefu Chai <kchai@redhat.com>
Thu, 25 Jun 2020 11:40:50 +0000 (19:40 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 25 Jun 2020 11:59:41 +0000 (19:59 +0800)
as we don't build master on el7 anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
install-deps.sh

index c27a37534fda92df51a88fbdfe77e03bcd2c2b67..6dc37314eda04190a3753621bce0a0b9d8a3accf 100755 (executable)
@@ -297,18 +297,17 @@ else
        if [ "$control" != "debian/control" ] ; then rm $control; fi
         ;;
     centos|fedora|rhel|ol|virtuozzo)
-        yumdnf="dnf"
         builddepcmd="dnf -y builddep --allowerasing"
-        echo "Using $yumdnf to install dependencies"
+        echo "Using dnf to install dependencies"
         case "$ID" in
             fedora)
-                $SUDO $yumdnf install -y $yumdnf-utils
+                $SUDO dnf install -y dnf-utils
                 ;;
             centos|rhel|ol|virtuozzo)
                 MAJOR_VERSION="$(echo $VERSION_ID | cut -d. -f1)"
-                $SUDO $yumdnf install -y $yumdnf-utils
+                $SUDO dnf install -y dnf-utils
                 rpm --quiet --query epel-release || \
-                   $SUDO $yumdnf -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
+                   $SUDO dnf -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
                 $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
@@ -325,7 +324,7 @@ else
         esac
         munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
         # for python3_pkgversion macro defined by python-srpm-macros, which is required by python3-devel
-        $SUDO $yumdnf install -y python3-devel
+        $SUDO dnf install -y python3-devel
         $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
         [ ${PIPESTATUS[0]} -ne 0 ] && exit 1
         IGNORE_YUM_BUILDEP_ERRORS="ValueError: SELinux policy is not managed or store cannot be accessed."