From: Sage Weil Date: Wed, 22 Jun 2016 12:55:08 +0000 (-0400) Subject: build-ceph-rpm.sh: use make-dist if available X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2331093277c8d0a23ed3ee98c75cc1f835e9bf75;p=autobuild-ceph.git build-ceph-rpm.sh: use make-dist if available Signed-off-by: Sage Weil --- diff --git a/build-ceph-rpm.sh b/build-ceph-rpm.sh index b1b3818..6c12fc9 100755 --- a/build-ceph-rpm.sh +++ b/build-ceph-rpm.sh @@ -17,7 +17,7 @@ rm -rf .git/modules/ git clean -fdx && git reset --hard /srv/git/bin/git submodule sync /srv/autobuild-ceph/use-mirror.sh -/srv/git/bin/git submodule update --init +/srv/git/bin/git submodule update --init --recursive git clean -fdx DISTS=`cat ../../dists` @@ -47,21 +47,6 @@ then exit 4 fi -echo --START-IGNORE-WARNINGS -[ ! -x install-deps.sh ] || ./install-deps.sh -[ ! -x autogen.sh ] || ./autogen.sh || exit 1 -autoconf || true -echo --STOP-IGNORE-WARNINGS - -[ -z "$CEPH_EXTRA_CONFIGURE_ARGS" ] && CEPH_EXTRA_CONFIGURE_ARGS=--with-tcmalloc -[ ! -x configure ] || ./configure --with-debug --with-radosgw --with-fuse --with-libatomic-ops --with-gtk2 --with-nss $CEPH_EXTRA_CONFIGURE_ARGS || exit 2 - -if [ ! -e Makefile ]; then - echo "$0: no Makefile, aborting." 1>&2 - exit 3 -fi - -# Actually build the project # clear out any $@ potentially passed in set -- @@ -78,11 +63,32 @@ else echo "$0: no ccache found, compiles will be slower." 1>&2 fi -# -# Build Source tarball. We do this after runing autogen/configure so that -# ceph.spec has the correct version number filled in. -echo "**** Building Tarball ***" -make dist-bzip2 +echo --START-IGNORE-WARNINGS +[ ! -x install-deps.sh ] || ./install-deps.sh + +# we only need to use autogen here if we need a dist tarball +if [ -x make-dist ]; then + echo --STOP-IGNORE-WARNINGS + ./make-dist +else + [ ! -x autogen.sh ] || ./autogen.sh || exit 1 + autoconf || true + echo --STOP-IGNORE-WARNINGS + + [ -z "$CEPH_EXTRA_CONFIGURE_ARGS" ] && CEPH_EXTRA_CONFIGURE_ARGS=--with-tcmalloc + [ ! -x configure ] || ./configure --with-debug --with-radosgw --with-fuse --with-libatomic-ops --with-gtk2 --with-nss $CEPH_EXTRA_CONFIGURE_ARGS || exit 2 + + if [ ! -e Makefile ]; then + echo "$0: no Makefile, aborting." 1>&2 + exit 3 + fi + + # + # Build Source tarball. We do this after runing autogen/configure so that + # ceph.spec has the correct version number filled in. + echo "**** Building Tarball ***" + make dist-bzip2 +fi # Set up build area BUILDAREA=./rpmbuild @@ -252,13 +258,6 @@ printf '%s\n' "$VER" >"$OUTDIR_TMP/version" printf '%s\n' "ceph" >"$OUTDIR_TMP/name" #mkdir -p $OUTDIR_TMP/conf -#MACH="$(uname -m)" -#INSTDIR="inst.tmp" -#[ ! -e "$INSTDIR" ] -#../maxtime 1800 ionice -c3 nice -n20 make install DESTDIR="$PWD/$INSTDIR" -#tar czf "$OUTDIR_TMP/ceph.$MACH.tgz" -C "$INSTDIR" . -#rm -rf -- "$INSTDIR" - # Copy RPMS to output repo for dir in ${BUILDAREA}/SRPMS ${BUILDAREA}/RPMS/* do