]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-new-build: get RELEASE early
authorKefu Chai <kchai@redhat.com>
Fri, 4 Oct 2019 18:16:13 +0000 (02:16 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 4 Oct 2019 18:16:15 +0000 (02:16 +0800)
so we can use it when enabling more repos

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-dev-new-build/build/setup_rpm

index 13c67f44652c99d96270d8023f9fc4b8585f901d..be9bbab0fc71d56091d69318f343cb0cd571b1fe 100644 (file)
@@ -30,28 +30,7 @@ cd ceph-*
 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,30 @@ get_rpm_dist() {
 
 get_rpm_dist
 
+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
+
 # Normalize variables across rpm/deb builds
 NORMAL_DISTRO=$DISTRO
 NORMAL_DISTRO_VERSION=$RELEASE