Source: gnugo
Version: 3.8-8
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

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.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
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
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to