[tex-live] Extending source_date_epoch support
Alexis Bienvenüe
pado at passoire.fr
Sun May 1 14:13:14 CEST 2016
Hi.
In reproducible build context [1], the SOURCE_DATE_EPOCH environment
variable [2] support is very powerful [3]. AFAIK, TL-2016 partially
supports it, which is really great!
However, I think this should be enhanced in the following ways:
1) make latex, lualatex, xelatex also honour SOURCE_DATE_EPOCH
2) make \today honour SOURCE_DATE_EPOCH
I tried to work on those points with texlive from svn (I hope I used the
right repository/version).
Please find attached/below:
- a patch to use as a starting point, that extend SOURCE_DATE_EPOCH as
described.
- a simple test script test.sh, with results before and after applying
the patch
I have already sent this mail in a different format, but it seemed to be
silently ignored. My apologies in case of multiple posts.
Regards,
Alexis Bienvenüe
[1]: https://wiki.debian.org/ReproducibleBuilds/
[2]: https://reproducible-builds.org/specs/source-date-epoch/
[3]: https://www.tug.org/pipermail/pdftex/2015-July/008954.html
=================================== test.sh ============================
#! /bin/sh
T=today
cd /tmp
cat <<EOF > $T.tex
\documentclass[a4paper]{article}
\begin{document}
\message{^^JTODAY=\today^^J}
Today is \today !
\end{document}
EOF
one_pass() {
echo "\n* LATEX\n"
latex $T | grep "TODAY="
echo -n "LOG: " ; grep "This is" $T.log || echo
echo -n "DVI: " ; strings $T.dvi | grep "TeX output" || echo
for engine in pdf lua xe
do
echo "\n* ${engine}LATEX\n"
${engine}latex $T | grep "TODAY="
echo -n "LOG: " ; grep "This is" $T.log || echo
pdftk $T.pdf output $T.u.pdf uncompress
grep -aP '^/((Creation|Mod)Date|Creator) ' $T.u.pdf
done
}
echo "******************************** TODAY"
one_pass
echo "\n\n******************************** SOURCE_DATE_EPOCH=31536000 ->
1971"
export SOURCE_DATE_EPOCH=31536000
one_pass
=================================== test-before-patch.log =============
******************************** TODAY
[...]
******************************** SOURCE_DATE_EPOCH=31536000 -> 1971
* LATEX
TODAY=April 30, 2016
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=latex 2016.4.30) 30 APR 2016 11:25
DVI: TeX output 2016.04.30:1125
* pdfLATEX
TODAY=April 30, 2016
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=pdflatex 2016.4.30) 30 APR 2016 11:25
/ModDate (D:19710101000000Z)
/CreationDate (D:19710101000000Z)
/Creator (TeX)
* luaLATEX
TODAY=April 30, 2016
LOG: This is LuaTeX, Version 0.95.0 (TeX Live 2016) (format=lualatex
2016.4.30) 30 APR 2016 11:25
/ModDate (D:20160430112553-11'00')
/CreationDate (D:20160430112553-11'00')
/Creator (TeX)
* xeLATEX
TODAY=April 30, 2016
LOG: This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
(preloaded format=xelatex 2016.4.30) 30 APR 2016 11:25
/CreationDate (D:19701231130000-11'00')
/Creator ( XeTeX output 2016.04.30:1125)
=================================== test-after-patch.log ==============
******************************** TODAY
* LATEX
TODAY=April 30, 2016
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=latex 2016.4.30) 30 APR 2016 10:52
DVI: TeX output 2016.04.30:1052
* pdfLATEX
TODAY=April 30, 2016
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=pdflatex 2016.4.30) 30 APR 2016 10:52
/ModDate (D:20160430105258-11'00')
/CreationDate (D:20160430105258-11'00')
/Creator (TeX)
* luaLATEX
TODAY=April 30, 2016
LOG: This is LuaTeX, Version 0.95.0 (TeX Live 2016) (format=lualatex
2016.4.30) 30 APR 2016 10:52
/ModDate (D:20160430105258-11'00')
/CreationDate (D:20160430105258-11'00')
/Creator (TeX)
* xeLATEX
TODAY=April 30, 2016
LOG: This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
(preloaded format=xelatex 2016.4.30) 30 APR 2016 10:52
/CreationDate (D:20160430105300-11'00')
/Creator ( XeTeX output 2016.04.30:1052)
******************************** SOURCE_DATE_EPOCH=31536000 -> 1971
* LATEX
TODAY=January 1, 1971
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=latex 2016.4.30) 1 JAN 1971 00:00
DVI: TeX output 1971.01.01:0000
* pdfLATEX
TODAY=January 1, 1971
LOG: This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016)
(preloaded format=pdflatex 2016.4.30) 1 JAN 1971 00:00
/ModDate (D:19710101000000Z)
/CreationDate (D:19710101000000Z)
/Creator (TeX)
* luaLATEX
TODAY=January 1, 1971
LOG: This is LuaTeX, Version 0.95.0 (TeX Live 2016) (format=lualatex
2016.4.30) 1 JAN 1971 00:00
/ModDate (D:19710101000000Z)
/CreationDate (D:19710101000000Z)
/Creator (TeX)
* xeLATEX
TODAY=January 1, 1971
LOG: This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
(preloaded format=xelatex 2016.4.30) 1 JAN 1971 00:00
/CreationDate (D:19710101000000-00'00')
/Creator ( XeTeX output 1971.01.01:0000)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extend_S_D_E_support.diff
Type: text/x-patch
Size: 7303 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20160501/c5bc2b6d/attachment.bin>
More information about the tex-live
mailing list