Bug 173875
Description
sangu
2005-11-22 01:30:28 UTC
Created attachment 121328 [details]
$starce /usr/bin/mkfontscale -a fontpath
This turns out to be a bug in libfontenc, which mkfontscale links to. It is built with a hard coded path to the encodings files supplied by its Makefile.am. Fixed by applying libfontenc-0.99.2-use-datadir-for-encodings.patch which patches Makefile.am, and calling automake. This package will require xorg-x11-filesystem also to be installed first, or at the same time. Created attachment 121380 [details]
mkfontscale's strace filei n libfontenc-0.99.2-2
still can't find encodings.dir
$ pwd
/usr/share/X11/fonts/75dpi
$ strace mkfontscale > strace.txt 2>&1
# cat fonts.scale
0
$cat strace.txt
[...]
unlink("./encodings.dir") = -1 ENOENT (No such file or directory)
exit_group(0) = ?
Process 13550 detached
$ rpm -q libfontenc xorg-x11-font-utils
libfontenc-0.99.2-2
xorg-x11-font-utils-6.99.99.902-2
Created attachment 121383 [details]
Doing mkfontscale fonts korean, strace.txt
$strace mkfontscale /usr/share/fonts/korean/TrueType > strace.txt 2>&1
Sorry my misposting (comment 4, 5 ). mkfontscale can't find enc files in /usr/share/X11/fonts/encoding/ and /usr/share/X11/fonts/encoding/large/. [...] open("/usr/share/X11/fonts/encodings/./*.enc", O_RDONLY) = -1 ENOENT (No such file or directory) [...] Please provide output of: rpm -q libfontenc libXfont xorg-x11-font-utils xorg-x11-fonts and rpm -ql xorg-x11-fonts-base Also, please run: rpm -V libfontenc libXfont xorg-x11-font-utils xorg-x11-fonts-base And the output of "ls -alFR /usr/share/X11/fonts/encodings" libfontenc-0.99.2-2 libXfont-0.99.2-3 xorg-x11-font-utils-6.99.99.902-2 xorg-x11-fonts-Type1-0.99.0-6 xorg-x11-fonts-truetype-0.99.0-6 xorg-x11-fonts-75dpi-0.99.0-6 xorg-x11-fonts-misc-0.99.0-6 xorg-x11-fonts-100dpi-0.99.0-6 xorg-x11-fonts-base-0.99.0-6 $rpm -V libfontenc libXfont xorg-x11-font-utils xorg-x11-fonts-base no message. $ls -alFR /usr/share/X11/fonts/encodings /usr/share/X11/fonts/encodings: total 184 drwxr-xr-x 3 root root 4096 Nov 22 02:43 ./ drwxr-xr-x 8 root root 4096 Nov 15 04:38 ../ -rw-r--r-- 1 root root 3253 Nov 15 04:35 adobe-dingbats.enc.gz -rw-r--r-- 1 root root 1655 Nov 15 04:35 adobe-standard.enc.gz -rw-r--r-- 1 root root 3165 Nov 15 04:35 adobe-symbol.enc.gz -rw-r--r-- 1 root root 986 Nov 15 04:35 ansi-1251.enc.gz -rw-r--r-- 1 root root 1026 Nov 15 04:35 armscii-8.enc.gz -rw-r--r-- 1 root root 435 Nov 15 04:35 ascii-0.enc.gz -rw-r--r-- 1 root root 582 Nov 15 04:35 dec-special.enc.gz -rw-r--r-- 1 root root 4581 Nov 15 04:35 encodings.dir -rw-r--r-- 1 root root 8192 Nov 17 01:02 fonts.cache-2 -rw-r--r-- 1 root root 2 Nov 17 02:46 fonts.dir -rw-r--r-- 1 root root 1576 Nov 15 04:35 ibm-cp437.enc.gz -rw-r--r-- 1 root root 1519 Nov 15 04:35 ibm-cp850.enc.gz -rw-r--r-- 1 root root 1412 Nov 15 04:35 ibm-cp852.enc.gz -rw-r--r-- 1 root root 1373 Nov 15 04:35 ibm-cp866.enc.gz -rw-r--r-- 1 root root 1012 Nov 15 04:35 iso8859-11.enc.gz -rw-r--r-- 1 root root 639 Nov 15 04:35 iso8859-13.enc.gz -rw-r--r-- 1 root root 626 Nov 15 04:35 iso8859-16.enc.gz -rw-r--r-- 1 root root 996 Nov 15 04:35 iso8859-6.16.enc.gz -rw-r--r-- 1 root root 836 Nov 15 04:35 iso8859-6.8x.enc.gz drwxr-xr-x 2 root root 4096 Nov 22 02:43 large/ -rw-r--r-- 1 root root 616 Nov 15 04:35 microsoft-cp1250.enc.gz -rw-r--r-- 1 root root 1181 Nov 15 04:35 microsoft-cp1251.enc.gz -rw-r--r-- 1 root root 529 Nov 15 04:35 microsoft-cp1252.enc.gz -rw-r--r-- 1 root root 1219 Nov 15 04:35 microsoft-cp1253.enc.gz -rw-r--r-- 1 root root 572 Nov 15 04:35 microsoft-cp1254.enc.gz -rw-r--r-- 1 root root 1004 Nov 15 04:35 microsoft-cp1255.enc.gz -rw-r--r-- 1 root root 1025 Nov 15 04:35 microsoft-cp1256.enc.gz -rw-r--r-- 1 root root 883 Nov 15 04:35 microsoft-cp1257.enc.gz -rw-r--r-- 1 root root 633 Nov 15 04:35 microsoft-cp1258.enc.gz -rw-r--r-- 1 root root 435 Nov 15 04:35 microsoft-win3.1.enc.gz -rw-r--r-- 1 root root 185 Nov 15 04:35 mulearabic-0.enc.gz -rw-r--r-- 1 root root 455 Nov 15 04:35 mulearabic-1.enc.gz -rw-r--r-- 1 root root 467 Nov 15 04:35 mulearabic-2.enc.gz -rw-r--r-- 1 root root 676 Nov 15 04:35 mulelao-1.enc.gz -rw-r--r-- 1 root root 811 Nov 15 04:35 suneu-greek.enc.gz -rw-r--r-- 1 root root 760 Nov 15 04:35 tcvn-0.enc.gz -rw-r--r-- 1 root root 1152 Nov 15 04:35 tis620-2.enc.gz -rw-r--r-- 1 root root 1242 Nov 15 04:35 viscii1.1-1.enc.gz /usr/share/X11/fonts/encodings/large: total 672 drwxr-xr-x 2 root root 4096 Nov 22 02:43 ./ drwxr-xr-x 3 root root 4096 Nov 22 02:43 ../ -rw-r--r-- 1 root root 64391 Nov 15 04:35 big5.eten-0.enc.gz -rw-r--r-- 1 root root 85290 Nov 15 04:35 big5hkscs-0.enc.gz -rw-r--r-- 1 root root 29725 Nov 15 04:35 cns11643-1.enc.gz -rw-r--r-- 1 root root 36755 Nov 15 04:35 cns11643-2.enc.gz -rw-r--r-- 1 root root 26146 Nov 15 04:35 cns11643-3.enc.gz -rw-r--r-- 1 root root 1769 Nov 15 04:35 encodings.dir -rw-r--r-- 1 root root 8192 Nov 17 01:02 fonts.cache-2 -rw-r--r-- 1 root root 140 Nov 15 04:35 gb18030-0.enc.gz -rw-r--r-- 1 root root 65458 Nov 15 04:35 gb18030.2000-0.enc.gz -rw-r--r-- 1 root root 1677 Nov 15 04:35 gb18030.2000-1.enc.gz -rw-r--r-- 1 root root 70467 Nov 15 04:35 gb2312.1980-0.enc.gz -rw-r--r-- 1 root root 59166 Nov 15 04:35 gbk-0.enc.gz -rw-r--r-- 1 root root 453 Nov 15 04:35 jisx0201.1976-0.enc.gz -rw-r--r-- 1 root root 72764 Nov 15 04:35 jisx0208.1990-0.enc.gz -rw-r--r-- 1 root root 23852 Nov 15 04:35 jisx0212.1990-0.enc.gz -rw-r--r-- 1 root root 34763 Nov 15 04:35 ksc5601.1987-0.enc.gz -rw-r--r-- 1 root root 32497 Nov 15 04:35 ksc5601.1992-3.enc.gz -rw-r--r-- 1 root root 938 Nov 15 04:35 sun.unicode.india-0.enc.gz I believe this problem is resolved in rawhide for a while now. Please confirm. Created attachment 122522 [details]
$rpm -ql xorg-x11-fonts-base and $ls -alFR /usr/share/X11/fonts/encodings
mharris : this problem still happens.
$ rpm -q libfontenc libXfont xorg-x11-font-utils
libfontenc-1.0.0-1
libXfont-1.0.0-1
xorg-x11-font-utils-1.0.0-1
$rpm -qa | grep xorg-x11-fonts
xorg-x11-fonts-base-1.0.0-1
xorg-x11-fonts-misc-1.0.0-1
xorg-x11-fonts-truetype-1.0.0-1
xorg-x11-fonts-75dpi-1.0.0-1
xorg-x11-fonts-100dpi-1.0.0-1
xorg-x11-fonts-ISO8859-1-75dpi-1.0.0-1
xorg-x11-fonts-Type1-1.0.0-1
$ rpm -V libfontenc libXfont xorg-x11-font-utils
no message
Created attachment 122523 [details]
$ strace mkfontscale > strace.txt 2>&1 in korean fonts directory
in strace.txt
[...]
open("/encodings/encodings.dir", O_RDONLY) = -1 ENOENT (No such file or
directory)
[...]
Does this problem still occur with FC5test3? this problem still happens in FC5T3 $rpm -q libfontenc libXfont xorg-x11-font-utils libfontenc-1.0.1-1.2 libXfont-1.0.0-2.2 xorg-x11-font-utils-1.0.1-2 $rpm -qa | grep xorg-x11-fonts xorg-x11-fonts-100dpi-7.0-1 xorg-x11-fonts-ISO8859-9-75dpi-7.0-1 xorg-x11-fonts-ISO8859-14-75dpi-7.0-1 xorg-x11-fonts-75dpi-7.0-1 xorg-x11-fonts-ISO8859-9-100dpi-7.0-1 xorg-x11-fonts-ISO8859-1-75dpi-7.0-1 xorg-x11-fonts-ISO8859-1-100dpi-7.0-1 xorg-x11-fonts-ISO8859-14-100dpi-7.0-1 xorg-x11-fonts-ISO8859-15-75dpi-7.0-1 xorg-x11-fonts-base-7.0-1 xorg-x11-fonts-ISO8859-15-100dpi-7.0-1 xorg-x11-fonts-ISO8859-2-75dpi-7.0-1 xorg-x11-fonts-Type1-7.0-1 xorg-x11-fonts-ISO8859-2-100dpi-7.0-1 $rpm -V libfontenc libXfont xorg-x11-font-utils no message Ok, I've reproduced this by copying the bitstream-vera fonts into /tmp/fonts and running: strace mkfontscale > strace.out 2>&1 Examining the log I see similar file not found complaints as you're reporting. What was odd, is that it looks for some files *.enc, and other files as *.enc.gz When you look in the system encodings directories however, *all* of the files are "*.enc.gz". The list of encodings files come from the encodings.dir files present in each of the encodings directories. If you look at the contents of these encodings.dir files, you find entries that seem to be randomly put there, some *.enc, some *.enc.gz, and various of the files simply do not exist at all in the actual system. I attempted to work around the problem by recreating the encodings.dir files with mkfontscale in each encodings directory, by doing: cp encodings.dir encodings.dir.ORIG mkfontscale -e . -n I repeated this in the 'large' dir as well. This created new encodings.dir files in each of the encodings directories, and when mkfontscale was ran on the test font directory I created earlier, the second strace did not show any errors. So, in a pinch, I can work around this bug by manually invoking "mkfontscale -e $encodingdir -n" in each encoding dir in the fonts rpm, which will recreate the proper encodings.dir files in our rpm packaging at least. I'm curious though why this is happening in the first place, and am going to dig into it further. Either the encodings.dir files are getting generated incorrectly in the encodings.*.tar.bz2 build in xorg-x11-fonts, or they're getting generated and discarded, or there are pregenerated bogus encodings.dir files stored in the CVS repo that just get copied into the output dir when building the package. That's my current theory anyway. Will report back shortly with my results. Ok, I've changed the file manifest to mark the encodings.dir files in the encodings directories as %ghost files, so that the rpm package build time encodings.dir files are not used. Then I updated the base-fonts rpm %post script to create the encodings.dir files via mkfontscale at package _install_ time. This is more consistent with how fonts.dir files are created, so I'm hoping it works out to be a better solution. I have tested the updated xorg-x11-fonts-base package locally by installing and removing it, and it now installs encodings.dir files that properly match the *.enc.gz files which are provided by the encodings tarball. There are a few things I'm not 100% certain of however. I'm not sure if these files end up getting updated at runtime when mkfont* get invoked during font rpm package installation/removal or not. So, while this fix fixes the problem reported here, and does so in a manner consistent with our other font file installation and whatnot, it could possibly uncover additional bugs which were dormant. There is a possibility that this could potentially regress OS installation or upgrades, if mkfontscale and mkfontdir act differently now than they have prior to this change. However it is equally possible that this change may also fix other bugs which were caused due to the encodings.dir files being built incorrectly by the X.Org Makefiles. Since there is some potential risk to including this fix in FC5 at this point, I am building test packages outside of rawhide, and will make them available on people.redhat.com for people to test. I will then post to the fedora lists to gather testers to bang on the package(s) and see what if anything breaks. Stay tuned... Created attachment 125179 [details]
diff of spec file changes for peer review
I posted rpm packages for people to test to Fedora devel and test list, and got several people to confirm things work for them with the new packages. Since they work for me too, I'm moving the new xorg-x11-fonts-7.0-2 packages to Fedora Devel today. Fixed in rawhide xorg-x11-fonts-7.0-2 Created attachment 125392 [details]
$/usr/bin/strace mkfontscale -n -e `/usr/share/fonts/japanese/TrueType/ > ~/strace.txt 2>&1
sorry about late response.
$/usr/bin/strace mkfontscale -n -e `/usr/share/fonts/japanese/TrueType/ >
~/strace.txt 2>&1
mkfontscale doesn't find encoding in large directory.
This bug started out as a libfontenc bug, and each fix has uncovered a separate bug/problem. It is prefered to have new bug reports opened for each new bug that pops up so it is easier to track each issue without having to sort through old bug comments that are no longer relevent. I have examined and verified that the encodings.dir files created during package installation time, properly represent the encodings files in the given directory, for both the large and non-large encodings. |