summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-05-30 15:37:10 +0200
committerFelix Fietkau <nbd@nbd.name>2017-05-30 15:40:51 +0200
commite25cedd0b5621dc02e47eea674006578ac062c9f (patch)
treeaf443321b65764db6b29cda6dedf6917a7dc6e94 /tools
parent6173f6d8f11961709eabfc871f40905ebbc2d274 (diff)
downloadmtk-20170518-e25cedd0b5621dc02e47eea674006578ac062c9f.zip
mtk-20170518-e25cedd0b5621dc02e47eea674006578ac062c9f.tar.gz
mtk-20170518-e25cedd0b5621dc02e47eea674006578ac062c9f.tar.bz2
tar: override symlink permissions
On Linux, symlink permissions cannot be altered and are always 0777. On Mac OS X they can be 0755. Force 0777 here to keep tarballs reproducible across systems Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools')
-rw-r--r--tools/tar/patches/110-symlink-force-permissions.patch10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/tar/patches/110-symlink-force-permissions.patch b/tools/tar/patches/110-symlink-force-permissions.patch
new file mode 100644
index 0000000..83dbda6
--- /dev/null
+++ b/tools/tar/patches/110-symlink-force-permissions.patch
@@ -0,0 +1,10 @@
+--- a/src/create.c
++++ b/src/create.c
+@@ -1851,6 +1851,7 @@ dump_file0 (struct tar_stat_info *st, ch
+ #ifdef HAVE_READLINK
+ else if (S_ISLNK (st->stat.st_mode))
+ {
++ st->stat.st_mode |= 0777; /* make permissions portable */
+ st->link_name = areadlinkat_with_size (parentfd, name, st->stat.st_size);
+ if (!st->link_name)
+ {