Source: perl
Version: 5.30.3-4
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@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.

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.

 [0] https://reproducible-builds.org/


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/rules      2020-10-15 11:05:15.531617632 +0100
--- b/debian/rules      2020-10-19 18:26:04.703453296 +0100
@@ -154,6 +154,7 @@
        # store probed configuration to support cross builds
        for flavour in $(flavours); do \
          install -D -m 644 build-$$flavour/config.sh 
$(configdata)/config.sh.$$flavour; \
+         sed -i -e 's@$(CURDIR)@/dummy/build/dir@g' 
$(configdata)/config.sh.$$flavour; \
          gzip -n $(configdata)/config.sh.$$flavour; \
        done
 
@@ -208,6 +209,11 @@
        # fix up generated headers
        $(PERL_TO_USE) debian/fixheaders $(tmp)/$(lib)
 
+       # remove references to the build directory in some files
+       find $(tmp) \
+         -path '*/CORE/config.h' -or -path '*/Config_heavy.pl' | \
+           xargs -tr sed -i -e 's@$(CURDIR)@/dummy/build/dir@g'
+
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
        # Verify that the headers are usable
        for ph in `< debian/headers sed -e 's/\.h$$/.ph/'`; do \

Reply via email to