diff --git a/kmod.spec b/kmod.spec index 80b1ae0..7c22d26 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,15 +1,17 @@ # Fedora does not support CONFIG_MODVERSIONS. Without kabi support # weak-modules is useless at best, and can be actively harmful. -%if 0%{?fedora} -%define with_weak_modules 0 +# Since RHEL *does* support this and offers kabi support, +# turn it on there by default. +%if 0%{?rhel} +%bcond_without weak_modules %else -%define with_weak_modules 1 +%bcond_with weak_modules %endif Name: kmod Version: 29 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux kernel module management utilities License: GPLv2+ @@ -86,7 +88,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d -%if %{with_weak_modules} +%if %{with weak_modules} install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules %endif @@ -101,7 +103,7 @@ install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules %{_sbindir}/rmmod %{_sbindir}/lsmod %{_sbindir}/depmod -%if %{with_weak_modules} +%if %{with weak_modules} %{_sbindir}/weak-modules %endif %{_datadir}/bash-completion/ @@ -119,6 +121,9 @@ install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules %{_libdir}/libkmod.so %changelog +* Tue Jun 08 2021 Neal Gompa - 29-3 +- Fix conditional to only install weak-modules for RHEL + * Tue May 25 2021 Justin M. Forbes - 29-2 - Rebuild for weak-modules drop in Fedora