chore: Update spec to automatically handle Dracut, following Negativo (#4840) (#4874)

* chore: Update spec to automatically handle Dracut, following Negativo



* fix: Add open-kmod



---------


(cherry picked from commit ac0891f29a)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Raboneko
2025-05-18 03:58:29 -07:00
committed by GitHub
parent e7147134bd
commit 4591e7d553
@@ -8,7 +8,7 @@
Name: nvidia-kmod-common
Version: 570.144
Release: 3%?dist
Release: 4%?dist
Summary: Common file for NVIDIA's proprietary driver kernel modules
Epoch: 3
License: NVIDIA License
@@ -25,6 +25,7 @@ Source21: 60-nvidia.rules
# UDev rule location (_udevrulesdir) and systemd macros:
BuildRequires: systemd-rpm-macros
Requires: dracut
Requires: nvidia-modprobe
Requires: (nvidia-open-kmod = %{?epoch:%{epoch}:}%{version} or nvidia-kmod = %{?epoch:%{epoch}:}%{version})
Provides: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
@@ -66,6 +67,9 @@ if [ "$1" -eq "2" ] && [ -x %{_bindir}/nvidia-boot-update ]; then
fi ||:
%triggerin -- nvidia-kmod,nvidia-open-kmod
dracut --regenerate-all --force
%files
%doc MODULE_VARIANT.txt
%{_modprobedir}/nvidia.conf