Re: [PATCH] Please make the output of cache files reproducible
Akira TAGOH <[email protected]>
| Newsgroups | gmane.comp.fonts.fontconfig |
|---|---|
| Message-ID | <CACT-Cx3NL=NW2Mgq-wKQU9OmEC1wA1NYgSkC1mFq=6Q-54YLgA@mail.gmail.com> |
Sorry, I missed this. How about creating your tool with FcConfigGetFontDirs()? I don't get why fc-cache needs to have such options. fc-cache isn't an interface to make the config readable. On Fri, Jun 9, 2017 at 10:11 AM, Chris Lamb <[email protected]> wrote: > Hi, > > Whilst working on the Reproducible Builds[0] effort, we noticed that > fontconfig — in its usual usage — generates un-reproducible cache files. > > This is due to it using the timestamps of each directory in the > "checksum" member of the _FcCache struct. This is so that it can identify > which cache files remain valid and/or require regeneration. > > Whilst we could zero-out the checksum, we would actually need it still > function correctly. Therefore, I've attached a patch that adds an option > to list all the configured font directories; that way, distributions, > etc. can modify the mtimes of these files in advance > > For example, I'm about to propose the following to Debian's fontconfig > "postinst" script: > > if [ -n "$SOURCE_DATE_EPOCH" ]; then > fc-cache -s --list-dirs | \ > xargs -I{} find {} -type d -follow -newermt "@$SOURCE_DATE_EPOCH" > -print0 2>/dev/null | \ > xargs -0r touch --date="@$SOURCE_DATE_EPOCH" > fi > > … and then we make the usual calls to, for example: > > $ fc-cache -s -f -v > > > (This work was sponsored by Tails[1].) > > > [0] https://reproducible-builds.org/ > [1] https://tails.boum.org/ > > > Regards, > > -- > ,''`. > : :' : Chris Lamb > `. `'` [email protected] / chris-lamb.co.uk > `- > > _______________________________________________ > Fontconfig mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/fontconfig > > -- Akira TAGOH _______________________________________________ Fontconfig mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/fontconfig