File: 0001_reproducible-build.patch

package info (click to toggle)
python-caja 1.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 832 kB
  • sloc: xml: 1,745; ansic: 791; python: 297; makefile: 182; sh: 19
file content (14 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: Make build reproducible.
Author: Chris Lamb <lamby@debian.org>

--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -88,7 +88,7 @@
 	$(HTML_FILES)
 
 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/ \