Subject: | Stable saved config |
As part of recent efforts towards reproducible builds of Debian packages (see <https://wiki.debian.org/ReproducibleBuilds>), we noticed that the contents of the *name*::Install::Files modules generated by ExtUtils::Depends vary between builds. See <https://bugs.debian.org/763677>.
This happens because of hash key randomization and can be easily fixed by setting $Data::Dumper::Sortkeys=1 in save_config(). Please consider the attached patch, which would get us one step further on the road.
Many thanks for your work on free software,
--
Niko Tyni (Debian Perl group)
ntyni@debian.org
Subject: | 0001-Sort-hash-keys-in-saved-configuration-for-reproducib.patch |
From cbb18537780f4bef8366f427f34a0b1cdf276d16 Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Wed, 1 Oct 2014 22:44:17 +0300
Subject: [PATCH] Sort hash keys in saved configuration for reproducibility
Bug-Debian: https://bugs.debian.org/763677
Having stable saved configuration helps the recent efforts
for reproducible builds, see https://wiki.debian.org/ReproducibleBuilds
---
lib/ExtUtils/Depends.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index 05ba8d4..2e43411 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -114,6 +114,7 @@ sub install {
sub save_config {
use Data::Dumper;
local $Data::Dumper::Terse = 0;
+ local $Data::Dumper::Sortkeys = 1;
use IO::File;
my ($self, $filename) = @_;
--
2.1.1