diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-12-06 15:44:12 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-12-06 16:03:25 +0100 |
commit | 23145430b16daa96f930f9b08b319dc474fba5cf (patch) | |
tree | f47a6969e2f8704a1cc53a92abfb72a3ed02b7e6 | |
parent | 3bff5cbf910636236563940abf38d532c7132cdd (diff) | |
download | scripts-23145430b16daa96f930f9b08b319dc474fba5cf.tar.gz scripts-23145430b16daa96f930f9b08b319dc474fba5cf.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-x | create_tarball | 1 |
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 \ |