mirror of OpenBSD xenocara tree github.com/openbsd/xenocara
openbsd
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make sure the fontconfig cache in the xbaseXX.tgz set is valid.

Tarballs only store timestamps with 1s resolution, while the
fontconfig cache uses nano-second resolution from the filesystem to
check that a directory hasn't changed.

So the font directories extracted by the installer were almost always
considered out of date, causing applications that use fontconfig to
trigger a rebuild of the cache.

Now, when installing with DESTDIR set, we use a perl one-liner to
remove the nanoseconds from the mtime of the fonts directories before
running fc-cache, so that the timestamps recorded in the cache match
what will be set after extracting the xfont set.

Help and suggestions from at least guenther@, millert@, espie@
and deraadt@

matthieu e573efcd 3d6c2359

+14 -11
+14 -11
font/alias/Makefile.bsd-wrapper
··· 1 - # $OpenBSD: Makefile.bsd-wrapper,v 1.5 2016/11/19 08:38:15 tb Exp $ 1 + # $OpenBSD: Makefile.bsd-wrapper,v 1.6 2018/07/09 21:20:56 matthieu Exp $ 2 2 3 3 afterinstall: 4 - @if test -z "$(DESTDIR)"; then \ 5 - echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\ 6 - fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\ 7 - chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \ 8 - else \ 9 - echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\ 10 - fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\ 11 - chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \ 12 - chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \ 13 - fi 14 4 .for fdir in 100dpi 75dpi OTF TTF Type1 cyrillic misc 15 5 rm -f ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir 16 6 mkfontdir ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir} ··· 22 12 chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale 23 13 chmod 644 ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale 24 14 .endfor 15 + if test -z "$(DESTDIR)"; then \ 16 + echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\ 17 + fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\ 18 + chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \ 19 + else \ 20 + echo "truncating font directories mtimes"; \ 21 + find "${DESTDIR}/usr/X11R6/lib/X11/fonts" -type d \ 22 + -exec perl -e 'utime+(stat)[8,9],$$_ for @ARGV' {} + ; \ 23 + echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\ 24 + fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\ 25 + chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \ 26 + chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \ 27 + fi 25 28 26 29 .include <bsd.xorg.mk>