Source: php8.0
Version: 8.0.3-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
php8.0 could not be built reproducibly.

Patch attached to make the build-defs.h, /usr/bin/php-config8.0 and
test-results.txt.gz reproducible. However, the phar8.0.phar file
remains unreproducible - it seems to embed a bunch of inline, zlibbed
(?) code that I haven't yet looked at yet and I thought I would send
over this much at least.

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


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/rules      2021-03-08 10:04:00.325828387 +0000
--- b/debian/rules      2021-03-08 14:45:35.699308154 +0000
@@ -519,9 +519,16 @@
 
 ifeq (yes,$(RUN_TESTS))
        mkdir -p debian/$(PHP_COMMON)/usr/share/doc/$(PHP_COMMON)/
-       cp test-results.txt debian/$(PHP_COMMON)/usr/share/doc/$(PHP_COMMON)/
+       $(SED) -e's@$(CURDIR)@«BUILDDIR»@g;' test-results.txt > \
+         > debian/$(PHP_COMMON)/usr/share/doc/$(PHP_COMMON)/test-results.txt
 endif
 
+       $(SED) -i -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
+           -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \
+           -e's@$(CURDIR)@/tmp/buildd/nonexistent@g' \
+           debian/$(PHP_DEV)/usr/include/php/*/main/build-defs.h \
+           debian/$(PHP_DEV)/usr/bin/php-config$(PHP_NAME_VERSION)
+
 override_dh_installinit:
        dh_installinit --restart-after-upgrade
 

Reply via email to