Source: libffi-platypus-perl Version: 0.47-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: randomness X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that libffi-platypus-perl could not be built reproducibly. This is because it rendered JSON without calling "canonical" to ensure determinsitic sorting which ended up in a "config.json" file. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/0001-reproducible-build.patch 1970-01-01 09:00:00.000000000 +0900 --- b/debian/patches/0001-reproducible-build.patch 2017-11-26 11:25:01.883626576 +0900 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2017-11-26 + +--- libffi-platypus-perl-0.47.orig/inc/My/ShareConfig.pm ++++ libffi-platypus-perl-0.47/inc/My/ShareConfig.pm +@@ -34,7 +34,7 @@ sub set + my($self, $name, $value) = @_; + $self->{$name} = $value; + my %data = %$self; +- my $data = JSON::PP->new->pretty->encode(\%data); ++ my $data = JSON::PP->new->canonical->pretty->encode(\%data); + my $fh; + open($fh, '>', 'share/config.json'); + print $fh $data; --- a/debian/patches/series 1970-01-01 09:00:00.000000000 +0900 --- b/debian/patches/series 2017-11-26 11:24:58.915595536 +0900 @@ -0,0 +1 @@ +0001-reproducible-build.patch