From 59975932b83be82e9d1933f5df0e3ad803f8a38c Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 8 Jun 2021 06:27:02 -0400 Subject: [PATCH] Move the conditional the top to clarify its scope This conditional impacts the whole spec, and generally these things are at the top of the spec to make it clear and avoid random scoping issues at spec parse time. --- kmod.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kmod.spec b/kmod.spec index 1d75527..80b1ae0 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,3 +1,12 @@ +# 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 +%else +%define with_weak_modules 1 +%endif + + Name: kmod Version: 29 Release: 2%{?dist} @@ -44,14 +53,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} The kmod-devel package provides header files used for development of applications that wish to load or unload Linux kernel modules. -# 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 -%else -%define with_weak_modules 1 -%endif - %prep %autosetup -p1