IMPORTANT: font package owners - modular X required changes

Mike A. Harris mharris at redhat.com
Sat Nov 5 13:08:12 UTC 2005


Modular X does not use /usr/X11R6 anymore.  As such, the binaries
once supplied in /usr/X11R6/bin are now located in /usr/bin.  This
applies to all modular X binaries, including applications like
mkfontdir, mkfontscale, ucs2any, bdftruncate, etc.

Most of the font rpm packages in the distribution invoke one or
more of these font utilities in their rpm processing scripts.

Any of these scripts which let the shell search the PATH for the
executables, or use "MKFONTDIR=$(which mkfontdir)" and then invoke
$MKFONTDIR instead of hard coding a path, should continue to work
with modular X without changes.

Scripts which hard code the path to mkfontdir, mkfontscale, or
other binaries found in /usr/X11R6/bin in rpm scripts, or in
%build or %install sections of spec files, or even in Makefiles
or other build or runtime scripts, etc. - should be updated to
do one of the following:

1) Use "which" to find the location of the binary, and store it
    in a variable, then invoke the app using the variable instead.

or

2) Change the code to rely on the shell's PATH, if that makes sense
    for the particular case, and does not create a security issue
    or other problem.

or

3) Hard code several paths to check for the binary, within the
    script/application, and have it check them all.  ie: Check
    for /usr/bin/mkfontdir, and fallback to /usr/X11R6/bin/mkfontdir,
    etc.

In addition to this, many rpm spec files include dependencies on
hard coded paths to executable files like mkfontdir et al.  For
example, many spec files contain:

Requires: /usr/X11R6/bin/mkfontdir

or similar, since the application has moved from package to package
over the years.  In order to permanently solve this problem, I have
added virtual "Provides: mkfontdir mkfontscale ucs2any bdftruncate"
to the modular X package which provides these utilities.  I have also
added the same Provides to the monolithic xorg-x11 which was built
in rawhide tonight.  Future Fedora Core 3 and 4 xorg-x11 updates will
also add these virtual provides.

Please update your packages to use:

BuildRequires: mkfontdir

and/or

Requires: mkfontdir

wherever appropriate.

By making these changes to your rpm spec files, Makefiles, etc., your
packages will become "future-proofed" to whatever currently unforseen
changes might occur in X packaging a year or more down the line.  By
including virtual provides in our next set of updates, it will also
make it a bit easier to keep compatiblity with existing OS releases
that have been updated to the latest updates, once we release them.

Hopefully these changes will help to make packagers lives easier
in the future, by never having to make similar changes ever again,
so long as everyone follows the above recommendations.

This email has been sent to fedora-devel-list, and the primary
Red Hat internal development list.  If anyone would like to see
it posted to other lists as well, please forward this email to
any other list that you feel the information would be useful to.

Thanks in advance.
TTYL




More information about the devel mailing list