Bug 491510 - [Tracker] rpm font autoprovides are missing some font types
Summary: [Tracker] rpm font autoprovides are missing some font types
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
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
TreeView+ depends on / blocked
 
Reported: 2009-03-22 12:35 UTC by Nicolas Mailhot
Modified: 2009-03-25 05:49 UTC (History)
7 users (show)

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


Attachments (Terms of Use)

Description Nicolas Mailhot 2009-03-22 12:35:41 UTC
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 12:52:40 UTC
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 06:28:14 UTC
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 08:31:25 UTC
Ok, let's split this

Comment 4 Nicolas Mailhot 2009-03-23 22:30:35 UTC
Panu,

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-24 00:33:14 UTC
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 07:05:46 UTC
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 07:57:40 UTC
...and fixed in rpm-4.7.0-0.beta1.7.fc11.

Comment 8 Panu Matilainen 2009-03-25 05:49:26 UTC
AFAICS we're all done here...


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