[tex-k] Reproducible builds using pdftex

Alexis Bienvenüe pado at passoire.fr
Mon May 2 15:18:22 CEST 2016


Working on the “reproducible builds” effort [1], we have noticed that a
lot of software packages rely on pdftex to build some documents
to be included in the binary package. Since revision 728 on pdftex's
svn, pdftex honours the SOURCE_DATE_EPOCH environment variable to get
reproducible values for the CreationDate, ModDate and ID fields in the
produced file. This greatly helps reproducibility.

However, a lot of software package date their documentation using the
`\today' command. This breaks reproducibility, and the document date
becomes the build date instead of the source files date as it should be.

Therefore, I would like to promote a feature for pdftex, that would use
(when set) the value of SOURCE_DATE_EPOCH to also feed the values of the
\year, \month and \day primitives.

Please find attached a patch that implements this feature, factorizing
the already present code from initstarttime to get and check the
SOURCE_DATE_EPOCH value, so that it can also be used in get_date_and_time.

Thanks in advance for considering including this feature in pdftex.

Alexis Bienvenüe.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: extend-S_D_E-support-pdftex.diff
Type: text/x-patch
Size: 3031 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20160502/6329a8e4/attachment.bin>

More information about the tex-k mailing list