summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Martin <jxm@risingtidesystems.com>2011-09-22 12:35:12 +0200
committerJerome Martin <jxm@risingtidesystems.com>2011-09-22 12:35:44 +0200
commit9e7959d4f4f32178ca1dcff862a56171c45c199b (patch)
tree50807ecde59c2c48315e205a14c5f5621f560502
parent3ba5560219d7ae8545ce825f4ba778b5c2c90893 (diff)
downloadconfigshell-fb-9e7959d4f4f32178ca1dcff862a56171c45c199b.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--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index dbbd0ef..20bf617 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,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
@@ -95,8 +95,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