[xorg-x11-xfs] remove chkfontpath calls

Adam Jackson ajax at fedoraproject.org
Tue Jul 5 20:54:54 UTC 2011


commit 06f300a4883d7f1929b51e0afbff74999712c1ae
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Jul 5 16:54:42 2011 -0400

    remove chkfontpath calls

 xfs.init          |   32 --------------------------------
 xorg-x11-xfs.spec |   26 +++++---------------------
 2 files changed, 5 insertions(+), 53 deletions(-)
---
diff --git a/xfs.init b/xfs.init
index 073c4e7..3df3566 100755
--- a/xfs.init
+++ b/xfs.init
@@ -22,40 +22,9 @@ umask 133
 
 prog=xfs
 
-buildfontlist() {
-   pushd . &> /dev/null
-   # chkfontpath output filtering, strips all of the junk output by
-   # chkfontpath that we do not want, including headers, FPE numbers and
-   # whitespace and other junk.  Also filters out FPE's with trailing
-   # modifiers such as ":unscaled" et al.
-   for dir in $(/usr/sbin/chkfontpath --list | sed -e '/^Current/d;s#^[0-9]*: ##g;s#:unscaled$##g;/^[[:space:]]*$/d' | sort | uniq) ;do
-      if [ -d "$dir" ]; then
-         cd "$dir"
-         # If fonts.dir does not exist, or if there are files in the
-         # directory with a newer change time, regenerate fonts.dir, etc.
-         # Using "-cnewer" here fixes bug #53737
-         if [ ! -e fonts.dir ] || [ -n "$(find . -maxdepth 1 -type f -cnewer fonts.dir -not -name 'fonts.cache*' 2>/dev/null)" ]; then
-            rm -f fonts.dir &>/dev/null
-            if ls | grep -iqs '\.ot[cf]$' ; then
-               # Opentype fonts found, generate fonts.scale and fonts.dir
-               mkfontscale . && mkfontdir . &>/dev/null
-            elif ls | grep -iqs '\.tt[cf]$' ; then
-               # TrueType fonts found, generate fonts.scale and fonts.dir
-               ttmkfdir -d . -o fonts.scale && mkfontdir . &>/dev/null
-            elif ls | grep -Eiqsv '(^fonts\.(scale|alias|cache.*)$|.+(\.[ot]t[cf]|dir)$)' ; then
-               # This directory contains non-TrueType/non-Opentype fonts
-               mkfontdir . &>/dev/null
-            fi
-         fi
-      fi
-   done
-   popd &> /dev/null
-}
-
 start() {
    FONT_UNIX_DIR=/tmp/.font-unix
    echo -n $"Starting $prog: "
-   [ -x /usr/sbin/chkfontpath ] && buildfontlist
    # Make sure .font-unix dir, exists.
    if [ ! -d $FONT_UNIX_DIR ]
    then
@@ -88,7 +57,6 @@ rhstatus() {
 reload() {
    if [ -f /var/lock/subsys/xfs ]; then
       echo -n $"Reloading $prog: "
-      [ -x /usr/sbin/chkfontpath ] && buildfontlist
       killproc xfs -USR1
       ret=$?
       echo
diff --git a/xorg-x11-xfs.spec b/xorg-x11-xfs.spec
index 8128808..057900a 100644
--- a/xorg-x11-xfs.spec
+++ b/xorg-x11-xfs.spec
@@ -1,7 +1,7 @@
 Summary: X.Org X11 xfs font server
 Name: xorg-x11-xfs
 Version: 1.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 # NOTE: Remove Epoch line if package gets renamed
 Epoch: 1
 License: MIT
@@ -111,19 +111,6 @@ rm -rf $RPM_BUILD_ROOT
 %pre
 {
   /usr/sbin/useradd -c "X Font Server" -r -s /sbin/nologin -u 43 -d /etc/X11/fs xfs || :
-  # Upgrade path:
-  if [ "$1" -gt "1" ] ; then
-    if [ -e "/usr/X11R6/lib/X11/fs/config" ] ; then
-      cat <<-EOF > "/etc/X11/fs/xfs-migrate"
-	On upgrades, we now must determine if we are upgrading from monolithic
-	xfs or modular xfs by checking for the existance of the old monolithic
-	xfs config file.  If found, we know it is a monolith->modular upgrade,
-	so we set this flag file in order for xfs.init to perform a "restart"
-	instead of a "reload" in the 'condrestart'.  See bug #173271 for
-	details.
-EOF
-    fi
-  fi
 } &> /dev/null || : # Silence output, and ignore errors (Bug #91822)
 
 %post
@@ -141,13 +128,6 @@ EOF
       # Remove Speedo font directories from xfs config if present to avoid
       # bug reports about xfs complaining about empty directories in syslog.
       perl -p -i -e 's#^.*/.*/Speedo.*\n##' $XFSCONFIG
-
-      # On upgrades, remove /usr/X11R6 font path elements from the XFS config file
-      if grep -q "/usr/X11R6/lib/X11/fonts" $XFSCONFIG &> /dev/null ; then
-        for fpe in misc:unscaled 75dpi:unscaled 100dpi:unscaled Type1 ; do
-          perl -p -i -e "s#/usr/X11R6/lib/X11/fonts/${fpe}#%{_x11fontdir}/${fpe}#g" $XFSCONFIG
-        done
-      fi
     fi
   fi ; # End Upgrade section
 }
@@ -209,6 +189,10 @@ EOF
 %{_mandir}/man1/xfsinfo.1*
 
 %changelog
+* Tue Jul 05 2011 Adam Jackson <ajax at redhat.com> 1.1.1-3
+- xfs.init: Redact calls to chkfontpath (#665746)
+- Remove some monolith-to-modular upgrade path leftovers
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.1.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list