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:00:57 +0100
commit807378eeb2a1363a10e4c9715758004df5c51500 (patch)
tree0b80a2d8d185cc2646814e928bcff741f4d9f2ba
parent517a78302072e0b2a55a65a4811bc90fbba42e08 (diff)
downloadscripts-807378eeb2a1363a10e4c9715758004df5c51500.tar.gz
scripts-807378eeb2a1363a10e4c9715758004df5c51500.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>
-rwxr-xr-xcreate_tarball1
1 files changed, 1 insertions, 0 deletions
diff --git a/create_tarball b/create_tarball
index 4035d33..62abb6d 100755
--- a/create_tarball
+++ b/create_tarball
@@ -154,6 +154,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 \