]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-build: setup_rpm Support for CentOS8 1463/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 18 Dec 2019 16:22:41 +0000 (11:22 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 18 Dec 2019 16:22:41 +0000 (11:22 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ceph-dev-build/build/setup_rpm

index 9fafd209f3c727315a18b1c3b2078460f9078822..2bd5096166800f904323a5c38dcca0e23d7b80c9 100644 (file)
@@ -30,28 +30,7 @@ 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
 
-# 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
@@ -100,6 +79,36 @@ 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
+
+# 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