Bug#1039932: python-bitstring: please make the build reproducible
Chris Lamb
lamby at debian.org
Thu Jun 29 17:27:14 BST 2023
Source: python-bitstring
Version: 4.0.2-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
python-bitstring could not be built reproducibly.
This was because the documentation used the build year in the
documentation:
│ │ │ ├── ./usr/share/doc/python-bitstring-doc/html/bitarray.html
│ │ │ │ @@ -973,11 +973,11 @@
│ │ │ │ >previous</a> |</li>
│ │ │ │ <li class="nav-item nav-item-0"><a href="index.html">bitstring 4.0 documentation</a> »</li>
│ │ │ │ <li class="nav-item nav-item-1"><a href="reference.html" >Reference</a> »</li>
│ │ │ │ <li class="nav-item nav-item-this"><a href="">BitArray Class</a></li>
│ │ │ │ </ul>
│ │ │ │ </div>
│ │ │ │ <div class="footer" role="contentinfo">
│ │ │ │ - © Copyright 2023 - 2023, Scott Griffiths.
│ │ │ │ + © Copyright 2023 - 2024, Scott Griffiths.
│ │ │ │ </div>
│ │ │ │ </body>
│ │ │ │ </html>
Patch attached that bases this value on SOURCE_DATE_EPOCH if
available.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/0002-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/0002-reproducible-build.patch 2023-06-29 17:25:47.227191969 +0100
@@ -0,0 +1,22 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-06-29
+
+--- python-bitstring-4.0.2.orig/doc/conf.py
++++ python-bitstring-4.0.2/doc/conf.py
+@@ -1,8 +1,14 @@
+ # Configuration file for the Sphinx documentation builder.
+ #
++import os
++import time
+ import datetime
+
+-year = datetime.datetime.now().year
++import datetime
++
++year = datetime.datetime.utcfromtimestamp(
++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
++).year
+
+ project = 'bitstring'
+ copyright = f'2006 - {year}, Scott Griffiths'
--- a/debian/patches/series 2023-06-29 17:24:24.615705188 +0100
--- b/debian/patches/series 2023-06-29 17:25:46.187198262 +0100
@@ -1 +1,2 @@
0001-delete-mybinder.org-remote-refs-privacy-breach-logo.patch
+0002-reproducible-build.patch
More information about the Reproducible-bugs
mailing list