From ceb18f16ccbfecd5ac36c1623629c2c2c33f307a Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Fri, 28 Jun 2013 18:12:35 -0600 Subject: 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 Reviewed-on: http://review.gluster.org/5271 Reviewed-by: Luis Pabon Tested-by: Luis Pabon --- makerpm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makerpm.sh') 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 } -- cgit