diff --git a/libvirt.spec.in b/libvirt.spec.in index 07c7e80c4e..34b481c69e 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -101,6 +101,7 @@ %define with_sanlock 0 %define with_numad 0 %define with_firewalld_zone 0 +%define with_netcf 0 %define with_libssh2 0 %define with_wireshark 0 %define with_libssh 0 @@ -145,6 +146,10 @@ %define with_firewalld_zone 0%{!?_without_firewalld_zone:1} %endif +%if 0%{?fedora} < 34 || 0%{?rhel} < 9 + %define with_netcf 0%{!?_without_netcf:1} +%endif + # fuse is used to provide virtualized /proc for LXC %if %{with_lxc} @@ -357,8 +362,9 @@ BuildRequires: fuse-devel >= 2.8.6 %if %{with_libssh2} BuildRequires: libssh2-devel >= 1.3.0 %endif - +%if %{with_netcf} BuildRequires: netcf-devel >= 0.2.2 +%endif %if %{with_esx} BuildRequires: libcurl-devel %endif @@ -527,13 +533,13 @@ capabilities. Summary: Interface driver plugin for the libvirtd daemon Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} +%if %{with_netcf} Requires: netcf-libs >= 0.2.2 +%endif %description daemon-driver-interface The interface driver plugin for the libvirtd daemon, providing -an implementation of the network interface APIs using the -netcf library - +an implementation of the host network interface APIs. %package daemon-driver-secret Summary: Secret driver plugin for the libvirtd daemon @@ -1099,6 +1105,12 @@ exit 1 %define arg_firewalld_zone -Dfirewalld_zone=disabled %endif +%if %{with_netcf} + %define arg_netcf -Dnetcf=enabled +%else + %define arg_netcf -Dnetcf=disabled +%endif + %if %{with_wireshark} %define arg_wireshark -Dwireshark_dissector=enabled %else @@ -1169,7 +1181,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) %{?arg_numad} \ -Dcapng=enabled \ %{?arg_fuse} \ - -Dnetcf=enabled \ + %{?arg_netcf} \ -Dselinux=enabled \ %{?arg_selinux_mount} \ -Dapparmor=disabled \