[tex-k] Reproducible builds using pdftex

Jonathan Kew jfkthame at gmail.com
Tue May 3 11:09:22 CEST 2016


On 3/5/16 08:30, Alexis Bienvenüe wrote:
>> Beyond that, I can imagine, at least in theory, that a document might
>> look at (not typeset) the value of \year etc. for some reason, and want
>> to get its current value, even while using SOURCE_DATE_EPOCH to get a
>> reproducible build.  After all, many manuals do not typeset \today.
>
> The SOURCE_DATE_EPOCH envvar is designed to be used only in the context
> of reproducible builds. In this context, if a document uses \year in
> some way (not only typesetting it) that does change the result, we must
> either modify the document itself to fix its behavior, either use
> SOURCE_DATE_EPOCH_TEX_PRIMITIVES to fix \year's behavior. So I think
> there can't be any case where we will want to set SOURCE_DATE_EPOCH but
> not SOURCE_DATE_EPOCH_TEX_PRIMITIVES.
>
> That said, I think that SOURCE_DATE_EPOCH_TEX_PRIMITIVES _is_ a solution
> that covers our needs.

Rather than hacking TeX primitives, how about simply inserting

   \day = 1
   \month = 4
   \year = 2016

(or whatever) into the format used to build the document?

ISTM that it shouldn't be hard to prepare and use such a "fixed-date 
format" as part of whatever package-building process needs to generate 
documents in a "reproducible" way, even if they (ab)use \today etc.

JK



More information about the tex-k mailing list