From a32f7f984cca3e6c9031f469129b68fdcc0039ed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 19 Dec 2023 21:51:04 +0000 Subject: [PATCH] Replace %{rhel} tests with more general %{have_nbd_ko} macro --- libnbd.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libnbd.spec b/libnbd.spec index cefb235..81d4262 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,6 +8,11 @@ %global have_ublk 1 %endif +# No nbd.ko in RHEL 9. +%if !0%{?rhel} +%global have_nbd_ko 1 +%endif + # If we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 @@ -84,7 +89,7 @@ BuildRequires: gcc-c++ BuildRequires: gnutls-utils BuildRequires: iproute BuildRequires: jq -%if !0%{?rhel} +%if 0%{?have_nbd_ko} BuildRequires: nbd %endif BuildRequires: util-linux