rebuilt with libglvnd and libmesa [release 465.24.02-2mamba;Fri Apr 23 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 07:44:40 +01:00
parent 77fd31ed69
commit 08459bd636
3 changed files with 243 additions and 271 deletions

View File

@ -0,0 +1,8 @@
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
ModulePath "/usr/lib64/nvidia/xorg"
ModulePath "/usr/lib64/xorg/modules"
EndSection

View File

@ -1,7 +1,7 @@
%define nvidia_current_ver %version %define nvidia_current_ver %version
%define nvidia_current_libver %version %define nvidia_current_libver %version
Name: nvidia Name: nvidia
Version: 390.138 Version: 465.24.02
Epoch: 1 Epoch: 1
Release: 2mamba Release: 2mamba
Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel
@ -9,114 +9,91 @@ Group: System/Kernel and Hardware
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.nvidia.com/object/unix.html URL: https://www.nvidia.com/object/unix.html
Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{nvidia_current_ver}/NVIDIA-Linux-x86-%{nvidia_current_ver}.run Source0: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{nvidia_current_ver}/NVIDIA-Linux-x86_64-%{nvidia_current_ver}.run
Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{nvidia_current_ver}/NVIDIA-Linux-x86_64-%{nvidia_current_ver}.run Source1: nvidia.sysusers
Source2: nvidia-drm-outputclass.conf
Patch0: nvidia-331.20-x86-conftest.patch Patch0: nvidia-331.20-x86-conftest.patch
Patch1: nvidia-367.35-kernel-4.6.patch Patch1: nvidia-367.35-kernel-4.6.patch
License: no OSI Approved License: no OSI Approved
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libgcc
BuildRequires: libglvnd-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
ExclusiveArch: i586 x86_64 ExclusiveArch: x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
nvidia proprietary accelerated drivers for the Linux Kernel. nvidia proprietary accelerated drivers for the Linux Kernel.
These packages contains parts that are not (fully) released under GPL license. These packages contains parts that are not (fully) released under GPL license.
These modules are packaged apart from the main kernel modules because they are not fully released as GPL. This means that some modules might have been built from binary objects distributed by the hardware manufacturer. By loading this modules you will "taint" the kernel, which means that your running system won't be 100% GPL. These modules are packaged apart from the main kernel modules because they are not fully released as GPL. This means that some modules might have been built from binary objects distributed by the hardware manufacturer. By loading this modules you will "taint" the kernel, which means that your running system won't be 100% GPL.
%package -n xorg-drv-video-nvidia %package -n xorg-drv-video-%{name}
Group: System/Kernel and Hardware Group: System/Kernel and Hardware
Summary: NVIDIA Accelerated Libraries for Xorg Summary: NVIDIA Accelerated Libraries for Xorg
Requires: xorg-server >= 1.1.0 Requires: xorg-server >= 1.1.0
Requires(post):kernelheaders Requires(post):kernelheaders
Requires(post):dkms Requires(post):dkms
Requires(pre): xorg-ext-libglx-nvidia == %{epoch}:%{version}-%{release}
Requires(pre): libGL-nvidia-X11 == %{epoch}:%{version}-%{release}
Provides: Xorg-nvidia Provides: Xorg-nvidia
Provides: xorgdrvvideo Provides: xorgdrvvideo
Provides: kernelnvidia Provides: kernelnvidia
Conflicts: xorg-drv-video-nvidia_304 Conflicts: xorg-drv-video-nvidia_304
AutoReq: no Conflicts: xorg-drv-video-nvidia_340
Conflicts: xorg-drv-video-nvidia_390
Conflicts: libGL-nvidia_304-X11
Conflicts: libGL-nvidia_340-X11
Conflicts: libGL-nvidia_390-X11
Obsoletes: libGL-nvidia_450-X11 <= 1:460.39
Obsoletes: xorg-drv-video-nvidia_450 <= 1:460.39
Provides: libGL-%{name}-X11
Obsoletes: libGL-%{name}-X11 < 1:465.24.02-2mamba
Provides: xorg-ext-libglx-%{name}
Obsoletes: xorg-ext-libglx-%{name} < 1:465.24.02-2mamba
Provides: xorg-apps-%{name}
Obsoletes: xorg-apps-%{name} < 1:465.24.02-2mamba
Obsoletes: libglx-nvidia < 1:460.39
Conflicts: xorg-ext-libglx-nvidia_304
Conflicts: xorg-ext-libglx-nvidia_340
Conflicts: xorg-ext-libglx-nvidia_390
Obsoletes: xorg-ext-libglx-nvidia_450 <= 1:460.39
Conflicts: xorg-apps-nvidia_304
Conflicts: xorg-apps-nvidia_340
Conflicts: xorg-apps-nvidia_390
Obsoletes: xorg-apps-nvidia_450 <= 1:460.39
%description -n xorg-drv-video-nvidia %description -n xorg-drv-video-%{name}
The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs). The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs).
These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips. These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips.
TwinView, TV-Out and flat panel displays are also supported. TwinView, TV-Out and flat panel displays are also supported.
This package contains the Xorg libraries, DKMS kernel driver and all the NVIDIA libraries.
This package contains the Xorg libraries. %package -n xorg-drv-video-%{name}-doc
%package -n libGL-nvidia-X11
Group: System/Libraries
Summary: NVIDIA proprietary OpenGL library implementation
Requires: xorg-ext-libglx-nvidia == %{epoch}:%{version}-%{release}
Provides: xorglibGL
Provides: libGL.so.1
Conflicts: libGL-nvidia_304-X11
%description -n libGL-nvidia-X11
The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs).
These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips.
TwinView, TV-Out and flat panel displays are also supported.
This package contains the NVIDIA proprietary OpenGL library implementation for Xorg.
%package -n xorg-ext-libglx-nvidia
Group: System/Libraries
Summary: NVIDIA proprietary glx library implementation
Provides: xorglibglx
Obsoletes: libglx-nvidia
Conflicts: xorg-ext-libglx-nvidia_304
%description -n xorg-ext-libglx-nvidia
The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs).
These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips.
TwinView, TV-Out and flat panel displays are also supported.
This package contains the NVIDIA proprietary glx library implementation for Xorg.
%package -n xorg-apps-nvidia
Group: System/Tools
Summary: NVIDIA configuration tools
Conflicts: xorg-apps-nvidia_304
%description -n xorg-apps-nvidia
The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs).
These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips.
TwinView, TV-Out and flat panel displays are also supported.
This package contains the NVIDIA tools nvidia-settings, nvidia-xconfig, and nvidia-smi.
%package -n xorg-drv-video-nvidia-doc
Group: Documentation Group: Documentation
Summary: HTML documentation for NVIDIA Accelerated Libraries for Xorg Summary: HTML documentation for NVIDIA Accelerated Libraries for Xorg
Conflicts: xorg-drv-video-nvidia_304-doc Conflicts: xorg-drv-video-nvidia_304-doc
AutoReq: no Conflicts: xorg-drv-video-nvidia_340-doc
Conflicts: xorg-drv-video-nvidia_390-doc
Obsoletes: xorg-drv-video-nvidia_450-doc <= 1:460.39
%description -n xorg-drv-video-nvidia-doc %description -n xorg-drv-video-%{name}-doc
The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs). The NVIDIA Accelerated Linux Driver Set brings both accelerated 2D functionality and high performance OpenGL support to Linux x86 with theuse of NVIDIA graphics processing units (GPUs).
These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips. These drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server and support nearly all NVIDIA graphics chips.
TwinView, TV-Out and flat panel displays are also supported. TwinView, TV-Out and flat panel displays are also supported.
This package contains the HTML documentation. This package contains the HTML documentation.
%prep %prep
%setup -q -c -n %{name}-%{version} -T %setup -q -c -n %{name}-%{version} -T
%global __provides_exclude ^(libGL\\.so.*|libEGL\\.so.*|libGLESv1_CM\\.so.*|libGLESv2\\.so.*|libOpenCL\\.so.*)$
#% global __requires_exclude ^(libGLX.so.0.*|libGLdispatch.)$
# #
# unpack NVIDIA files # unpack NVIDIA files
# #
%if "%{_target_cpu}" == "x86_64" sh %{SOURCE0} --extract-only
sh %{SOURCE1} --extract-only ln -sf NVIDIA-Linux-x86_64-%{nvidia_current_ver} current
ln -sf NVIDIA-Linux-x86_64-%{nvidia_current_ver} current
%else
sh %{SOURCE0} --extract-only
ln -sf NVIDIA-Linux-x86-%{nvidia_current_ver} current
%endif
sed -i "s|__UTILS_PATH__|%{_bindir}|;s|__PIXMAP_PATH__|%{_datadir}/pixmaps|" \ sed -i "s|__UTILS_PATH__|%{_bindir}|;s|__PIXMAP_PATH__|%{_datadir}/pixmaps|" \
current/nvidia-settings.desktop current/nvidia-settings.desktop
@ -124,6 +101,7 @@ sed -i "s|__UTILS_PATH__|%{_bindir}|;s|__PIXMAP_PATH__|%{_datadir}/pixmaps|" \
cd current cd current
#%patch0 -p1 #%patch0 -p1
#%patch1 -p1 #%patch1 -p1
tar xf nvidia-persistenced-init.tar.bz2
cd .. cd ..
%build %build
@ -132,96 +110,136 @@ cd ..
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
pushd current pushd current
install -D -m 0755 libnvidia-wfb.so.%{nvidia_current_libver} \ # From Arch Linux
%{buildroot}%{_libdir}/xorg/modules/libnvidia-wfb.so.%{nvidia_current_libver} # X driver
install -D -m755 nvidia_drv.so %{buildroot}%{_libdir}/xorg/modules/drivers/nvidia_drv.so
install -D -m 0755 libcuda.so.%{nvidia_current_libver} \ # firmware
%{buildroot}%{_libdir}/libcuda.so.%{nvidia_current_libver} install -D -m644 firmware/gsp.bin %{buildroot}/lib/firmware/nvidia/%{version}/gsp.bin
install -D -m 0755 libGL.so.%{nvidia_current_libver} \ # GLX extension module for X
%{buildroot}%{_libdir}/libGL_so.%{nvidia_current_libver} install -D -m755 libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia/xorg/libglxserver_nvidia.so.%{version}
ln -s libGL_so.%{nvidia_current_libver} %{buildroot}%{_libdir}/libGL_current_so.1
install -D -m 0755 libglx.so.%{nvidia_current_libver} \ # Ensure that X finds glx
%{buildroot}%{_libdir}/xorg/modules/extensions/libglx_so.%{nvidia_current_libver} ln -s libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia/xorg/libglxserver_nvidia.so.1
ln -s libglx_so.%{nvidia_current_libver} \ ln -s libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia/xorg/libglxserver_nvidia.so
%{buildroot}%{_libdir}/xorg/modules/extensions/libglx_current_so
install -D -m 0755 libnvcuvid.so.%{nvidia_current_libver} \ install -D -m755 libGLX_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLX_nvidia.so.%{version}
%{buildroot}%{_libdir}/libnvcuvid.%{nvidia_current_libver}
install -D -m 0755 libnvidia-cfg.so.%{nvidia_current_libver} \ # OpenGL libraries
%{buildroot}%{_libdir}/libnvidia-cfg_so.%{nvidia_current_libver} install -D -m755 libEGL_nvidia.so.%{version} %{buildroot}%{_libdir}/libEGL_nvidia.so.%{version}
ln -s libnvidia-cfg_so.%{nvidia_current_libver} \ install -D -m755 libGLESv1_CM_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLESv1_CM_nvidia.so.%{version}
%{buildroot}%{_libdir}/libnvidia-cfg_current_so install -D -m755 libGLESv2_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLESv2_nvidia.so.%{version}
install -D -m644 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
install -D -m 0755 libnvidia-compiler.so.%{nvidia_current_libver} \ # OpenGL core library
%{buildroot}%{_libdir}/libnvidia-compiler.%{nvidia_current_libver} install -D -m755 libnvidia-glcore.so.%{version} %{buildroot}%{_libdir}/libnvidia-glcore.so.%{version}
install -D -m755 libnvidia-eglcore.so.%{version} %{buildroot}%{_libdir}/libnvidia-eglcore.so.%{version}
install -D -m755 libnvidia-glsi.so.%{version} %{buildroot}%{_libdir}/libnvidia-glsi.so.%{version}
install -D -m 0755 libnvidia-encode.so.%{nvidia_current_libver} \ # OpenCL
%{buildroot}%{_libdir}/libnvidia-encode.%{nvidia_current_libver} install -D -m644 nvidia.icd %{buildroot}%{_sysconfdir}/OpenCL/vendors/nvidia.icd
install -D -m755 libnvidia-compiler.so.%{version} %{buildroot}%{_libdir}/libnvidia-compiler.so.%{version}
install -D -m755 libnvidia-opencl.so.%{version} %{buildroot}%{_libdir}/libnvidia-opencl.so.%{version}
install -D -m 0755 libnvidia-glcore.so.%{nvidia_current_libver} \ # misc
%{buildroot}%{_libdir}/libnvidia-glcore.so.%{nvidia_current_libver} install -D -m755 libnvidia-ifr.so.%{version} %{buildroot}%{_libdir}/libnvidia-ifr.so.%{version}
install -D -m755 libnvidia-fbc.so.%{version} %{buildroot}%{_libdir}/libnvidia-fbc.so.%{version}
install -D -m755 libnvidia-encode.so.%{version} %{buildroot}%{_libdir}/libnvidia-encode.so.%{version}
install -D -m755 libnvidia-cfg.so.%{version} %{buildroot}%{_libdir}/libnvidia-cfg.so.%{version}
install -D -m755 libnvidia-ml.so.%{version} %{buildroot}%{_libdir}/libnvidia-ml.so.%{version}
install -D -m755 libnvidia-ngx.so.%{version} %{buildroot}%{_libdir}/libnvidia-ngx.so.%{version}
install -D -m755 libnvidia-glvkspirv.so.%{version} %{buildroot}%{_libdir}/libnvidia-glvkspirv.so.%{version}
install -D -m 0755 libnvidia-ml.so.%{nvidia_current_libver} \ # Vulkan ICD
%{buildroot}%{_libdir}/libnvidia-ml.so.%{nvidia_current_libver} install -D -m644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.json
ln -s libnvidia-ml.so.%{nvidia_current_libver} \ install -D -m644 nvidia_layers.json %{buildroot}%{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json
%{buildroot}%{_libdir}/libnvidia-ml.so.1
install -D -m 0755 libnvidia-opencl.so.%{nvidia_current_libver} \ # VDPAU
%{buildroot}%{_libdir}/libnvidia-opencl.so.%{nvidia_current_libver} install -D -m755 libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.%{version}
install -D -m 0755 tls/libnvidia-tls.so.%{nvidia_current_libver} \ # nvidia-tls library
%{buildroot}%{_libdir}/tls/libnvidia-tls.so.%{nvidia_current_libver} install -D -m755 libnvidia-tls.so.%{version} %{buildroot}%{_libdir}/libnvidia-tls.so.%{version}
install -D -m 0755 libnvidia-tls.so.%{nvidia_current_libver} \ # CUDA
%{buildroot}%{_libdir}/libnvidia-tls.so.%{nvidia_current_libver} install -D -m755 libcuda.so.%{version} %{buildroot}%{_libdir}/libcuda.so.%{version}
install -D -m755 libnvcuvid.so.%{version} %{buildroot}%{_libdir}/libnvcuvid.so.%{version}
install -D -m 0755 libnvidia-wfb.so.%{nvidia_current_libver} \ # PTX JIT Compiler (Parallel Thread Execution (PTX) is a pseudo-assembly language for CUDA)
%{buildroot}%{_libdir}/libnvidia-wfb.so.%{nvidia_current_libver} install -D -m755 libnvidia-ptxjitcompiler.so.%{version} %{buildroot}%{_libdir}/libnvidia-ptxjitcompiler.so.%{version}
install -D -m755 libOpenCL.so.1.0.0 \ # raytracing
%{buildroot}%{_libdir}/libOpenCL_nvidia_so.1.0.0 install -D -m755 libnvoptix.so.%{version} %{buildroot}%{_libdir}/libnvoptix.so.%{version}
install -D -m755 libnvidia-rtcore.so.%{version} %{buildroot}%{_libdir}/libnvidia-rtcore.so.%{version}
install -D -m755 libnvidia-cbl.so.%{version} %{buildroot}%{_libdir}/libnvidia-cbl.so.%{version}
install -D -m755 libvdpau_nvidia.so.%{nvidia_current_libver} \ # Optical flow
%{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.%{nvidia_current_libver} install -D -m755 libnvidia-opticalflow.so.%{version} %{buildroot}%{_libdir}/libnvidia-opticalflow.so.%{version}
ln -s libvdpau_nvidia.so.%{nvidia_current_libver} \
%{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so
install -D -m 0755 nvidia_drv.so \ # DEBUG
%{buildroot}%{_libdir}/xorg/modules/drivers/nvidia_current_drv_so install -D -m755 nvidia-debugdump %{buildroot}%{_bindir}/nvidia-debugdump
install -d %{buildroot}%{_sbindir} # nvidia-xconfig
cat > %{buildroot}%{_sbindir}/update-alternatives-set-nvidia << _EOF install -D -m755 nvidia-xconfig %{buildroot}%{_bindir}/nvidia-xconfig
#!/bin/sh install -D -m644 nvidia-xconfig.1.gz %{buildroot}%{_mandir}/man1/nvidia-xconfig.1.gz
#update-alternatives --set nvidia_\$(uname -r)_%{kernel_ver_u}.ko \
#/lib/modules/\$(uname -r)/kernel/drivers/video/nvidia_current_ko # nvidia-settings
update-alternatives --set libglx.so %{_libdir}/xorg/modules/extensions/libglx_current_so install -D -m755 nvidia-settings %{buildroot}%{_bindir}/nvidia-settings
update-alternatives --set nvidia_drv.so %{_libdir}/xorg/modules/drivers/nvidia_current_drv_so install -D -m644 nvidia-settings.1.gz %{buildroot}%{_mandir}/man1/nvidia-settings.1.gz
update-alternatives --set libGL.so.1 %{_libdir}/libGL_current_so.1 install -D -m644 nvidia-settings.desktop %{buildroot}%{_datadir}/applications/nvidia-settings.desktop
update-alternatives --set libXvMCNVIDIA_dynamic.so %{_libdir}/libXvMCNVIDIA_current_so install -D -m644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/nvidia-settings.png
update-alternatives --set libnvidia-cfg.so %{_libdir}/libnvidia-cfg_current_so sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i %{buildroot}%{_datadir}/applications/nvidia-settings.desktop
update-alternatives --set libOpenCL.so.1 %{_libdir}/libOpenCL_nvidia_so.1.0.0
#update-alternatives --set libnvidia-tls.so.1.lib %{_libdir}/libnvidia-tls_current_so.1 # nvidia-bug-report
#update-alternatives --set libnvidia-tls.so.1 %{_libdir}/tls/libnvidia-tls_current_so.1 install -D -m755 nvidia-bug-report.sh %{buildroot}%{_bindir}/nvidia-bug-report.sh
_EOF
# nvidia-smi
install -D -m755 nvidia-smi %{buildroot}%{_bindir}/nvidia-smi
install -D -m644 nvidia-smi.1.gz %{buildroot}%{_mandir}/man1/nvidia-smi.1.gz
# nvidia-cuda-mps
install -D -m755 nvidia-cuda-mps-server %{buildroot}%{_bindir}/nvidia-cuda-mps-server
install -D -m755 nvidia-cuda-mps-control %{buildroot}%{_bindir}/nvidia-cuda-mps-control
install -D -m644 nvidia-cuda-mps-control.1.gz %{buildroot}%{_mandir}/man1/nvidia-cuda-mps-control.1.gz
# nvidia-modprobe
# This should be removed if nvidia fixed their uvm module!
install -D -m4755 nvidia-modprobe %{buildroot}%{_bindir}/nvidia-modprobe
install -D -m644 nvidia-modprobe.1.gz %{buildroot}%{_mandir}/man1/nvidia-modprobe.1.gz
# nvidia-persistenced
install -D -m755 nvidia-persistenced %{buildroot}%{_bindir}/nvidia-persistenced
install -D -m644 nvidia-persistenced.1.gz %{buildroot}%{_mandir}/man1/nvidia-persistenced.1.gz
install -D -m644 nvidia-persistenced-init/systemd/nvidia-persistenced.service.template %{buildroot}%{_unitdir}/nvidia-persistenced.service
sed -i 's/__USER__/nvidia-persistenced/' %{buildroot}%{_unitdir}/nvidia-persistenced.service
# application profiles
install -D -m644 nvidia-application-profiles-%{version}-rc %{buildroot}%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
install -D -m644 nvidia-application-profiles-%{version}-key-documentation %{buildroot}%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
# new power management support
install -D -m644 systemd/system/nvidia-suspend.service %{buildroot}%{_unitdir}/nvidia-suspend.service
install -D -m644 systemd/system/nvidia-hibernate.service %{buildroot}%{_unitdir}/nvidia-hibernate.service
install -D -m644 systemd/system/nvidia-resume.service %{buildroot}%{_unitdir}/system/nvidia-resume.service
install -D -m755 systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/nvidia
install -D -m755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir}/nvidia-sleep.sh
# distro specific files must be installed in /usr/share/X11/xorg.conf.d
install -D -m644 %{SOURCE2} %{buildroot}%{_datadir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
install -Dm644 %{SOURCE1} %{buildroot}%{_sysusersdir}/nvidia.conf
for f in nvidia-xconfig nvidia-settings nvidia-smi; do
install -D -m 775 ${f} %{buildroot}%{_bindir}/${f}
install -D -m 644 ${f}.1.gz %{buildroot}%{_mandir}/man1/${f}.1.gz
done
install -D -m 644 nvidia-settings.desktop \ install -D -m 644 nvidia-settings.desktop \
%{buildroot}%{_datadir}/applications/nvidia-settings.desktop %{buildroot}%{_datadir}/applications/nvidia-settings.desktop
install -D -m 644 nvidia-settings.png \ install -D -m 644 nvidia-settings.png \
%{buildroot}%{_datadir}/pixmaps/nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/nvidia-settings.png
# Clutter workaround (http://blog.sukimashita.com/2015/04/13/gnome-3-16-and-nvidia-binary-driver-crash-with-totem-gnome-maps-cheese-and-others/) ## Clutter workaround (http://blog.sukimashita.com/2015/04/13/gnome-3-16-and-nvidia-binary-driver-crash-with-totem-gnome-maps-cheese-and-others/)
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ #mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
cat > %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh << _EOF #cat > %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh << _EOF
export CLUTTER_BACKEND=x11 #export CLUTTER_BACKEND=x11
_EOF #_EOF
chmod +x %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh #chmod +x %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh
# dkms # dkms
install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version}
@ -272,169 +290,114 @@ nvidia-uvm \
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n xorg-drv-video-nvidia %post -n xorg-drv-video-%{name}
# new install # new install
update-alternatives --remove libnvidia-tls.so %{_libdir}/libnvidia-tls_current.so 2>/dev/null
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
# clean any legacy alternatives symlink # clean any legacy alternatives symlink
find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \; find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \;
dkms add -q -m %{name} -v %{version} dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version} dkms install -q -m %{name} -v %{version}
# update-alternatives \
# --install %{_libdir}/libXvMCNVIDIA_dynamic.so libXvMCNVIDIA_dynamic.so \
# %{_libdir}/libXvMCNVIDIA_current_so 50
update-alternatives \
--install %{_libdir}/libnvidia-cfg.so libnvidia-cfg.so \
%{_libdir}/libnvidia-cfg_current_so 50
# update-alternatives \
# --install %{_libdir}/libnvidia-tls.so.1 libnvidia-tls.so.1.lib \
# %{_libdir}/libnvidia-tls_current_so.1 50
# update-alternatives \
# --install %{_libdir}/tls/libnvidia-tls.so.1 libnvidia-tls.so.1 \
# %{_libdir}/tls/libnvidia-tls_current_so.1 50
[ -e %{_libdir}/xorg/modules/drivers/nvidia_drv.so ] && \
rm -f %{_libdir}/xorg/modules/drivers/nvidia_drv.so
update-alternatives \
--install %{_libdir}/xorg/modules/drivers/nvidia_drv.so nvidia_drv.so \
%{_libdir}/xorg/modules/drivers/nvidia_current_drv_so 50
update-alternatives \
--install %{_libdir}/libOpenCL.so.1 libOpenCL.so.1 \
%{_libdir}/libOpenCL_nvidia_so.1.0.0 20
fi fi
if [ $1 -eq 1 -a -n "`grep nv /etc/X11/xorg.conf 2>/dev/null`" ]; then
sed -i "s|\"nv\"|\"nvidia\"|" /etc/X11/xorg.conf
sed -i "s|Load \"dri\"||" /etc/X11/xorg.conf
fi
/sbin/ldconfig /sbin/ldconfig
/sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \ /sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \
%{kernel_ver}%{?KERNEL_TARGET} &>/dev/null %{kernel_ver}%{?KERNEL_TARGET} &>/dev/null
exit 0 :
%preun -n xorg-drv-video-nvidia %preun -n xorg-drv-video-%{name}
# erase # erase
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
dkms remove -q -m nvidia -v %{version} --all dkms remove -q -m nvidia -v %{version} --all
update-alternatives \
--remove libXvMCNVIDIA_dynamic.so %{_libdir}/libXvMCNVIDIA_current_so
update-alternatives \
--remove libnvidia-cfg.so %{_libdir}/libnvidia-cfg_current_so
update-alternatives \
--remove libnvidia-tls.so.1.lib %{_libdir}/libnvidia-tls_current_so.1
update-alternatives \
--remove libnvidia-tls.so.1 %{_libdir}/tls/libnvidia-tls_current_so.1
[ ! -L %{_libdir}/xorg/modules/drivers/nvidia_drv.so ] && \
rm -f %{_libdir}/xorg/modules/drivers/nvidia_drv.so
update-alternatives \
--remove nvidia_drv.so %{_libdir}/xorg/modules/drivers/nvidia_current_drv_so
update-alternatives \
--remove libOpenCL.so.1 %{_libdir}/libOpenCL_nvidia_so.1.0.0
[ -w /etc/X11/xorg.conf ] && \
sed -i "s|\"nvidia\"|\"nv\"|" /etc/X11/xorg.conf
/sbin/ldconfig /sbin/ldconfig
/sbin/depmod -a -F /boot/System.map-`uname -r` \ /sbin/depmod -a -F /boot/System.map-`uname -r` \
`uname -r` &>/dev/null `uname -r` &>/dev/null
fi fi
exit 0 :
%post -n xorg-ext-libglx-nvidia %files -n xorg-drv-video-%{name}
update-alternatives --remove libglx.so %{_libdir}/libglx_current.so 2>/dev/null
/usr/sbin/update-alternatives \
--install %{_libdir}/xorg/modules/extensions/libglx.so libglx.so \
%{_libdir}/xorg/modules/extensions/libglx_current_so 20
exit 0
%preun -n xorg-ext-libglx-nvidia
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove libglx.so \
%{_libdir}/xorg/modules/extensions/libglx_current_so
fi
exit 0
%post -n libGL-nvidia-X11
update-alternatives --remove libGL.so.1 %{_libdir}/libGL_current.so.1 2>/dev/null
/usr/sbin/update-alternatives \
--install %{_libdir}/libGL.so.1 libGL.so.1 \
%{_libdir}/libGL_current_so.1 20
/sbin/ldconfig
exit 0
%preun -n libGL-nvidia-X11
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove libGL.so.1 \
%{_libdir}/libGL_current_so.1
fi
/sbin/ldconfig
exit 0
%files -n libGL-nvidia-X11
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libGL_so.%{nvidia_current_libver} #%{_sysconfdir}/profile.d/nvidia-clutter.sh
%{_libdir}/libGL_current_so.1 %{_sysconfdir}/OpenCL/vendors/nvidia.icd
%files -n xorg-ext-libglx-nvidia
%defattr(-,root,root)
%{_libdir}/xorg/modules/extensions/libglx_current_so
%{_libdir}/xorg/modules/extensions/libglx_so.%{nvidia_current_libver}
%files -n xorg-drv-video-nvidia
%defattr(-,root,root)
%{_sysconfdir}/profile.d/nvidia-clutter.sh
%dir %{_prefix}/src/%{name}-%{version} %dir %{_prefix}/src/%{name}-%{version}
%{_prefix}/src/%{name}-%{version}/* %{_prefix}/src/%{name}-%{version}/*
%attr(0755,root,root) %{_sbindir}/update-alternatives-set-nvidia /lib/firmware/nvidia/%{version}/gsp.bin
%{_libdir}/libnvidia-glcore.so.%{nvidia_current_libver} %{_bindir}/nvidia-*
#%{_libdir}/libXvMCNVIDIA.a %{_systemd_util_dir}/system-sleep/nvidia
#%{_libdir}/libXvMCNVIDIA_so.%{nvidia_current_libver} %{_unitdir}/nvidia-hibernate.service
#%{_libdir}/libXvMCNVIDIA_current_so %{_unitdir}/nvidia-persistenced.service
%{_libdir}/xorg/modules/drivers/nvidia_current_drv_so %{_unitdir}/nvidia-suspend.service
%{_libdir}/xorg/modules/libnvidia-wfb.so.%{nvidia_current_libver} %{_unitdir}/system/nvidia-resume.service
#%{_libdir}/xorg/modules/libwfb.so %{_sysusersdir}/nvidia.conf
%{_libdir}/libnvidia-cfg_so.%{nvidia_current_libver} %{_libdir}/libEGL_nvidia.so.*
%{_libdir}/libnvidia-cfg_current_so %{_libdir}/libGLESv1_CM_nvidia.so.*
%{_libdir}/libnvidia-tls.so.%{nvidia_current_libver} %{_libdir}/libGLESv2_nvidia.so.*
#%{_libdir}/libnvidia-tls_current_so.1 %{_libdir}/libGLX_nvidia.so.*
#%{_libdir}/tls/libnvidia-tls_current_so.1 %{_libdir}/libcuda.so.*
%{_libdir}/libnvidia-ml.so.1 %{_libdir}/libnvcuvid.so.*
%{_libdir}/libnvidia-ml.so.%{nvidia_current_libver} %{_libdir}/libnvidia-*.so.*
%{_libdir}/tls/libnvidia-tls.so.%{nvidia_current_libver} %{_libdir}/libnvoptix.so.*
%{_libdir}/libcuda.so.%{nvidia_current_libver} %dir %{_libdir}/nvidia
%{_libdir}/libnvcuvid.%{nvidia_current_libver} %dir %{_libdir}/nvidia/xorg
%{_libdir}/libnvidia-compiler.%{nvidia_current_libver} %{_libdir}/nvidia/xorg/libglxserver_nvidia.so
%{_libdir}/libnvidia-encode.%{nvidia_current_libver} %{_libdir}/nvidia/xorg/libglxserver_nvidia.so.*
%{_libdir}/libnvidia-opencl.so.%{nvidia_current_libver} %{_libdir}/vdpau/libvdpau_nvidia.so.*
%{_libdir}/libnvidia-wfb.so.%{nvidia_current_libver} %{_libdir}/xorg/modules/drivers/nvidia_drv.so
%{_libdir}/libOpenCL_nvidia_so.1.0.0 %{_datadir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
%{_libdir}/vdpau/libvdpau_nvidia.so %{_datadir}/applications/nvidia-settings.desktop
%{_libdir}/vdpau/libvdpau_nvidia.so.%{nvidia_current_libver} %{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
%{_datadir}/pixmaps/nvidia-settings.png
%{_datadir}/vulkan/icd.d/nvidia_icd.json
%{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json
%{_mandir}/man1/nvidia-*.1*
%doc current/LICENSE %doc current/LICENSE
%files -n xorg-apps-nvidia %files -n xorg-drv-video-%{name}-doc
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/nvidia-settings %doc current/{NVIDIA_Changelog,README.txt} current/html
%{_bindir}/nvidia-xconfig
%{_bindir}/nvidia-smi
%{_datadir}/applications/nvidia-settings.desktop
%{_datadir}/pixmaps/nvidia-settings.png
%{_mandir}/man1/nvidia-settings.*
%{_mandir}/man1/nvidia-smi.*
%{_mandir}/man1/nvidia-xconfig.*
%files -n xorg-drv-video-nvidia-doc
%defattr(-,root,root)
%doc current/{LICENSE,NVIDIA_Changelog,README.txt} current/html
%changelog %changelog
* Fri Aug 21 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 390.138-2mamba * Fri Apr 23 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 465.24.02-2mamba
- dkms: add IGNORE_CC_MISMATCH=1 before make command to fix build with gcc 10.1+ - rebuilt with libglvnd and libmesa
* Thu Apr 15 2021 Automatic Build System <autodist@mambasoft.it> 465.24.02-1mamba
- automatic version update by autodist
* Thu Apr 15 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 460.73.01-1mamba
- update to 460.73.01
* Thu Apr 15 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 460.39-2mamba
- renamed from nvidia_450
* Wed Jan 27 2021 Automatic Build System <autodist@mambasoft.it> 460.39-1mamba
- automatic version update by autodist
* Fri Jan 08 2021 Automatic Build System <autodist@mambasoft.it> 460.32.03-1mamba
- automatic version update by autodist
* Thu Nov 19 2020 Automatic Build System <autodist@mambasoft.it> 455.45.01-1mamba
- automatic version update by autodist
* Thu Oct 08 2020 Automatic Build System <autodist@mambasoft.it> 455.28-1mamba
- automatic version update by autodist
* Thu Oct 01 2020 Automatic Build System <autodist@mambasoft.it> 450.80.02-1mamba
- automatic version update by autodist
* Mon Aug 31 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 450.66-3mamba
- fix removing provides for conflicting libraries
* Sun Aug 30 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 450.66-2mamba
- remove provide for conflicting libraries
* Fri Aug 21 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 450.66-1mamba
- update to 450.66
- dkms: added IGNORE_CC_MISMATCH=1 before make command to support gcc 10.1+
* Sun Aug 09 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 450.57-1mamba
- update to 450.57
* Fri Jul 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 390.138-1mamba * Fri Jul 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 390.138-1mamba
- update to 390.138 - update to 390.138

1
nvidia.sysusers Normal file
View File

@ -0,0 +1 @@
u nvidia-persistenced 143 'NVIDIA Persistence Daemon'