Set permissions of fontconfig cache files, fonts.dir and fons.scale

explicitly, so they don't depend on the umask.

push forward deraadt; no objections matthieu
This commit is contained in:
tb 2016-11-19 08:38:15 +00:00
parent 014a2c67d0
commit d1cd881611

View File

@ -1,22 +1,26 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2016/10/02 20:55:09 matthieu Exp $ # $OpenBSD: Makefile.bsd-wrapper,v 1.5 2016/11/19 08:38:15 tb Exp $
afterinstall: afterinstall:
@if test -z "$(DESTDIR)"; then \ @if test -z "$(DESTDIR)"; then \
echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\ echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\
fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\ fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\
chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \
else \ else \
echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\ echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\
fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\ fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\
chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \ chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \
chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \
fi fi
.for fdir in 100dpi 75dpi OTF TTF Type1 cyrillic misc .for fdir in 100dpi 75dpi OTF TTF Type1 cyrillic misc
rm -f ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir rm -f ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
mkfontdir ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir} mkfontdir ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
chmod 644 ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
.endfor .endfor
.for fdir in OTF TTF Type1 .for fdir in OTF TTF Type1
mkfontscale ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir} mkfontscale ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale
chmod 644 ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale
.endfor .endfor
.include <bsd.xorg.mk> .include <bsd.xorg.mk>