Source: rsbackup
Version: 3.1-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: locale fileordering
X-Debbugs-Cc: [email protected]

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that rsbackup could not be built reproducibly.
The changelog generated with lynx differs in the encoding, which is
fixed by running lynx always under a C.UTF-8 locale.
Also the order of lines in md5sums differs, as the file list is not
sorted.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/rules b/debian/rules
index f076f21..fd1c2e5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,7 +61,7 @@ binary-${PACKAGE}: build
 	cp debian/changelog debian/${PACKAGE}/usr/share/doc/${PACKAGE}/changelog.Debian
 	cp debian/doc.rsbackup debian/${PACKAGE}/usr/share/doc-base/rsbackup
 	cp README.md debian/${PACKAGE}/usr/share/doc/${PACKAGE}/.
-	lynx -dump -nolist doc/CHANGES.html > debian/${PACKAGE}/usr/share/doc/${PACKAGE}/changelog
+	LC_ALL=C.UTF-8 lynx -dump -nolist doc/CHANGES.html > debian/${PACKAGE}/usr/share/doc/${PACKAGE}/changelog
 	gzip -9nv debian/${PACKAGE}/usr/share/doc/${PACKAGE}/*
 	cp doc/*.html doc/*.css debian/${PACKAGE}/usr/share/doc/${PACKAGE}/.
 	cp debian/copyright debian/${PACKAGE}/usr/share/doc/${PACKAGE}/.
@@ -73,7 +73,7 @@ binary-${PACKAGE}: build
 	cd debian/${PACKAGE} && \
 	  find -name DEBIAN -prune -o -type f -print \
 	    | sed 's/^\.\///' \
-			| xargs md5sum > DEBIAN/md5sums
+			| LC_ALL=C sort | xargs md5sum > DEBIAN/md5sums
 	dpkg-gencontrol -isp -p${PACKAGE} -Pdebian/${PACKAGE} \
 		-Tdebian/substvars.rsbackup
 	chown -R root:root debian/${PACKAGE}

Attachment: signature.asc
Description: PGP signature

Reply via email to