Source: ftplib
Version: 3.1-1-9
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@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
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- 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)
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to