Maria Valentina Marin
2015-07-11 10:33:04 UTC
Hello,
I wanted to expand on the thread started by Nicolas Boulenguez:
http://tug.org/mailman/htdig/pdftex/2015-May/008940.html
Where they explain ways to make pdftex produce reproducible output.
I propose the attached patch which does not change the default behaviour
of pdftex but if the environment variable SOURCE_DATE_EPOCH is set it
causes pdftex to produce reproducible PDF files by modifying the
behaviour of the function initstarttime() and printID().
The environment variable SOURCE_DATE_EPOCH contains the unix epoch as an
integer [1]. The function printID was modified to obtain the time as in
the patch from Nicolas Boulenguez though in contrast to their patch the
ID still uses the output build directory as part of its hash. This was
done because the Debian reproducible builds team decided to not change
the path between builds, this makes the build path deterministic by
default. As far as Debian goes stripping off the path is not required.
Though we will not complain if you do =)
This environment variable was introduced by the Debian reproducible
builds team but it is meant to be used by any distribution. The package
help2man is now supporting this and we are also in the process of
persuading txt2man, epydoc, GCC, Doxygen and libxslt.
We are successfully using in our framework a modified version of pdftek
which includes this patch to build packages and test for reproducibility.
Thanks!
akira
P.S. I am starting a new thread because I could not find a way to reply
to the one Nicolas started.
[1] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
I wanted to expand on the thread started by Nicolas Boulenguez:
http://tug.org/mailman/htdig/pdftex/2015-May/008940.html
Where they explain ways to make pdftex produce reproducible output.
I propose the attached patch which does not change the default behaviour
of pdftex but if the environment variable SOURCE_DATE_EPOCH is set it
causes pdftex to produce reproducible PDF files by modifying the
behaviour of the function initstarttime() and printID().
The environment variable SOURCE_DATE_EPOCH contains the unix epoch as an
integer [1]. The function printID was modified to obtain the time as in
the patch from Nicolas Boulenguez though in contrast to their patch the
ID still uses the output build directory as part of its hash. This was
done because the Debian reproducible builds team decided to not change
the path between builds, this makes the build path deterministic by
default. As far as Debian goes stripping off the path is not required.
Though we will not complain if you do =)
This environment variable was introduced by the Debian reproducible
builds team but it is meant to be used by any distribution. The package
help2man is now supporting this and we are also in the process of
persuading txt2man, epydoc, GCC, Doxygen and libxslt.
We are successfully using in our framework a modified version of pdftek
which includes this patch to build packages and test for reproducibility.
Thanks!
akira
P.S. I am starting a new thread because I could not find a way to reply
to the one Nicolas started.
[1] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal