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/75931020 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/75931020 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/75931020 Branch: refs/heads/0.9.x Commit: 75931020882bb5c3a7eb04eb1464f975851cef70 Parents: bcb7a47 Author: Dominic Evans <[email protected]> Authored: Mon Mar 30 12:44:16 2015 +0100 Committer: Rafael Schloming <[email protected]> Committed: Tue Mar 31 05:06:43 2015 -0400 ---------------------------------------------------------------------- bin/export.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/75931020/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: [email protected] For additional commands, e-mail: [email protected]
