[Debian-med-packaging] Bug#912957: python-multipletau: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Nov 5 09:12:16 GMT 2018
Source: python-multipletau
Version: 0.3.0+ds-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-multipletau could not be built reproducibly.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2018-11-05 09:06:13.938544636 +0000
@@ -0,0 +1,23 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-11-05
+
+--- python-multipletau-0.3.0+ds.orig/multipletau/_version.py
++++ python-multipletau-0.3.0+ds/multipletau/_version.py
+@@ -109,6 +109,16 @@ if True: # pragma: no cover
+ except BaseException:
+ pass
+
++ # 1.5. Prefer SOURCE_DATE_EPOCH if set. See <https://reproducible-builds.org/specs/source-date-epoch/>
++ try:
++ longversion = time.strftime(
++ "%Y.%m.%d-%H-%M-%S",
++ time.gmtime(float(os.environ['SOURCE_DATE_EPOCH']))
++ )
++ print("Using SOURCE_DATE_EPOCH as version: {}".format(longversion))
++ except KeyError:
++ pass
++
+ # 2. previously created version file
+ if longversion == "":
+ # Either this is this is not a git repository or we are in the
--- a/debian/patches/series 2018-11-05 08:50:30.848811875 +0000
--- b/debian/patches/series 2018-11-05 09:06:12.030765663 +0000
@@ -1,2 +1,3 @@
examples_location.patch
packaged-mathjax.patch
+reproducible-build.patch
More information about the Debian-med-packaging
mailing list