Bug 629943 - Fontmap.local file created by package is never used
Summary: Fontmap.local file created by package is never used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ghostscript
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: QE Internationalization Bugs
URL:
Whiteboard:
Depends On: 610301
Blocks: 629941
TreeView+ depends on / blocked
 
Reported: 2010-09-03 11:00 UTC by Tim Waugh
Modified: 2011-01-13 22:07 UTC (History)
3 users (show)

Fixed In Version: ghostscript-8.70-5.el5
Doc Type: Bug Fix
Doc Text:
Although the Fontmap.local configuration file was created in the /etc/ghostscript/8.71/ directory during the installation, it was not read by the gs utility. This error has been fixed, and Ghostscript now reads the configuration file as expected.
Clone Of: 610301
Environment:
Last Closed: 2011-01-13 22:07:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0137 0 normal SHIPPED_LIVE ghostscript bug fix and enhancement update 2011-01-12 19:26:44 UTC

Description Tim Waugh 2010-09-03 11:00:00 UTC
Will also affect ghostscript-8.70 in Red Hat Enterprise Linux 5.6, and cause a regression compared with 5.5.

+++ This bug was initially created as a clone of Bug #610301 +++

Description of problem:
The spec file for the ghostscript package creates the following
three files in /etc/ghostscript/8.71:
  cidfmap.local
  CIDFnmap.local
  Fontmap.local

The files under /etc/ghostscript are important because they are
the only ones marked as %config(noreplace), and so if you make
customizations to the system-wide files in
/usr/share/ghostscript/8.71/Resource/Init, they may be clobbered
if the upstream version of the file changes.

The system-wide cidfmap and CIDFnmap files contain lines like
these at the end:

% must be at the bottom of line to allow people overriding everything.
(cidfmap.local) .runlibfileifexists

% must be at the bottom of line to allow people overriding everything.
(CIDFnmap.local) .runlibfileifexists

No such line exists at the end of the global Fontmap file.  As a
result, making customizations in the obvious place (the
/etc/ghostscript/8.71/Fontmap.local file that the package helpfully
creates for you) results in your customizations never being read
in by gs.

Version-Release number of selected component (if applicable):
8.71-6.fc11.x86_64, 8.71-9.fc13.x86_64, and presumably also the
current versions in F12 and Rawhide

Steps to Reproduce:
1. yum install ghostscript strace
2. strace gs >/tmp/gstrace 2>&1
3. search for Fontmap in /tmp/gstrace with your favorite editor
   and note that several locations including /etc/ghostscript and
   /etc/ghostscript/8.71 are searched for a file called Fontmap,
   but Fontmap.local is never tried
  
One way to tackle this would be to patch the upstream Fontmap
file to add something like this to the end of the global file:
(Fontmap.local) .runlibfileifexists
I recommend this solution.

Another approach would be to discontinue creating the
/etc/ghostscript/8.71/Fontmap.local file and instead create
one named Fontmap.  However, all systems with ghostscript
already installed may still have the Fontmap.local file present
and be confused when they try to use it.

--- Additional comment from twaugh on 2010-09-03 06:58:04 EDT ---

The patch to get ghostscript to read Fontmap.local was dropped after ghostscript-8.15.4-3.fc7.  I think that was just a mistake at the time -- those files were reorganised upstream.

Thanks for reporting it.

Comment 2 Tim Waugh 2010-09-22 12:11:31 UTC
Note: we'll also need to pull in the .runlibfileifexists fix from bug #610301.

Comment 3 Tim Waugh 2010-09-24 11:17:50 UTC
Test case:

1. Just run 'gs </dev/null' on its own and check there are no error messages
2. tail -n1 /usr/share/ghostscript/8.70/Resource/Init/Fontmap
should give:
(Fontmap.local) .runlibfileifexists

Comment 5 Jaromir Hradilek 2010-10-05 09:02:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Although the Fontmap.local configuration file was created in the /etc/ghostscript/8.71/ directory during the installation, it was not read by the gs utility. This error has been fixed, and Ghostscript now reads the configuration file as expected.

Comment 11 errata-xmlrpc 2011-01-13 22:07:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0137.html


Note You need to log in before you can comment on or make changes to this bug.