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