Bug#1056398: php-doc: please make the build reproducible
Chris Lamb
lamby at debian.org
Wed Nov 22 09:39:51 GMT 2023
Source: php-doc
Version: 20231115~git.99fbf5d+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
php-doc could not be built reproducibly.
This is due to embedded timestamps. For example:
│ │ │ ├── ./usr/share/doc/php-doc/html/index.html
│ │ │ │ @@ -98,27 +98,27 @@
│ │ │ │ <span class="othername">
│ │ │ │ <a href="preface.html#contributors" class="link">And several others</a>
│ │ │ │ </span>
│ │ │ │ </span>
│ │ │ │ </div>
│ │ │ │
│ │ │ │ </div>
│ │ │ │ - <div class="pubdate">2023-11-21</div>
│ │ │ │ + <div class="pubdate">2024-12-23</div>
Patch attached that seeds this date from SOURCE_DATE_EPOCH instead.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2023-11-22 09:35:13.092088512 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-11-22
+
+--- php-doc-20231115~git.99fbf5d+dfsg.orig/phd/phpdotnet/phd/PI/DBHTMLHandler.php
++++ php-doc-20231115~git.99fbf5d+dfsg/phd/phpdotnet/phd/PI/DBHTMLHandler.php
+@@ -98,7 +98,7 @@ class PI_DBHTMLHandler extends PIHandler
+ }
+ $format = $this->getAttribute("format");
+ if (!$format) {
+- return $this->format->appendData(date('c'));
++ return $this->format->appendData(date('c', getenv('SOURCE_DATE_EPOCH') ?: time()));
+ }
+ $dateFormat = "";
+ $len = strlen($format);
--- a/debian/patches/series 2023-11-22 09:29:46.742984644 +0000
--- b/debian/patches/series 2023-11-22 09:35:11.644083656 +0000
@@ -1,2 +1,3 @@
remove-xkcd-mediaobjects.patch
replace-non-free-stylesheets.patch
+reproducible-build.patch
More information about the Reproducible-bugs
mailing list