Debian Bug report logs - #1034499
twisted: reproducible builds: timestamp embedded in .html documentation

Package: src:twisted; Maintainer for src:twisted is Debian Python Team <team+python@tracker.debian.org>;

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

Date: Mon, 17 Apr 2023 03:51:02 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, Debian Python Team <team+python@tracker.debian.org>:
Bug#1034499; Package src:twisted. (Mon, 17 Apr 2023 03:51:04 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, Debian Python Team <team+python@tracker.debian.org>. (Mon, 17 Apr 2023 03:51:04 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: twisted: reproducible builds: timestamp embedded in .html documentation
Date: Sun, 16 Apr 2023 20:47:58 -0700
[Message part 1 (text/plain, inline)]
Source: twisted
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The year and date are embedded in various pieces of .html documentation:

  https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/twisted.html

  /usr/share/doc/twisted-doc/html/api.sphinx_files/index.html

  Copyright·2023,·Twisted·Matrix·Labs.·Ver·22.4.0.·Built·on·2024-04-13.
  vs.
  Copyright·2023,·Twisted·Matrix·Labs.·Ver·22.4.0.·Built·on·2023-03-13.

The attached patch removes the year and date references in
docs/conf.py.

The build date can be found on buildd.debian.org if needed, and it is
likely inaccurate to derive the copyright date from the build date;
building it one year after the last source modification (e.g. the
copyrightable content) will always result in an incorrect year.

Another possible approach would be to use SOURCE_DATE_EPOCH, although
this is still inaccurate for the copyright information, and arguably
misleading to use as a build date.


According to my local tests, with this patch applied, twisted should
build reproducibly on tests.reproducible-builds.org!


Thanks for maintaining twisted!


live well,
  vagrant
[0001-docs-conf.py-Remove-timestamps-from-documentation.patch (text/x-diff, inline)]
From 9f99c16fa009563915558fc37e669049186861b9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 16 Apr 2023 19:56:58 -0700
Subject: [PATCH 1/3] docs/conf.py: Remove timestamps from documentation.

Embedding the build date breaks reproducible builds and the
auto-generated copyright years are inaccurate, as it is the year the
package was built, not when the copyrightable content was created.

https://reproducible-builds.org/docs/timestamps/
---
 docs/conf.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index d2d276b..0f65835 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -15,7 +15,6 @@ import os
 import pathlib
 import subprocess
 import sys
-from datetime import date
 from pprint import pprint
 
 # If extensions (or modules to document with autodoc) are in another directory,
@@ -61,13 +60,10 @@ source_suffix = ".rst"
 # The master toctree document.
 master_doc = "index"
 
-_today = date.today()
 # General information about the project.
 project = "Twisted"
-copyright = "{}, Twisted Matrix Labs. Ver {}. Built on {}".format(
-    _today.year,
+copyright = "Twisted Matrix Labs. Ver {}.".format(
     twisted_version_object.public(),
-    _today.isoformat(),
 )
 
 # The version info for the project you're documenting, acts as replacement for
-- 
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 09:21:59 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.