Author: kwizart
Update of /cvs/nonfree/rpms/xorg-x11-drv-nvidia/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv1987
Modified Files:
xorg-x11-drv-nvidia.spec
Log Message:
Restore nvidia-settings and nvidia-xconfig - rfbz#2852
Add virtual provides for nvidia-modprobe/nvidia-persistenced
Enable nvidia-persistenced systemd service
Index: xorg-x11-drv-nvidia.spec
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-nvidia/F-19/xorg-x11-drv-nvidia.spec,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- xorg-x11-drv-nvidia.spec 13 Jul 2013 15:21:44 -0000 1.104
+++ xorg-x11-drv-nvidia.spec 13 Jul 2013 19:59:12 -0000 1.105
@@ -8,7 +8,7 @@
Name: xorg-x11-drv-nvidia
Epoch: 1
Version: 319.32
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
Group: User Interface/X Hardware Support
@@ -21,13 +21,25 @@
Source3: nvidia-xorg.conf
Source6: blacklist-nouveau.conf
+BuildRequires: desktop-file-utils
+Buildrequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+
ExclusiveArch: i686 x86_64 armv7hl
-Requires: nvidia-xconfig
-Requires: %{_nvidia_serie}-settings
+
+Obsoletes: nvidia-xconfig < 1.0-30
+Provides: nvidia-xconfig = %{version}-%{release}
+Obsoletes: nvidia-settings < 1.0-34
+Provides: nvidia-settings = %{version}-%{release}
+Obsoletes: nvidia-settings-desktop < 1.0-34
+Provides: nvidia-settings-desktop = %{version}-%{release}
+Provides: nvidia-modprobe = %{version}-%{release}
+Provides: nvidia-persistenced = %{version}-%{release}
Requires: %{_nvidia_serie}-kmod >= %{?epoch}:%{version}
-# Needed in all nvidia or fglrx driver packages
Requires: which
Requires: %{name}-libs%{_isa} = %{?epoch}:%{version}-%{release}
@@ -169,7 +181,8 @@
install -p -m 0755 nvidia_drv.so
$RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/
# Install binaries
-install -p -m 0755
nvidia-{bug-report.sh,debugdump,smi,cuda-mps-control,cuda-mps-server,persistenced,modprobe}
$RPM_BUILD_ROOT%{_bindir}
+install -p -m 0755
nvidia-{bug-report.sh,debugdump,smi,cuda-mps-control,cuda-mps-server,xconfig,settings,persistenced,modprobe}
\
+ $RPM_BUILD_ROOT%{_bindir}
# Install headers
install -m 0755 -d $RPM_BUILD_ROOT%{_includedir}/nvidia/GL/
@@ -201,6 +214,28 @@
touch -r %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/00-nvidia.conf
install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/
+# Desktop entry for nvidia-settings
+desktop-file-install --vendor "" \
+ --dir $RPM_BUILD_ROOT%{_datadir}/applications/ \
+ --set-icon=nvidia-settings \
+ --set-key=Exec --set-value=nvidia-settings \
+ nvidia-settings.desktop
+
+#Workaround for self made xorg.conf using a Files section.
+ln -fs ../../%{_nvidia_serie}/xorg
$RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
+
+#Install the initscript
+tar jxf nvidia-persistenced-init.tar.bz2
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+install -pm 0644 nvidia-persistenced-init/systemd/nvidia-persistenced.service.template \
+ $RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.service
+#Change the daemon running owner
+sed -i -e "s/__USER__/root/"
$RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.service
+
+#Create the default nvidia config directory
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/nvidia
+
+
%post
if [ "$1" -eq "1" ]; then
@@ -224,6 +259,7 @@
&>/dev/null
done
fi
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi || :
%triggerpostun -- xorg-x11-drv-nvidia < 1:%{version}-5
@@ -274,11 +310,22 @@
gfxpayload=vga=normal vga=normal" &>/dev/null
done
fi
+
+ /bin/systemctl --no-reload disable nvidia-persistenced.service > /dev/null
2>&1 || :
+ /bin/systemctl stop nvidia-persistenced.service > /dev/null 2>&1 || :
+
#Backup and disable previously used xorg.conf
[ -f %{_sysconfdir}/X11/xorg.conf ] && \
mv %{_sysconfdir}/X11/xorg.conf %{_sysconfdir}/X11/xorg.conf.%{name}_uninstalled
&>/dev/null
fi ||:
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart nvidia-persistenced.service >/dev/null 2>&1 ||
:
+fi
+
%postun libs -p /sbin/ldconfig
%files
@@ -286,27 +333,34 @@
%doc nvidiapkg/LICENSE
%doc nvidiapkg/NVIDIA_Changelog
%doc nvidiapkg/README.txt
+%doc nvidiapkg/nvidia-application-profiles-%{version}-rc
%doc nvidiapkg/html
%ifarch x86_64 i686
%dir %{_sysconfdir}/OpenCL
%dir %{_sysconfdir}/OpenCL/vendors
%config %{_sysconfdir}/OpenCL/vendors/nvidia.icd
%endif
+%dir %{_sysconfdir}/nvidia
%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
+%{_unitdir}/nvidia-persistenced.service
%{_bindir}/nvidia-bug-report.sh
%{_bindir}/nvidia-debugdump
%{_bindir}/nvidia-smi
%{_bindir}/nvidia-cuda-mps-control
%{_bindir}/nvidia-cuda-mps-server
-%exclude %{_bindir}/nvidia-persistenced
-%exclude %{_bindir}/nvidia-modprobe
+%{_bindir}/nvidia-persistenced
+%{_bindir}/nvidia-modprobe
+%{_bindir}/nvidia-settings
+%{_bindir}/nvidia-xconfig
# Xorg libs that do not need to be multilib
%dir %{_nvidia_xorgdir}
%{_nvidia_xorgdir}/*.so*
%{_libdir}/xorg/modules/drivers/nvidia_drv.so
+%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
#/no_multilib
+%{_datadir}/applications/*nvidia-settings.desktop
%{_datadir}/pixmaps/*.png
%{_mandir}/man1/nvidia-smi.*
%{_mandir}/man1/nvidia-cuda-mps-control.1.*
@@ -343,6 +397,11 @@
%changelog
+* Sat Jul 13 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-3
+- Restore nvidia-settings and nvidia-xconfig - rfbz#2852
+- Add virtual provides for nvidia-modprobe/nvidia-persistenced
+- Enable nvidia-persistenced systemd service
+
* Sat Jul 13 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-2
- Add armhfp support
- Spec file clean-up
Show replies by date