File: reproducible-build.patch

package info (click to toggle)
python-reportlab 4.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,708 kB
  • sloc: python: 99,020; xml: 1,494; makefile: 143; sh: 12
file content (33 lines) | stat: -rw-r--r-- 1,491 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Enable reproducible building
 - Remove timestamp from documentation
 - When generating PDF files, honour SOURCE_DATE_EPOCH for timestamps in
   metadata: https://reproducible-builds.org/specs/source-date-epoch/
 - Interpret timestamps in generated PDF files as UTC.

Index: python-reportlab/docs/userguide/ch1_intro.py
===================================================================
--- python-reportlab.orig/docs/userguide/ch1_intro.py
+++ python-reportlab/docs/userguide/ch1_intro.py
@@ -9,7 +9,6 @@ from reportlab.lib.utils import TimeStam
 title("ReportLab PDF Library")
 title("User Guide")
 centred('ReportLab Version ' + reportlab.Version)
-centred(TimeStamp().datetime.strftime('Document generated on %Y/%m/%d %H:%M:%S %Z'))
 
 nextTemplate("TOC")
 
Index: python-reportlab/src/reportlab/pdfbase/pdfdoc.py
===================================================================
--- python-reportlab.orig/src/reportlab/pdfbase/pdfdoc.py
+++ python-reportlab/src/reportlab/pdfbase/pdfdoc.py
@@ -1767,8 +1767,8 @@ class PDFDate(PDFObject):
     def format(self, doc):
         dfmt = self.dateFormatter or (
                 lambda yyyy,mm,dd,hh,m,s:
-                    "D:%04d%02d%02d%02d%02d%02d%+03d'%02d'"
-                        % (yyyy,mm,dd,hh,m,s,self.dhh,self.dmm))
+                    "D:%04d%02d%02d%02d%02d%02d+00'00'"
+                        % (yyyy,mm,dd,hh,m,s))
         return format(PDFString(dfmt(*self.date)), doc)
 
 class Destination(PDFObject):