Bug 491510

Summary: [Tracker] rpm font autoprovides are missing some font types
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: behdad, ffesti, fonts-bugs, jnovy, n3npq, pmatilai, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Bug Depends On: 491594, 491595, 491596, 491597    
Bug Blocks: 446451, 491954, 491956, 491957, 491958, 491959, 491961, 491962, 491963, 491964, 491965, 491966, 491968, 491969, 491970, 491971, 491972, 491973, 491974, 491975, 491976    

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...