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,
The test-results.txt.gz also embeds the hostname, kernel version, build time, etc. ... https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/php8.0.html Some of these things may be sanitized usefully (although perhaps a bit of a whack-a-mole game over time), but if any sort of timing information is desired, sanitizing that data would defeat the purpose of the log. We had a similar discussion for binutils which does something similar: https://bugs.debian.org/950585 If the test suite output is not too huge, I think it might be better to not ship test-results.txt in the package, but to output the contents to the build log (so you could access the necessary test-results from buildd.debian.org). We may also need to explore finding a way for source packages to store things like test suite logs outside of the actual .deb packages, as for binutils it was not feasible to output the full test-suite log during the build for size constraints... FWIW, it looks like PHP 7.4 has the same issues, although I haven't checked if the patch applies without modification. live well, vagrant
Apparently php8.0 already outputs the test-results.txt to the build log. An updated patch that simply doesn't install test-restults.txt is attached. live well, vagrant
Control: clone 984809 -1 Control: reassign -1 php7.4 Control: retitle -1 php7.4: please make the build (mostly) reproducible ... Patch applies and is effective; cloning into new bug... live well, vagrant
php8.2 (8.2.0~rc1-2) experimental; urgency=medium * Use media-types instead of mime-support (Closes: #1010155) * Make the build (mostly) reproducible (Closes: #1001648) * Export SED := /bin/sed in d/rules (Closes: #1015188) I can confirm debian/rules in the current php8.2 package has the changes from the above patch. There are still other unresolved reproducibility issues, but not ones that would be fixed by this patch and would probably be best to open new bugs about them, as this bug has a tangled history across numerous php versioned packages... Thanks everyone who worked on this, marking as done! live well, vagrant