Source: libperl-apireference-perl
Version: 0.18-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=102203

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that libperl-apireference-perl doesn't build reproducibly.
It generates class files with non-deterministic output.

The attached patch, which I have already forwarded upstream,
fixes this.

Regards,
 Reiner

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

diff --git a/debian/patches/reproducible.patch b/debian/patches/reproducible.patch
new file mode 100644
index 0000000..82ef935
--- /dev/null
+++ b/debian/patches/reproducible.patch
@@ -0,0 +1,16 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Make build reproducible by sorting Data::Dumper output.
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=102203
+
+Index: libperl-apireference-perl-0.18/lib/Perl/APIReference.pm
+===================================================================
+--- libperl-apireference-perl-0.18.orig/lib/Perl/APIReference.pm
++++ libperl-apireference-perl-0.18/lib/Perl/APIReference.pm
+@@ -135,6 +135,7 @@ sub _dump_as_class {
+   
+   require Data::Dumper;
+   local $Data::Dumper::Indent = 0;
++  local $Data::Dumper::Sortkeys = 1;
+   my $dumper = Data::Dumper->new([$self->{'index'}]);
+   my $dump = $dumper->Dump();
+   
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..038ee28
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible.patch

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to