[SCM] libdvd-pkg/master: rules/get-orig-source: generate reproducible archive.

onlyjob at users.alioth.debian.org onlyjob at users.alioth.debian.org
Wed Apr 15 02:28:41 UTC 2015


The following commit has been merged in the master branch:
commit 776a54e00d1e4cf0589f31a3d5da96173de27c2a
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Wed Apr 15 12:15:26 2015 +1000

    rules/get-orig-source: generate reproducible archive.

diff --git a/debian/rules b/debian/rules
index 4397ff6..287bd31 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@
 PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
 PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
 PKGG = $(patsubst %-pkg,%,$(PKG))css
-VER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{Version:\s+(\d.*)(?:\-\d+.*)};')
+VER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(\d.*)(?:\-\d+.*)};')
 VERG = $(shell dpkg-parsechangelog -l$(PKGG)/debian/changelog | sed -n 's/^Version: *//p')
 P88  = $(patsubst debian/%,%,$(wildcard debian/88*))
 TMPL = $(patsubst %.in,%,$(wildcard debian/*.in))
@@ -51,6 +51,7 @@ $(SHA_FILES):
 
 $(PKG)_$(VER).orig.tar.xz: $(SHA_FILES)
 	mkdir $(PKG)_$(VER)
-	cp -r $(PKGG) $(PKG)_$(VER)/
-	XZ_OPT="-6v" tar -caf $(PKG)_$(VER).orig.tar.xz $(PKG)_$(VER) --exclude=*.bz2 --owner=root --group=root --mode=a+rX
+	cp --archive --recursive $(PKGG) $(PKG)_$(VER)/
+	find -L "$(PKG)_$(VER)" -xdev -type f -print | sort \
+        | XZ_OPT="-6v" tar -caf $(PKG)_$(VER).orig.tar.xz -T- --exclude="*.bz2" --owner=root --group=root --mode=a+rX
 	$(RM) -r $(PKG)_$(VER)

-- 
libdvdcss-pkg packaging



More information about the pkg-multimedia-commits mailing list