[Fontconfig] [PATCH] Please make the output of cache files reproducible

Akira TAGOH akira at tagoh.org
Mon Jul 3 12:59:43 UTC 2017


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 <lamby at debian.org> 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
>      `. `'`      lamby at debian.org / chris-lamb.co.uk
>        `-
>
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fontconfig
>
>


-- 
Akira TAGOH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20170703/d9655f33/attachment.html>


More information about the Fontconfig mailing list