From 5cd006c2113617c248c0fc5b6bcd8adcbd2a457fe1e4469e33da885d715bd568 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 28 May 2014 11:03:19 +0000 Subject: [PATCH] - %post: * move SaX2 generated xorg.conf file to xorg.conf.sle11 Only in very rare cases a static X configuration is still required on sle12. And, in some cases the migration from a static sle11 X configuration to a static sle12 X configuration is not possible at all, e.g. some video and input drivers are no longer available on sle12. In short, trying to migrate will result in more harm than benefit. (bnc#877315) * remove dangling link /etc/X11/XF86Config (bnc#879360, comment#15) * prevent %postun of NVIDIA/fglrx driver packages from restoring xorg.conf backup or running sax2 as fallback to create a new xorg.conf (bcn#877315) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=519 --- xorg-x11-server.changes | 16 ++++++++++++++++ xorg-x11-server.spec | 36 ++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 0f7af54..4096a02 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed May 28 11:00:49 UTC 2014 - sndirsch@suse.com + +- %post: + * move SaX2 generated xorg.conf file to xorg.conf.sle11 + Only in very rare cases a static X configuration is still + required on sle12. And, in some cases the migration from a + static sle11 X configuration to a static sle12 X configuration + is not possible at all, e.g. some video and input drivers + are no longer available on sle12. In short, trying to migrate + will result in more harm than benefit. (bnc#877315) + * remove dangling link /etc/X11/XF86Config (bnc#879360, comment#15) + * prevent %postun of NVIDIA/fglrx driver packages from + restoring xorg.conf backup or running sax2 as fallback + to create a new xorg.conf (bcn#877315) + ------------------------------------------------------------------- Sat May 24 09:16:08 UTC 2014 - eich@suse.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 81d6e04..0f78729 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -340,23 +340,27 @@ install -D xorg-x11-server.macros %{buildroot}%{_sysconfdir}/rpm/macros.xorg-ser %post %ifnarch s390 s390x %{fillup_only -an displaymanager} -if [ -f etc/X11/xorg.conf ]; then - # Document how to restore previous input driver behaviour in xorg.conf files created - # on openSUSE <= 11.1 - if ! grep -q "will be disabled unless 'Option \"AutoAddDevices\" \"off\"'" etc/X11/xorg.conf; then - if ! grep -q "\"AutoAddDevices\" \"off\"" etc/X11/xorg.conf; then - sed -i ' -/Section "ServerFlags"/{ -h -g -a\ - # Uncomment the following option to reenable kbd/mouse driver input sections. \ - # Otherwise evdev driver is used. \ - #Option "AutoAddDevices" "off" -} -' etc/X11/xorg.conf +# Move SaX2 generated xorg.conf file to xorg.conf.sle11 +# +# Only in very rare cases a static X configuration is still +# required on sle12. And, in some cases the migration from a +# static sle11 X configuration to a static sle12 X configuration +# is not possible at all, e.g. some video and input drivers +# are no longer available on sle12. In short, trying to migrate +# will result in more harm than benefit. +if [ -f etc/X11/xorg.conf -a ! -f etc/X11/xorg.conf.sle11 ]; then + echo "xorg.conf exists and xorg.conf.sle11 does not" + if grep -q "SaX generated X11 config file" etc/X11/xorg.conf; then + echo "move SaX generated xorg.conf to xorg.conf.sle11" + mv etc/X11/xorg.conf{,.sle11} + # remove dangling link (bnc#879360, comment#15) + rm -f etc/X11/XF86Config + # prevent %postun of NVIDIA/fglrx driver packages from restoring xorg.conf + # backup or running sax2 as fallback to create a new xorg.conf (bcn#877315) + rm -f etc/X11/xorg.conf.nvidia-post \ + etc/X11/xorg.conf.fglrx-post + chmod -x usr/sbin/sax2 fi - fi fi %endif exit 0