Bug#1031412: pysdl2: please make the build reproducible
Chris Lamb
lamby at debian.org
Thu Feb 16 20:45:49 GMT 2023
Source: pysdl2
Version: 0.9.15+dfsg-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
pysdl2 in experimental could not be built reproducibly.
This is because the documentation embeds a timestamp. Patch attached
that seeds this date from SOURCE_DATE_EPOCH [1] if available.
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/specs/source-date-epoch/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/0003-reproducible-build.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/0003-reproducible-build.patch 2023-02-16 12:38:14.656545296 -0800
@@ -0,0 +1,28 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-02-16
+
+--- pysdl2-0.9.15+dfsg.orig/doc/conf.py
++++ pysdl2-0.9.15+dfsg/doc/conf.py
+@@ -2,8 +2,9 @@
+
+ import os
+ import sys
++import time
++import datetime
+ import pkg_resources
+-from datetime import date
+
+ # -- Path setup --------------------------------------------------------------
+
+@@ -17,7 +18,9 @@ sys.path.append(os.path.join(parent_dir,
+
+ # -- Project information -----------------------------------------------------
+
+-curr_date = date.today()
++curr_date = datetime.datetime.utcfromtimestamp(
++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
++).date()
+ copyright_str = '{0}, Marcus von Appen. Last updated: {1}'
+
+ project = 'PySDL2'
--- a/debian/patches/series 2023-02-16 12:33:49.951412423 -0800
--- b/debian/patches/series 2023-02-16 12:38:13.312477668 -0800
@@ -2,3 +2,4 @@
0002-dont-include-buildpath-in-docs.patch
tests-Don-t-assume-SDL_Init-will-leave-SDL_GetError-unset.patch
tests-Skip-pixel-comparison-when-loading-XCF-files-on-big.patch
+0003-reproducible-build.patch
More information about the Reproducible-bugs
mailing list