Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252095 - app-misc/cmatrix-1.2a-r1: won't install X11 font if font directory doesn't exist
Summary: app-misc/cmatrix-1.2a-r1: won't install X11 font if font directory doesn't exist
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Wormo (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-21 21:54 UTC by David Wildasin
Modified: 2008-12-29 23:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
This patch forces the X11 font file `mtx.pcf' to be installed. (cmatrix-1.2a-fontdir.patch,977 bytes, patch)
2008-12-21 21:59 UTC, David Wildasin
Details | Diff
This causes the previous patch to be applied if the X USE flag is enabled (cmatrix-1.2a-r1.ebuild.patch,331 bytes, patch)
2008-12-21 22:00 UTC, David Wildasin
Details | Diff
Update: This patch forces the X11 font file `mtx.pcf' to be installed into `/usr/share/fonts/misc' (cmatrix-1.2a-fontdir.patch,1.75 KB, patch)
2008-12-24 03:00 UTC, David Wildasin
Details | Diff
Update: This patch makes the ebuild apply the previous patch if the X USE flag is enabled (cmatrix-1.2a-r1.ebuild.patch,1020 bytes, patch)
2008-12-24 03:01 UTC, David Wildasin
Details | Diff
Update: This patch makes the ebuild apply the previous patch if the X USE flag is enabled (cmatrix-1.2a-r1.ebuild.patch,1.06 KB, patch)
2008-12-24 03:15 UTC, David Wildasin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Wildasin 2008-12-21 21:54:40 UTC
When installing app-misc/cmatrix-1.2a-r1 (and presumably earlier versions), if neither /usr/lib/X11/fonts/misc nor /usr/X11R6/lib/X11/fonts/misc exist as directories, then the X11 matrix font file `mtx.pcf' is not installed.  Also, the command line switch `-x' can no longer be used.

Reproducible: Always

Steps to Reproduce:
1. Backup any fonts in /usr/lib/X11/fonts/misc and /usr/X11R6/lib/X11/fonts/misc 
2. Remove these two directories
3. (Re-)emerge app-misc/cmatrix-1.2a-r1 with the X USE flag enabled
Actual Results:  
<snip>
>>> Compiling source ...
<...>
./configure ...
<...>
checking for /usr/lib/X11/fonts/misc... no
checking for /usr/X11R6/lib/X11/fonts/misc... no
configure: WARNING:

*** You do not appear to have an X window fonts directory in the standard
*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The
*** mtx.pcf font will not be installed.  This means you will probably not
*** be able to use the mtx fonts in your x terminals, and hence be unable
*** to use the -x command line switch.  Sorry about that...

configure: creating ./config.status
</snip>

<snip>
$ equery files =app-misc/cmatrix-1.2a-r1
[ Searching for packages matching =app-misc/cmatrix-1.2a-r1... ]
* Contents of app-misc/cmatrix-1.2a-r1:
/usr
/usr/bin
/usr/bin/cmatrix
/usr/lib
/usr/lib/X11
/usr/lib/X11/fonts
/usr/lib/X11/fonts/misc  <<< Note that this directory is empty
/usr/lib/kbd
</snip>

<snip>
$ ls -al /usr/lib/X11/fonts/misc
total 12
drwxr-xr-x 2 root root 4096 Dec 20 18:53 .
drwxr-xr-x 3 root root 4096 Dec 20 18:52 ..
-rw-r--r-- 1 root root    2 Dec 20 18:53 fonts.dir
$ _
</snip>

Expected Results:  
<snip>
>>> Compiling source ...
<...>
./configure ...
<...>
checking for /usr/lib/X11/fonts/misc... yes
checking for /usr/X11R6/lib/X11/fonts/misc... no
configure: creating ./config.status
</snip>

<snip>
$ equery files =app-misc/cmatrix-1.2a-r1
[ Searching for packages matching =app-misc/cmatrix-1.2a-r1... ]
* Contents of app-misc/cmatrix-1.2a-r1:
/usr
/usr/bin
/usr/bin/cmatrix
/usr/lib
/usr/lib/X11
/usr/lib/X11/fonts
/usr/lib/X11/fonts/misc
/usr/lib/X11/fonts/misc/mtx.pcf <<< Not empty this time
/usr/lib/kbd
</snip>

<snip>
$ ls -al /usr/lib/X11/fonts/misc
total 40
drwxr-xr-x 2 root root  4096 Dec 21 13:43 .
drwxr-xr-x 3 root root  4096 Dec 20 18:52 ..
-rw-r--r-- 1 root root    14 Dec 21 13:43 fonts.dir
-rw-r--r-- 1 root root 24633 Dec 21 13:43 mtx.pcf
$ _
</snip>

This problem also seems to be a sandbox violation, since ./configure is checking for a directory on the live filesystem.  Please correct me if necessary.

I've tested and will attach a source code patch and an ebuild patch that fix the problem, at least on my system.

Thanks in advance for any assistance.

(Please notify me of any typos - I'm typing all this by hand.)

-----BEGIN emerge --info-----
Portage 2.1.4.5 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r9 i686)
=================================================================
System uname: 2.6.25-gentoo-r9 i686 Pentium III (Coppermine)
Timestamp of tree: Wed, 10 Dec 2008 18:15:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --color=y --with-bdeps=y"
FEATURES="candy distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://ftp.heanet.ie/pub/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gnustep /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl alsa bash-completion berkdb bzip2 caps cjk cli cracklib crypt cscope cvs djvu doc dri esd examples expat fbcon flac fontconfig fortran ftp gdbm gif gmp gnutls gpm hardened iconv idn imagemagick imap ipv6 isdnlog javascript jbig jpeg jpeg2k libcaca lua lzo maildir midi mmap mudflap mysql ncurses nls nntp nptl nptlonly offensive ogg openexr openmp pam pcre pdf perl png pppd python raw readline reflection session speex spl sse ssl subversion svg sysfs tcpd threads tiff truetype unicode usb vim-syntax wmf x86 xft xml xorg zeroconf 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------END emerge --info------
yuck.  I need to clean out some of those variables.

-----BEGIN /etc/portage/package.keywords-----
app-admin/sudo
app-editors/vim
app-editors/vim-core
app-misc/vlock
app-portage/eix
games-misc/fortune-mod-gentoo-dev
games-rougelike/angband
media-gfx/imagemagick
media-gfx/splash-themes-gentoo
media-gfx/splash-themes-livecd
media-gfx/splashutils
media-libs/libcaca
>=sys-apps/baselayout-2
sys-apps/openrc
------END /etc/portage/package.keywords------

-----BEGIN /etc/portage/package.mask-----
<sys-kernel/gentoo-sources-2.6.25
>=sys-kernel/gentoo-sources-2.6.26
>=x11-drivers/nvidia-drivers-87.00
------END /etc/portage/package.mask------

-----BEGIN /etc/portage/package.use-----
app-doc/doxygen nodot
app-editors/vim vim-pager vim-with-x
dev-lang/nqc -usb
dev-lang/spidermonkey threadsafe
dev-libs/apr-util -mysql
dev-python/docutils glep
dev-util/subversion extras
games-action/moon-buggy -esd
mail-mta/netqmail gencertdaily
media-gfx/imagemagick fpx gs hdri q32
media-gfx/splashutils fbcondecor
media-libs/alsa-lib alisp
media-libs/fontconfig -doc
media-libs/freetype utils
media-libs/giflib rle
media-libs/netpbm rle
media-libs/urt gs
sys-apps/parted device-mapper
sys-apps/portage epydoc
sys-apps/shadow nousuid
sys-devel/gcc objc objc++ objc-gc
sys-kernel/gentoo-sources symlink
www-client/elinks bittorrent finger gopher
------END /etc/portage/package.use------

If you need any more information, ask me and I'll see what I can do.
Comment 1 David Wildasin 2008-12-21 21:59:22 UTC
Created attachment 176100 [details, diff]
This patch forces the X11 font file `mtx.pcf' to be installed.

Here's the first patch.
Comment 2 David Wildasin 2008-12-21 22:00:56 UTC
Created attachment 176102 [details, diff]
This causes the previous patch to be applied if the X USE flag is enabled

Here's the second patch.
Comment 3 Wormo (RETIRED) gentoo-dev 2008-12-23 20:02:05 UTC
Thanks for the report, and for submitting your fix.

I think it would be even better if the font were installed in the standard gentoo location; want to update the makefile patch to install the font into /usr/share/fonts/misc ?
Comment 4 David Wildasin 2008-12-24 02:35:20 UTC
Hmmm... I thought X had it's own font directory tree.  Seems I missed that in my reading.  Thanks for the info.  I'll post an updated patch shortly.
Comment 5 David Wildasin 2008-12-24 03:00:12 UTC
Created attachment 176269 [details, diff]
Update: This patch forces the X11 font file `mtx.pcf' to be installed into `/usr/share/fonts/misc'

Updated the patch to use the default Gentoo font directory.
Comment 6 David Wildasin 2008-12-24 03:01:59 UTC
Created attachment 176270 [details, diff]
Update: This patch makes the ebuild apply the previous patch if the X USE flag is enabled

Updated to use the default Gentoo font directory
Comment 7 David Wildasin 2008-12-24 03:15:10 UTC
Created attachment 176271 [details, diff]
Update: This patch makes the ebuild apply the previous patch if the X USE flag is enabled

Gah.  That's what I get for posting a patch before testing it.  Fixed the `einfo  ">>>Running mkfontdir"' line.
Comment 8 Wormo (RETIRED) gentoo-dev 2008-12-27 07:39:51 UTC
Thanks for the new improved patch; applied in CVS.
Comment 9 David Wildasin 2008-12-29 23:26:49 UTC
Thank you for your time and assistance, Wormo.