From 736b9d964bb04479458881a1b353d4c6604d1188 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 07:46:59 +0100 Subject: [PATCH] patch dkms.conf to fix build error caused by src dir called nvidia_340 [release 340.108-12mamba;Tue Feb 07 2023] --- ...a_340-340.108-dkms-rename_nvidia_340.patch | 24 +++++++++++++++++++ nvidia_340.spec | 14 +++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 nvidia_340-340.108-dkms-rename_nvidia_340.patch diff --git a/nvidia_340-340.108-dkms-rename_nvidia_340.patch b/nvidia_340-340.108-dkms-rename_nvidia_340.patch new file mode 100644 index 0000000..a0c3f5e --- /dev/null +++ b/nvidia_340-340.108-dkms-rename_nvidia_340.patch @@ -0,0 +1,24 @@ +diff -Nru nvidia_340-340.108.orig/NVIDIA-Linux-x86_64-340.108/kernel/dkms.conf nvidia_340-340.108/NVIDIA-Linux-x86_64-340.108/kernel/dkms.conf +--- kernel/dkms.conf 2023-02-07 20:06:16.847865991 +0100 ++++ kernel/dkms.conf 2023-02-07 20:07:00.366621491 +0100 +@@ -4,9 +4,9 @@ + num_cpu_cores=1 + fi + +-PACKAGE_NAME="nvidia" ++PACKAGE_NAME="nvidia_340" + PACKAGE_VERSION="340.108" +-BUILT_MODULE_NAME[0]="$PACKAGE_NAME" ++BUILT_MODULE_NAME[0]="nvidia" + DEST_MODULE_LOCATION[0]="/kernel/drivers/video" + MAKE[0]="make -j$num_cpu_cores module KERNEL_UNAME=${kernelver}" + CLEAN="make clean" +diff -Nru nvidia_340-340.108.orig/NVIDIA-Linux-x86_64-340.108/kernel/uvm/dkms.conf.fragment nvidia_340-340.108/NVIDIA-Linux-x86_64-340.108/kernel/uvm/dkms.conf.fragment +--- kernel/uvm/dkms.conf.fragment 2019-12-11 23:04:24.000000000 +0100 ++++ kernel/uvm/dkms.conf.fragment 2023-02-07 20:07:18.056522182 +0100 +@@ -1,4 +1,4 @@ +-BUILT_MODULE_NAME[1]="${PACKAGE_NAME}-uvm" ++BUILT_MODULE_NAME[1]="nvidia-uvm" + BUILT_MODULE_LOCATION[1]="uvm/" + DEST_MODULE_LOCATION[1]="/kernel/drivers/video" + MAKE[0]+="; make -C uvm module KERNEL_UNAME=${kernelver} KBUILD_EXTMOD=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/uvm" diff --git a/nvidia_340.spec b/nvidia_340.spec index 000588a..ca2e089 100644 --- a/nvidia_340.spec +++ b/nvidia_340.spec @@ -2,7 +2,7 @@ Name: nvidia_340 Version: 340.108 Epoch: 1 -Release: 11mamba +Release: 12mamba Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel Group: System/Kernel and Hardware Vendor: openmamba @@ -27,6 +27,7 @@ Patch11: nvidia_340-340.108-kernel-5.16.patch Patch12: nvidia_340-340.108-kernel-5.17.patch Patch13: nvidia_340-340.108-kernel-5.18.patch Patch14: nvidia_340-340.108-kernel-6.0.patch +Patch15: nvidia_340-340.108-dkms-rename_nvidia_340.patch License: no OSI Approved ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -114,7 +115,7 @@ cd current #%patch0 -p1 #%patch1 -p1 ##%patch2 -p1 -#%patch3 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 @@ -126,6 +127,7 @@ cd current %patch12 -p1 -b .kernel-5.17 %patch13 -p1 -b .kernel-5.18 %patch14 -p1 -b .kernel-6.0 +%patch15 -p0 -b .dkms tar xf nvidia-persistenced-init.tar.bz2 cd .. @@ -228,6 +230,11 @@ install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ cat kernel/uvm/dkms.conf.fragment >> %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf +## blacklist nouveau +#install -d -m0755 %{buildroot}%{_modprobedir} +#echo "blacklist nouveau +#" > %{buildroot}%{_modprobedir}/%{name}.conf + ## 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/ #cat > %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh << _EOF @@ -325,6 +332,9 @@ fi %doc current/{NVIDIA_Changelog,README.txt} current/html %changelog +* Tue Feb 07 2023 Silvan Calarco 340.108-12mamba +- patch dkms.conf to fix build error caused by src dir called nvidia_340 + * Mon Feb 06 2023 Silvan Calarco 340.108-11mamba - require (post) glibc-devel