[libmodule-build-perl] 01/06: Add patch to sort file linking order to produce reproducible binaries

Florian Schlichting fsfs at moszumanska.debian.org
Thu Sep 10 11:32:28 UTC 2015


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

fsfs pushed a commit to branch master
in repository libmodule-build-perl.

commit 5474b7f535e58cb6ff692d9fee0acf9d4f613021
Author: Florian Schlichting <fsfs at debian.org>
Date:   Thu Sep 10 13:12:00 2015 +0200

    Add patch to sort file linking order to produce reproducible binaries
---
 ...02-Sort-file-lists-generated-by-rscan_dir.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/0002-Sort-file-lists-generated-by-rscan_dir.patch b/debian/patches/0002-Sort-file-lists-generated-by-rscan_dir.patch
new file mode 100644
index 0000000..bcb1826
--- /dev/null
+++ b/debian/patches/0002-Sort-file-lists-generated-by-rscan_dir.patch
@@ -0,0 +1,35 @@
+From 7bfcb26d8e314bce37aeeef4048f99b66fcdfbbc Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Tue, 1 Sep 2015 22:05:27 +0300
+Subject: [PATCH] Sort file lists generated by rscan_dir()
+
+The rscan_dir() function traverses a directory with File::Find,
+which returns files in readdir() order. This order is nondeterministic
+and depends on the file system.
+
+The lists are used, among other things, to find C files to compile
+(in process_support_files()) and later to link (in c_link()).
+The linking order affects the generated binary, essentially rendering
+it nondeterministic and breaking reproducibility.
+
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=106813
+---
+ lib/Module/Build/Base.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
+index 1cbc61e..d9ea82f 100644
+--- a/lib/Module/Build/Base.pm
++++ b/lib/Module/Build/Base.pm
+@@ -5255,7 +5255,7 @@ sub rscan_dir {
+              die "Unknown pattern type";
+ 
+   File::Find::find({wanted => $subr, no_chdir => 1}, $dir);
+-  return \@result;
++  return [ sort @result ];
+ }
+ 
+ sub delete_filetree {
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 4218d4a..2ee1ac1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 man-ext
 0001-Allow-loading-from-system-path-when-running-under-au.patch
+0002-Sort-file-lists-generated-by-rscan_dir.patch

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



More information about the Pkg-perl-cvs-commits mailing list