[Reproducible-builds] Bug#831645: ftplib: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Jul 18 07:20:12 UTC 2016
Source: ftplib
Version: 3.1-1-9
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi,
Whilst working on the "reproducible builds" effort [0], we noticed
that ftplib could not be built reproducibly.
Patch attached.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/html2man.py 2016-07-18 09:06:20.927901134 +0200
--- b/debian/html2man.py 2016-07-18 09:12:56.275360755 +0200
@@ -84,7 +84,7 @@
self.mtime = time
def prettydate(self):
- return time.strftime('"%d %B %Y"', time.localtime(self.mtime))
+ return time.strftime('"%Y-%m-%d"', time.gmtime(self.mtime))
def opt_newline(self):
if self.need_newline:
@@ -185,7 +185,10 @@
outfilename = os.path.join(dirname, convert(filename))
infile = open(filename, "r")
outfile = open(outfilename, "w")
- timestamp = os.fstat(infile.fileno())[stat.ST_MTIME]
+ try:
+ timestamp = float(os.environ['SOURCE_DATE_EPOCH'])
+ except KeyError:
+ timestamp = os.fstat(infile.fileno())[stat.ST_MTIME]
receiver = PageWriter(outfile)
receiver.set_time(timestamp)
parser = PageParser(receiver)
More information about the Reproducible-builds
mailing list