[xorg-x11-drv-nvidia] Rework
by Nicolas Chauvet
commit 7596596b0ddd535d487fdc002adb61295495239d
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Apr 26 12:30:54 2017 +0200
Rework
xorg-x11-drv-nvidia.spec | 122 +++++++++++++++++++++--------------------------
1 file changed, 55 insertions(+), 67 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index ea8fd92..f4375bc 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -5,10 +5,7 @@
# https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2443
# https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2556-L2558
%global _alternate_dir %{_prefix}/lib/nvidia
-
-%if 0%{?rhel} || 0%{?fedora} == 24
%global _glvnd_libdir %{_libdir}/libglvnd
-%endif
%if 0%{?rhel} == 6
%global _modprobe_d %{_sysconfdir}/modprobe.d/
@@ -17,15 +14,20 @@
%global _modprobe_d %{_sysconfdir}/modprobe.d/
%global _dracutopts nouveau.modeset=0 rdblacklist=nouveau
%global _grubby /sbin/grubby --grub --update-kernel=ALL
-%else
+%else #rhel > 6 or fedora
%global _modprobe_d %{_prefix}/lib/modprobe.d/
-%global _dracutopts nouveau.modeset=0 rd.driver.blacklist=nouveau
%global _grubby %{_sbindir}/grubby --update-kernel=ALL
+%if 0%{?rhel} == 7
+%global _dracutopts nouveau.modeset=0 rd.driver.blacklist=nouveau
+%else #fedora
+%global _dracutopts rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
+%endif
%endif
%global debug_package %{nil}
%global __strip /bin/true
+
Name: xorg-x11-drv-nvidia
Epoch: 1
Version: 381.09
@@ -34,18 +36,17 @@ Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted
URL: http://www.nvidia.com/
-Source0: ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%...
-Source1: ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x8...
-Source4: ftp://download.nvidia.com/XFree86/Linux-32bit-ARM/%{version}/NVIDIA-Linux...
-Source2: 99-nvidia.conf
+Source0: http://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-...
+Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x...
+Source2: http://download.nvidia.com/XFree86/Linux-32bit-ARM/%{version}/NVIDIA-Linu...
+
Source3: xorg.conf.nvidia
+Source4: 99-nvidia.conf
Source5: 00-avoid-glamor.conf
Source6: blacklist-nouveau.conf
Source7: alternate-install-present
-Source8: nvidia-old.conf
Source9: nvidia-settings.desktop
Source10: nvidia.conf
-Source11: 00-ignoreabi.conf
Source12: xorg-x11-drv-nvidia.metainfo.xml
Source13: parse-readme.py
Source14: 60-nvidia-uvm.rules
@@ -64,6 +65,11 @@ Requires(postun): systemd
# AppStream metadata generation
BuildRequires: python2
BuildRequires: libappstream-glib >= 0.6.3
+# Xorg with PrimaryGPU
+Requires: Xorg >= 1.19.0-3
+%else
+# Xorg with OutputClass
+Requires: Xorg >= 1.16.0-1
%endif
Requires(post): ldconfig
@@ -73,11 +79,6 @@ Requires: which
Requires: %{_nvidia_serie}-kmod >= %{?epoch}:%{version}
Requires: %{name}-libs%{?_isa} = %{?epoch}:%{version}-%{release}
-%if 0%{?fedora} >= 25
-# filesystem is needed as we don't own %%{_libdir}
-Requires: filesystem
-Requires: xorg-x11-server-Xorg%{?_isa} >= 1.19.0-3
-%endif
Obsoletes: %{_nvidia_serie}-kmod < %{?epoch}:%{version}
Provides: %{_nvidia_serie}-kmod-common = %{?epoch}:%{version}
@@ -190,7 +191,7 @@ sh %{SOURCE0} \
sh %{SOURCE1} \
%endif
%ifarch armv7hl
-sh %{SOURCE4} \
+sh %{SOURCE2} \
%endif
--extract-only --target nvidiapkg-%{_target_cpu}
ln -s nvidiapkg-%{_target_cpu} nvidiapkg
@@ -250,9 +251,11 @@ done
install -D -p -m 0755 libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.%{version}
ln -sf libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.1
-%if 0%{?rhel} == 7 || 0%{?rhel} == 6 || 0%{?fedora} == 24
# GlVND
-ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0
+%if 0%{?fedora} >= 25
+ln -s libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0
+%else
+ln -s libGLX_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLX_indirect.so.0
%endif
# X DDX driver and GLX extension
@@ -273,14 +276,17 @@ install -m 0755 -d %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
install -p -m 0644 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
# ld.so.conf.d file
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
+%if ! 0%{?fedora} >= 25
install -m 0755 -d %{buildroot}%{_sysconfdir}/ld.so.conf.d/
echo -e "%{_glvnd_libdir} \n" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%endif
# Blacklist nouveau, autoload nvidia-uvm module after nvidia module
-install -m 0755 -d %{buildroot}%{_modprobe_d}/
-install -p -m 0644 %{SOURCE6} %{SOURCE15} %{buildroot}%{_modprobe_d}/
+mkdir -p %{buildroot}%{_modprobe_d}
+install -p -m 0644 %{SOURCE15} %{buildroot}%{_modprobe_d}
+%if ! 0%{?fedora} >= 25
+install -p -m 0644 %{SOURCE6} %{buildroot}%{_modprobe_d}
+%endif
# UDev rules for nvidia-uvm
install -m 0755 -d %{buildroot}%{_udevrulesdir}
@@ -304,22 +310,6 @@ install -p -m 0644 nvidia-{cuda-mps-control,persistenced,settings,smi,xconfig}.1
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -pm 0644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps
-#Install static driver dependant configuration files
-mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-install -pm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
-%endif
-%if 0%{?rhel} == 6
-install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.nvidia
-%endif
-%if 0%{?fedora} <= 24
-install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
-sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
-touch -r %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
-%endif
-# Comment Xorg abi override
-#install -pm 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
-
# Fix desktop file and validate
sed -i -e 's|__UTILS_PATH__/||g' -e 's|__PIXMAP_PATH__/||g' nvidia-settings.desktop
sed -i -e 's|nvidia-settings.png|nvidia-settings|g' nvidia-settings.desktop
@@ -335,17 +325,23 @@ install -p -m 0644 %{SOURCE7} %{buildroot}%{_alternate_dir}
mkdir -p %{buildroot}%{_datadir}/nvidia
install -p -m 0644 nvidia-application-profiles-%{version}-{rc,key-documentation} %{buildroot}%{_datadir}/nvidia
-#Install the output class configuration file - xorg-server >= 1.16
-%if 0%{?fedora} >= 25
+#Install the Xorg configuration files
+mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
mkdir -p %{buildroot}%{_datadir}/X11/xorg.conf.d
+%if 0%{?fedora} >= 25
install -pm 0644 %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
touch -r %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
+%else
+install -pm 0644 nvidia-drm-outputclass.conf %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
+install -pm 0644 %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+touch -r %{SOURCE4} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%endif
-%if 0%{?rhel} == 7 || 0%{?fedora} == 24
-mkdir -p %{buildroot}%{_datadir}/X11/xorg.conf.d
-install -pm 0644 %{SOURCE8} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
-%endif
+#Ghost Xorg nvidia.conf files
+touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
+touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
#Install the initscript
tar jxf nvidia-persistenced-init.tar.bz2
@@ -360,9 +356,6 @@ sed -i -e "s/__USER__/root/" %{buildroot}%{_unitdir}/nvidia-persistenced.service
#Create the default nvidia config directory
mkdir -p %{buildroot}%{_sysconfdir}/nvidia
-#Ghost Xorg nvidia.conf file
-touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
-
#Install the nvidia kernel modules sources archive
mkdir -p %{buildroot}%{_datadir}/nvidia-kmod-%{version}
tar Jcf %{buildroot}%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_target_cpu}.tar.xz kernel
@@ -419,10 +412,8 @@ if [ "$1" -eq "0" ]; then
%if 0%{?fedora} || 0%{?rhel} >= 7
sed -i -e 's/%{_dracutopts} //g' /etc/default/grub
%endif
-%if 0%{?rhel} == 6
# Backup and disable previously used xorg.conf
[ -f %{_sysconfdir}/X11/xorg.conf ] && mv %{_sysconfdir}/X11/xorg.conf %{_sysconfdir}/X11/xorg.conf.nvidia_uninstalled &>/dev/null
-%endif
fi ||:
%if 0%{?rhel} > 6 || 0%{?fedora}
@@ -454,16 +445,21 @@ fi ||:
%endif
%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
%dir %{_sysconfdir}/nvidia
-%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-%config %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
-%config %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
-%endif
-# Comment Xorg abi override
-#%%config %%{_sysconfdir}/X11/xorg.conf.d/00-ignoreabi.conf
-%config(noreplace) %{_modprobe_d}/blacklist-nouveau.conf
+%ghost %{_sysconfdir}/X11/xorg.conf.d/00-avoid-glamor.conf
+%ghost %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
+%if 0%{?fedora} >= 25
+%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
+%{_datadir}/X11/xorg.conf.d/nvidia.conf
+%else
+%{_datadir}/X11/xorg.conf.d/00-avoid-glamor.conf
+%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
+# RHEL6 uses /etc
%if 0%{?rhel} == 6
-%config(noreplace) %{_sysconfdir}/X11/xorg.conf.nvidia
+%config(noreplace) %{_modprobe_d}/blacklist-nouveau.conf
+%else
+%{_modprobe_d}/blacklist-nouveau.conf
+%endif
%endif
%config %{_sysconfdir}/xdg/autostart/nvidia-settings.desktop
%{_bindir}/nvidia-bug-report.sh
@@ -487,12 +483,6 @@ fi ||:
%endif
%endif
#/no_multilib
-%if 0%{?rhel} > 6 || 0%{?fedora}
-%{_datadir}/X11/xorg.conf.d/nvidia.conf
-%endif
-%if 0%{?fedora} >= 25
-%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
-%endif
%dir %{_datadir}/nvidia
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-*
%{_datadir}/applications/*nvidia-settings.desktop
@@ -505,7 +495,7 @@ fi ||:
%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_target_cpu}.tar.xz
%files libs
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
+%if 0%{?rhel} || 0%{?fedora} == 24
%config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%dir %{_libdir}
%endif
@@ -516,9 +506,7 @@ fi ||:
%{_libdir}/libGLESv1_CM_nvidia.so.%{version}
%{_libdir}/libGLESv2_nvidia.so.2
%{_libdir}/libGLESv2_nvidia.so.%{version}
-%if 0%{?rhel} == 7 || 0%{?rhel} == 6 || 0%{?fedora} == 24
%{_libdir}/libGLX_indirect.so.0
-%endif
%{_libdir}/libGLX_nvidia.so.0
%{_libdir}/libGLX_nvidia.so.%{version}
%{_libdir}/libnvidia-cfg.so.1
7 years, 7 months
[xorg-x11-drv-nvidia] Hardcode installation of the alternate-install-present file where nvidia-installer expects it. Also,
by Nicolas Chauvet
commit 5a113131de333ba705a4a4b0c7c30a63fea4e90d
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 13:52:32 2017 +0200
Hardcode installation of the alternate-install-present file where nvidia-installer expects it. Also, include it in the main package and not the library subpackage.
xorg-x11-drv-nvidia.spec | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index edc8b75..ea8fd92 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -1,6 +1,10 @@
%global _nvidia_serie nvidia
%global _nvidia_libdir %{_libdir}/%{_nvidia_serie}
%global _nvidia_xorgdir %{_nvidia_libdir}/xorg
+# Unfortunately this is always hardcoded regardless of architecture:
+# https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2443
+# https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2556-L2558
+%global _alternate_dir %{_prefix}/lib/nvidia
%if 0%{?rhel} || 0%{?fedora} == 24
%global _glvnd_libdir %{_libdir}/libglvnd
@@ -324,7 +328,8 @@ desktop-file-install --vendor "" \
nvidia-settings.desktop
#Alternate-install-present is checked by the nvidia .run
-install -p -m 0644 %{SOURCE7} %{buildroot}%{_nvidia_libdir}
+mkdir -p %{buildroot}%{_alternate_dir}
+install -p -m 0644 %{SOURCE7} %{buildroot}%{_alternate_dir}
#install the NVIDIA supplied application profiles
mkdir -p %{buildroot}%{_datadir}/nvidia
@@ -442,6 +447,8 @@ fi ||:
%doc nvidiapkg/README.txt
%doc nvidiapkg/nvidia-application-profiles-%{version}-rc
%doc nvidiapkg/html
+%dir %{_alternate_dir}
+%{_alternate_dir}/alternate-install-present
%ifarch x86_64 i686
%{_datadir}/vulkan/icd.d/nvidia_icd.json
%endif
@@ -503,7 +510,6 @@ fi ||:
%dir %{_libdir}
%endif
%dir %{_nvidia_libdir}
-%{_nvidia_libdir}/alternate-install-present
%{_libdir}/libEGL_nvidia.so.0
%{_libdir}/libEGL_nvidia.so.%{version}
%{_libdir}/libGLESv1_CM_nvidia.so.1
7 years, 7 months
[xorg-x11-drv-nvidia] Also use split libglvnd packages for Fedora 24 and RHEL 6/7
by Nicolas Chauvet
commit 25a738f4e1a2dd947075d6677f33f1c696e43123
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 10:23:46 2017 +0200
Also use split libglvnd packages for Fedora 24 and RHEL 6/7
xorg-x11-drv-nvidia.spec | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index f0ec728..edc8b75 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -25,7 +25,7 @@
Name: xorg-x11-drv-nvidia
Epoch: 1
Version: 381.09
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted
@@ -152,13 +152,12 @@ which is generated during the build of main package.
%package libs
Summary: Libraries for %{name}
Requires: libvdpau%{?_isa} >= 0.5
-Requires: libglvnd%{?_isa} >= 0.2
-%if 0%{?fedora} >= 25
-Requires: egl-wayland%{?_isa} >= 1.0.0
Requires: libglvnd-egl%{?_isa} >= 0.2
Requires: libglvnd-gles%{?_isa} >= 0.2
Requires: libglvnd-glx%{?_isa} >= 0.2
Requires: libglvnd-opengl%{?_isa} >= 0.2
+%if 0%{?fedora} >= 25
+Requires: egl-wayland%{?_isa} >= 1.0.0
Requires: mesa-libEGL%{?_isa} >= 13.0.3-3
Requires: mesa-libGL%{?_isa} >= 13.0.3-3
Requires: mesa-libGLES%{?_isa} >= 13.0.3-3
@@ -572,6 +571,9 @@ fi ||:
%{_libdir}/libnvidia-encode.so
%changelog
+* Mon Apr 10 2017 Simone Caronni <negativo17(a)gmail.com> - 1:381.09-3
+- Also use split libglvnd packages for Fedora 24 and RHEL 6/7.
+
* Mon Apr 10 2017 Simone Caronni <negativo17(a)gmail.com> - 1:381.09-2
- Simplify GRUB installation for Grub 1 (RHEL 6) and Grub 2 (RHEL 7+/Fedora), do
not use obsolete kernel parameters.
7 years, 7 months
[xorg-x11-drv-nvidia] Update changelog
by Nicolas Chauvet
commit 44fc0bc9b3fbdedc23b1aadc9dbfd9ddbd16816a
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 10:20:44 2017 +0200
Update changelog
xorg-x11-drv-nvidia.spec | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index b503d70..f0ec728 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -25,7 +25,7 @@
Name: xorg-x11-drv-nvidia
Epoch: 1
Version: 381.09
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted
@@ -572,6 +572,33 @@ fi ||:
%{_libdir}/libnvidia-encode.so
%changelog
+* Mon Apr 10 2017 Simone Caronni <negativo17(a)gmail.com> - 1:381.09-2
+- Simplify GRUB installation for Grub 1 (RHEL 6) and Grub 2 (RHEL 7+/Fedora), do
+ not use obsolete kernel parameters.
+- Add kernel parameters to default grub file on Fedora/RHEL 7+.
+- Bring default RHEL 6 X.org configuration on par with Fedora/RHEL 7+ and make
+ sure it is installed by default.
+- Install RHEL 6 X.org configuration template only on RHEL 6, make sure it does
+ not end in .conf to avoid confusion.
+- Package only required symlinks for libraries.
+- Add only the libraries that program can link to in the devel subpackage.
+- Make CUDA subpackages multilib compliant (no more CUDA i686 binaries on
+ x86_64).
+- Do not require main packages for libraries subpackages, this makes possible to
+ build things that link to Nvidia drivers using only libraries and not pulling
+ all the graphic driver components.
+- Fix files listed twice during build.
+- Install non conflicting libraries in standard locations, remove all redundant
+ directory overrides for the various distributions. This also removes the link
+ libGLX_indirect.so.0.
+- Explicitly list all libraries included in the packages, avoid too many
+ if/exclude directives.
+- Various fixups from Nicolas Chauvet:
+ * buildroot
+ * glvnd vulkan to use _datadir
+ * Use nvidia_libdir for alternate install file
+ * arm and opencl
+
* Fri Apr 07 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:381.09-1
- Update to 381.09 beta
7 years, 7 months
[xorg-x11-drv-nvidia] Do not create the /usr/lib64/xorg/modules/nvidia-%{version} symlink and remove redundant Optimus con
by Nicolas Chauvet
commit bda0c023e73f731040166fa9d2bf2b3782572ba3
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 10:05:25 2017 +0200
Do not create the /usr/lib64/xorg/modules/nvidia-%{version} symlink and remove redundant Optimus configuration.
On systems prior to Fedora 25 the modules directory is specified in the file /etc/X11/xorg.conf.d/99-nvidia.conf, which is always loaded even if a user has a custom xorg.conf. On Fedora 25+, if the driver is installed and is not actually used (fallback scenario) this makes the X server to always load the Nvidia extension.
On Fedora 25+ the OutputClass configuration for the i915 driver is alreay at this default for Intel gen4+ systems, on Intel gen3 systems it prevents the usage of Glamor and there are no gen3 Optimus laptops.
nvidia.conf | 6 ------
xorg-x11-drv-nvidia.spec | 8 --------
2 files changed, 14 deletions(-)
---
diff --git a/nvidia.conf b/nvidia.conf
index b2d9a85..d19ec75 100644
--- a/nvidia.conf
+++ b/nvidia.conf
@@ -11,9 +11,3 @@ Section "OutputClass"
Option "BaseMosaic" "on"
ModulePath "@LIBDIR@/nvidia/xorg"
EndSection
-
-Section "OutputClass"
- Identifier "intel"
- MatchDriver "i915"
- Driver "modesetting"
-EndSection
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index ba1d1fd..b503d70 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -324,11 +324,6 @@ desktop-file-install --vendor "" \
--dir %{buildroot}%{_datadir}/applications/ \
nvidia-settings.desktop
-%if 0%{?rhel} < 8 || 0%{?fedora} <= 24
-#Workaround for self made xorg.conf using a Files section.
-ln -fs ../../%{_nvidia_serie}/xorg $RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
-%endif
-
#Alternate-install-present is checked by the nvidia .run
install -p -m 0644 %{SOURCE7} %{buildroot}%{_nvidia_libdir}
@@ -473,9 +468,6 @@ fi ||:
%{_nvidia_xorgdir}/libglx.so
%{_nvidia_xorgdir}/libglx.so.%{version}
%{_libdir}/xorg/modules/drivers/nvidia_drv.so
-%if 0%{?rhel} < 8 || 0%{?fedora} <= 24
-%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
-%endif
%ifarch %{arm}
%{_libdir}/libnvidia-gtk2.so.%{version}
%endif
7 years, 7 months
[xorg-x11-drv-nvidia] Fix RHEL 6 X and Grub configuration
by Nicolas Chauvet
commit faf0dd06890368a4e4856dc34da9a6faa6c44e89
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 10:04:38 2017 +0200
Fix RHEL 6 X and Grub configuration
- Bring default RHEL 6 X.org configuration on par with Fedora/RHEL 7+ and make sure it is installed by default.
- Install RHEL 6 X.org configuration template only on RHEL 6, make sure it does not end in .conf to avoid confusion.
- Simplify GRUB installation for Grub 1 (RHEL 6) and Grub 2 (RHEL 7+/Fedora), do not use obsolete kernel parameters.
- Do not regenerate all the Grub configuration the user might have, just add the required parameters.
- Add kernel parameters to default grub file on Fedora/RHEL 7+ just in case the user uses grub-mkconfig.
This also simplifies Grub configuration for other distributions and removes the "upgrade path" from Fedora 16 Grub 1.
nvidia-xorg.conf | 6 ----
xorg-x11-drv-nvidia.spec | 84 ++++++++++++++++--------------------------------
xorg.conf.nvidia | 9 ++++++
3 files changed, 37 insertions(+), 62 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index 0f8ee74..ba1d1fd 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -10,8 +10,13 @@
%global _modprobe_d %{_sysconfdir}/modprobe.d/
# RHEL 6 does not have _udevrulesdir defined
%global _udevrulesdir %{_prefix}/lib/udev/rules.d/
+%global _modprobe_d %{_sysconfdir}/modprobe.d/
+%global _dracutopts nouveau.modeset=0 rdblacklist=nouveau
+%global _grubby /sbin/grubby --grub --update-kernel=ALL
%else
%global _modprobe_d %{_prefix}/lib/modprobe.d/
+%global _dracutopts nouveau.modeset=0 rd.driver.blacklist=nouveau
+%global _grubby %{_sbindir}/grubby --update-kernel=ALL
%endif
%global debug_package %{nil}
@@ -29,7 +34,7 @@ Source0: ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-L
Source1: ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x8...
Source4: ftp://download.nvidia.com/XFree86/Linux-32bit-ARM/%{version}/NVIDIA-Linux...
Source2: 99-nvidia.conf
-Source3: nvidia-xorg.conf
+Source3: xorg.conf.nvidia
Source5: 00-avoid-glamor.conf
Source6: blacklist-nouveau.conf
Source7: alternate-install-present
@@ -301,7 +306,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
install -pm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
%endif
-install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/
+%if 0%{?rhel} == 6
+install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.nvidia
+%endif
%if 0%{?fedora} <= 24
install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
@@ -386,31 +393,10 @@ fi
%post
/sbin/ldconfig
if [ "$1" -eq "1" ]; then
- ISGRUB1=""
- 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
- if [ -f /boot/grub2/grub.cfg ]; then
- /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
- fi
- if [ -f /boot/efi/EFI/fedora/grub.cfg ]; then
- /sbin/grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
- fi
- fi
- if [ -x /sbin/grubby ] ; then
- KERNELS=`/sbin/grubby --default-kernel`
- DIST=`rpm -E %%{?dist}`
- ARCH=`uname -m`
- [ -z $KERNELS ] && KERNELS=`ls /boot/vmlinuz-*${DIST}.${ARCH}*`
- for kernel in ${KERNELS} ; do
- /sbin/grubby $ISGRUB1 \
- --update-kernel=${kernel} \
- --args="nouveau.modeset=0 rd.driver.blacklist=nouveau $GFXPAYLOAD" \
- &>/dev/null
- done
- fi
+ %{_grubby} --args='%{_dracutopts}' &>/dev/null
+%if 0%{?fedora} || 0%{?rhel} >= 7
+ sed -i -e 's/GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="%{_dracutopts} /g' /etc/default/grub
+%endif
fi || :
@@ -423,37 +409,21 @@ fi || :
%post cuda-libs -p /sbin/ldconfig
+%if 0%{?rhel} == 6
+%posttrans
+[ -f %{_sysconfdir}/X11/xorg.conf ] || cp -p %{_sysconfdir}/X11/xorg.conf.nvidia %{_sysconfdir}/X11/xorg.conf || :
+%endif
%preun
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
- if [ -f /boot/grub2/grub.cfg ]; then
- /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
- fi
- if [ -f /boot/efi/EFI/fedora/grub.cfg ]; then
- /sbin/grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
- fi
- fi
- if [ -x /sbin/grubby ] ; then
- DIST=`rpm -E %%{?dist}`
- ARCH=`uname -m`
- KERNELS=`ls /boot/vmlinuz-*${DIST}.${ARCH}*`
- 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 \
- gfxpayload=vga=normal vga=normal" &>/dev/null
- done
- fi
-
- #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
+ %{_grubby} --remove-args='%{_dracutopts}' &>/dev/null
+%if 0%{?fedora} || 0%{?rhel} >= 7
+ sed -i -e 's/%{_dracutopts} //g' /etc/default/grub
+%endif
+%if 0%{?rhel} == 6
+ # Backup and disable previously used xorg.conf
+ [ -f %{_sysconfdir}/X11/xorg.conf ] && mv %{_sysconfdir}/X11/xorg.conf %{_sysconfdir}/X11/xorg.conf.nvidia_uninstalled &>/dev/null
+%endif
fi ||:
%if 0%{?rhel} > 6 || 0%{?fedora}
@@ -491,7 +461,9 @@ fi ||:
# Comment Xorg abi override
#%%config %%{_sysconfdir}/X11/xorg.conf.d/00-ignoreabi.conf
%config(noreplace) %{_modprobe_d}/blacklist-nouveau.conf
-%config(noreplace) %{_sysconfdir}/X11/nvidia-xorg.conf
+%if 0%{?rhel} == 6
+%config(noreplace) %{_sysconfdir}/X11/xorg.conf.nvidia
+%endif
%config %{_sysconfdir}/xdg/autostart/nvidia-settings.desktop
%{_bindir}/nvidia-bug-report.sh
%{_bindir}/nvidia-settings
diff --git a/xorg.conf.nvidia b/xorg.conf.nvidia
new file mode 100644
index 0000000..d894cd1
--- /dev/null
+++ b/xorg.conf.nvidia
@@ -0,0 +1,9 @@
+# RPM Fusion - xorg.conf.nvidia
+
+Section "Device"
+ Identifier "Videocard0"
+ Driver "nvidia"
+ Option "DPI" "96 x 96"
+ Option "SLI" "Auto"
+ Option "BaseMosaic" "on"
+EndSection
7 years, 7 months
[xorg-x11-drv-nvidia] Simplify folder structure.
by Nicolas Chauvet
commit 7fc8c367ea61bab898e8116f4d6087cf5e2b693e
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 10:12:29 2017 +0200
Simplify folder structure.
- Fix files listed twice during build.
- Install non conflicting libraries in standard locations, remove all redundant directory overrides for the various distributions.
- Explicitly list all libraries included in the packages, avoid too many if/exclude directives.
- Make CUDA subpackages multilib compliant (no more CUDA i686 binaries on x86_64).
- Do not require main packages for libraries subpackages, this makes possible to build things that link to Nvidia drivers using only libraries and not pulling all the graphic driver components.
- Various fixups from Nicolas Chauvet:
* buildroot
* glvnd vulkan to use _datadir
* Use nvidia_libdir for alternate install file
* arm and opencl
xorg-x11-drv-nvidia.spec | 314 +++++++++++++++++++++++------------------------
1 file changed, 152 insertions(+), 162 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index 297becd..0f8ee74 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -1,11 +1,8 @@
%global _nvidia_serie nvidia
-%if 0%{?fedora} >= 25
-%global _nvidia_libdir %{_libdir}
-%global _nvidia_serie_libdir %{_libdir}/%{_nvidia_serie}
-%global _nvidia_xorgdir %{_libdir}/%{_nvidia_serie}/xorg
-%else
%global _nvidia_libdir %{_libdir}/%{_nvidia_serie}
%global _nvidia_xorgdir %{_nvidia_libdir}/xorg
+
+%if 0%{?rhel} || 0%{?fedora} == 24
%global _glvnd_libdir %{_libdir}/libglvnd
%endif
@@ -107,7 +104,6 @@ http://rpmfusion.org/Howto/nVidia
%package devel
Summary: Development files for %{name}
Requires: %{name}-libs%{?_isa} = %{?epoch}:%{version}-%{release}
-Requires: %{name}-cuda = %{?epoch}:%{version}-%{release}
Requires: %{name}-cuda-libs%{?_isa} = %{?epoch}:%{version}-%{release}
#Don't put an epoch here
@@ -137,7 +133,6 @@ This package provides the CUDA driver.
%package cuda-libs
Summary: CUDA libraries for %{name}
-Requires: %{name}-cuda = %{?epoch}:%{version}-%{release}
%description cuda-libs
This package provides the CUDA driver libraries.
@@ -151,7 +146,6 @@ which is generated during the build of main package.
%package libs
Summary: Libraries for %{name}
-Requires: %{name} = %{?epoch}:%{version}-%{release}
Requires: libvdpau%{?_isa} >= 0.5
Requires: libglvnd%{?_isa} >= 0.2
%if 0%{?fedora} >= 25
@@ -200,136 +194,127 @@ echo "Nothing to build"
%install
-rm -rf $RPM_BUILD_ROOT
-
cd nvidiapkg
-# The new 256.x version supplies all the files in a relatively flat structure
-# .. so explicitly deal out the files to the correct places
-# .. nvidia-installer looks too closely at the current machine, so it's hard
-# .. to generate rpm's unless a NVIDIA card is in the machine.
-
-rm -f nvidia-installer*
-
-# GLVND
-rm libGL.so*
-rm libEGL.so*
-
-# Built from source
-rm -f libnvidia-egl-wayland.so*
-
-# Simple wildcard install of libs
-install -m 0755 -d $RPM_BUILD_ROOT%{_nvidia_libdir}
-install -p -m 0755 lib*.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/
+# Install only required libraries
+mkdir -p %{buildroot}%{_libdir}
+cp -a \
+ libcuda.so.%{version} \
+ libEGL_nvidia.so.%{version} \
+ libGLESv1_CM_nvidia.so.%{version} \
+ libGLESv2_nvidia.so.%{version} \
+ libGLX_nvidia.so.%{version} \
+ libnvcuvid.so.%{version} \
+ libnvidia-cfg.so.%{version} \
+ libnvidia-eglcore.so.%{version} \
+ libnvidia-encode.so.%{version} \
+ libnvidia-fatbinaryloader.so.%{version} \
+ libnvidia-fbc.so.%{version} \
+ libnvidia-glcore.so.%{version} \
+ libnvidia-glsi.so.%{version} \
+ libnvidia-gtk*.so.%{version} \
+ libnvidia-ifr.so.%{version} \
+ libnvidia-ml.so.%{version} \
+ libnvidia-ptxjitcompiler.so.%{version} \
+ %{buildroot}%{_libdir}/
+
+# Use the correct TLS implementation for x86_64/i686, already ok on ARM
+# OpenCL is only available on x86_64/i686.
%ifarch x86_64 i686
-# Use only newer ELF TLS implementation
-install -p -m 0755 tls/lib*.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/
+cp -af \
+ tls/libnvidia-tls.so* \
+ libnvidia-compiler.so.%{version} \
+ libnvidia-opencl.so.%{version} \
+ %{buildroot}%{_libdir}/
+%else
+cp -af libnvidia-tls.so* %{buildroot}%{_libdir}/
%endif
-# GlVND
-ln -s %{_libdir}/libGLX_mesa.so.0 $RPM_BUILD_ROOT%{_nvidia_libdir}/libGLX_indirect.so.0
+# Use ldconfig for libraries with a mismatching SONAME/filename
+ldconfig -vn %{buildroot}%{_libdir}/
-# Fix unowned lib links
-ln -s libEGL_nvidia.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/libEGL_nvidia.so.0
-ln -s libGLESv2_nvidia.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/libGLESv2_nvidia.so.2
-ln -s libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_nvidia_libdir}/libGLX_nvidia.so.0
+# Libraries you can link against
+for lib in libcuda libnvcuvid libnvidia-encode; do
+ ln -sf $lib.so.%{version} %{buildroot}%{_libdir}/$lib.so
+done
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-#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
+# Vdpau driver
+install -D -p -m 0755 libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.%{version}
+ln -sf libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.1
+
+%if 0%{?rhel} == 7 || 0%{?rhel} == 6 || 0%{?fedora} == 24
+# GlVND
+ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0
%endif
+# X DDX driver and GLX extension
+install -p -D -m 0755 libglx.so.%{version} %{buildroot}%{_nvidia_xorgdir}/libglx.so.%{version}
+ln -sf libglx.so.%{version} %{buildroot}%{_nvidia_xorgdir}/libglx.so
+install -D -p -m 0755 nvidia_drv.so %{buildroot}%{_libdir}/xorg/modules/drivers/nvidia_drv.so
+
%ifarch x86_64 i686
# OpenCL config
-install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors/
-install -p -m 0644 nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors/
+install -m 0755 -d %{buildroot}%{_sysconfdir}/OpenCL/vendors/
+install -p -m 0644 nvidia.icd %{buildroot}%{_sysconfdir}/OpenCL/vendors/
# Vulkan config
-install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/vulkan/icd.d/
-install -p -m 0644 nvidia_icd.json $RPM_BUILD_ROOT%{_sysconfdir}/vulkan/icd.d/
+install -m 0755 -d %{buildroot}%{_datadir}/vulkan/icd.d/
+install -p -m 0644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/
%endif
# EGL config
-install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/glvnd/egl_vendor.d/
-install -p -m 0644 10_nvidia.json $RPM_BUILD_ROOT%{_sysconfdir}/glvnd/egl_vendor.d/
-
-#Vdpau
-install -m 0755 -d $RPM_BUILD_ROOT%{_libdir}/vdpau/
-install -p -m 0755 libvdpau*.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau
-
-#
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/
-mkdir -p $RPM_BUILD_ROOT%{_nvidia_xorgdir}
-
-# .. but some in a different place
-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 libglx.so.%{version} $RPM_BUILD_ROOT%{_nvidia_xorgdir}
-install -p -m 0755 nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/
+install -m 0755 -d %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
+install -p -m 0644 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
# ld.so.conf.d file
%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-install -m 0755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/
-echo -e "%{_nvidia_libdir} \n%{_glvnd_libdir} \n" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
+install -m 0755 -d %{buildroot}%{_sysconfdir}/ld.so.conf.d/
+echo -e "%{_glvnd_libdir} \n" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%endif
# Blacklist nouveau, autoload nvidia-uvm module after nvidia module
-install -m 0755 -d $RPM_BUILD_ROOT%{_modprobe_d}/
-install -p -m 0644 %{SOURCE6} %{SOURCE15} $RPM_BUILD_ROOT%{_modprobe_d}/
+install -m 0755 -d %{buildroot}%{_modprobe_d}/
+install -p -m 0644 %{SOURCE6} %{SOURCE15} %{buildroot}%{_modprobe_d}/
# UDev rules for nvidia-uvm
-install -m 0755 -d $RPM_BUILD_ROOT%{_udevrulesdir}
-install -p -m 0644 %{SOURCE14} $RPM_BUILD_ROOT%{_udevrulesdir}
+install -m 0755 -d %{buildroot}%{_udevrulesdir}
+install -p -m 0644 %{SOURCE14} %{buildroot}%{_udevrulesdir}
# Install binaries
-install -m 0755 -d $RPM_BUILD_ROOT%{_bindir}
+install -m 0755 -d %{buildroot}%{_bindir}
install -p -m 0755 nvidia-{bug-report.sh,debugdump,smi,cuda-mps-control,cuda-mps-server,xconfig,settings,persistenced} \
- $RPM_BUILD_ROOT%{_bindir}
+ %{buildroot}%{_bindir}
# Install headers
-install -m 0755 -d $RPM_BUILD_ROOT%{_includedir}/nvidia/GL/
-install -p -m 0644 {gl.h,glext.h,glx.h,glxext.h} $RPM_BUILD_ROOT%{_includedir}/nvidia/GL/
+install -m 0755 -d %{buildroot}%{_includedir}/nvidia/GL/
+install -p -m 0644 {gl.h,glext.h,glx.h,glxext.h} %{buildroot}%{_includedir}/nvidia/GL/
# Install man pages
-install -m 0755 -d $RPM_BUILD_ROOT%{_mandir}/man1/
+install -m 0755 -d %{buildroot}%{_mandir}/man1/
install -p -m 0644 nvidia-{cuda-mps-control,persistenced,settings,smi,xconfig}.1.gz \
- $RPM_BUILD_ROOT%{_mandir}/man1/
-
-# Make unversioned links to dynamic libs
-for lib in $( find $RPM_BUILD_ROOT%{_libdir} -name lib\*.%{version} ) ; do
- ln -s ${lib##*/} ${lib%.%{version}}
- ln -s ${lib##*/} ${lib%.%{version}}.1
-done
-
+ %{buildroot}%{_mandir}/man1/
# 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%{_nvidia_libdir}/libnvidia-{cfg,tls}.so
+mkdir -p %{buildroot}%{_datadir}/pixmaps
+install -pm 0644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps
#Install static driver dependant configuration files
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
+mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-install -pm 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
+install -pm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
%endif
-install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/
+install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/
%if 0%{?fedora} <= 24
-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/99-nvidia.conf
-touch -r %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
+touch -r %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%endif
# Comment Xorg abi override
-#install -pm 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
+#install -pm 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
# Fix desktop file and validate
sed -i -e 's|__UTILS_PATH__/||g' -e 's|__PIXMAP_PATH__/||g' nvidia-settings.desktop
sed -i -e 's|nvidia-settings.png|nvidia-settings|g' nvidia-settings.desktop
desktop-file-install --vendor "" \
- --dir $RPM_BUILD_ROOT%{_datadir}/applications/ \
+ --dir %{buildroot}%{_datadir}/applications/ \
nvidia-settings.desktop
%if 0%{?rhel} < 8 || 0%{?fedora} <= 24
@@ -338,52 +323,52 @@ ln -fs ../../%{_nvidia_serie}/xorg $RPM_BUILD_ROOT%{_libdir}/xorg/modules/%{_nvi
%endif
#Alternate-install-present is checked by the nvidia .run
-install -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_nvidia_libdir}
+install -p -m 0644 %{SOURCE7} %{buildroot}%{_nvidia_libdir}
#install the NVIDIA supplied application profiles
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/nvidia
-install -p -m 0644 nvidia-application-profiles-%{version}-{rc,key-documentation} $RPM_BUILD_ROOT%{_datadir}/nvidia
+mkdir -p %{buildroot}%{_datadir}/nvidia
+install -p -m 0644 nvidia-application-profiles-%{version}-{rc,key-documentation} %{buildroot}%{_datadir}/nvidia
#Install the output class configuration file - xorg-server >= 1.16
%if 0%{?fedora} >= 25
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d
-install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/nvidia.conf
-sed -i -e 's|@LIBDIR@|%{_libdir}|g' $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/nvidia.conf
-touch -r %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/nvidia.conf
+mkdir -p %{buildroot}%{_datadir}/X11/xorg.conf.d
+install -pm 0644 %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
+touch -r %{SOURCE10} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
%endif
%if 0%{?rhel} == 7 || 0%{?fedora} == 24
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d
-install -pm 0644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/nvidia.conf
+mkdir -p %{buildroot}%{_datadir}/X11/xorg.conf.d
+install -pm 0644 %{SOURCE8} %{buildroot}%{_datadir}/X11/xorg.conf.d/nvidia.conf
%endif
#Install the initscript
tar jxf nvidia-persistenced-init.tar.bz2
%if 0%{?rhel} > 6 || 0%{?fedora}
-mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+mkdir -p %{buildroot}%{_unitdir}
install -pm 0644 nvidia-persistenced-init/systemd/nvidia-persistenced.service.template \
- $RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.service
+ %{buildroot}%{_unitdir}/nvidia-persistenced.service
#Change the daemon running owner
-sed -i -e "s/__USER__/root/" $RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.service
+sed -i -e "s/__USER__/root/" %{buildroot}%{_unitdir}/nvidia-persistenced.service
%endif
#Create the default nvidia config directory
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/nvidia
+mkdir -p %{buildroot}%{_sysconfdir}/nvidia
#Ghost Xorg nvidia.conf file
-touch $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
+touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
#Install the nvidia kernel modules sources archive
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/nvidia-kmod-%{version}
-tar Jcf $RPM_BUILD_ROOT%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_target_cpu}.tar.xz kernel
+mkdir -p %{buildroot}%{_datadir}/nvidia-kmod-%{version}
+tar Jcf %{buildroot}%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_target_cpu}.tar.xz kernel
#Add autostart file for nvidia-settings to load user config
-install -D -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/nvidia-settings.desktop
+install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/xdg/autostart/nvidia-settings.desktop
%if 0%{?fedora} >= 25
# install AppData and add modalias provides
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata/
-install -pm 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/appdata/
-fn=$RPM_BUILD_ROOT%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
+mkdir -p %{buildroot}%{_datadir}/appdata/
+install -pm 0644 %{SOURCE12} %{buildroot}%{_datadir}/appdata/
+fn=%{buildroot}%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{SOURCE13} README.txt "NVIDIA GEFORCE GPUS" | xargs appstream-util add-provide ${fn} modalias
%{SOURCE13} README.txt "NVIDIA QUADRO GPUS" | xargs appstream-util add-provide ${fn} modalias
%{SOURCE13} README.txt "NVIDIA NVS GPUS" | xargs appstream-util add-provide ${fn} modalias
@@ -432,7 +417,6 @@ fi || :
%post libs -p /sbin/ldconfig
%post cuda
-/sbin/ldconfig
%if 0%{?rhel} > 6 || 0%{?fedora}
%systemd_post nvidia-persistenced.service
%endif
@@ -482,7 +466,6 @@ fi ||:
%postun libs -p /sbin/ldconfig
%postun cuda
-/sbin/ldconfig
%if 0%{?rhel} > 6 || 0%{?fedora}
%systemd_postun_with_restart nvidia-persistenced.service
%endif
@@ -496,9 +479,9 @@ fi ||:
%doc nvidiapkg/nvidia-application-profiles-%{version}-rc
%doc nvidiapkg/html
%ifarch x86_64 i686
-%config %{_sysconfdir}/vulkan/icd.d/nvidia_icd.json
+%{_datadir}/vulkan/icd.d/nvidia_icd.json
%endif
-%config %{_sysconfdir}/glvnd/egl_vendor.d/10_nvidia.json
+%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
%dir %{_sysconfdir}/nvidia
%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
@@ -514,24 +497,23 @@ fi ||:
%{_bindir}/nvidia-settings
%{_bindir}/nvidia-xconfig
# Xorg libs that do not need to be multilib
-%if 0%{?fedora} >= 25
-%{_nvidia_serie_libdir}
-%endif
-%{_nvidia_xorgdir}
+%dir %{_nvidia_xorgdir}
+%{_nvidia_xorgdir}/libglx.so
+%{_nvidia_xorgdir}/libglx.so.%{version}
%{_libdir}/xorg/modules/drivers/nvidia_drv.so
%if 0%{?rhel} < 8 || 0%{?fedora} <= 24
%{_libdir}/xorg/modules/%{_nvidia_serie}-%{version}
%endif
%ifarch %{arm}
-%{_nvidia_libdir}/libnvidia-gtk2.so*
+%{_libdir}/libnvidia-gtk2.so.%{version}
%endif
%ifarch x86_64 i686
%if 0%{?rhel} == 6
-%exclude %{_nvidia_libdir}/libnvidia-gtk3.so*
-%{_nvidia_libdir}/libnvidia-gtk2.so*
+%exclude %{_libdir}/libnvidia-gtk3.so.%{version}
+%{_libdir}/libnvidia-gtk2.so.%{version}
%else
-%exclude %{_nvidia_libdir}/libnvidia-gtk2.so*
-%{_nvidia_libdir}/libnvidia-gtk3.so*
+%exclude %{_libdir}/libnvidia-gtk2.so.%{version}
+%{_libdir}/libnvidia-gtk3.so.%{version}
%endif
%endif
#/no_multilib
@@ -555,22 +537,33 @@ fi ||:
%files libs
%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
%config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
-%dir %{_nvidia_libdir}
+%dir %{_libdir}
%endif
+%dir %{_nvidia_libdir}
%{_nvidia_libdir}/alternate-install-present
-%{_nvidia_libdir}/*.so.*
-%exclude %{_nvidia_libdir}/libcuda.so*
-%exclude %{_nvidia_libdir}/libnvidia-gtk*.so*
-%exclude %{_nvidia_libdir}/libnvcuvid.so*
-%exclude %{_nvidia_libdir}/libnvidia-encode.so*
-%exclude %{_nvidia_libdir}/libnvidia-fatbinaryloader.so*
-%exclude %{_nvidia_libdir}/libnvidia-ml.so*
-%exclude %{_nvidia_libdir}/libnvidia-ptxjitcompiler.so*
-%ifarch x86_64 i686
-%exclude %{_nvidia_libdir}/libnvidia-compiler.so*
-%exclude %{_nvidia_libdir}/libnvidia-opencl.so*
-%endif
-%{_libdir}/vdpau/libvdpau_nvidia.so.*
+%{_libdir}/libEGL_nvidia.so.0
+%{_libdir}/libEGL_nvidia.so.%{version}
+%{_libdir}/libGLESv1_CM_nvidia.so.1
+%{_libdir}/libGLESv1_CM_nvidia.so.%{version}
+%{_libdir}/libGLESv2_nvidia.so.2
+%{_libdir}/libGLESv2_nvidia.so.%{version}
+%if 0%{?rhel} == 7 || 0%{?rhel} == 6 || 0%{?fedora} == 24
+%{_libdir}/libGLX_indirect.so.0
+%endif
+%{_libdir}/libGLX_nvidia.so.0
+%{_libdir}/libGLX_nvidia.so.%{version}
+%{_libdir}/libnvidia-cfg.so.1
+%{_libdir}/libnvidia-cfg.so.%{version}
+%{_libdir}/libnvidia-eglcore.so.%{version}
+%{_libdir}/libnvidia-fbc.so.1
+%{_libdir}/libnvidia-fbc.so.%{version}
+%{_libdir}/libnvidia-glcore.so.%{version}
+%{_libdir}/libnvidia-glsi.so.%{version}
+%{_libdir}/libnvidia-ifr.so.1
+%{_libdir}/libnvidia-ifr.so.%{version}
+%{_libdir}/libnvidia-tls.so.%{version}
+%{_libdir}/vdpau/libvdpau_nvidia.so.1
+%{_libdir}/vdpau/libvdpau_nvidia.so.%{version}
%files cuda
%license nvidiapkg/LICENSE
@@ -582,15 +575,7 @@ fi ||:
%{_bindir}/nvidia-cuda-mps-control
%{_bindir}/nvidia-cuda-mps-server
%{_bindir}/nvidia-persistenced
-%if 0%{?rhel} > 6 || 0%{?fedora} <= 24
-%{_libdir}/libcuda.so*
-%endif
-%{_nvidia_libdir}/libnvidia-fatbinaryloader.so*
-%{_nvidia_libdir}/libnvidia-ml.so*
-%{_nvidia_libdir}/libnvidia-ptxjitcompiler.so*
%ifarch x86_64 i686
-%{_nvidia_libdir}/libnvidia-compiler.so*
-%{_nvidia_libdir}/libnvidia-opencl.so*
%config %{_sysconfdir}/OpenCL/vendors/nvidia.icd
%endif
%{_mandir}/man1/nvidia-smi.*
@@ -600,22 +585,27 @@ fi ||:
%{_udevrulesdir}/60-nvidia-uvm.rules
%files cuda-libs
-%{_nvidia_libdir}/libcuda.so*
-%{_nvidia_libdir}/libnvcuvid.so*
-%{_nvidia_libdir}/libnvidia-encode.so*
+%{_libdir}/libcuda.so
+%{_libdir}/libcuda.so.1
+%{_libdir}/libcuda.so.%{version}
+%{_libdir}/libnvcuvid.so.1
+%{_libdir}/libnvcuvid.so.%{version}
+%{_libdir}/libnvidia-encode.so.1
+%{_libdir}/libnvidia-encode.so.%{version}
+%{_libdir}/libnvidia-fatbinaryloader.so.%{version}
+%{_libdir}/libnvidia-ml.so.1
+%{_libdir}/libnvidia-ml.so.%{version}
+%{_libdir}/libnvidia-ptxjitcompiler.so.%{version}
+%ifarch x86_64 i686
+%{_libdir}/libnvidia-compiler.so.%{version}
+%{_libdir}/libnvidia-opencl.so.1
+%{_libdir}/libnvidia-opencl.so.%{version}
+%endif
%files devel
%{_includedir}/nvidia/
-%{_libdir}/vdpau/libvdpau_nvidia.so
-%{_nvidia_libdir}/libnvidia-ifr.so
-%{_nvidia_libdir}/libEGL_nvidia.so
-%{_nvidia_libdir}/libGLESv1_CM_nvidia.so
-%{_nvidia_libdir}/libGLESv2_nvidia.so
-%{_nvidia_libdir}/libnvidia-eglcore.so
-%{_nvidia_libdir}/libnvidia-fbc.so
-%{_nvidia_libdir}/libnvidia-glcore.so
-%{_nvidia_libdir}/libnvidia-glsi.so
-%{_nvidia_libdir}/libGLX_nvidia.so
+%{_libdir}/libnvcuvid.so
+%{_libdir}/libnvidia-encode.so
%changelog
* Fri Apr 07 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:381.09-1
7 years, 7 months
[xorg-x11-drv-nvidia] Remove no longer existing conflicting packages
by Nicolas Chauvet
commit 3a0b78041a9584e03f94eb8eb4e5a2206678b59e
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Mar 6 15:29:43 2017 +0100
Remove no longer existing conflicting packages
xorg-x11-drv-nvidia.spec | 5 -----
1 file changed, 5 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index a389942..297becd 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -75,11 +75,6 @@ Requires: xorg-x11-server-Xorg%{?_isa} >= 1.19.0-3
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
-Conflicts: xorg-x11-drv-nvidia-96xx
-Conflicts: xorg-x11-drv-nvidia-173xx
Conflicts: xorg-x11-drv-nvidia-304xx
Conflicts: xorg-x11-drv-nvidia-340xx
Conflicts: xorg-x11-drv-fglrx
7 years, 7 months