From 05f68898a18c6f07a7ad98d74de29e43c5d3e82e Mon Sep 17 00:00:00 2001 From: mharris Date: Nov 15 2005 21:11:50 +0000 Subject: - Updated xfs pre script to check for the existance of the old monolithic /usr/X11R6/lib/X11/fs/config xfs config file, and set a migration flag file. - Updated xfs.init to check for the existance of the migration flag file, and perform an xfs 'restart' instead of a 'reload' if migrating. Users will now have to restart their X server, or reconnect the xfs server to the X server after a migration to modular X. - Changed upgrade comparison typo from 2 to 1 in xfs post script. --- diff --git a/xfs.init b/xfs.init index f19e034..00b4906 100755 --- a/xfs.init +++ b/xfs.init @@ -1,6 +1,6 @@ #!/bin/bash # -# $Id: xfs.init,v 1.1 2005/08/26 21:09:37 mharris Exp $ +# $Id: xfs.init,v 1.2 2005/11/15 21:11:50 mharris Exp $ # # xfs: Starts the X Font Server # @@ -111,6 +111,21 @@ restart() { start } +condrestart() { + # NOTE: We reload normally, to ensure the xfs<->Xserver connection does + # not get broken on xfs upgrades, however we must force a restart on + # upgrades that are migrating from monolithic Xorg (6.8.x or older) to + # modular X, to avoid bug #173271. The modular xfs %preun script will + # now check for the old config file to determine if migration should be + # done, and touch the following migration file if necessary. + if [ -e /etc/X11/fs/xfs-migrate ] ; then + restart + rm -f /etc/X11/fs/xfs-migrate || : &> /dev/null + else + reload + fi +} + case "$1" in start) start @@ -125,7 +140,7 @@ case "$1" in reload ;; condrestart) - [ -f /var/lock/subsys/xfs ] && reload || : + [ -f /var/lock/subsys/xfs ] && condrestart || : ;; status) rhstatus diff --git a/xorg-x11-xfs.spec b/xorg-x11-xfs.spec index d238956..5ae07e5 100644 --- a/xorg-x11-xfs.spec +++ b/xorg-x11-xfs.spec @@ -8,7 +8,7 @@ Summary: X.Org X11 xfs font server Name: xorg-x11-%{pkgname} Version: 0.99.2 -Release: 2 +Release: 3 # FIXME: Remove Epoch line if package gets renamed Epoch: 1 License: MIT/X11 @@ -166,6 +166,19 @@ 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" -ge "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 @@ -174,7 +187,7 @@ rm -rf $RPM_BUILD_ROOT /sbin/chkconfig --add xfs #------------------------------------------------------------------------ # Upgrade section - if [ "$1" -ge 2 ] ; then + if [ "$1" -ge "1" ] ; then XORG_CONFIG=/etc/X11/xorg.conf XFSCONFIG=/etc/X11/fs/config @@ -273,6 +286,16 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1x/xfsinfo.1x* %changelog +* Tue Nov 15 2005 Mike A. Harris 0.99.2-3 +- Updated xfs pre script to check for the existance of the old monolithic + /usr/X11R6/lib/X11/fs/config xfs config file, and set a migration flag + file. +- Updated xfs.init to check for the existance of the migration flag file, + and perform an xfs 'restart' instead of a 'reload' if migrating. Users + will now have to restart their X server, or reconnect the xfs server to + the X server after a migration to modular X. +- Changed upgrade comparison typo from 2 to 1 in xfs post script. + * Mon Nov 14 2005 Mike A. Harris 0.99.2-2 - Added temporary "BuildRequires: libXfont-devel >= 0.99.2-3" and "Requires: libXfont-devel >= 0.99.2-3" to ensure early-testers of