Source: pagekite Version: 0.5.6d-4 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, While working on the "reproducible builds" effort [1], we have noticed that pagekite could not be built reproducibly. The attached patch removes (timezone-varying) build time timestamps from the build system. Once applied, pagekite can be built reproducibly in our reproducible toolchain. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/pagekite/compat.py 2015-08-16 08:48:19.910479441 +0200 --- b/pagekite/compat.py 2015-08-16 08:57:27.007924014 +0200 @@ -50,7 +50,7 @@ import datetime ts_to_date = datetime.datetime.fromtimestamp def ts_to_iso(ts=None): - return datetime.datetime.fromtimestamp(ts).isoformat() + return datetime.datetime.utcfromtimestamp(ts).isoformat() except ImportError: ts_to_date = str ts_to_iso = str --- a/pagekite/manual.py 2015-08-16 08:48:19.910479441 +0200 --- b/pagekite/manual.py 2015-08-16 08:54:12.769916889 +0200 @@ -2,6 +2,7 @@ """ The program manual! """ +import os import re import time @@ -447,7 +448,7 @@ .TH PAGEKITE "1" "%s" "https://pagekite.net/" "Awesome Commands" .nh .ad l -""") % ts_to_iso(time.time()).split('T')[0] +""") % ts_to_iso(int(os.environ['SOURCE_DATE_EPOCH'])).split('T')[0] for h, section, text in MANUAL_TOC: man += ('.%s %s\n\n%s\n\n' ) % (h, h == 'SH' and section.upper() or section,