summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-12-17 16:01:49 +0100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-01-16 20:49:52 +1100
commitdc956da42249b857588bc8d9ca6a61419b84e5d5 (patch)
tree564d9e571ba0f229c903f3f9916df563a26a9fec /ctdb
parent68b9c876748f9443fc5ecfb9b9eca06d977e7920 (diff)
downloadsamba-dc956da42249b857588bc8d9ca6a61419b84e5d5.tar.gz
samba-dc956da42249b857588bc8d9ca6a61419b84e5d5.tar.xz
samba-dc956da42249b857588bc8d9ca6a61419b84e5d5.zip
makerpms: fix creation of tarball when gzip does not know "--rsynceable"
--rsynceable is a patch to gzip that not all distributors / packagers add to gzip. (It has just bitten me on openSUSE.) This path first detects whether gzip knows about --rsynceable and then calls gzip accordingly. Michael (This used to be ctdb commit 62eccefc15e2ca737098980aa0b7d226df73a456)
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/packaging/RPM/makerpms.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/ctdb/packaging/RPM/makerpms.sh b/ctdb/packaging/RPM/makerpms.sh
index f513da4ce4..3735b394d8 100755
--- a/ctdb/packaging/RPM/makerpms.sh
+++ b/ctdb/packaging/RPM/makerpms.sh
@@ -28,9 +28,15 @@ RPMBUILD="rpmbuild"
VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
RELEASE=$(grep ^Release ${DIRNAME}/${SPECFILE} | sed -e 's/^Release:\ \+//')
+if gzip --rsyncable 2>&1 ; then
+ GZIP="gzip -9 --rsyncable"
+else
+ GZIP="gzip -9"
+fi
+
pushd ${TOPDIR}
echo -n "Creating ctdb-${VERSION}.tar.gz ... "
-git archive --prefix=ctdb-${VERSION}/ HEAD | gzip -9 --rsyncable > ${SRCDIR}/ctdb-${VERSION}.tar.gz
+git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} > ${SRCDIR}/ctdb-${VERSION}.tar.gz
RC=$?
popd
echo "Done."