Source: gpick
Version: 0.2.5-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 gpick could not be built reproducibly.
Patch attached. It should probably be sent upstream.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
--- a/debian/patches/reproducible_build.patch 1970-01-01 02:00:00.000000000
+0200
--- b/debian/patches/reproducible_build.patch 2016-07-13 22:53:53.835325058
+0200
@@ -0,0 +1,23 @@
+--- gpick-0.2.5.orig/tools/gpick.py
++++ gpick-0.2.5/tools/gpick.py
+@@ -2,6 +2,7 @@
+
+ import os
+ import time
++import datetime
+ import SCons
+ import re
+ import string
+@@ -146,9 +147,10 @@ class GpickEnvironment(SConsEnvironment)
+ except:
+ revision = 'not under version control system'
+
++ build_date =
datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH',
time.time())))
+ self.Replace(GPICK_BUILD_REVISION = revision,
+- GPICK_BUILD_DATE = time.strftime ("%Y-%m-%d"),
+- GPICK_BUILD_TIME = time.strftime ("%H:%M:%S"));
++ GPICK_BUILD_DATE = build_date.strftime ("%Y-%m-%d"),
++ GPICK_BUILD_TIME = build_date.strftime ("%H:%M:%S"));
+
+ def RegexEscape(str):
+ return str.replace('\\', '\\\\')
--- a/debian/patches/series 1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/series 2016-07-13 22:53:49.411311156 +0200
@@ -0,0 +1 @@
+reproducible_build.patch