diff --git a/alternate-install-present b/alternate-install-present new file mode 100644 index 0000000..d0ad06c --- /dev/null +++ b/alternate-install-present @@ -0,0 +1,7 @@ +This file is provided by RPMFusion project +Please look for documentation at http://rpmfusion.org/Howto/nVidia + +To uninstall the package, use the following command: + +$ sudo yum remove xorg-x11-drv-nvidia\* kmod-nvidia\* + diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index db4a384..c1c4dc1 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -8,7 +8,7 @@ Name: xorg-x11-drv-nvidia Epoch: 1 Version: 331.20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Group: User Interface/X Hardware Support @@ -21,6 +21,7 @@ Source2: 00-nvidia.conf Source3: nvidia-xorg.conf Source5: 00-avoid-glamor.conf Source6: blacklist-nouveau.conf +Source7: alternate-install-present BuildRequires: desktop-file-utils %if 0%{?rhel} > 6 || 0%{?fedora} >= 15 @@ -234,6 +235,13 @@ desktop-file-install --vendor "" \ #Workaround for self made xorg.conf using a Files section. ln -fs ../../%{_nvidia_serie}/xorg $RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version} +#Workaround for cuda availability - rfbz#2916 +ln -fs %{_nvidia_libdir}/libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/libcuda.so.1 +ln -fs %{_nvidia_libdir}/libcuda.so $RPM_BUILD_ROOT%{_libdir}/libcuda.so + +#Alternate-install-present is checked by the nvidia .run +install -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_nvidia_libdir} + #Install the initscript tar jxf nvidia-persistenced-init.tar.bz2 %if 0%{?rhel} > 6 || 0%{?fedora} >= 15 @@ -248,7 +256,7 @@ sed -i -e "s/__USER__/root/" $RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.serv mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/nvidia -%pre +%pretrans if [ "$1" -eq "1" ]; then if [ -x %{_bindir}/nvidia-uninstall ]; then %{_bindir}/nvidia-uninstall -s && rm -f %{_bindir}/nvidia-uninstall &>/dev/null || : @@ -317,6 +325,8 @@ if [ "$1" -eq "0" ]; then ISGRUB1="" if [[ -f /boot/grub/grub.conf && ! -f /boot/grub2/grub.cfg ]] ; then ISGRUB1="--grub" + else + sed -i -e 's|GRUB_GFXPAYLOAD_LINUX=text||g' /etc/default/grub fi if [ -x /sbin/grubby ] ; then DIST=`rpm -E %%{?dist}` @@ -378,7 +388,8 @@ fi %{_bindir}/nvidia-cuda-mps-control %{_bindir}/nvidia-cuda-mps-server %{_bindir}/nvidia-persistenced -%{_bindir}/nvidia-modprobe +#nvidia-modprobe is setuid root to allow users to load the module in +%attr(4755, root, root) %{_bindir}/nvidia-modprobe %{_bindir}/nvidia-settings %{_bindir}/nvidia-xconfig # Xorg libs that do not need to be multilib @@ -400,6 +411,7 @@ fi %defattr(-,root,root,-) %dir %{_nvidia_libdir} %config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf +%{_nvidia_libdir}/alternate-install-present %{_nvidia_libdir}/*.so.* %ifarch x86_64 i686 %dir %{_nvidia_libdir}/tls @@ -408,6 +420,7 @@ fi %{_libdir}/vdpau/libvdpau_nvidia.so.* %exclude %{_libdir}/vdpau/libvdpau_trace.so* %endif +%{_libdir}/libcuda.so.1 %files devel %defattr(-,root,root,-) @@ -433,9 +446,17 @@ fi %{_nvidia_libdir}/libnvidia-ml.so %{_nvidia_libdir}/libnvidia-opencl.so %{_nvidia_libdir}/tls/libnvidia-tls.so +%{_libdir}/libcuda.so %{_libdir}/vdpau/libvdpau_nvidia.so %changelog +* Mon Nov 11 2013 Nicolas Chauvet - 1:331.20-3 +- move nvidia-uninstall to %%pretrans +- Setuid root for nvidia-modprobe to allow text users to load modules +- Disable GRUB_GFXPAYLOAD_LINUX=text in grub2 when uninstalling +- Workaround for cuda availability - rfbz#2916 +- Add alternate-install-present in -libs to prevent .run to overwrite us + * Thu Nov 07 2013 Leigh Scott - 1:331.20-2 - remove conflicts xorg-x11-glamor - disable glamor module