After installing fonts manually (not from an ebuild), the new fonts did not have correct permissions (only chmod 600.) I loaded a website that required the font in question, and firefox segfaulted. Reproducible: Always Steps to Reproduce: 1. Install a new font, chmod to 600 2. Start firefox 3. Load a webpage that requires the new font Actual Results: Firefox segfaulted. Error message varies. Expected Results: Either 1) Fallback to a known system font; 2) A warning indicating there's a font problem; or 3) Both 1 and 2. Installed packages: [I--] [ ] x11-base/xorg-x11-7.1 (0) [I--] [ ] media-libs/fontconfig-2.4.2 (1.0) [I--] [ ] www-client/mozilla-firefox-2.0.0.3 (0) emerge --info: Portage 2.1.2.9 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.20-gentoo-r6 i686) ================================================================= System uname: 2.6.20-gentoo-r6 i686 AMD Athlon(tm) XP 3200+ Gentoo Base System release 1.12.9 Timestamp of tree: Wed, 25 Jul 2007 14:30:10 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.15-r1 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j7" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa amarok arts berkdb bitmap-fonts cdr cli cracklib crypt cups dri dvd dvdr flac fortran g15 gdbm gimp gnome gpm gtk gtk2 hal iconv isdnlog ithreads kde libg++ lirc midi mp3 mudflap musepack ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre perl ppds pppd python qt qt3 readline reflection samba scanner session spl ssl tcpd truetype truetype-fonts type1-fonts unicode usb x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="g15" LIRC_DEVICES="atiusb" USERLAND="GNU" VIDEO_CARDS="vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I did forget to mention that running: $ chmod -R 644 /usr/share/fonts/* $ fc-cache -fv fixes it.
Not a fonts bug.
And not a Gentoo-specific bug at all, for that matter. Please report such things upstream - https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&format=guided
jakub, please leave bugs alone after they've been assigned.
*** Bug 187634 has been marked as a duplicate of this bug. ***
this might actually be the cause of several bugs we have open. i'll look into adding some checks to be sure all the fonts we install have the correct permissions. i'm not sure what we can do about user-installed fonts though. maybe i can make a case to fontconfig upstream to filter out fonts that aren't world readable.
Please do so. As I said in my other bug, I never did install any fonts manually - the error crept in elsewhere. I only wish at the time I had a way to figure out quickly which fonts were unreadable - too late now.
In a thread on the forums someone had this issue and konqueror was also affected; in that case media-fonts/arphicfonts is one of the packages that had incorrect permissions. There could be more than one package at fault though. m.nawaz: did you have arphicfonts installed? I don't, maybe I'll try emerging them right now.
OK, I tried media-fonts/arphicfonts-0.1.20060928 and the permissions are OK.
font.eclass now forces 0644 on all installed font files. thanks.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a9c7da92382416ba4a25b2bc04a47820f116c1 commit e4a9c7da92382416ba4a25b2bc04a47820f116c1 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-11-08 01:01:54 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-11-08 23:48:51 +0000 font.eclass: Remove racy pkg_postinst code Noticed on ChromeOS when installing a large number of font packages in parallel: /usr/share/fonts/noto/NotoSerifThai-Regular.ttf#new' from 0004 (------r--) to 2440 (r--r-S---) * ERROR: media-fonts/ipaex-004.01-r1::chromiumos failed (postinst phase): * failed to fix font files perms The "#new" filename is the hint. Portage uses "#new" suffixes when copying files to the system, and then renames them to their final filenames. This code was executing while another font was in the process of being copied to the system. Font packages should just ensure that they install files with correct permissions to begin with, and all except media-fonts/x11fonts-jmk already use 0644 permissions. media-fonts/x11fonts-jmk used 0444 (which was probably fine) until the previous commit which changes its installed files to 0644. Bug: https://bugs.gentoo.org/187774 Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/font.eclass | 6 ------ 1 file changed, 6 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fe5fff7e18111b0eb547177c52016744f2f0011 commit 4fe5fff7e18111b0eb547177c52016744f2f0011 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-11-08 00:57:01 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-11-08 23:48:51 +0000 media-fonts/x11fonts-jmk: Install files with 0644 permissions font.eclass has some racy code in pkg_postinst() that changes permissions of already-installed files. I want to remove that to avoid the race. This is the only package that installs fonts with permissions other than 0644, so override that in src_install(). The claim in font.eclass is that fontconfig segfaults if fonts are unreadable, but that claim dates to 2007 (bug #187774). Additionally, 0444 is readable, but who knows. Let's just keep things working how they have been since 2007. Bug: https://bugs.gentoo.org/187774 Signed-off-by: Matt Turner <mattst88@gentoo.org> media-fonts/x11fonts-jmk/x11fonts-jmk-3.0-r4.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)