File: 0001_reproducible-build.patch

package info (click to toggle)
python-caja 1.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 660 kB
  • ctags: 141
  • sloc: xml: 1,701; ansic: 726; python: 212; makefile: 165; sh: 16
file content (14 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: Make build reproducible.
Author: Chris Lamb <lamby@debian.org>

--- python-caja-1.10.0.orig/docs/Makefile.am
+++ python-caja-1.10.0/docs/Makefile.am
@@ -86,7 +86,7 @@ REFERENCE_DEPS = 	\
 if ENABLE_GTK_DOC
 
 reference/builddate.xml: $(REFERENCE_DEPS)
-	$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+	$(PYTHON) -c "import os, time, datetime; print datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).strftime('%Y-%m-%d')" > $@
 
 $(HTML_FILES): $(REFERENCE_DEPS)
 	xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \