[Fontconfig] [PATCH] Please make the output of cache files reproducible
lamby at debian.org
Tue May 15 20:13:58 UTC 2018
> Please mention about SOURCE_DATE_EPOCH at the section of the
> Environment variables in doc/fontconfig-user.sgml
Whoops, I somehow forgot this bit. Updated patch attached:
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Tue May 15 22:11:24 2018 +0200
Ensure cache checksums are deterministic
Whilst working on the Reproducible Builds effort, we noticed that
fontconfig generates unreproducible cache files.
This is due to fc-cache uses the modification timestamps of each
directory in the "checksum" and "checksum_nano" members of the _FcCache
struct. This is so that it can identify which cache files are valid
and/or require regeneration.
This patch changes the behaviour of the checksum calculations to prefer
the value of the SOURCE_DATE_EPOCH environment variable over the
directory's own mtime. This variable can then be exported by build
systems to ensure reproducible output.
If SOURCE_DATE_EPOCH is not set or is newer than the mtime of the
directory, the existing behaviour is unchanged.
This work was sponsored by Tails.
doc/fontconfig-user.sgml | 6 ++++-
src/fccache.c | 58 +++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 57 insertions(+), 7 deletions(-)
You can also merge from the "864082-FcConfigGetFontDirs" branch of
https://github.com/lamby/fontconfig if that is more convenient.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5442 bytes
Desc: not available
More information about the Fontconfig