From Fedora Project Wiki

No edit summary
No edit summary
Line 1: Line 1:
{{draft}}
{{draft}}


The current [[Fonts_spec_template_for_multiple_fonts| Complex Font Template]] leaves an unexpanded macro in SRPMS. There's several proposed fixes.
The current [[Fonts_spec_template_for_multiple_fonts| Complex Font Template]] leaves an unexpanded macro in SRPMS. We propose to take two actions to fix the issue


== Move the macro ==
== Move the macro ==
Line 10: Line 10:
Currently is right after the <code>%description</code> which is what causes issues.  Moving it after the <code>%clean</code> section matches with the [[Simple_fonts_spec_template| Simple Fonts Template]], is where the expansion of the macro would normally live, and fixes the problem.
Currently is right after the <code>%description</code> which is what causes issues.  Moving it after the <code>%clean</code> section matches with the [[Simple_fonts_spec_template| Simple Fonts Template]], is where the expansion of the macro would normally live, and fixes the problem.


== Use it conditionally ==
This will resolve the problem in new packages.
<pre>
%{?_font_pkg: %_font_pkg -n <FAMILY> -f %{fontconf}-<FAMILY>.conf <NAME>*.ttf}
</pre>


Would also keep it from showing up in the SRPM.  However, reviewers would need to be familiar with font packaging to be able to tell that this macro isn't expected to show up in the <code>%description</code>.
== Add a Dummy Macro ==
Add a "dummy" %_font_pkg macro to redhat-rpm-config which checks to see if it is set, and if not, evaluates to %{nil}.
[https://bugzilla.redhat.com/show_bug.cgi?id=564613#c4 As suggested by Panu]


== Fix the tools ==
This would mean that existing packages would no longer have the issue and would be effectively "grandfathered".
 
[https://bugzilla.redhat.com/show_bug.cgi?id=564613#c4 As suggested by Panu]


[[Category:Packaging guidelines drafts]]
[[Category:Packaging guidelines drafts]]

Revision as of 21:57, 3 March 2010

Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

The current Complex Font Template leaves an unexpanded macro in SRPMS. We propose to take two actions to fix the issue

Move the macro

 %_font_pkg -n <FAMILY> -f %{fontconf}-<FAMILY>.conf <NAME>*.ttf

Currently is right after the %description which is what causes issues. Moving it after the %clean section matches with the Simple Fonts Template, is where the expansion of the macro would normally live, and fixes the problem.

This will resolve the problem in new packages.

Add a Dummy Macro

Add a "dummy" %_font_pkg macro to redhat-rpm-config which checks to see if it is set, and if not, evaluates to %{nil}. As suggested by Panu

This would mean that existing packages would no longer have the issue and would be effectively "grandfathered".