From 46b54b9b7627146b4deaa71cff6d8d43be963f88fcb33e92c92e463fd0073824 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 29 Jul 2010 04:52:23 +0000 Subject: [PATCH] Accepting request 44152 from home:sndirsch:branches:X11:Utilities Copy from home:sndirsch:branches:X11:Utilities/x11-tools via accept of submit request 44152 revision 2. Request was accepted with message: Looks good. Thanks. OBS-URL: https://build.opensuse.org/request/show/44152 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/x11-tools?expand=0&rev=5 --- nvidia-post-install | 10 ++++++++++ nvidia-post-uninstall | 3 +++ x11-tools.changes | 6 ++++++ x11-tools.spec | 10 ++++++++++ 4 files changed, 29 insertions(+) create mode 100644 nvidia-post-install create mode 100644 nvidia-post-uninstall diff --git a/nvidia-post-install b/nvidia-post-install new file mode 100644 index 0000000..da2da09 --- /dev/null +++ b/nvidia-post-install @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "blacklist nouveau" > /etc/modprobe.d/nvidia.conf + +# recreate initrd without KMS, if the use of KMS is enabled in initrd +if grep -q NO_KMS_IN_INITRD=\"no\" /etc/sysconfig/kernel; then + sed -i 's/NO_KMS_IN_INITRD.*/NO_KMS_IN_INITRD="yes"/g' /etc/sysconfig/kernel + mkinitrd +fi + diff --git a/nvidia-post-uninstall b/nvidia-post-uninstall new file mode 100644 index 0000000..ceb0199 --- /dev/null +++ b/nvidia-post-uninstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /etc/modprobe.d/nvidia.conf diff --git a/x11-tools.changes b/x11-tools.changes index 2c050b8..64449f4 100644 --- a/x11-tools.changes +++ b/x11-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 29 06:44:57 CEST 2010 - sndirsch@suse.de + +- added distribution hook scripts for nvidia-installer to disable + nouveau module and remove it from initrd if required + ------------------------------------------------------------------- Tue Sep 1 19:06:04 CEST 2009 - sndirsch@suse.de diff --git a/x11-tools.spec b/x11-tools.spec index 0cc112b..df08143 100644 --- a/x11-tools.spec +++ b/x11-tools.spec @@ -37,6 +37,8 @@ Source31: xim Source32: xim.template Source33: none Source34: sysconfig.language-%{name} +Source35: nvidia-post-install +Source36: nvidia-post-uninstall BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,6 +70,11 @@ mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates/ install -c -m0644 $RPM_SOURCE_DIR/sysconfig.language-%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates/ install -m 755 $RPM_SOURCE_DIR/switch2nv $RPM_BUILD_ROOT/usr/bin install -m 755 $RPM_SOURCE_DIR/switch2nvidia $RPM_BUILD_ROOT/usr/bin +mkdir -p $RPM_BUILD_ROOT/usr/lib/nvidia +install -m 755 $RPM_SOURCE_DIR/nvidia-post-install \ + $RPM_BUILD_ROOT/usr/lib/nvidia +install -m 755 $RPM_SOURCE_DIR/nvidia-post-uninstall \ + $RPM_BUILD_ROOT/usr/lib/nvidia %post %{fillup_only -an language} @@ -75,11 +82,14 @@ install -m 755 $RPM_SOURCE_DIR/switch2nvidia $RPM_BUILD_ROOT/usr/bin %files %defattr(-, root, root) %dir /etc/X11/xim.d +%dir /usr/lib/nvidia /usr/bin/xf86debug /usr/bin/wmlist /usr/bin/kroot /usr/bin/switch2nv /usr/bin/switch2nvidia +/usr/lib/nvidia/nvidia-post-install +/usr/lib/nvidia/nvidia-post-uninstall /etc/X11/xim /etc/X11/xim.d/* /etc/skel/.xim.template