Source: cloud-sptheme
Version: 1.8.0-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]

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
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- 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 <[email protected]>
+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
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to