Debian Bug report logs - #1033954
pike8.0: reproducible builds: timestamp embedded in .html documentation

Package: src:pike8.0; Maintainer for src:pike8.0 is Magnus Holmgren <holmgren@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Tue, 4 Apr 2023 22:03:04 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Magnus Holmgren <holmgren@debian.org>:
Bug#1033954; Package src:pike8.0. (Tue, 04 Apr 2023 22:03:06 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Magnus Holmgren <holmgren@debian.org>. (Tue, 04 Apr 2023 22:03:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: pike8.0: reproducible builds: timestamp embedded in .html documentation
Date: Tue, 04 Apr 2023 15:00:01 -0700
[Message part 1 (text/plain, inline)]
Source: pike8.0
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

A build timestamp is embedded in the data-timestamp field in various
.html documentation files:

  /usr/share/doc/pike8.0-doc/html/reference/ex/7.4_3A_3A/hash.html

  <div id="build-date">Extracted from <strong data-id="version">Pike v8.0 release 1738</strong> as of <strong data-id="date" data-timestamp="1680404892">2023-04-01</strong>.</div>
vs.
  <div id="build-date">Extracted from <strong data-id="version">Pike v8.0 release 1738</strong> as of <strong data-id="date" data-timestamp="1680405437">2023-04-01</strong>.</div>


The attached patch to refdoc/structure/modref.html fixes this by
removing the generation date and timestamp entirely.

If this is not an appropriate fix, another more complicated option would
be to explore using SOURCE_DATE_EPOCH to specify the date and timestamp:

  https://reproducible-builds.org/docs/source-date-epoch/


Unfortunately, this patch alone does not solve all reproducibility
issues with pike8.0, but applying this patch should significantly reduce
the differences, making it easier to debug remaining issues.


Thanks for maintaining pike8.0!


live well,
  vagrant
[0001-refdoc-structure-modref.html-Remove-date-and-timesta.patch (text/x-diff, inline)]
From fdd481d745b79559d995d8fa23253a25698c347e Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 3 Apr 2023 15:43:44 -0700
Subject: [PATCH 1/9] refdoc/structure/modref.html: Remove date and timestamp
 from generated documentation.

https://reproducible-builds.org/docs/timestamps/

---
 refdoc/structure/modref.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/refdoc/structure/modref.html b/refdoc/structure/modref.html
index 79bb1f9..5fd884e 100644
--- a/refdoc/structure/modref.html
+++ b/refdoc/structure/modref.html
@@ -54,7 +54,7 @@
       </div>
     </div>
     <footer>
-      <div id="build-date">Extracted from <strong data-id="version">$version$</strong> as of <strong data-id="date" data-timestamp="$generated$">$date$</strong>.</div>
+      <div id="build-date">Extracted from <strong data-id="version">$version$</strong>.</div>
     </footer>
     $extra_footer$
     <script>
-- 
2.39.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Magnus Holmgren <holmgren@debian.org>:
Bug#1033954; Package src:pike8.0. (Tue, 04 Apr 2023 23:00:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Magnus Holmgren <holmgren@debian.org>. (Tue, 04 Apr 2023 23:00:03 GMT) (full text, mbox, link).


Message #10 received at 1033954@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 1033954@bugs.debian.org
Subject: Re: Bug#1033954: pike8.0: reproducible builds: timestamp embedded in .html documentation
Date: Tue, 04 Apr 2023 15:56:09 -0700
[Message part 1 (text/plain, inline)]
On 2023-04-04, Vagrant Cascadian wrote:
> A build timestamp is embedded in the data-timestamp field in various
> .html documentation files:

This additional patch is also needed to avoid additional timestamps in
some of the rest of the documentation:

[0004-Avoid-embedding-timestamp-in-documentation.patch (text/x-diff, inline)]
From c8d7e168779597eb36cad22b051dea372179c7e5 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 3 Apr 2023 17:52:43 -0700
Subject: [PATCH 4/5] Avoid embedding timestamp in documentation.

https://reproducible-builds.org/docs/timestamps/
---
 .../Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike b/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike
index f8b1b63..dd4a2c4 100644
--- a/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike
+++ b/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike
@@ -1503,11 +1503,9 @@ int low_main(string doc_file, string template_file, string outdir,
 
   string js_constants = sprintf(
     "PikeDoc.VERSION = '%s';\n"
-    "PikeDoc.PUBDATE = '%s';\n"
-    "PikeDoc.GENERATED = %d;\n",
+    "PikeDoc.PUBDATE = '%s';\n",
     top->pike_version,
-    top->timestamp,
-    time());
+    top->timestamp);
 
   if (exporter) {
     exporter->filemodify(Git.MODE_FILE, outdir + "/constants.js");
-- 
2.39.2

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 11:43:28 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.