Source: gnugo
Version: 3.8-8
Severity: wishlist
Tags: patch
Usertags: fileordering


While working on the "reproducible builds" effort [1], we have noticed
that gnugo could not be built reproducibly.
The md5sums file generated during build varies with the readdir order.

The attached patch fixes this by sorting the output from find.


diff --git a/debian/rules b/debian/rules
index 33d07ad..dac2c30 100755
--- a/debian/rules
+++ b/debian/rules
@@ -73,7 +73,7 @@ endif
 	install -d -p -m 0755 debian/gnugo/DEBIAN
 	install    -p -m 0755 debian/postinst debian/postrm debian/gnugo/DEBIAN
-	cd debian/gnugo && find usr -type f -print0 | xargs -0 md5sum > DEBIAN/md5sums
+	cd debian/gnugo && find usr -type f -print0 | LC_ALL=C sort -z | xargs -0 md5sum > DEBIAN/md5sums
 	cd debian/gnugo && find etc -type f | sed 's@^@/@' > DEBIAN/conffiles
 	chmod -R u+w,go=u-w debian/gnugo

Attachment: signature.asc
Description: PGP signature

Reproducible-builds mailing list

Reply via email to