From: Kefu Chai Date: Fri, 4 Oct 2019 18:16:13 +0000 (+0800) Subject: ceph-dev-new-build: get RELEASE early X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a2e83583fdc2a0451889c5cf239d35411e29e623;p=ceph-build.git ceph-dev-new-build: get RELEASE early so we can use it when enabling more repos Signed-off-by: Kefu Chai --- diff --git a/ceph-dev-new-build/build/setup_rpm b/ceph-dev-new-build/build/setup_rpm index 13c67f44..be9bbab0 100644 --- a/ceph-dev-new-build/build/setup_rpm +++ b/ceph-dev-new-build/build/setup_rpm @@ -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