Source: libxray-scattering-perl
Version: 3.0.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-CC: reproducible-builds@lists.alioth.debian.org

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that libxray-scattering-perl doesn't build reproducibly.
Two files generated by perl scripts are not generated deterministically.

The attached patch fixes this by telling Storable::nstore to produce
sorted output.

Regards,
 Reiner

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




diff --git a/debian/patches/reproducible_db.patch b/debian/patches/reproducible_db.patch
new file mode 100644
index 0000000..95df2df
--- /dev/null
+++ b/debian/patches/reproducible_db.patch
@@ -0,0 +1,29 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Set $Storable::canonical to 1 to get reproducible output for nstore
+
+Index: libxray-scattering-perl-3.0.1/data/cromann.PL
+===================================================================
+--- libxray-scattering-perl-3.0.1.orig/data/cromann.PL
++++ libxray-scattering-perl-3.0.1/data/cromann.PL
+@@ -31,6 +31,8 @@ use Storable qw/nstore/;
+ use File::Spec;
+ use Chemistry::Elements qw(get_symbol);
+ 
++$Storable::canonical = 1;
++
+ ##data (s(i),i=1,214) /
+ my @symbols = (
+ 	       'h',    'h.',   'h1-',  'he',   'li',   'li1+', 'be',
+Index: libxray-scattering-perl-3.0.1/data/waaskirf.PL
+===================================================================
+--- libxray-scattering-perl-3.0.1.orig/data/waaskirf.PL
++++ libxray-scattering-perl-3.0.1/data/waaskirf.PL
+@@ -36,6 +36,8 @@ use Storable qw/nstore/;
+ use File::Spec;
+ use Chemistry::Elements qw(get_symbol);
+ 
++$Storable::canonical = 1;
++
+ ##data (s(i),i=1,214) /
+ 
+ my @symbols = qw(H H1- He Li Li1+ Be Be2+ B C Cval N O O1- O2- F F1- Ne Na
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4be9e98
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible_db.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