[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: .Q: Best Practice for dir owneership

On Sun, 2006-08-13 at 22:58 +0200, Jochen Schmitt wrote:

> I have a special problem with a package which I have submitted
> for review at BZ #174021. This package contains two subpackages
> with fonts. the first subpackage conatins trutype fonts which
> should installed at %{_datadir}/fonts/apl/TrueType. The second
> conains classic X11 bitmap fonts which shluld installed on
> %{_datadir}/fonts/apl/pcf. In comment #28 there was a suggestion
> to put the X11 fonts to %{_datadir}/X11/fonts/apl but I think
> only the core fonts on the X11 system should put into
> %{_datadir}/X11/fonts, so I want to keep the X11 fonts into
> %{_datadir}/fonts/apl/pcf.

Having only X11 core packages messing around with %{_anydir}/X11 makes
sense to me.

> Now there is the directory %{_datadir]/fonts/apl which is not
> owned by any package. 

You package is named "aplus-fsf". I suppose the "apl" in that directory
name stands for "aplus"? IMHO abbreviating package name does not make
much sense here.

IMHO, the cleanest solution in the absence of any official policy is to
have the package %{name} with the fonts depend on the fontconfig package
which owns the %{_datadir}/fonts directory and then install a directory
%{_datadir}/fonts/%{name} owned by the %{name} package.

The scriptlets of the %{name} package will then call fc-cache for
scalable fonts to register them with fontconfig.

For non-fontconfig programs (such as xfontsel, xterm, etc.), AFAICT you
need to call mkfontdir (from the xorg-x11-font-utils package) and
chkfontpath (from the chkfontpath package) to register the bitmap fonts
with the X11 fontserver. At least that is what I had to do to get my
terminus package (#202356) to work with xterm.

> My question now, what is the best practice to solve this problem.

Non-representative examination of existing packages:

The bitstream-vera-fonts package installs all its fonts in
   %{_datadir}/fonts/bitstream-vera and then calls fc-cache.

The bitmap-fonts package installs all its fonts in
   %{_datadir}/fonts/bitmap-fonts and then calls fc-cache.

The gnome-print package just drops a bunch of .afm files into
   %{_datadir}/fonts/afms/adobe/ without any package owning the "afms"
   or "adobe" directories and
   calls /usr/bin/redhat-update-gnome-font-install.

So I'd say that owning and installing into %{_datadir}/fonts/%{name} is
a safe bet.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]