From d34971cf61f8fcc78475d77d1c8849e6d1f49bf6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 8 Jun 2011 21:09:17 +0000 Subject: [PATCH] Update to current --- .gitignore | 4 +- filter-provides.sh | 10 --- filter-requires.sh | 10 --- nvidia-config-display | 146 --------------------------------------- nvidia-init | 118 ------------------------------- sources | 4 +- xorg-x11-drv-nvidia.spec | 47 ++++++------- 7 files changed, 25 insertions(+), 314 deletions(-) delete mode 100755 filter-provides.sh delete mode 100755 filter-requires.sh delete mode 100755 nvidia-config-display delete mode 100755 nvidia-init diff --git a/.gitignore b/.gitignore index 59da678..125a9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -NVIDIA-Linux-x86-270.41.06.run -NVIDIA-Linux-x86_64-270.41.06.run +NVIDIA-Linux-x86-270.41.19.run +NVIDIA-Linux-x86_64-270.41.19.run diff --git a/filter-provides.sh b/filter-provides.sh deleted file mode 100755 index ccf417e..0000000 --- a/filter-provides.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ -x /usr/lib/rpm/redhat/find-provides ]; then - FINDPROV=/usr/lib/rpm/redhat/find-provides -else - FINDPROV=/usr/lib/rpm/find-provides -fi - -$FINDPROV $* | sed -e '/libnvidia-tls.so/d' | sed -e '/libGLcore.so/d' | sed -e '/libGL.so/d' - diff --git a/filter-requires.sh b/filter-requires.sh deleted file mode 100755 index ea0bcd1..0000000 --- a/filter-requires.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ -x /usr/lib/rpm/redhat/find-requires ]; then - FINDREQ=/usr/lib/rpm/redhat/find-requires -else - FINDREQ=/usr/lib/rpm/find-requires -fi - -$FINDREQ $* | sed -e '/libnvidia-tls.so/d' | sed -e '/libGLcore.so/d' | sed -e '/libGL.so/d' - diff --git a/nvidia-config-display b/nvidia-config-display deleted file mode 100755 index b71b3d1..0000000 --- a/nvidia-config-display +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/python -tt -# -*- coding: UTF-8 -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 only -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# Copyright 2003, 2004 Peter Backlund -# Copyright 2004 Thorsten Leemhuis -# Copyright 2006 Van Assche Alphonse -# Copyright 2006, 2007 Stewart Adam - -import string -import os -import sys - -from livnaConfigDisplay.const import * -from livnaConfigDisplay.const import _ - -import livnaConfigDisplay.ConfigDisplay -from livnaConfigDisplay.GlxConfig import * -from livnaConfigDisplay import Utils -from livnaConfigDisplay.ConfigFile import ConfigFile - -class nvidiaConfigDisplay(GlxConfig): - def __init__(self): - GlxConfig.__init__(self) - self.vendor = 'nvidia' - self.majorVendor = Utils.getMajorVendor() - if self.vendor != Utils.getVendor(): - print _('The initscript and installed driver vendors do not match!') - sys.exit(1) - self.ldconf = LD_CONF_FILE % (self.vendor) - try: - self.doAllBackups() - except livnaConfigDisplayError, (bkupErrMsg): - print bkupErrMsg - sys.exit(1) - self.xconfig, self.xconfigpath = self.loadXconfig() - self.config = ConfigFile(STATUS_FILE) - self.TOP_MOD_DIR = self.getModTopDir() - - # finally, run arg checks. - self.run() - - - def enable(self, isAutoConfigure = True): - # Backup the file before make any change. - currentDriver = self.getDriver() - # Already enabled? - if currentDriver == self.majorVendor: - print _('Driver already enabled.') - return - # nVidia modules - self.addModulePath("/extensions/nvidia", self.TOP_MOD_DIR) - # 'remembering' magic's in here. - self.config.setOldDriver(currentDriver) - #currentDriver = self.config.getOldDriver() - self.toggleDriver(currentDriver, self.majorVendor) - # Disable dri and GLcore modules - these are no - self.removeModule("dri") - self.removeModule("GLcore") - # Add glx/dbe/extmod modules when modules section exists - if self.xconfig.modules: - for module in ["glx", "dbe", "extmod"]: - if self.onlyHasModule(module): - self.removeModule(module) - break - else: - self.addModule(module) - # Problems with Compiz without these. - not needed since 195.xxx - #self.addOption(self.majorVendor,"AddARGBGLXVisuals", "True") - #self.addOption(self.majorVendor,"DisableGLXRootClipping", "True") - Utils.writeXorgConf(self.xconfig, self.xconfigpath) - # We have to read saved status file to restore the Xorg configuration. - self.restoreconf() - - - def disable(self, isAutoConfigure = True): - self.removeModulePath("/extensions/nvidia", self.TOP_MOD_DIR) - # Check if it's already disabled - if self.getDriver() != self.majorVendor: - print _('Driver already disabled.') - return - # Backup the file before make any change. - prevDriver = self.config.getOldDriver() - if prevDriver == self.majorVendor: - print _('Will not allow reverting from driver \'%s\' to \'%s\'.') % (self.vendor, self.vendor) - print _('Using the \'nouveau\' driver instead.') - prevDriver = "nouveau" - self.config.setOldDriver("nouveau") - self.removeOption(self.majorVendor,"AddARGBGLXVisuals") - self.removeOption(self.majorVendor,"DisableGLXRootClipping") - self.toggleDriver(self.majorVendor, prevDriver) - Utils.writeXorgConf(self.xconfig, self.xconfigpath) - # We have to save the status file so it can be restored later - self.storeconf() - # And return to the Fedora default. - self.enableAiglx() - - def printUsage(self): - print _("Usage: ") + self.vendor + _("-config-display [ enable|disable ]") - - def run(self): - # Check number of arguments - # arg = action - if len(sys.argv) == 2: - arg = sys.argv[1] - else: - print _('Wrong number of arguments') - self.printUsage() - sys.exit(1) - # Check value of argument - if arg.lower() != "enable" and arg.lower() != "disable": - print _('Invalid command: %s') % arg.lower() - self.printUsage() - sys.exit(1) - try: - if arg == "enable": - if self.getActive(): - self.enable() - else: - print _('livna-config-display\'s `active\' state is False - Exiting') - elif arg == "disable": - if self.getActive(): - self.disable() - except: - raise # Uncomment me to show the real error - print MSG_CONF_APPLY_ERROR - try: - self.doAllRestores() - sys.exit(1) - except livnaConfigDisplayError, (bkupErrMsg): - #raise # Uncomment me to show the real error - print MSG_CONF_RESTORE_ERROR + '\n' + MSG_TRACEBACK % (str(errMsg)) + '\n\n' + str(bkupErrMsg) - sys.exit(1) - -app = nvidiaConfigDisplay() diff --git a/nvidia-init b/nvidia-init deleted file mode 100755 index 9d23b15..0000000 --- a/nvidia-init +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -# -# chkconfig: 2345 8 92 -# description: This script will check if a nvidia kernel module is present for\ -# the running kernel and modify the xorg.conf to the appropriate\ -# configuration. - -# Source function library. -. /etc/rc.d/init.d/functions - -name='nvidia' -exec="/usr/sbin/$name-config-display" -prog="`basename $exec`" -lockfile="/var/lock/subsys/$name" - -RETVAL=0 -modname="nvidia.ko" -modpath="/lib/modules/$(uname -r)" -# Default to no module -module="noneWithSomeCrazyNameSoItsNeverFound" -# If one exists, then use it. -if test -e "${modpath}/extra/${modname}";then - module="${modpath}/extra/${modname}" -elif test -e "${modpath}/extra/nvidia/${modname}";then - module="${modpath}/extra/nvidia/${modname}" -elif test -e "${modpath}/kernel/drivers/video/nvidia/${modname}";then - module="${modpath}/kernel/drivers/video/nvidia/${modname}" -fi - - -# Try to modify the below the least possible. If you need to change something, try -# using the variables above first, as most of the program control is based on -# the variables above. If something really needs to be changed, try to make -# the change in all the drivers for the sake of consistency. - -# We shouldn't use lock files anymore because the lock file -# doesn't mean a driver is disabled or enabled. For example, we start() -# at boot and enable the driver. start() makes a lock file. We stop() on -# shutdown, which removes the lock file. But what if the user ran *config-display -# manually? Or if we don't `*config-display disable` in stop()? - -start() { - if action $"Checking for module $modname:" test -f $module;then - action $"Enabling the $name driver:" $exec enable - RETVAL=$? - [ -e /sbin/restorecon ] && /sbin/restorecon /dev/nvidia{ctl,0,1,2,3} - else - echo -en $"$modname for kernel $(uname -r) was not found." && echo_warning;echo -en '\n' - echo -en $"The $name driver will not be enabled until one is found." && echo_warning;echo -en '\n' - $exec disable - RETVAL=1 - fi - if [ "$RETVAL" -eq "0" ];then - #touch $lockfile - # this is a nothing assignment so that bash doesn't complain. - RETVAL=0 - else - # Let them read the errors or warnings - sleep 3 - fi - return -} - -stop() { - #action $"Disabling the $name driver:" $exec disable - #RETVAL=$? - RETVAL=0 - #if [ "$RETVAL" -eq 0 ];then - # rm -f $lockfile - #fi - return -} - -restart() { - stop - start -} - -reload() { - restart -} - -status() { - #if [ -e $lockfile ];then - if [ -f $module ] && lsmod | grep ^${modname%%.ko} &>/dev/null ;then - echo $"$modname for kernel $(uname -r) was found." - echo $"The driver is enabled." - else - echo $"$modname for kernel $(uname -r) was not found." - echo $"The $name driver cannot be enabled until one is found." - fi - #else - # echo $"The $name driver has not been enabled." - #fi - RETVAL=0 -} - -fdrstatus() { - status $prog -} - -case "$1" in - start|stop|restart|reload) - $1 - ;; - status) - fdrstatus - ;; - condrestart) - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/sources b/sources index 24d292a..0f63fc0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -702868c77b13bba46f0fce26ed7a1fb7 NVIDIA-Linux-x86-270.41.06.run -76d94f513731c75bdc4b763a3501cd4e NVIDIA-Linux-x86_64-270.41.06.run +c167e32702f56599bd600add97943312 NVIDIA-Linux-x86-270.41.19.run +b84143ecb5c0511c5ef9e53e732d9136 NVIDIA-Linux-x86_64-270.41.19.run diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index daab844..163f5ad 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -1,15 +1,12 @@ %global nvidialibdir %{_libdir}/nvidia %global ignoreabi 0 -# Tweak to have debuginfo - part 1/2 -%if 0%{?fedora} >= 7 -%define __debug_install_post %{_builddir}/%{?buildsubdir}/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\ -%{nil} -%endif +%global debug_package %{nil} +%global __strip /bin/true Name: xorg-x11-drv-nvidia Epoch: 1 -Version: 270.41.06 +Version: 270.41.19 Release: 1%{?dist} Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards @@ -20,18 +17,9 @@ Source0: ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-L Source1: ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run Source2: 00-nvidia.conf Source3: nvidia-xorg.conf -#Source5: nvidia-init Source6: blacklist-nouveau.conf -#Source10: nvidia-config-display Source11: nvidia-README.Fedora -# So we don't pull other nvidia variants -Source91: filter-requires.sh -# So we don't mess with mesa provides. -Source92: filter-provides.sh Source99: 00-ignoreabi.conf -%define _use_internal_dependency_generator 0 -%define __find_requires %{SOURCE91} -%define __find_provides %{SOURCE92} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} > 11 || 0%{?rhel} > 5 @@ -80,6 +68,20 @@ Provides: nvidia-x11-drv = %{version}-%{release} Obsoletes: xorg-x11-drv-nvidia-newest < %{version}-100 Provides: xorg-x11-drv-nvidia-newest = %{version}-101 +%{?filter_setup: +%filter_from_provides /^libnvidia/d; +%filter_from_provides /^libGLCore\.so/d; +%filter_from_provides /^libGL\.so/d; +%filter_from_provides /^libvdpau_nvidia\.so\.1/d; +%filter_from_provides /^libXvMCNVIDIA_dynamic\.so\.1/d; +%filter_from_provides /^libglx\.so/d; +%filter_from_requires /^libnvidia/d; +%filter_from_requires /^libGLCore\.so/d; +%filter_from_requires /^libGL\.so/d; +%filter_from_requires /^libvdpau_nvidia\.so\.1/d; +%filter_from_requires /^libXvMCNVIDIA_dynamic\.so\.1/d; +%filter_setup +} %description This package provides the most recent NVIDIA display driver which allows for @@ -131,11 +133,6 @@ This package provides the shared libraries for %{name}. sh %{SOURCE0} --extract-only --target nvidiapkg-x86 sh %{SOURCE1} --extract-only --target nvidiapkg-x64 tar -cjf nvidia-kmod-data-%{version}.tar.bz2 nvidiapkg-*/LICENSE nvidiapkg-*/kernel -# Tweak to have debuginfo - part 2/2 -%if 0%{?fedora} >= 7 -cp -p %{_prefix}/lib/rpm/find-debuginfo.sh . -sed -i -e 's|strict=true|strict=false|' find-debuginfo.sh -%endif %ifarch %{ix86} ln -s nvidiapkg-x86 nvidiapkg @@ -143,12 +140,6 @@ ln -s nvidiapkg-x86 nvidiapkg ln -s nvidiapkg-x64 nvidiapkg %endif -# Tweak to have debuginfo - part 2/2 -%if 0%{?fedora} >= 7 -cp -p %{_prefix}/lib/rpm/find-debuginfo.sh . -sed -i -e 's|strict=true|strict=false|' find-debuginfo.sh -%endif - %build # Nothing to build echo "Nothing to build" @@ -350,6 +341,10 @@ fi ||: %changelog +* Wed Jun 08 2011 Nicolas Chauvet - 1:270.41.19-1 +- Update to 270.41.19 +- Use official filter macros - patch from + * Sat Apr 30 2011 Nicolas Chauvet - 1:270.41.06-1 - Update to 270.41.06