From a81e15debb46b85a877ea76ce883c3816f2fd229 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 8 Jun 2021 06:45:19 -0400 Subject: [PATCH] Fix conditional to only install weak-modules for RHEL Generally speaking, weak-modules is going to be of no use to anyone, since the stabilized kABI is a unique property that only exists with the Red Hat Enterprise Linux distribution kernel. To avoid issues with downstreams, flip the conditional so that it is explicit that this is only useful for RHEL. --- kmod.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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