[Reproducible-builds] Bug#807111: libperl-apireference-perl: Make the stored data reproducible between builds

Axel Beckert abe at debian.org
Sat Dec 5 16:32:13 UTC 2015


Hi Niko,

Niko Tyni wrote:
> This module recently switched to using Sereal::Encoder instead of
> Data::Dumper to store pre-parsed data. The stored data representation
> now varies between builds.  The attached patch fixes this, rendering
> the build reproducible again.
[…]
> --- a/lib/Perl/APIReference.pm
> +++ b/lib/Perl/APIReference.pm
> @@ -141,6 +141,7 @@ sub _dump_as_class {
>    require Sereal::Encoder;
>    my $data = $self->{'index'};
>    my $dump = Sereal::Encoder->new({
> +    canonical      => 1,
>      compress       => Sereal::Encoder::SRL_ZLIB(),
>      compress_level => 9,
>      dedupe_strings => 1,

I wonder if it's wise to patch the module itself in such a permanent
way instead of maybe adding a switch and setting canonical=1 only
during the build or the running of the test suite.

Maybe users of that module won't be happy if canonical=1 is hardcoded
that way, e.g. for (guessed) performance reasons as the above likely
includes sorting which always has an performance impact at some scale.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Reproducible-builds mailing list