This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 477410 - Please convert to new font packaging guidelines
Please convert to new font packaging guidelines
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: comps (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Jeremy Katz
: i18n, Reopened
: 480750 (view as bug list)
Depends On:
Blocks: F11-new-font-rules
  Show dependency treegraph
 
Reported: 2008-12-20 19:31 EST by Nicolas Mailhot
Modified: 2014-03-16 23:16 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-15 13:21:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2008-12-20 19:31:23 EST
This bug has been filed because we've detected your package includes one or several font files:                                                                                                                                                             repoquery -C --repoid=rawhide -f '*.ttf' -f '*.otf' -f '*.pfb' -f '*.pfa' --qf='%{SOURCERPM}\n' |sed -e 's+-[0-9.-]*\.fc[123456789]\(.*\)src.rpm++g'|sort|uniq                                                                                                                                                             Unfortunately the script does not detect symlinks to other packages, so if that's your case, you can close this bug report now.                                                                                                                                                              Otherwise, you should know that:                                                                                                                                                              - Fedora guidelines demand the packaging of fonts in a separate package or subpackage: http://fedoraproject.org/wiki/Packaging/Guidelines#Avoid_bundling_of_fonts_in_other_packages                                                                                - our font packaging guidelines recently changed, and every package that ships fonts must be adapted to the new templates available in the fontpackages-devel package. http://fedoraproject.org/wiki/PackagingDrafts/Fonts_packaging_automation_(2008-11-18) http://fedoraproject.org/wiki/Fedora_fonts_policy_package http://fedoraproject.org/wiki/Simple_fonts_spec_template http://fedoraproject.org/wiki/Fonts_spec_template_for_multiple_fonts                                                                                                                                                              Please make your package conform to the current guidelines in rawhide.                                                                                                                                                             If your package is not principaly a font package, depending on a separate font package or subpackage is the prefered solution. If your application does not use fontconfig you can always package symlinks to the files provided by the font package and installed in the correct fontconfig directories.                                                                                                                                                              It is preferred to make a font package or subpackage per font family, though it is not currently a hard guidelines requirement (it may become before Fedora 11 is released). The definition of a font family is given on http://fedoraproject.org/wiki/Fonts_spec_template_notes/font-family                                                                                                                                                              The new templates should make the creation of font subpackages easy and safe.                                                                                                                                                              The following packages have already been converted and can serve as examples: - andika-fonts - apanov-heuristica-fonts - bitstream-vera-fonts - charis-fonts - dejavu-fonts - ecolier-court-fonts - edrip-fonts - gfs-ambrosia-fonts - gfs-artemisia-fonts - gfs-baskerville-fonts - gfs-bodoni-classic-fonts - gfs-bodoni-fonts - gfs-complutum-fonts - gfs-didot-classic-fonts - gfs-didot-fonts - gfs-eustace-fonts - gfs-fleischman-fonts - gfs-garaldus-fonts - gfs-gazis-fonts - gfs-jackson-fonts - gfs-neohellenic-fonts - gfs-nicefore-fonts - gfs-olga-fonts - gfs-porson-fonts - gfs-solomos-fonts - gfs-theokritos-fonts - stix-fonts - yanone-kaffeesatz-fonts                                                                                                                                                           If you have any remaining questions about the new guidelines please ask them on fedora-fonts-list at redhat.com
Comment 1 Nicolas Mailhot 2008-12-20 19:56:03 EST
[Since the bot made a mess of the text here it is again in properly indented form.]

This bug has been filed because we've detected your package includes one or several font files:

repoquery -C --repoid=rawhide -f '*.ttf' -f '*.otf' -f '*.pfb' -f '*.pfa' --qf='%{SOURCERPM}\n' |sed -e 's+-[0-9.-]*\.fc[123456789]\(.*\)src.rpm++g'|sort|uniq

Unfortunately this script does not detect symlinks to other packages, so if that's your case, you can close this bug report now.

Otherwise, you should know that:

— Fedora guidelines demand the packaging of fonts in a separate package (or subpackage):
http://fedoraproject.org/wiki/Packaging/Guidelines#Avoid_bundling_of_fonts_in_other_packages

— our font packaging guidelines recently changed, and every package that ships fonts must be adapted to the new templates available in the fontpackages-devel package:
  – http://fedoraproject.org/wiki/PackagingDrafts/Fonts_packaging_automation_(2008-11-18)
  – http://fedoraproject.org/wiki/Fedora_fonts_policy_packagehttp://fedoraproject.org/wiki/Simple_fonts_spec_templatehttp://fedoraproject.org/wiki/Fonts_spec_template_for_multiple_fonts

Please make your package conform to the current guidelines in rawhide (you can use the fontpackages package in F9 or F10 to test, but only submit changes to rawhide please).

If your package is not principaly a font package, depending on a separate font package or subpackage is the prefered solution. If your application does not use fontconfig you can always package symlinks to the files provided by the font package and installed in the correct fontconfig directories.

It is preferred to create a font package or subpackage per font family, though it is not currently a hard guidelines requirement (it may become before Fedora 11 is released). The definition of a font family is given on:
http://fedoraproject.org/wiki/Fonts_spec_template_notes/font-family

The new templates should make the creation of font subpackages easy and safe.

The following packages have already been converted by their packager and can serve as examples:
❄ andika-fonts
❄ apanov-heuristica-fonts
❄ bitstream-vera-fonts
❄ charis-fonts
❄ dejavu-fonts
❄ ecolier-court-fonts
❄ edrip-fonts
❄ gfs-ambrosia-fonts
❄ gfs-artemisia-fonts
❄ gfs-baskerville-fonts
❄ gfs-bodoni-classic-fonts
❄ gfs-bodoni-fonts
❄ gfs-complutum-fonts
❄ gfs-didot-classic-fonts
❄ gfs-didot-fonts
❄ gfs-eustace-fonts
❄ gfs-fleischman-fonts
❄ gfs-garaldus-fonts
❄ gfs-gazis-fonts
❄ gfs-jackson-fonts
❄ gfs-neohellenic-fonts
❄ gfs-nicefore-fonts
❄ gfs-olga-fonts
❄ gfs-porson-fonts
❄ gfs-solomos-fonts
❄ gfs-theokritos-fonts
❄ stix-fonts
❄ yanone-kaffeesatz-fonts

If you have any remaining questions about the new guidelines please ask them on:
fedora-fonts-list at redhat.com
Comment 2 Caius Chance 2009-01-08 23:04:25 EST
built

http://koji.fedoraproject.org/koji/buildinfo?buildID=77796
Comment 3 Nicolas Mailhot 2009-01-09 10:42:54 EST
Please use the %_font_pkg macro; its an integral part of the official font
packaging guidelines.

Behdad requested an end to all the variations around fontconfig caching, so he does not have to check every font package for fontconfig breakage. The %_font_pkg macro puts all this stuff in a single package he can easily audit
Comment 4 Nicolas Mailhot 2009-01-11 10:19:43 EST
To help packagers manage the transition to the new guidelines, we've published the following FAQ

http://fedoraproject.org/wiki/Shipping_fonts_in_other_packages_(FAQ)
Comment 5 Nicolas Mailhot 2009-01-14 13:37:19 EST
FPC approved those two additional guidelines recently, please take them into account if you need to create or update a fonts package or subpackage:

– 2009-01-14: naming
http://fedoraproject.org/wiki/PackagingDrafts/Font_package_naming_%282009-01-13%29

— 2009-01-06: exact splitting rules
http://fedoraproject.org/wiki/PackagingDrafts/Font_package_splitting_rules_%282008-12-21%29

(packagers that can drop font files and just depend on an existing font package are not impacted)
Comment 6 Caius Chance 2009-01-19 01:13:56 EST
renamed and rebuilt with %_font_pkg macro

http://koji.fedoraproject.org/koji/buildinfo?buildID=79292
Comment 7 Nicolas Mailhot 2009-01-19 19:18:00 EST
Some QA review:

1. the Microsoft font names are likely to be trademarked to hell, I hope someone checked with spot when they were added to the package description

2. the URL should probably be changed to the new fedorahosted Liberation homepage

3.
Requires:         %{name}-sans >= %{version}-%{release}
Requires:         %{name}-serif >= %{version}-%{release}
Requires:         %{name}-mono >= %{version}-%{release}

is going to create a huge mess. You don't have any packages named %{name}-foo anymore, so package resolvers won't know what to do

4. If you want to create an upgrade path (good idea!) I suggest you do it in a compat package like dejavu, vera and mgopen. The advantage of a compat package is it has a different package name, so you don't mix past and present names, and is obviously going away someday, so people won't expect you to keep it forever

For example the new vera spec includes:

%package compat
Summary: Bitstream Vera, compatibility
Group:   User Interface/X

Obsoletes: bitstream-vera-fonts < 1.10-9
Requires:  %{fontname}-sans-fonts, %{fontname}-serif-fonts, %{fontname}-sans-mono-fonts

%description compat
This package only exists to help transition pre 1.10-9 Bitstream Vera users to
the new package split. It will be removed after one distribution release cycle,
please do not reference it or depend on it in any way.

[…]

%files compat

IIRC the empty %files is needed for rpm to create an empty subpackage

5. this is somewhat confusing, but you do not need for the common subpackage to be named foo-common-fonts. I realise I hadn't really explained this point, so I've added
http://fedoraproject.org/wiki/Shipping_fonts_in_Fedora_%28FAQ%29#Why_is_the_common_subpackage_in_the_multi-font-families_templates_named_foo-fonts-common_and_not_foo-common-fonts.3F

to the FAQ. You're not the first one to ask/make the mistake
(though it's mainly cosmetical)

6. Liberation is a bit special. It has specific fontconfig rules in fontconfig itself to handle MS fonts substitution, so Behdad would like you not to include fontconfig files in your liberation package (but do add them to non-Liberation packages). Vera had the same treatment when it mattered and so our vera package does not include fontconfig rules either

7. you do not need to require fontpackages-filesystem in the font subpackages, they require the common subpackage and it requires in turn fontpackages-filesystem do all is going to be well

8. you do not need to repeat the License info in each subpackage, if you don't list it the value of the main License declaration is going to be inherited by subpackages (you can check by doing a less on the package files once they're built)

(you should not need to repeat Group either but this problem has only be fixed recently in a rpm version not available on our builders)

9. you should not 
Obsoletes:    %{name}-foo < %{version}-%{release}

in your font subpackage, but Obsolete packages older than the particular version where the renaming occured. For liberation probably

Obsoletes:    %{name}-foo < 1.04.93-4

10. The summary of your serif package has a problem, Liberation serif is not a sans-serif font

11. someday you really need to build the ttf from sfds in %build. In the meanwhile at least use the -p flag when installing the ttf files
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}

