Bug 477447 - [python-tgcaptcha] Please convert to new font packaging guidelines
[python-tgcaptcha] Please convert to new font packaging guidelines
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python-tgcaptcha (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Luke Macken
Fedora Extras Quality Assurance
:
Depends On: 489117
Blocks: F11-new-font-rules
  Show dependency treegraph
 
Reported: 2008-12-20 19:37 EST by Nicolas Mailhot
Modified: 2009-04-08 11:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-08 11:30:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch to use system installed tuffy font (2.22 KB, patch)
2009-02-25 01:52 EST, Toshio Ernie Kuratomi
no flags Details | Diff
Updated spec file to work with system installed fonts (1.84 KB, application/octet-stream)
2009-02-25 01:53 EST, Toshio Ernie Kuratomi
no flags Details

  None (edit)
Description Nicolas Mailhot 2008-12-20 19:37:47 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:56 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 Nicolas Mailhot 2009-01-11 10:20:13 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 3 Nicolas Mailhot 2009-01-14 13:37:52 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 4 Nicolas Mailhot 2009-02-18 14:32:48 EST
This is a reminder for all the packagers that still have bugs open about adapting to font packaging guidelines there is only one month left before Fedora 11 beta:
http://fedoraproject.org/wiki/Releases/11/Schedule

A week of this month will see the Fedora 11 mass rebuild, that will load the build farm:
http://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

As already converted packages showed it is quite possible to make mistakes during the conversion. Please make releng and QA happy and don't wait till the last minute to do your changes (avoid pre-beta panic). If possible start before the mass rebuild so we don't burn cycles on incorrect packages.

The PackageKit enhancements stated for Fedora 11 assume fonts and font-using packages are sane (basically respect packaging guidelines). It is quite possible that not-converted packages will interact with the F11 font autoinstall feature in "interesting" ways.
http://fedoraproject.org/wiki/Features/AutomaticFontInstallation

We don't want that

There is extensive documentation on the wiki and most of your questions have likely already been answered there. Please do read the FAQ before making more work for the support team by asking questions answered there.
http://fedoraproject.org/wiki/Shipping_fonts_in_Fedora_%28FAQ%29
Comment 5 Toshio Ernie Kuratomi 2009-02-25 01:50:30 EST
I got started on this but don't have time to finish it ATM.  Luke, Felix, do either of you have time to work on this?  Here's what has to be done:

 * tgcaptcha has to be patched to search for the tuffy font in the system font path.  I'll attach an untested patch to do that.  If it works, it should be suitable for sending upstream as well.
 * tgcaptcha needs to not install the tuffy font.  I'll attach a new spec file to do that.

 * tulrich-tuffy-fonts package needs to be created.  I have the beginnings of a spec and a fontconfig file for that but couldn't get it to mock build (I can't get python-tgcaptcha to build right now either so it might be some more general problem... not sure.)  The SRPM is at http://toshio.fedorapeople.org/packages/tulrich-tuffy-fonts-1.1-1.fc10.src.rpm
Comment 6 Toshio Ernie Kuratomi 2009-02-25 01:52:14 EST
Created attachment 333137 [details]
patch to use system installed tuffy font

This patch first checks the paths currently specified for the font file.  If it isn't in any of those, it then checks /usr/share/fonts/tuffy/Tuffy.ttf
Comment 7 Toshio Ernie Kuratomi 2009-02-25 01:53:59 EST
Created attachment 333138 [details]
Updated spec file to work with system installed fonts

This updated spec file applies the patch to use a system installed tuffy font and removes the font files in the build step so they won't be installed from the package.
Comment 8 Felix Schwarz 2009-03-03 02:31:57 EST
I started working on that. Found some smaller problems which I try to resolve:
* tuffy rpm did not built for me on F11 as well. fontforge complained about $argc in the while loop - probably some escaping issue. I worked around this by extracting the fontforge script for now.
* The /usr/share path for tuffy in tgcaptcha is wrong because it's now tulrich-tuffy
* We need to delete to ttf files from the tgcaptcha tar.gz before building, otherwise they will be still included.
Comment 9 Nicolas Mailhot 2009-03-03 03:27:34 EST
(In reply to comment #8)
> I started working on that. Found some smaller problems which I try to resolve:
> * tuffy rpm did not built for me on F11 as well. fontforge complained about
> $argc in the while loop - probably some escaping issue. I worked around this by
> extracting the fontforge script for now.

http://www.redhat.com/archives/fedora-fonts-list/2009-February/msg00076.html
Comment 10 Felix Schwarz 2009-03-07 15:07:20 EST
I filed bug 489117 to get the tuffy fonts into Fedora. In the meanwhile, I updated python-tgcaptcha. New SRPM is online: http://www.felix-schwarz.name/files/misc/2009/tgcaptcha/review/python-tgcaptcha-0.11-6.fc11.src.rpm

When/if tuffy is in Fedora, I can update CVS for python-tgcaptcha.
Comment 11 Felix Schwarz 2009-04-08 11:30:36 EDT
New package built successfully: http://koji.fedoraproject.org/koji/taskinfo?taskID=1285504

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