]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
build-ceph-rpm.sh: use make-dist if available
authorSage Weil <sage@redhat.com>
Wed, 22 Jun 2016 12:55:08 +0000 (08:55 -0400)
committerSage Weil <sage@redhat.com>
Wed, 22 Jun 2016 12:55:08 +0000 (08:55 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
build-ceph-rpm.sh

index b1b3818b1a18fbff7e208d3fe9159d6702ef7885..6c12fc91ba7fdc51e97ea4bf6c520ce739c44070 100755 (executable)
@@ -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