fix: block incompatible kernel from being installed

The current "Requires" lines only ensure the old kernel is available on the system but it does not prevent fedora from updating to an incompatible and breaking user's system.

Set Conflicts to block incompatible kernels from being installed.

Signed-off-by: tleydxdy <shironeko.github@tesaguri.club>
This commit is contained in:
tleydxdy 2024-04-27 23:22:33 -04:00 committed by GitHub
parent 21bc066ece
commit 8ebbadd19e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Requires(post): gcc, make, perl, diffutils
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
Conflicts: kernel-devel < @ZFS_META_KVER_MIN@, kernel-devel > @ZFS_META_KVER_MAX@.999
Obsoletes: spl-dkms <= %{version}
%endif
Provides: %{module}-kmod = %{version}