Bug 491510 - [Tracker] rpm font autoprovides are missing some font types
[Tracker] rpm font autoprovides are missing some font types
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On: 491594 491595 491596 491597
Blocks: F11Target 491954 491956 491957 491958 491959 491961 491962 491963 491964 491965 491966 491968 491969 491970 491971 491972 491973 491974 491975 491976
  Show dependency treegraph
Reported: 2009-03-22 08:35 EDT by Nicolas Mailhot
Modified: 2009-03-25 01:49 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 491594 491595 491596 491597 (view as bug list)
Last Closed: 2009-03-25 01:49:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2009-03-22 08:35:41 EDT
The new font autoprovides are working well for some font formats but are not processing others:
1. ttc files: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1026593
2. pfa files: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1126190
3. compressed pcf fonts: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1054305
(and probably plain pcf fonts though I could not locate a pcf package that was properly converted yet)
Comment 1 Nicolas Mailhot 2009-03-22 08:52:40 EDT
Also, it seems to fail even for plain ttf files, when they have a space in their name: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1055798
Comment 2 Panu Matilainen 2009-03-23 02:28:14 EDT
The problem with .ttc and .pfa is that neither is seen as font data by libmagic:
[pmatilai@localhost cjkuni-ukai-fonts-0.2.20080216.1]$ file ukai.ttc 
ukai.ttc: data
[pmatilai@localhost culmus-0.102]$ file YehudaCLM-Bold.pfa
YehudaCLM-Bold.pfa: PostScript document text

These should be treated filed against "file" (libmagic), rpm will recognize them as fonts as soon as libmagic does.

Compressed files aren't currently being looked into. I initially enabled it when enabling the font provide stuff but it blew up at least openoffice.org build due to leaking file descriptors someplace (probably libmagic but haven't had a chance to look at it).

Spaces in filenames causing issues is likely to be something entirely different, lets not pile things up.
Comment 3 Nicolas Mailhot 2009-03-23 04:31:25 EDT
Ok, let's split this
Comment 4 Nicolas Mailhot 2009-03-23 18:30:35 EDT

For some reason this still does not work for culmus-fonts pfa files, even though file now correctly identifies them

$ file /usr/share/fonts/culmus/MiriamMonoCLM-BookOblique.pfa
/usr/share/fonts/culmus/MiriamMonoCLM-BookOblique.pfa: PostScript Type 1 font text
Comment 5 Jeff Johnson 2009-03-23 20:33:14 EDT
rpm used to have a private copy of /usr/share/magic,
so it may not be enough to fix file*(1).

Same patch to rpm's version of /usr/share/magic is all
that is needed.

Space in file paths is just ho-hum tedium yes ...
Comment 6 Panu Matilainen 2009-03-24 03:05:46 EDT
Oh I see, " text" happens to be before " [Ff]ont" in the matching order so "foo font text" gets classified as text. PFA isn't the only font type affected by this either. Will fix...
Comment 7 Panu Matilainen 2009-03-24 03:57:40 EDT
...and fixed in rpm-4.7.0-0.beta1.7.fc11.
Comment 8 Panu Matilainen 2009-03-25 01:49:26 EDT
AFAICS we're all done here...

Note You need to log in before you can comment on or make changes to this bug.