summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-12-06 15:44:12 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-12-06 16:03:55 +0100
commita7d99ab36c6e9f3fd8db9735ad85f30f757d66d3 (patch)
tree4e2ff0fbf305d4539a4372436da4c37a964f49e0
parentf72bbe3b31163b9908ab59cc1d295080090ad439 (diff)
downloadscripts-a7d99ab36c6e9f3fd8db9735ad85f30f757d66d3.tar.gz
scripts-a7d99ab36c6e9f3fd8db9735ad85f30f757d66d3.zip
create_tarball: Force file permissions in the tarball.
It addresses independence from UMASK to ensure a reproducible build. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 807378eeb2a1363a10e4c9715758004df5c51500)
-rwxr-xr-xcreate_tarball1
1 files changed, 1 insertions, 0 deletions
diff --git a/create_tarball b/create_tarball
index 081ac90..b954201 100755
--- a/create_tarball
+++ b/create_tarball
@@ -161,6 +161,7 @@ if [ ! -e $TARBALL_DIR/$package.tar$TAR_SUFFIX ]; then
trap "rm $TARBALL_DIR/tar-$$; rm .tdescminfo; exit 1" INT
find ./ -print0 | LC_ALL=C sort -z | \
tar c --no-recursion --null -T - \
+ --mode=u+rw,go=rX,a-s \
--mtime "@$(git log -1 --pretty=format:"%ct")" \
--owner=root --group=users --exclude .git --exclude .gitmodules \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \