PackagingDrafts/Fonts spec template correction: fontconfig (2008-10-12)

From FedoraProject

< PackagingDrafts
Revision as of 17:54, 7 December 2008 by Nim (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The Fedora Fonts Special Interest Group


This is a modification proposal for our official fonts spec template.

Contents

Current situation

In the interest of KISS, and since upstream's conf.avail/conf.d feels un-fedorish (we filter apache conf.d on extension for example), the template currently installs fontconfig rules directly in %{_sysconfdir}/fonts/conf.d.


 %define fontconfdir %{_sysconfdir}/fonts/conf.d
 …
 %install
 …
 install -m 0755 -d %{buildroot}%{fontconfdir}
 install -m 0644 -p %{SOURCE1} %{buildroot}%{fontconfdir}/…-%{fontname}.conf
 …
 %files
 …
 %config(noreplace) %{fontconfdir}…-%{fontname}.conf

(This has been good enough for some of our major font packages for a long time).

Problem

However our fontconfig package does deploy upstream's conf.avail/conf.d separation. And users have started have started filling bugs on packages that do not follow this rule. Anything user-visible is a problem.

Proposed change

In the interest of stemming the potential user report flood, and since adhering closely to upstream is generally considered good, I propose to change the template in

 %define fontconfdir %{_sysconfdir}/fonts/
 …
 %install
 …
 install -m 0755 -d %{buildroot}%{fontconfdir}conf.{avail,d}
 install -pm 0644 -p %{SOURCE1}\
         %{buildroot}%{fontconfdir}conf.avail/…-%{fontname}.conf
 …
 pushd %{buildroot}%{fontconfdir}conf.d
   ln -s ../conf.avail/*.conf .
 popd
 …
 %files
 …
 %config            %{fontconfdir}conf.avail/…-%{fontname}.conf
 %config(noreplace) %{fontconfdir}conf.d/…-%{fontname}.conf

Comments

Using %config without noreplace on %{fontconfdir}conf.avail will make rpmlint barf. Its content should probably be moved to /usr/share/fontconfig, though it's useless to mandate it in font packages if our fontconfig package (and probably upstream) are not fixed at the same time.

Also /etc/fonts/conf.d is provided by filesystem but %{fontconfdir}conf.avail (or usr/share/fontconfig) are not, so filesystem needs to be modified to follow whatever scheme this guideline end up recommending.

See also

466667

FPC minutes

This proposal was discussed the 2008-10-21.