Archive:PackagingDrafts/Fonts packaging automation (2008-11-18)
It is a follow-up on PackagingDrafts/Fonts spec template correction (fontconfig), discussed by FPC on 2008-10-21.
As proposed then fontconfig upstream has been contacted by mail and bugzilla to state its position on the location of configuration templates, but has not responded so far. The Fedora fontconfig maintainer, however, feels upstream has been given enough notification and Fedora should move on.
Meanwhile, several new font reviews have made it clearer that there is an actual need to provide font packagers with supporting macros, which was one of FPC's suggestions. This revised proposal implements a set of macros to simplify execution and future evolution of font packaging guidelines.
What this proposal is not
This proposal does not codify any specific policy to split font packages
It is plumbing that works both with split and un-split packages, both with the current use common sense policy and with the alternatives being discussed right now. While there is significant opposition to splitting every font package along font family lines, no one has articulated a rule that didn't exempt both packages people felt should not be split (liberation) and packages people felt should be split so far. When/if there is a consensus about wording, it will be submitted to FPC separately (it may be that we'll end up with split every package along font family lines + explicit package exception list).
All the existing and considered splitting policies result in a mix of split and not-split packages, so those two cases need to be industrialised regardless of what our splitting policy finally becomes.
This proposal does not introduce macros where there were none
The main macro, %_font_pkg, is a sanitized version of a macro that was found in existing Fedora packages. There are probably half a dozen if not more variants of this macro in the repository, all with different tweaks, bugs and drawbacks. This proposal attempts to bring this macro proliferation under control, by consolidating on a single audited version instead of having different packagers reinvent the wheel (badly). The other macros are simple directory macros that consist of the directory definitions we re-define in every font spec right now complemented by the new directories proposed in the approved PackagingDrafts/Fonts spec template correction (fontconfig) (as per FPC suggestion).
This proposal is not adherent to a particular rpm version or distribution release
The proposed packages are completely self-contained, do not depend on a particular rpm or redhat-rpm-config packages. They could be deployed and later removed from different versions of the distribution or even other distributions without side-effects to the base system. In fact, they do not contain Fedora at all, except for a documentation reference to the Fedora wiki. They do depend on the fontconfig version present in a particular distribution, and should be adapted to its capabilities (fc-cache arguments, generic font families it defines, directories it uses) before deployment. Those potential adaptations are not likely to be important or difficult, however.
What this proposal is
It is a set of rpm macros (4 directory macros + 1 code macro) that define directories used by font packages and automate the way they're commonly used. They are complemented by two new spec templates (one with subpackages, one without) showing how to use them, and a set of fontconfig templates.
Thus, font packaging bits currently dispersed in the Fedora wiki, the filesystem package, the rpmdevtools package, the fontconfig package, and individual font packages, have been consolidated in a central place where it's easy for packagers to find them, and for guideline writers to maintain them.
A set of font packages has been rebuilt using those templates and macros to shake out typos and other bugs. They're all packages of the author of this proposal, and no guideline or other packager was harmed during this operation. This is all within the discretion limits existing Fedora packagers commonly enjoy. It is not asked of FPC whether this should or should not have been done, but if the plumbing used is sane enough to be offered as a recommendation to other Fedora font packagers.
Both Behdad Esfahbod and Jens Petersen have reviewed those files and expressed approval. They both complained about the unsatisfactory state of existing guidelines previously, saying that they pushed too much complexity to the font packager side.
Ville Skyttä was notified too, but didn't provide any feedback.
An RFC was sent to the fedora-devel and fedora-fonts lists.
If FPC approves this proposal:
- fontpackages will be proposed as a fedorahosted project done
- the resulting package will be proposed for inclusion in Fedora 11 475593
- the filesystem maintainer will be asked to remove the directory definitions moved to fontpackages-filesystem
- the rpmdevtools maintainer will be asked to remove the font packaging templates moved to fontpackages-devel
- the fontconfig package will be rebuilt using the directory definitions provided by fontpackages-devel
- the Fedora wiki will be updated to mirror the new packaging templates
- a fontpackages variant will be pushed to Fedora 9 and 10 to allow building new font packages for those distributions with minimal changes from the Fedora 11 packages.
- fontpackages will be added to the Fedora 11 font-design group