Bug#1078048: scikit-optimize: please make the build reproducible
Chris Lamb
lamby at debian.org
Tue Aug 6 11:11:38 BST 2024
Source: scikit-optimize
Version: 0.10.2-2
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
scikit-optimize could not be built reproducibly.
This is because it embeds the current build year in the documentation:
/usr/share/doc/python-scikit-optimize-doc/html/_modules/index.html
@@ -201,15 +201,15 @@
<p class="copyright">
- © Copyright 2024 - 2024, scikit-optimize contributors (BSD License).<br>
+ © Copyright 2024 - 2025, scikit-optimize contributors (BSD License).<br>
</p>
Patch attached that uses 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/004-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/004-reproducible-build.patch 2024-08-06 11:09:17.875959432 +0100
@@ -0,0 +1,31 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2024-08-06
+
+--- scikit-optimize-0.10.2.orig/doc/conf.py
++++ scikit-optimize-0.10.2/doc/conf.py
+@@ -10,6 +10,7 @@
+ import os
+ import re
+ import datetime
++import time
+ # import pkg_resources
+ import sys
+
+@@ -36,10 +37,15 @@ from importlib.metadata import version,
+ # __version__ = pkg_resources.get_distribution('skopt').version
+ on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
++build_date = datetime.datetime.fromtimestamp(
++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
++ tz=datetime.timezone.utc,
++)
++
+ # -- Project information -----------------------------------------------------
+
+ project = 'scikit-optimize'
+-copyright = f'2017 - {datetime.date.today().year}, scikit-optimize contributors (BSD License)'
++copyright = f'2017 - {build_date.year}, scikit-optimize contributors (BSD License)'
+ author = 'The scikit-optimize contributors'
+
+ # The short X.Y version
--- a/debian/patches/series 2024-08-06 10:52:03.881697388 +0100
--- b/debian/patches/series 2024-08-06 11:09:16.963951476 +0100
@@ -1,3 +1,4 @@
003-fix-privacy-breach-generic.patch
002-replace-bootstrap-js.patch
001-doc-system-path-skopt.patch
+004-reproducible-build.patch
More information about the Reproducible-bugs
mailing list