Debian Codegraph @

debian/patches/use-utc-timezone

raw
1 Subject: Ensure the date is represented in UTC when generating PDF files.
2 Author: Vagrant Cascadian <[email protected]>
3
4 Use SOURCE_DATE_EPOCH directly rather than a timestamp
5 reference file which can vary between builds.
6
7 https://reproducible-builds.org/docs/source-date-epoch/
8
9 Index: libtommath/doc/makefile
10 ===================================================================
11 --- libtommath.orig/doc/makefile
12 +++ libtommath/doc/makefile
13 @@ -16,15 +16,12 @@ docs: manual
14
15 #LTM user manual
16 mandvi: bn.tex
17 - cp bn.tex bn.bak
18 - touch --reference=bn.tex bn.bak
19 - (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
20 + (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
21 printf "%s\n" "\pdfinfo{" >> bn-deterministic.tex
22 printf "%s\n" " /CreationDate (\fixedpdfdate)" >> bn-deterministic.tex
23 printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> bn-deterministic.tex
24 cat bn.tex >> bn-deterministic.tex
25 mv bn-deterministic.tex bn.tex
26 - touch --reference=bn.bak bn.tex
27 echo "hello" > bn.ind
28 latex bn ${silent_stdout}
29 latex bn ${silent_stdout}
30 @@ -35,7 +32,6 @@ mandvi: bn.tex
31 manual: mandvi
32 pdflatex bn >/dev/null
33 sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' bn.pdf
34 - mv bn.bak bn.tex
35 rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc
36
37 clean: