Bug 53737

Summary: XFS restart doesn't always rebuild font directories
Product: [Retired] Red Hat Public Beta Reporter: Stephen Tweedie <sct>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: roswell   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-09-17 14:03:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Tweedie 2001-09-17 14:03:29 UTC
Description of Problem:

"service xfs restart" does not always update the font directories correctly
if new fonts have been added.  Specifically, if new font files are added
from an archive which preserves timestamps, then the font directories will
not be updated.  This is due to the /etc/rc.d/init.d/xfs script:

       elif [ "x$(find . -type f -newer fonts.dir 2>/dev/null)" != "x" ];then
            NEEDED=yes

"find -newer" returns true if the mtime of any font file is newer than the
mtime of the fonts.dir directory file.  However, many methods of copying
files across will preserve mtime of the original file, so that the mtime of
the new font file will be older than that of fonts.dir despite the fact
that the file has been recently installed.  Testing the ctime of the font
files would be much more reliable, via "find -cnewer"

I discovered this after running the commonly-available "webFonts.sh" script
to install the Microsoft TrueType Webfonts into
/usr/share/fonts/default/TrueType: the "cabextract" utility which extracts
those font files preserves the mtime of the original font files, and so xfs
failed to rebuild the font directories until I manually removed fonts.dir.
 That should not be necessary.

Version-Release number of selected component (if applicable):
XFree86-xfs-4.1.0-3

How Reproducible:
100%

Steps to Reproduce:
1. Run webFonts.sh, or use "cp -p" to copy a font file into an xfs font
dir, or use "tar" to unpack a font archive, or any other way of creating a
new font file which preserves mtime.

2. Restart xfs.

Actual Results:
fonts.dir is not updated so the new fonts are not served by XFS.

Expected Results:
The new fonts should be available to X: fonts.dir should be rebuilt.

Comment 1 Mike A. Harris 2001-09-18 07:19:57 UTC
Thanks sct.  Fixed internally, will be in future release.