Source: libextutils-depends-perl
Version: 0.402-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness toolchain

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that packages using ExtUtils::Depends contain differing files after
each build, because the dependency list is not sorted in save_config.

The attached patch, which has already been forwarded upstream [2], fixes this.

Regards,
 Reiner

 [1]: https://wiki.debian.org/ReproducibleBuilds
 [2]: https://rt.cpan.org/Public/Bug/Display.html?id=101602

diff --git a/debian/changelog b/debian/changelog
index d011462..16db901 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libextutils-depends-perl (0.402-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Added patch to produce stable output in saved configs.
+
+ -- Reiner Herrmann <rei...@reiner-h.de>  Sun, 18 Jan 2015 16:05:44 +0100
+
 libextutils-depends-perl (0.402-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/deterministic_output.patch b/debian/patches/deterministic_output.patch
new file mode 100644
index 0000000..2487e90
--- /dev/null
+++ b/debian/patches/deterministic_output.patch
@@ -0,0 +1,17 @@
+Subject: Sort keys to get the same output on every invocation
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101602
+
+Index: libextutils-depends-perl-0.402/lib/ExtUtils/Depends.pm
+===================================================================
+--- libextutils-depends-perl-0.402.orig/lib/ExtUtils/Depends.pm
++++ libextutils-depends-perl-0.402/lib/ExtUtils/Depends.pm
+@@ -127,7 +127,7 @@ sub save_config {
+ 		inc => join (" ", @{ $self->{inc} }),
+ 		libs => $self->{libs},
+ 		typemaps => [ map { basename $_ } @{ $self->{typemaps} } ],
+-		deps => [keys %{ $self->{deps} }],
++		deps => [sort keys %{ $self->{deps} }],
+ 	}], ['self']);
+ 	print $file <<'EOF';
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..155adf7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+deterministic_output.patch

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