summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@kotori.zaitcev.us>2013-06-28 18:12:35 -0600
committerLuis Pabon <lpabon@redhat.com>2013-06-30 17:22:44 -0700
commitceb18f16ccbfecd5ac36c1623629c2c2c33f307a (patch)
treed3f932cb936f06c59965cf17f79918b78c2677a2
parent5cef798f8dcdee0d0512e47b67ac67d5f8d6c14c (diff)
Fix git-archive invocation for RHEL 6
Apparently, on RHEL 6, the valid archive type is tar, not tar.gz. It causes git-archive and thus makerpm.sh to abort with: fatal: Unknown archive format 'tar.gz' To fix, use a regular pipeline. Change-Id: I9174ad1d1c0e087f46ecd31eade61eeea75cb9cb Signed-off-by: Pete Zaitcev <zaitcev@kotori.zaitcev.us> Reviewed-on: http://review.gluster.org/5271 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
-rw-r--r--makerpm.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/makerpm.sh b/makerpm.sh
index 6427df6..74d7c00 100644
--- a/makerpm.sh
+++ b/makerpm.sh
@@ -28,8 +28,8 @@ create_dir()
gittotar()
{
# Only archives committed changes
- git archive --format=tar.gz --prefix=${SRCTAR_DIR}/ HEAD --output ${SRCTAR}
- if [ $? -ne 0 ] ; then
+ git archive --format=tar --prefix=${SRCTAR_DIR}/ HEAD | gzip -c > ${SRCTAR}
+ if [ $? -ne 0 -o \! -s ${SRCTAR} ] ; then
fail "Unable to create git archive" $?
fi
}