[Python-modules-team] Bug#854332: cloud-sptheme: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Feb 6 04:10:30 UTC 2017


Source: cloud-sptheme
Version: 1.8.0-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 cloud-sptheme 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/0004-reproducible-build.patch	1970-01-01 12:00:00.000000000 +1200
--- b/debian/patches/0004-reproducible-build.patch	2017-02-06 16:56:35.851016445 +1300
@@ -0,0 +1,24 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2017-02-06
+
+--- cloud-sptheme-1.8.0.orig/setup.py
++++ cloud-sptheme-1.8.0/setup.py
+@@ -16,6 +16,7 @@ import re
+ from setuptools import setup, find_packages
+ import subprocess
+ import time
++import datetime
+ #=========================================================
+ #inspection
+ #=========================================================
+@@ -31,7 +32,8 @@ if os.environ.get("CLOUD_SETUP_TAG_RELEA
+             raise subprocess.CalledProcessError(1, [])
+         stamp = stamp.decode("ascii")
+     except (OSError, subprocess.CalledProcessError):
+-        stamp = time.strftime("%Y%m%d%H%M%S")
++        build_date = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
++        stamp = build_date.strftime("%Y%m%d%H%M%S")
+     version += ".post" + stamp
+ 
+ #=========================================================
--- a/debian/patches/series	2017-02-06 16:43:03.444740709 +1300
--- b/debian/patches/series	2017-02-06 16:56:33.731000068 +1300
@@ -1,3 +1,4 @@
 0001-move-themes-to-usr-share.patch
 0002-add-missing-table_styling.css.patch
 0003-Remove-cookies-and-tracking.patch
+0004-reproducible-build.patch


More information about the Python-modules-team mailing list