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

Bernhard M. Wiedemann bwiedemann at suse.de
Fri Oct 4 13:00:21 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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/share/Makefile.am b/share/Makefile.am
index e5b801a5be..775c404916 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -93,7 +93,9 @@ 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 \
+	tar --help|grep -q sort=ORDER && tarsort=--sort=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