[vlc-devel] [PATCH v2] Sort tar file list

Bernhard M. Wiedemann bwiedemann at suse.de
Fri Oct 4 13:30:08 CEST 2019


if available (in GNU tar >= 1.28)
and use ustar format to not have pax headers add nondetermistic bits
to make skins2/default.vlt reproducible.

See https://reproducible-builds.org/ for why this is good.

This patch was done while working on reproducible builds for openSUSE.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann at suse.de>
---
 share/Makefile.am | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index e5b801a5be..327d36a64d 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -92,8 +92,11 @@ skins2_default_vlt_FILES = \
 skins2/default.vlt: $(skins2_default_vlt_FILES)
 	$(AM_V_at)mkdir -p skins2
 	$(AM_V_at)rm -f -- skins2/default.vlt.tmp
-	$(AM_V_GEN)GZIP=--no-name \
+	$(AM_V_GEN)tarsort= ; \
+	tar --help|grep -q sort=ORDER && tarsort=--sort=name ; \
+	GZIP=--no-name \
 	tar cvvzf skins2/default.vlt.tmp \
+		--format=ustar $$tarsort \
 		--owner=root --group=root --directory="$(srcdir)/skins2" \
 		default/
 	$(AM_V_at)mv -f -- skins2/default.vlt.tmp skins2/default.vlt
-- 
2.16.4



More information about the vlc-devel mailing list