[Fontconfig] [PATCH] Make the cache filenames determinstic

Chris Lamb chris at chris-lamb.co.uk
Mon Oct 29 20:10:48 UTC 2018

Hi fontconfig@,

Whilst working on the Reproducible Builds[0] effort, we noticed that
fontconfig generates cache files with unreproducible/non-deterministic

This is a supplement to the changes added in f098adac54ab where we
ensured that the checksums themselves were determistic but the files
that were stored in the cache directory are currently being given
"random" names via uuid(3)'s uuid_generate_random function, thus
any images that generate such files have different contents on every

This patch changes the behaviour of the cache directory filename
calculation to be based on the "source" directory name, rather than
being entirely random.

An alternative solution could be to continue to use the previous
uuid_generate_random function but use this alternative codepath if the
SOURCE_DATE_EPOCH[1] environment variable was determined to be
present via getenv(3).

This work was sponsored by Tails[2] and tracked in Debian in #864082[3].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/
 [2] https://tails.boum.org/
 [3] https://bugs.debian.org/864082
 src/fccache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Chris Lamb
chris-lamb.co.uk / @lolamby
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-the-cache-filenames-determinstic.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20181029/3fd2910b/attachment.bin>

More information about the Fontconfig mailing list