From 2aafc0af07cdc07ca76e123699cb6472663035b5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 8 Jun 2013 13:56:21 +0000 Subject: [PATCH] Some Fixes --- 00-ignoreabi.conf | 3 - nvidia-README.Fedora | 1 - xorg-x11-drv-nvidia.spec | 173 +++++++++++++++------------------------ 3 files changed, 68 insertions(+), 109 deletions(-) delete mode 100644 00-ignoreabi.conf delete mode 100755 nvidia-README.Fedora diff --git a/00-ignoreabi.conf b/00-ignoreabi.conf deleted file mode 100644 index c2071f1..0000000 --- a/00-ignoreabi.conf +++ /dev/null @@ -1,3 +0,0 @@ -Section "ServerFlags" - Option "IgnoreABI" "True" -EndSection diff --git a/nvidia-README.Fedora b/nvidia-README.Fedora deleted file mode 100755 index ef02633..0000000 --- a/nvidia-README.Fedora +++ /dev/null @@ -1 +0,0 @@ -See http://rpmfusion.org/Howto/nVidia diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index 7981051..ae92270 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -1,6 +1,6 @@ -%global nvidialibdir %{_libdir}/nvidia -%global nvidiaxorgdir %{_libdir}/nvidia/xorg -%global ignoreabi 0 +%global _nvidia_serie nvidia-304xx +%global _nvidia_libdir %{_libdir}/%{_nvidia_serie} +%global _nvidia_xorgdir %{_nvidia_libdir}/xorg %global debug_package %{nil} %global __strip /bin/true @@ -8,7 +8,7 @@ Name: xorg-x11-drv-nvidia Epoch: 1 Version: 319.23 -Release: 2%{?dist} +Release: 3%{?dist} Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Group: User Interface/X Hardware Support @@ -19,8 +19,6 @@ Source1: ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDI Source2: 00-nvidia.conf Source3: nvidia-xorg.conf Source6: blacklist-nouveau.conf -Source11: nvidia-README.Fedora -Source99: 00-ignoreabi.conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} > 11 || 0%{?rhel} > 5 @@ -31,33 +29,25 @@ ExclusiveArch: i586 x86_64 ExclusiveArch: i386 x86_64 %endif Requires: nvidia-xconfig -Requires: nvidia-settings +Requires: %{_nvidia_serie}-settings -Requires: nvidia-kmod >= %{version} +Requires: %{_nvidia_serie}-kmod >= %{?epoch}:%{version} # Needed in all nvidia or fglrx driver packages -BuildRequires: prelink Requires: which #Requires: livna-config-display >= 0.0.21 %if 0%{?fedora} > 10 || 0%{?rhel} > 5 Requires: %{name}-libs%{_isa} = %{?epoch}:%{version}-%{release} %else -Requires: %{name}-libs-%{_target_cpu} = %{version}-%{release} +Requires: %{name}-libs-%{_target_cpu} = %{?epoch}:%{version}-%{release} %endif -#Requires(post): livna-config-display -#Requires(preun): livna-config-display -#Requires(post): chkconfig Requires(post): ldconfig -#Requires(preun): chkconfig - -%if 0%{?fedora} == 16 -Conflicts: selinux-policy-targeted < 3.10.0-53 -%endif +Requires(postun): ldconfig - -Provides: nvidia-kmod-common = %{?epoch}:%{version} +Obsoletes: %{_nvidia_serie}-kmod < %{?epoch}:%{version} +Provides: %{_nvidia_serie}-kmod-common = %{?epoch}:%{version} Conflicts: xorg-x11-drv-nvidia-beta Conflicts: xorg-x11-drv-nvidia-legacy Conflicts: xorg-x11-drv-nvidia-71xx @@ -65,14 +55,7 @@ Conflicts: xorg-x11-drv-nvidia-96xx Conflicts: xorg-x11-drv-nvidia-173xx Conflicts: xorg-x11-drv-fglrx Conflicts: xorg-x11-drv-catalyst -Obsoletes: nvidia-kmod < %{?epoch}:%{version} -#Introduced in F10 for freshrpms compatibility -Obsoletes: nvidia-x11-drv < %{version}-%{release} -Provides: nvidia-x11-drv = %{version}-%{release} -#Introduced in F10 when 173xx has forked to legacy serie -Obsoletes: xorg-x11-drv-nvidia-newest < %{version}-100 -Provides: xorg-x11-drv-nvidia-newest = %{version}-101 #Support for cuda #Don't put an epoch here @@ -94,8 +77,8 @@ Provides: cuda-driver = %{version} %description This package provides the most recent NVIDIA display driver which allows for -hardware accelerated rendering with NVIDIA chipsets GeForce6 series and newer. -GeForce5 and below are NOT supported by this release. +hardware accelerated rendering with NVIDIA chipsets GeForce8 series and newer. +GeForce7 and below are NOT supported by this release. For the full product support list, please consult the release notes for driver version %{version}. @@ -112,9 +95,6 @@ Requires: %{name}-libs%{_isa} = %{?epoch}:%{version}-%{release} %else Requires: %{name}-libs-%{_target_cpu} = %{?epoch}:%{version}-%{release} %endif -#Introduced in F10 when 173xx has forked to legacy serie -Obsoletes: xorg-x11-drv-nvidia-newest-devel < %{version}-100 -Provides: xorg-x11-drv-nvidia-newest-devel = %{version}-101 %description devel This package provides the development files of the %{name} package, @@ -126,15 +106,6 @@ Group: User Interface/X Hardware Support Requires: %{name} = %{?epoch}:%{version}-%{release} Requires: libvdpau%{_isa} >= 0.5 Provides: %{name}-libs-%{_target_cpu} = %{?epoch}:%{version}-%{release} -%ifarch %{ix86} -Provides: %{name}-libs-32bit = %{?epoch}:%{version}-%{release} -Obsoletes: %{name}-libs-32bit <= %{?epoch}:%{version}-%{release} -Obsoletes: nvidia-x11-drv-32bit < %{version}-%{release} -Provides: nvidia-x11-drv-32bit = %{version}-%{release} -%endif -#Introduced in F10 when 173xx has forked to legacy serie -Obsoletes: xorg-x11-drv-nvidia-newest-libs < %{version}-100 -Provides: xorg-x11-drv-nvidia-newest-libs = %{version}-101 %description libs This package provides the shared libraries for %{name}. @@ -173,38 +144,37 @@ install -m 0755 -d $RPM_BUILD_ROOT%{_bindir} # ld.so.conf.d file install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/ -echo "%{nvidialibdir}" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf +echo "%{_nvidia_libdir}" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf #Blacklist nouveau (since F-11) install -m 0755 -d $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/ install -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/ -# Install initscript -#install -D -p -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_initrddir}/nvidia - # OpenCL config install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors/ install -p -m 0755 nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors/ # Simple wildcard install of libs -install -m 0755 -d $RPM_BUILD_ROOT%{nvidialibdir}/tls/ +install -m 0755 -d $RPM_BUILD_ROOT%{_nvidia_libdir}/tls/ install -m 0755 -d $RPM_BUILD_ROOT%{_libdir}/vdpau/ -install -p -m 0755 lib*.so.%{version} $RPM_BUILD_ROOT%{nvidialibdir}/ -install -p -m 0755 libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{nvidialibdir}/ -install -p -m 0755 tls/lib*.so.%{version} $RPM_BUILD_ROOT%{nvidialibdir}/tls/ +install -p -m 0755 lib*.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/ +install -p -m 0755 libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{_nvidia_libdir}/ +install -p -m 0755 tls/lib*.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/tls/ # mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/ -mkdir -p $RPM_BUILD_ROOT%{nvidiaxorgdir} +mkdir -p $RPM_BUILD_ROOT%{_nvidia_xorgdir} # .. but some in a different place -install -m 0755 -d $RPM_BUILD_ROOT%{nvidiaxorgdir} -install -m 0755 -d $RPM_BUILD_ROOT%{nvidiaxorgdir} -rm -f $RPM_BUILD_ROOT%{nvidialibdir}/lib{nvidia-wfb,glx,vdpau*}.so.%{version} +install -m 0755 -d $RPM_BUILD_ROOT%{_nvidia_xorgdir} +install -m 0755 -d $RPM_BUILD_ROOT%{_nvidia_xorgdir} +rm -f $RPM_BUILD_ROOT%{_nvidia_libdir}/lib{nvidia-wfb,glx,vdpau*}.so.%{version} # Finish up the special case libs -install -p -m 0755 libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{nvidiaxorgdir} -install -p -m 0755 libglx.so.%{version} $RPM_BUILD_ROOT%{nvidiaxorgdir} +%if 0%{?rhel} == 5 +install -p -m 0755 libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_nvidia_xorgdir} +%endif +install -p -m 0755 libglx.so.%{version} $RPM_BUILD_ROOT%{_nvidia_xorgdir} install -p -m 0755 nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/ install -p -m 0755 libvdpau*.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau/ @@ -220,37 +190,22 @@ install -m 0755 -d $RPM_BUILD_ROOT%{_mandir}/man1/ install -p -m 0644 *.gz $RPM_BUILD_ROOT%{_mandir}/man1/ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{nvidia-settings,nvidia-xconfig}* -# Make our documentation available for later -cp -p %{SOURCE11} README.Fedora - # Make unversioned links to dynamic libs for lib in $( find $RPM_BUILD_ROOT%{_libdir} -name lib\*.%{version} ) ; do - #ln -s libGL.so.256.52 $RPM_BUILD_ROOT%{nvidialibdir}/libGL.so ln -s ${lib##*/} ${lib%.%{version}} ln -s ${lib##*/} ${lib%.%{version}}.1 done -ln -s libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{nvidialibdir}/libOpenCL.so.1 -ln -s libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{nvidialibdir}/libOpenCL.so +ln -s libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{_nvidia_libdir}/libOpenCL.so.1 +ln -s libOpenCL.so.1.0.0 $RPM_BUILD_ROOT%{_nvidia_libdir}/libOpenCL.so -# X configuration script -#install -D -p -m 0755 %{SOURCE10} $RPM_BUILD_ROOT%{_sbindir}/nvidia-config-display - # Install nvidia icon mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps install -pm 0644 nvidia-settings.png $RPM_BUILD_ROOT%{_datadir}/pixmaps # Remove duplicate install -rm $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvidia-{cfg,tls}.so - -# Remove execstack needs on F-12 and laters -%if 0%{?fedora} >= 12 || 0%{?rhel} > 5 -find $RPM_BUILD_ROOT%{_libdir} -name '*.so.*' -type f -exec execstack -c {} ';' -%ifarch x86_64 -execstack -c $RPM_BUILD_ROOT%{_bindir}/nvidia-smi -%endif -%endif +rm $RPM_BUILD_ROOT%{_nvidia_libdir}/libnvidia-{cfg,tls}.so #Install static driver dependant configuration files mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d @@ -258,9 +213,6 @@ install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d sed -i -e 's|@LIBDIR@|%{_libdir}|g' $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/00-nvidia.conf touch -r %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/00-nvidia.conf install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/ -%{?_with_ignoreabi: -install -pm 0644 %{SOURCE99} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d -} %clean @@ -269,16 +221,22 @@ rm -rf $RPM_BUILD_ROOT %post if [ "$1" -eq "1" ]; then ISGRUB1="" - if [[ -f /boot/grub/grub.conf && ! -f /boot/grub2/grub2.cfg ]] ; then + if [[ -f /boot/grub/grub.conf && ! -f /boot/grub2/grub.cfg ]] ; then ISGRUB1="--grub" + GFXPAYLOAD="vga=normal" + else + echo "GRUB_GFXPAYLOAD_LINUX=text" >> %{_sysconfdir}/default/grub + grub2-mkconfig -o /boot/grub2/grub.cfg fi if [ -x /sbin/grubby ] ; then KERNELS=`/sbin/grubby --default-kernel` - [ -z $KERNELS ] && KERNELS=`ls /boot/vmlinuz-*%{?dist}.$(uname -m)*` + DIST=`rpm -E %%{?dist}` + ARCH=`uname -m` + [ -z $KERNELS ] && KERNELS=`ls /boot/vmlinuz-*${DIST}.${ARCH}{,.PAE}` for kernel in ${KERNELS} ; do /sbin/grubby $ISGRUB1 \ --update-kernel=${kernel} \ - --args='nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off vga=normal' \ + --args="nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off $GFXPAYLOAD" \ &>/dev/null done fi @@ -293,16 +251,19 @@ fi || : %preun if [ "$1" -eq "0" ]; then ISGRUB1="" - if [[ -f /boot/grub/grub.conf && ! -f /boot/grub2/grub2.cfg ]] ; then + if [[ -f /boot/grub/grub.conf && ! -f /boot/grub2/grub.cfg ]] ; then ISGRUB1="--grub" fi if [ -x /sbin/grubby ] ; then - KERNELS=`ls /boot/vmlinuz-*%{?dist}.$(uname -m)*` + DIST=`rpm -E %%{?dist}` + ARCH=`uname -m` + KERNELS=`ls /boot/vmlinuz-*${DIST}.${ARCH}{,.PAE}` for kernel in ${KERNELS} ; do /sbin/grubby $ISGRUB1 \ --update-kernel=${kernel} \ - --remove-args='nouveau.modeset=0 rdblacklist=nouveau rd.driver.blacklist=nouveau nomodeset video=vesa:off vga=normal' \ - &>/dev/null + --remove-args="nouveau.modeset=0 rdblacklist=nouveau \ + rd.driver.blacklist=nouveau nomodeset video=vesa:off \ + gfxpayload=vga=normal vga=normal" &>/dev/null done fi #Backup and disable previously used xorg.conf @@ -317,28 +278,22 @@ fi ||: %doc nvidiapkg/LICENSE %doc nvidiapkg/NVIDIA_Changelog %doc nvidiapkg/README.txt -%doc nvidiapkg/README.Fedora %doc nvidiapkg/html %dir %{_sysconfdir}/OpenCL %dir %{_sysconfdir}/OpenCL/vendors %config %{_sysconfdir}/OpenCL/vendors/nvidia.icd -%{?_with_ignoreabi: -%config %{_sysconfdir}/X11/xorg.conf.d/00-ignoreabi.conf -} %config %{_sysconfdir}/X11/xorg.conf.d/00-nvidia.conf %config(noreplace) %{_prefix}/lib/modprobe.d/blacklist-nouveau.conf %config(noreplace) %{_sysconfdir}/X11/nvidia-xorg.conf -#{_initrddir}/nvidia %{_bindir}/nvidia-bug-report.sh %{_bindir}/nvidia-smi %{_bindir}/nvidia-cuda-mps-control %{_bindir}/nvidia-cuda-mps-server %{_bindir}/nvidia-persistenced %{_bindir}/nvidia-modprobe -#{_sbindir}/nvidia-config-display # Xorg libs that do not need to be multilib -%dir %{nvidiaxorgdir} -%{nvidiaxorgdir}/*.so* +%dir %{_nvidia_xorgdir} +%{_nvidia_xorgdir}/*.so* %{_libdir}/xorg/modules/drivers/nvidia_drv.so #/no_multilib %{_datadir}/pixmaps/*.png @@ -349,31 +304,39 @@ fi ||: %files libs %defattr(-,root,root,-) -%dir %{nvidialibdir} -%dir %{nvidialibdir}/tls +%dir %{_nvidia_libdir} +%dir %{_nvidia_libdir}/tls %config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf -%{nvidialibdir}/*.so.* -%{nvidialibdir}/libcuda.so -%{nvidialibdir}/libnvidia-glcore.so -%{nvidialibdir}/tls/*.so* +%{_nvidia_libdir}/*.so.* +%{_nvidia_libdir}/libcuda.so +%{_nvidia_libdir}/libnvidia-glcore.so +%{_nvidia_libdir}/tls/*.so* %exclude %{_libdir}/vdpau/libvdpau.* %{_libdir}/vdpau/libvdpau_nvidia.so* %exclude %{_libdir}/vdpau/libvdpau_trace.so* %files devel %defattr(-,root,root,-) -%exclude %{nvidialibdir}/libcuda.so +%exclude %{_nvidia_libdir}/libcuda.so %{_includedir}/nvidia/ -%{nvidialibdir}/libOpenCL.so -%{nvidialibdir}/libnvidia-compiler.so -%{nvidialibdir}/libGL.so -%{nvidialibdir}/libnvcuvid.so -%{nvidialibdir}/libnvidia-ml.so -%{nvidialibdir}/libnvidia-opencl.so -%{nvidialibdir}/libnvidia-encode.so +%{_nvidia_libdir}/libOpenCL.so +%{_nvidia_libdir}/libnvidia-compiler.so +%{_nvidia_libdir}/libGL.so +%{_nvidia_libdir}/libnvcuvid.so +%{_nvidia_libdir}/libnvidia-ml.so +%{_nvidia_libdir}/libnvidia-opencl.so +%{_nvidia_libdir}/libnvidia-encode.so %changelog +* Sat Jun 08 2013 Nicolas Chauvet - 1:319.23-3 +- Few resync with devel +- Disable execstack fix +- Don't redistribute libnvidia-wfb.so (only needed on EL5). +- Add GRUB_GFXPAYLOAD_LINUX=text by default +- Fix PAE kvarriant on uninstall +- Fix grub.cfg path for grub2 + * Thu May 23 2013 Leigh Scott - 1:319.23-2 - issue another build as buildsystem lost the first one