The branch, master has been updated via 83e7c161efa93cd7acdfc803142b4fb3bfde7538 (commit) via bc8aee079e09164e06533a1474f5e9d899795933 (commit) via bb8d02abd88899d259085b9b23fa52accb222be9 (commit) from 4f50aa8bb8be544058523f2f544109a26c2b3b51 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 83e7c161efa93cd7acdfc803142b4fb3bfde7538 Author: Michael Adam <ob...@samba.org> Date: Thu Nov 26 08:35:20 2009 +0100 packaging:maketarball.sh: add a DEBIAN_MODE to the tarball creation It is triggered by setting DEBIAN_MODE=yes in the environment. This creates a tarball suitable for use in debian packages. The differences from the standard tarball are these: * The tar ball file is called ctdb_VERSION.orig.tar.gz * The base directory in the tar ball is ctdb-VERSION.orig/ Michael commit bc8aee079e09164e06533a1474f5e9d899795933 Author: Michael Adam <ob...@samba.org> Date: Thu Nov 26 08:34:44 2009 +0100 configure:maketarball.sh: call autogen.sh and include configure in the tarball Michael commit bb8d02abd88899d259085b9b23fa52accb222be9 Author: Michael Adam <ob...@samba.org> Date: Thu Nov 26 08:32:24 2009 +0100 packaging:maketarball.sh: create the specfile from the ctdb.spec.in Michael ----------------------------------------------------------------------- Summary of changes: packaging/maketarball.sh | 61 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 56 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/maketarball.sh b/packaging/maketarball.sh index 18e57a2..1ba353d 100755 --- a/packaging/maketarball.sh +++ b/packaging/maketarball.sh @@ -28,10 +28,21 @@ DIRNAME=$(dirname $0) TOPDIR=${DIRNAME}/.. RPMDIR=${DIRNAME}/RPM SPECFILE=${RPMDIR}/ctdb.spec +SPECFILE_IN=${SPECFILE}.in EXTRA_SUFFIX="$1" -VERSION=$(grep ^Version ${SPECFILE} | sed -e 's/^Version:\ \+//') +GITHASH=".$(git log --pretty=format:%h -1)" + +if test "x$USE_GITHASH" = "xno" ; then + GITHASH="" +fi + +sed -e s/GITHASH/${GITHASH}/g \ + < ${SPECFILE_IN} \ + > ${SPECFILE} + +VERSION=$(grep ^Version ${SPECFILE} | sed -e 's/^Version:\ \+//')${GITHASH} if [ "x${EXTRA_SUFFIX}" != "x" ]; then VERSION="${VERSION}-${EXTRA_SUFFIX}" @@ -43,18 +54,58 @@ else GZIP="gzip -9" fi +TAR_PREFIX="ctdb-${VERSION}" +TAR_BASE="ctdb-${VERSION}" + +if test "x${DEBIAN_MODE}" = "xyes" ; then + TAR_PREFIX="ctdb-${VERSION}.orig" + TAR_BASE="ctdb_${VERSION}.orig" +fi + +TAR_BALL=${TAR_BASE}.tar +TAR_GZ_BALL=${TAR_BALL}.gz + pushd ${TOPDIR} -echo -n "Creating ctdb-${VERSION}.tar.gz ... " -git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} \ - > ${TOPDIR}/ctdb-${VERSION}.tar.gz +echo "Creating ${TAR_BASE}.tar.gz ... " +git archive --prefix=${TAR_PREFIX}/ HEAD | ( cd /tmp ; tar xf - ) RC=$? popd +if [ $RC -ne 0 ]; then + echo "Error calling git archive." + exit 1 +fi -echo "Done." +pushd /tmp/${TAR_PREFIX} +./autogen.sh +RC=$? +popd +if [ $RC -ne 0 ]; then + echo "Error calling autogen.sh." + exit 1 +fi +pushd /tmp +tar cf ${TAR_BALL} ${TAR_PREFIX} +RC=$? if [ $RC -ne 0 ]; then + popd echo "Creation of tarball failed." exit 1 fi +${GZIP} ${TAR_BALL} +RC=$? +if [ $RC -ne 0 ]; then + popd + echo "Zipping tarball failed." + exit 1 +fi + +rm -rf ${TAR_PREFIX} + +popd + +mv /tmp/${TAR_GZ_BALL} . + +echo "Done." exit 0 -- CTDB repository