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 34 35 36 37
|
Author: Vagrant Cascadian <vagrant@reproducible-builds.org>
Subject: Ensure the date is represented in UTC when generating PDF
files.
Description: Use SOURCE_DATE_EPOCH directly rather than a timestamp
reference file which can vary between builds.
.
https://reproducible-builds.org/docs/source-date-epoch/
Index: libtommath/doc/makefile
===================================================================
--- libtommath.orig/doc/makefile
+++ libtommath/doc/makefile
@@ -16,15 +16,12 @@ docs: manual
#LTM user manual
mandvi: bn.tex
- cp bn.tex bn.bak
- touch --reference=bn.tex bn.bak
- (printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y bn.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > bn-deterministic.tex
+ (printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -u -d @$(SOURCE_DATE_EPOCH) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > bn-deterministic.tex
printf "%s\n" "\pdfinfo{" >> bn-deterministic.tex
printf "%s\n" " /CreationDate (\fixedpdfdate)" >> bn-deterministic.tex
printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> bn-deterministic.tex
cat bn.tex >> bn-deterministic.tex
mv bn-deterministic.tex bn.tex
- touch --reference=bn.bak bn.tex
echo "hello" > bn.ind
latex bn ${silent_stdout}
latex bn ${silent_stdout}
@@ -35,7 +32,6 @@ mandvi: bn.tex
manual: mandvi
pdflatex bn >/dev/null
sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' bn.pdf
- mv bn.bak bn.tex
rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc
clean:
|