fix(dkms-nvidia,nvidia-kmod): Update sources and patches (#12655) (#12661)

(cherry picked from commit dfb1063e2d)

Co-authored-by: Gilver <roachy@fyralabs.com>
This commit is contained in:
Raboneko
2026-05-26 17:42:44 -05:00
committed by GitHub
parent e351386e55
commit a87df1ed7a
2 changed files with 6 additions and 10 deletions
@@ -10,10 +10,8 @@ Summary: NVIDIA display driver kernel module
Epoch: 3
License: NVIDIA License
URL: https://www.nvidia.com/object/unix.html
Source0: https://github.com/NVIDIA/open-gpu-kernel-modules/archive/%{version}/open-gpu-kernel-modules-%{version}.tar.gz
Source0: https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-%{version}.tar.xz
Source1: %{name}.conf
Patch0: https://github.com/CachyOS/open-gpu-kernel-modules/commit/211f012865b8ea2ba62c3422f5519cb32395c3e0.patch
Patch1: https://github.com/CachyOS/open-gpu-kernel-modules/commit/92789a5709f64008bee34bb044e33a3de9702eb7.patch
BuildRequires: sed
Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version}
Requires: dkms
@@ -30,7 +28,7 @@ Packager: Terra Packaging Team <terra@fyralabs.com>
This package provides the NVIDIA kernel driver modules.
%prep
%autosetup -p1 -n open-gpu-kernel-modules-%{version}
%autosetup -p1 -n NVIDIA-kernel-module-source-%{version}
cp -f %{SOURCE1} dkms.conf
@@ -13,9 +13,7 @@ Summary: NVIDIA display driver kernel module
Epoch: 3
License: NVIDIA License
URL: http://www.nvidia.com/object/unix.html
Source0: https://github.com/NVIDIA/open-gpu-kernel-modules/archive/%{version}/open-gpu-kernel-modules-%{version}.tar.gz
Patch0: https://github.com/CachyOS/open-gpu-kernel-modules/commit/211f012865b8ea2ba62c3422f5519cb32395c3e0.patch
Patch1: https://github.com/CachyOS/open-gpu-kernel-modules/commit/92789a5709f64008bee34bb044e33a3de9702eb7.patch
Source0: https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-%{version}.tar.xz
BuildRequires: gcc-c++
BuildRequires: kmodtool
Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
@@ -41,14 +39,14 @@ kmodtool --target %{_target_cpu} --repo terrapkg.com --kmodname %{name} %{?bui
%setup -c
pushd open-gpu-kernel-modules-%{version}
pushd NVIDIA-kernel-module-source-%{version}
%autopatch -p1
popd
rm -f open-gpu-kernel-modules-%{version}/dkms.conf
rm -f NVIDIA-kernel-module-source-%{version}/dkms.conf
for kernel_version in %{?kernel_versions}; do
cp -fr open-gpu-kernel-modules-%{version} _kmod_build_${kernel_version%%___*}
cp -fr NVIDIA-kernel-module-source-%{version} _kmod_build_${kernel_version%%___*}
done
%build