add nvidia libraries to ldconfig and regenerate initramfs [release 340.108-15mamba;Tue Feb 21 2023]
This commit is contained in:
parent
9d5df2e5e7
commit
7b2cc10558
@ -2,7 +2,7 @@
|
||||
Name: nvidia_340
|
||||
Version: 340.108
|
||||
Epoch: 1
|
||||
Release: 14mamba
|
||||
Release: 15mamba
|
||||
Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel
|
||||
Group: System/Kernel and Hardware
|
||||
Vendor: openmamba
|
||||
@ -239,6 +239,17 @@ echo "blacklist nouveau
|
||||
# Install X.org configuration fragment
|
||||
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/20-nvidia.conf
|
||||
|
||||
# Add nvidia GL* libraries to ldconfig path
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia_340.conf << __EOF
|
||||
%{_libdir}/nvidia
|
||||
__EOF
|
||||
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/dracut.conf.d
|
||||
cat > %{buildroot}%{_sysconfdir}/dracut.conf.d/20-nvidia_340.conf << __EOF
|
||||
add_drivers+=" nvidia "
|
||||
__EOF
|
||||
|
||||
## 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
|
||||
@ -264,22 +275,6 @@ cd current/kernel
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%posttrans -n xorg-drv-video-%{name}
|
||||
if [ $1 -ge 1 ]; then
|
||||
# clean any legacy alternatives symlink
|
||||
find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \;
|
||||
#dkms remove -q -m nvidia -v 304.60 --all
|
||||
dkms add -q -m %{name} -v %{version}
|
||||
dkms install -q -m %{name} -v %{version}
|
||||
fi
|
||||
:
|
||||
|
||||
%post -n xorg-drv-video-%{name}
|
||||
/sbin/ldconfig
|
||||
/sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \
|
||||
%{kernel_ver}%{?KERNEL_TARGET} &>/dev/null
|
||||
:
|
||||
|
||||
%preun -n xorg-drv-video-%{name}
|
||||
# erase
|
||||
dkms remove -q -m %{name} -v %{version} --all
|
||||
@ -290,6 +285,20 @@ if [ $1 -eq 0 ]; then
|
||||
fi
|
||||
:
|
||||
|
||||
%posttrans -n xorg-drv-video-%{name}
|
||||
if [ $1 -ge 1 ]; then
|
||||
# clean any legacy alternatives symlink
|
||||
find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \;
|
||||
#dkms remove -q -m nvidia -v 304.60 --all
|
||||
dkms add -q -m %{name} -v %{version}
|
||||
dkms install -q -m %{name} -v %{version}
|
||||
/sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \
|
||||
%{kernel_ver}%{?KERNEL_TARGET} &>/dev/null
|
||||
/usr/sbin/mkinitrd -f
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
:
|
||||
|
||||
%triggerpostun -n xorg-drv-video-%{name} -- xorg-drv-video-%{name} < 1:340.108-9mamba
|
||||
# /bin and /sbin are removed during old filesystem postun
|
||||
# Fixes for removal of alternatives overwriting symlinks belonging to libglvnd
|
||||
@ -300,6 +309,8 @@ fi
|
||||
|
||||
%files -n xorg-drv-video-%{name}
|
||||
%defattr(-,root,root)
|
||||
%{_sysconfdir}/ld.so.conf.d/nvidia_340.conf
|
||||
%{_sysconfdir}/dracut.conf.d/20-nvidia_340.conf
|
||||
#%{_sysconfdir}/profile.d/nvidia-clutter.sh
|
||||
%{_sysconfdir}/OpenCL/vendors/nvidia.icd
|
||||
%{_sysconfdir}/X11/xorg.conf.d/20-nvidia.conf
|
||||
@ -338,6 +349,9 @@ fi
|
||||
%doc current/{NVIDIA_Changelog,README.txt} current/html
|
||||
|
||||
%changelog
|
||||
* Tue Feb 21 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 340.108-15mamba
|
||||
- add nvidia libraries to ldconfig and regenerate initramfs
|
||||
|
||||
* Tue Feb 14 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 340.108-14mamba
|
||||
- fix content of /etc/X11/xorg.conf.d/20-nvidia.conf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user