Source: debhelper
Version: 9.20151126
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: fileordering toolchain
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that dh_installinit doesn't generate reproducible postinst files.
It writes a list of tmpfiles in readdir order.

The attached patch sorts this list before it is written.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds

diff --git a/dh_installinit b/dh_installinit
index 4c19c5b..f438cd9 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -274,7 +274,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		}, $tmp);
 		if (@tmpfiles > 0) {
 			autoscript($package,"postinst", "postinst-init-tmpfiles",
-				"s,#TMPFILES#," . join(" ", @tmpfiles).",");
+				"s,#TMPFILES#," . join(" ", sort @tmpfiles).",");
 		}
 	}
 

Attachment: signature.asc
Description: OpenPGP digital 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