This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository libextutils-xsbuilder-perl.

commit 0e0e88af539b7dabed7c9536e7ede6d1492c7c37
Author: Niko Tyni <nt...@debian.org>
Date:   Sat Oct 17 16:03:59 2015 +0300

    Add patches to make generated XS code reproducible
    
    Closes: #802078
---
 ..._includes-directory-list-for-reproducibil.patch | 29 ++++++++++++++++++++
 ...der-of-function_list-elements-for-reprodu.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 62 insertions(+)

diff --git 
a/debian/patches/0001-Sort-the-xs_includes-directory-list-for-reproducibil.patch
 
b/debian/patches/0001-Sort-the-xs_includes-directory-list-for-reproducibil.patch
new file mode 100644
index 0000000..99ac072
--- /dev/null
+++ 
b/debian/patches/0001-Sort-the-xs_includes-directory-list-for-reproducibil.patch
@@ -0,0 +1,29 @@
+From 7fb4db40af72b6fe203bf48988680eec3b794a6c Mon Sep 17 00:00:00 2001
+From: Niko Tyni <nt...@debian.org>
+Date: Sat, 17 Oct 2015 14:05:03 +0300
+Subject: [PATCH 1/2] Sort the xs_includes() directory list for reproducibility
+
+The generated XS code will have #include lines in this order, so sorting
+helps make the code stable between builds.
+
+Bug-Debian: https://bugs.debian.org/802078
+---
+ XSBuilder/WrapXS.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/XSBuilder/WrapXS.pm b/XSBuilder/WrapXS.pm
+index b25cf5a..6c76e69 100644
+--- a/XSBuilder/WrapXS.pm
++++ b/XSBuilder/WrapXS.pm
+@@ -205,7 +205,7 @@ sub xs_includes
+     
+ 
+     return [ 
+-                keys %includes, 
++                sort(keys %includes),
+                 -f $self -> xs_include_dir . '/'. $fixup1?$fixup1:(),
+                 'EXTERN.h', 'perl.h', 'XSUB.h',             
+                 -f $self -> xs_include_dir . '/'. $fixup2?$fixup2:(),
+-- 
+2.5.1
+
diff --git 
a/debian/patches/0002-Sort-the-order-of-function_list-elements-for-reprodu.patch
 
b/debian/patches/0002-Sort-the-order-of-function_list-elements-for-reprodu.patch
new file mode 100644
index 0000000..b4efa6b
--- /dev/null
+++ 
b/debian/patches/0002-Sort-the-order-of-function_list-elements-for-reprodu.patch
@@ -0,0 +1,31 @@
+From 0ec5e5a19e32e39b05a60fd32a59287c6dc1db85 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <nt...@debian.org>
+Date: Sat, 17 Oct 2015 14:05:08 +0300
+Subject: [PATCH 2/2] Sort the order of function_list() elements for
+ reproducibility
+
+This is the order that get_function() gets called in, so sorting
+helps make the generated code stable between builds.
+
+Bug-Debian: https://bugs.debian.org/802078
+---
+ XSBuilder/WrapXS.pm | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/XSBuilder/WrapXS.pm b/XSBuilder/WrapXS.pm
+index 6c76e69..ed662e9 100644
+--- a/XSBuilder/WrapXS.pm
++++ b/XSBuilder/WrapXS.pm
+@@ -325,7 +325,8 @@ sub function_list {
+     my $self = shift;
+     my(@list) = @{ function_table($self) };
+ 
+-    while (my($name, $val) = each %{ $self->typemap->function_map }) {
++    for my $name (sort keys %{ $self->typemap->function_map }) {
++        my $val = $self->typemap->function_map->{$name};
+         #entries that do not exist in C::Scan generated tables
+         next unless $name =~ /^DEFINE_/;
+         push @list, $val;
+-- 
+2.5.1
+
diff --git a/debian/patches/series b/debian/patches/series
index cdf6025..5054c7a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 use-C-type.patch
 spelling.patch
+0001-Sort-the-xs_includes-directory-list-for-reproducibil.patch
+0002-Sort-the-order-of-function_list-elements-for-reprodu.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libextutils-xsbuilder-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to