Control: tag -1 patch On Sun, Sep 13, 2015 at 10:53:38PM +0300, Niko Tyni wrote: > Package: libmodule-build-perl > Version: 0.421400-2 > Severity: serious > User: reproducible-bui...@lists.alioth.debian.org > Usertags: ftbfs > X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org > Control: affects -1 libdevice-cdio-perl > > The libdevice-cdio-perl package fails to build on current sid because > of the libmodule-build-perl change in 0.421400-2 that sorts results of > Module::Build::Base::rscan_dir() [see #797709].
[...] > So we need to sort more smartly, and I don't have patch right now. > I suggest to revert the patch and reopen #797709 for the time being. Revised patch attached, this seems to work. I'm going to upload shortly. -- Niko Tyni nt...@debian.org
From: Niko Tyni <nt...@debian.org> Date: Tue, 1 Sep 2015 22:05:27 +0300 Subject: [PATCH] Preprocess file lists generated by rscan_dir() to sort them 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. Bug-Debian: https://bugs.debian.org/797709 Bug: 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 --- a/lib/Module/Build/Base.pm +++ b/lib/Module/Build/Base.pm @@ -5254,7 +5254,7 @@ sub rscan_dir { ref($pattern) eq 'CODE' ? sub {push @result, $File::Find::name if $pattern->()} : die "Unknown pattern type"; - File::Find::find({wanted => $subr, no_chdir => 1}, $dir); + File::Find::find({wanted => $subr, no_chdir => 1, preprocess => sub { sort @_ }}, $dir); return \@result; }