[source] tar: fix reproducibility issue
LEDE Commits
lede-commits at lists.infradead.org
Mon Dec 19 12:09:23 PST 2016
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/2b510d97ba9f66ef1e5b40778ed85b47e3b7cbe3
commit 2b510d97ba9f66ef1e5b40778ed85b47e3b7cbe3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Dec 19 21:06:07 2016 +0100
tar: fix reproducibility issue
Force root/root as names for uid0/gid0 instead of using the system
names. This helps make packed download tarballs more reproducible
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
.../tar/patches/100-symlink-force-root-name.patch | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/tar/patches/100-symlink-force-root-name.patch b/tools/tar/patches/100-symlink-force-root-name.patch
new file mode 100644
index 0000000..896b472
--- /dev/null
+++ b/tools/tar/patches/100-symlink-force-root-name.patch
@@ -0,0 +1,22 @@
+Force root/root as names for uid0/gid0 instead of using the system
+names. This helps make packed download tarballs more reproducible
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+--- a/src/create.c
++++ b/src/create.c
+@@ -545,12 +545,8 @@ write_gnu_long_link (struct tar_stat_inf
+ char *tmpname;
+
+ header = start_private_header ("././@LongLink", size, 0);
+- uid_to_uname (0, &tmpname);
+- UNAME_TO_CHARS (tmpname, header->header.uname);
+- free (tmpname);
+- gid_to_gname (0, &tmpname);
+- GNAME_TO_CHARS (tmpname, header->header.gname);
+- free (tmpname);
++ UNAME_TO_CHARS ("root", header->header.uname);
++ GNAME_TO_CHARS ("root", header->header.gname);
+
+ strcpy (header->buffer + offsetof (struct posix_header, magic),
+ OLDGNU_MAGIC);
More information about the lede-commits
mailing list