]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: Update setup_rpm for CentOS8 support 1493/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 30 Jan 2020 14:48:42 +0000 (09:48 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 30 Jan 2020 14:48:42 +0000 (09:48 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ceph-build/build/setup_rpm

index 601acb94062b893a293d6ea5d72c99c2065cc5d9..56618f20b2485a75a9a21bf3348a05d08a6287ab 100644 (file)
@@ -30,29 +30,6 @@ cd $(basename *.orig.tar.gz .orig.tar.gz | sed s/_/-/)
 pwd
 
 $SUDO yum install -y yum-utils
-if [ "$ARCH" = x86_64 ]; then
-    $SUDO yum install -y centos-release-scl
-elif [ "$ARCH" = arm64 ]; then
-    $SUDO yum install -y centos-release-scl-rh
-    $SUDO yum-config-manager --disable centos-sclo-rh
-    $SUDO yum-config-manager --enable centos-sclo-rh-testing
-fi
-sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
-
-# Make sure we have all the rpm macros installed and at the latest version
-# before installing the dependencies, python3-devel requires the
-# python-rpm-macro we use for identifying the python related dependencies
-$SUDO yum install -y python3-devel
-
-$SUDO yum-builddep -y --setopt=*.skip_if_unavailable=true $DIR/ceph.spec
-
-BRANCH=`branch_slash_filter $BRANCH`
-
-if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
-    exit 0
-fi
-
-cd $WORKSPACE
 
 get_rpm_dist() {
     LSB_RELEASE=/usr/bin/lsb_release
@@ -101,6 +78,37 @@ get_rpm_dist() {
 
 get_rpm_dist
 
+if [ "$RELEASE" = 7 ]; then
+   if [ "$ARCH" = x86_64 ]; then
+       $SUDO yum install -y centos-release-scl
+   elif [ "$ARCH" = arm64 ]; then
+       $SUDO yum install -y centos-release-scl-rh
+       $SUDO yum-config-manager --disable centos-sclo-rh
+       $SUDO yum-config-manager --enable centos-sclo-rh-testing
+   fi
+elif [ "$RELEASE" = 8 ]; then
+    $SUDO dnf config-manager --set-enabled PowerTools
+    # chacractl is not python3 compatible yet
+    $SUDO dnf -y install python2
+fi
+
+sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
+
+# Make sure we have all the rpm macros installed and at the latest version
+# before installing the dependencies, python3-devel requires the
+# python-rpm-macro we use for identifying the python related dependencies
+$SUDO yum install -y python3-devel
+
+$SUDO yum-builddep -y --setopt=*.skip_if_unavailable=true $DIR/ceph.spec
+
+BRANCH=`branch_slash_filter $BRANCH`
+
+if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
+    exit 0
+fi
+
+cd $WORKSPACE
+
 # Normalize variables across rpm/deb builds
 NORMAL_DISTRO=$DISTRO
 NORMAL_DISTRO_VERSION=$RELEASE