Package: libapache2-mod-perl2
Version: 2.0.9-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering

As seen at
 
https://reproducible.debian.net/dbd/unstable/amd64/libapache2-mod-perl2_2.0.9-1.debbindiff.html

the generated file /usr/share/doc/libapache2-mod-perl2-doc/index.html
currently varies with the file system ordering via File::Find. This can
be easily tested with the disorderfs package. The attached patch fixes
the issue.
-- 
Niko Tyni   nt...@debian.org
>From 8aa026dec3a3572dabff99b9c5c1a3db579798fa Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sun, 11 Oct 2015 18:56:37 +0300
Subject: [PATCH] Make the generated documentation not vary with filesystem
 ordering

If the order of the generated HTML depends on the filesystem ordering,
it's possible that it varies between build systems, breaking build
reproducibility.
---
 debian/transform_pod2html.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/transform_pod2html.pl b/debian/transform_pod2html.pl
index 44d8497..329af9a 100644
--- a/debian/transform_pod2html.pl
+++ b/debian/transform_pod2html.pl
@@ -25,7 +25,7 @@ croak "No destination directory: $DEST_DIR" if not -d $DEST_DIR;
 # the pod in the form expected by HTML::Template.
 my %data = (pod=>[],sections=>[]);
 
-find( \&transform_pod2html, $SRC_DIR );
+find( { wanted => \&transform_pod2html, preprocess => sub { sort @_ }}, $SRC_DIR );
 my $template = HTML::Template->new(filename=>"$CUR_DIR/debian/index.tmpl", die_on_bad_params=>0);
 $template->param(%{$data{sections}->[0]->{sections}->[0]});
 open my $fh,'>', "$CUR_DIR/$DEST_DIR/index.html";
-- 
2.5.1

Reply via email to