Bug#1057721: openpyxl: please make the build reproducible
Chris Lamb
lamby at debian.org
Thu Dec 7 14:28:41 GMT 2023
Source: openpyxl
Version: 3.1.2+dfsg-4
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
openpyxl could not be built reproducibly.
This is because the documentation embedded the current build year in
its documentation.
However, a patch is attached that seeds this date from SOURCE_DATE_EPOCH
if available.
[0] https://reproducible-builds.org/
Best wishes,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducibility_docs.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducibility_docs.patch 2023-12-07 14:25:29.745194613 +0000
@@ -0,0 +1,23 @@
+Description: Make the docs reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-12-07
+
+--- openpyxl-3.1.2+dfsg.orig/doc/conf.py
++++ openpyxl-3.1.2+dfsg/doc/conf.py
+@@ -68,9 +68,14 @@ master_doc = 'index'
+
+ # General information about the project.
+ project = u'openpyxl'
+-from datetime import date
++import os
++import time
++import datetime
++build_date = datetime.datetime.utcfromtimestamp(
++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
++)
+
+-copyright = u'2010 - {0}, {1}'.format(date.today().year, openpyxl.__author__)
++copyright = u'2010 - {0}, {1}'.format(build_date.year, openpyxl.__author__)
+
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
--- a/debian/patches/series 2023-12-07 14:07:11.622651360 +0000
--- b/debian/patches/series 2023-12-07 14:24:37.929086483 +0000
@@ -2,3 +2,4 @@
python3p12_compat.patch
privacy.patch
reproducibility.patch
+reproducibility_docs.patch
More information about the debian-science-maintainers
mailing list