]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Sanitize tar file ownership, mode, and order
authorPaul Smith <psmith@gnu.org>
Thu, 8 Sep 2022 04:04:11 +0000 (00:04 -0400)
committerPaul Smith <psmith@gnu.org>
Thu, 8 Sep 2022 07:04:15 +0000 (03:04 -0400)
For reproducibility ensure all files in the dist tar file are owned by
root, and sorted by name.  Force the mode on all files to be writable
by the owner and not writable by group or user, by default.

Remove unnecessary execute permissions from build_w32.bat.

Recommended by Tzvetelin Katchov <katchov@gnu.org>.

build_w32.bat [changed mode: 0755->0644]
maintMakefile

old mode 100755 (executable)
new mode 100644 (file)
index 88f734aee1acad326e64b62a20e86b028a1a1a67..99d649b6a2e95f28a677a1394128e87ec10aed91 100644 (file)
@@ -230,6 +230,11 @@ get-doc/make-stds.texi get-doc/fdl.texi:
 # Extra configuration checks.  #
 # ---------------------------- #
 
+# Make the dist file contents more regular, if we're using GNU tar.
+# Suggested by Tzvetelin Katchov <katchov@gnu.org>
+
+export TAR_OPTIONS := --mode=u+w,go-w --owner=0 --group=0 --numeric-owner --sort=name
+
 # When I released 4.3 somehow the INSTALL file was missing.
 # When I tried to build it again, it was there.  I have no idea what happened
 # but add a new check to be sure it doesn't happen again.