12. what's the purpose of the cd ../ in the middle of %install?

13. you should probably create %{buildroot}%{catalogue} the same way the other directories were created at the beginning of %install

And that's all for this package. I don't have the time to look at baekmuk today, but I suppose a lot of the remarks apply to it too
Comment 8 Caius Chance 2009-01-19 20:12:48 EST
Hi spot, what would be your comment about mentioning Microsoft's font name in liberation-fonts' descriptions?
Comment 9 Caius Chance 2009-01-19 21:18:50 EST
(In reply to comment #7)
> And that's all for this package. I don't have the time to look at baekmuk
> today, but I suppose a lot of the remarks apply to it too

I'll refine the baekmuk first. Thanks a lot.
Comment 12 Tom "spot" Callaway 2009-01-20 10:56:26 EST
(In reply to comment #8)
> Hi spot, what would be your comment about mentioning Microsoft's font name in
> liberation-fonts' descriptions?

Yeah, I think this is fine. You should not use any trademark symbols here, but the way these trademarks are used is well within the realm of fair use.
Comment 13 Nicholas Wourms 2009-01-20 11:01:10 EST
You switched back to the fonts-common package name but you forgot to change the Requires: to reflect this change. Do you even bother trying to install the packages after you make the changes?
Comment 14 Caius Chance 2009-01-20 18:04:54 EST
thanks mclasen: http://koji.fedoraproject.org/koji/buildinfo?buildID=79588
Comment 15 Caius Chance 2009-01-20 18:44:28 EST
*** Bug 480750 has been marked as a duplicate of this bug. ***
Comment 16 Caius Chance 2009-02-03 21:15:15 EST
latest: http://koji.fedoraproject.org/koji/buildinfo?buildID=79588
Comment 17 Caius Chance 2009-02-03 21:45:51 EST
hi rel-eng, please rename rpm in comps.xml from 'liberation-fonts' to 'liberation-fonts-compat':

http://koji.fedoraproject.org/koji/buildinfo?buildID=81453
Comment 18 Bill Nottingham 2009-02-04 14:19:05 EST
As the package maintainer, you can do that...
Comment 19 Caius Chance 2009-02-15 13:21:07 EST
comps.xml is updated
close this bug

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