Bug#972559: perl: please make the build mostly reproducible

Niko Tyni ntyni at debian.org
Tue Oct 20 14:23:26 BST 2020


On Tue, Oct 20, 2020 at 10:55:23AM +0100, Chris Lamb wrote:
> Source: perl
> Version: 5.30.3-4
> Severity: wishlist
> Tags: patch
> User: reproducible-builds at lists.alioth.debian.org
> Usertags: buildpath
> X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
> 
> Hi,
>  
> Whilst working on the Reproducible Builds effort [0] we noticed that
> perl could not be built reproducibly.
> 
> This is because it ships a number of build-related header files that
> include the build path in various guises. Assuming these files are
> actually useful in the binary package, a patch is attached that
> sanitises these in debian/rules prior to the final creation of the .deb.

Thanks! For some reason I thought this was a wider issue than
just those files.

The config.h and Config_heavy.pl files are definitely useful and
necessary. The config.sh.* files are part of our hacky cross build
support, and we seem to be stuck with them until somebody implements
cross build safe configure probes upstream. Mangling the build directory
in all of them should be fine, though I worry a bit about short build
paths potentially matching some other data in the files. But I guess
that's mostly theoretical.

I'm uneasy with using $(CURDIR) as a regexp in sed.  Similar usage in the
past led to #585678. Given '+' is not special in sed regexps, this is not
quite as bad, but still not ideal.  An option is to say
  $(PERL_TO_USE) -pi -e 's/\Q$(CURDIR)\E/.../'
like we do elsewhere in the rules already.

> To be clear, Perl is not entirely reproducible with this change — I
> need to address the variations added between a /usr-merged system and
> one that is not. That part should be incoming soon.

Cool, thanks again.

We're currently waiting for a transition slot for perl 5.32, so this
may have to wait until after that. Feel free to poke if nothing happens.
-- 
Niko




More information about the Perl-maintainers mailing list