You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by dn...@apache.org on 2015/03/30 14:32:16 UTC
qpid-proton git commit: NO-JIRA: export.sh creates pax-based tar
Repository: qpid-proton
Updated Branches:
refs/heads/master 65aa64c0e -> ea9ca783c
NO-JIRA: export.sh creates pax-based tar
Having switched to using git-archive, we end up creating a tar that uses
the PAX-based scheme for supporting long pathnames. This causes issues
for a number of extraction tools (ant, 7-zip, etc.) which only support
the GNU tar format. We should stick with GNU tar, as used for previous
qpid-proton releases.
Also update the script to revert to using a suffix of .tar.gz (rather
than .tgz) for the source distribution.
Closes #14
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ea9ca783
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ea9ca783
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ea9ca783
Branch: refs/heads/master
Commit: ea9ca783cd7e7516f37f23b661ae27ba326b128b
Parents: 65aa64c
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Mon Mar 30 12:44:16 2015 +0100
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Mon Mar 30 13:31:49 2015 +0100
----------------------------------------------------------------------
bin/export.sh | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ea9ca783/bin/export.sh
----------------------------------------------------------------------
diff --git a/bin/export.sh b/bin/export.sh
index a0d7568..85ef2c7 100755
--- a/bin/export.sh
+++ b/bin/export.sh
@@ -20,6 +20,8 @@
#
# export.sh - Create a release archive.
+set -e
+trap "cleanup" 0 1 2 3 9 11 13 15
ME=$(basename ${0})
SRC=$(dirname $(dirname $(readlink -f $0)))
@@ -30,6 +32,13 @@ usage()
exit 1
}
+cleanup()
+{
+ trap - 0 1 2 3 9 11 13 15
+ echo
+ [ ${WORKDIR} ] && [ -d ${WORKDIR} ] && rm -rf ${WORKDIR}
+}
+
if [ $# == 1 ]; then
DIR=$1
elif [ $# == 0 ]; then
@@ -38,12 +47,22 @@ else
usage
fi
+WORKDIR=$(mktemp -d)
+
##
## Create the archive
##
(
cd ${SRC}
TAG=$(git describe --tags --always)
- ARCHIVE=$DIR/qpid-proton-${TAG}.tgz
- git archive --format=tgz --prefix=qpid-proton-${TAG}/ ${TAG} -o ${ARCHIVE}
+ MTIME=$(date -d @`git log -1 --pretty=format:%ct tags/${TAG}` '+%Y-%m-%d %H:%M:%S')
+ ARCHIVE=$DIR/qpid-proton-${TAG}.tar.gz
+ [ -d ${WORKDIR} ] || mkdir -p ${WORKDIR}
+ git archive --format=tar --prefix=qpid-proton-${TAG}/ tags/${TAG} \
+ | tar -x -C ${WORKDIR}
+ cd ${WORKDIR}
+ tar -c -z \
+ --owner=root --group=root --numeric-owner \
+ --mtime="${MTIME}" \
+ -f ${ARCHIVE} .
)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org