diff options
author | Jerome Martin <jxm@risingtidesystems.com> | 2011-09-22 12:36:22 +0200 |
---|---|---|
committer | Jerome Martin <jxm@risingtidesystems.com> | 2011-09-22 12:37:09 +0200 |
commit | b03ec79f3654cc790d216d24e9ec69795c486df7 (patch) | |
tree | bb3bc168497b351f44d1882e1c13c325b3abcab5 | |
parent | 95cdcb7dd669d840d14bd099d68fce4dcdc9cc64 (diff) | |
download | targetcli-b03ec79f3654cc790d216d24e9ec69795c486df7.tar.gz |
Normalized release archive generation.
* Now using gzip -n to compress the release tarball.
* Forcing gzip compression level to 6.
* Setting the timestamp for all files in the archive to the last commit's one.
* Feeding a sorted list of files to tar.
* Forcing numerid UIDs in tarball and original owner/group to be uid 0.
* Forcing gnu archive format.
* Forcing blocking factor.
* Forcing name quoting style.
* Preserves git archive permissions.
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -56,7 +56,7 @@ build/release-stamp: @mkdir -p build @echo "Exporting the repository files..." @git archive ${GIT_BRANCH} --prefix ${NAME}-${VERSION}/ \ - | (cd build; tar xf -) + | (cd build; tar xfp -) @echo "Cleaning up the target tree..." @rm -f build/${NAME}-${VERSION}/Makefile @rm -f build/${NAME}-${VERSION}/.gitignore @@ -101,8 +101,15 @@ build/release-stamp: echo " -- $${author} $${date}"; \ echo ; \ done > build/${NAME}-${VERSION}/debian/changelog + @find build/${NAME}-${VERSION}/ -exec \ + touch -t $$(date -d @$$(git show -s --format="format:%at") \ + +"%Y%m%d%H%M.%S") {} \; @mkdir -p dist - @cd build; tar zcf ../dist/${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION} + @cd build; tar -c --owner=0 --group=0 --numeric-owner \ + --format=gnu -b20 --quoting-style=escape \ + -f ../dist/${NAME}-${VERSION}.tar \ + $$(find ${NAME}-${VERSION} -type f | sort) + @gzip -6 -n dist/${NAME}-${VERSION}.tar @echo "Generated release tarball:" @echo " $$(ls dist/${NAME}-${VERSION}.tar.gz)" @touch build/release-stamp |