Source: audiotools
Version: 3.1.1-1
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 audiotools 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/patches/reproducible-build.patch   1969-12-31 19:00:00.000000000 
-0500
--- b/debian/patches/reproducible-build.patch   2016-08-03 16:00:41.954116812 
-0400
@@ -0,0 +1,30 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2016-08-03
+
+--- audiotools-3.1.1.orig/docs/manpagexml.py
++++ audiotools-3.1.1/docs/manpagexml.py
+@@ -17,6 +17,7 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ 
++import os
+ import re
+ import time
+ from sys import version_info
+@@ -181,12 +182,14 @@ class Manpage:
+                    examples=examples)
+ 
+     def to_man(self, stream):
++        curdate = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH',
++                                                 time.time())))
+         write_u(stream,
+                 (u".TH \"%(utility)s\" %(section)d " +
+                  u"\"%(date)s\" \"\" \"%(title)s\"\n") %
+                 {"utility": self.utility.upper(),
+                  "section": self.section,
+-                 "date": time.strftime("%B %Y", time.localtime()),
++                 "date": time.strftime("%F", curdate),
+                  "title": self.title})
+         write_u(stream, u".SH NAME\n")
+         write_u(stream, u"%(utility)s \\- %(name)s\n" %
--- a/debian/patches/series     1969-12-31 19:00:00.000000000 -0500
--- b/debian/patches/series     2016-08-03 15:44:10.233516989 -0400
@@ -0,0 +1 @@
+reproducible-build.patch
_______________________________________________
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