From c90dac67d79f70c3cf033be9ed8767e7475bfef3 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Sun, 7 Feb 2021 13:36:42 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libvirt.git#bbfa59c8da67f73f63fa738f9a42394feaf4d035 --- ...d-support-explicitly-disabling-netcf.patch | 60 +++++++++++++++++++ libvirt.spec | 36 ++++++++--- 2 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 0001-build-support-explicitly-disabling-netcf.patch diff --git a/0001-build-support-explicitly-disabling-netcf.patch b/0001-build-support-explicitly-disabling-netcf.patch new file mode 100644 index 0000000..66e6a2b --- /dev/null +++ b/0001-build-support-explicitly-disabling-netcf.patch @@ -0,0 +1,60 @@ +From b776d049b8c89b033004ad9502270d4b255a1958 Mon Sep 17 00:00:00 2001 +From: Laine Stump +Date: Thu, 21 Jan 2021 16:01:06 -0500 +Subject: [PATCH 1/2] build: support explicitly disabling netcf + +placing "-Dnetcf=disabled" on the meson commandline was ignored, +meaning that even with that option the build would get WITH_NETCF if +the netcf-devel package was found - the only way to disable it was to +uninstall netcf-devel. + +This patch adds the small bit of logic to check the netcf meson +commandline option (in addition to whether netcf-devel is installed) +before defining WITH_NETCF. + +Signed-off-by: Laine Stump +Reviewed-by: Neal Gompa +Reviewed-by: Michal Privoznik +(cherry picked from commit 06169a115d46d8870a96d293c2faf6ea87e71020) +--- + meson.build | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index b5164f68ed..e9d6d9f82e 100644 +--- a/meson.build ++++ b/meson.build +@@ -1155,8 +1155,10 @@ libm_dep = cc.find_library('m', required : false) + + netcf_version = '0.1.8' + netcf_dep = dependency('netcf', version: '>=' + netcf_version, required: get_option('netcf')) +-if netcf_dep.found() +- conf.set('WITH_NETCF', 1) ++if not get_option('netcf').disabled() ++ if netcf_dep.found() ++ conf.set('WITH_NETCF', 1) ++ endif + endif + + have_gnu_gettext_tools = false +@@ -1550,7 +1552,7 @@ elif get_option('driver_hyperv').enabled() + error('openwsman is required for the Hyper-V driver') + endif + +-if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or netcf_dep.found()) ++if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or conf.has('WITH_NETCF')) + conf.set('WITH_INTERFACE', 1) + elif get_option('driver_interface').enabled() + error('Requested the Interface driver without netcf or udev and libvirtd support') +@@ -2362,7 +2364,7 @@ libs_summary = { + 'libssh': libssh_dep.found(), + 'libssh2': libssh2_dep.found(), + 'libutil': libutil_dep.found(), +- 'netcf': netcf_dep.found(), ++ 'netcf': conf.has('WITH_NETCF'), + 'NLS': have_gnu_gettext_tools, + 'numactl': numactl_dep.found(), + 'openwsman': openwsman_dep.found(), +-- +2.29.2 + diff --git a/libvirt.spec b/libvirt.spec index cf173b0..b79a221 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -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} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} < 9) + %define with_netcf 0%{!?_without_netcf:1} +%endif + # fuse is used to provide virtualized /proc for LXC %if %{with_lxc} @@ -214,7 +219,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 7.0.0 -Release: 2%{?dist} +Release: 4%{?dist} License: LGPLv2+ URL: https://libvirt.org/ @@ -223,6 +228,8 @@ URL: https://libvirt.org/ %endif Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz +Patch0001: 0001-build-support-explicitly-disabling-netcf.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -358,8 +365,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 @@ -528,13 +536,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 @@ -1100,6 +1108,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 @@ -1170,7 +1184,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 \ @@ -1288,7 +1302,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ %endif %check -VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check +# Building on slow archs, like emulated s390x in Fedora copr, requires +# raising the test timeout +VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10 %post libs %if 0%{?rhel} == 7 @@ -1950,6 +1966,12 @@ exit 0 %changelog +* Wed Feb 03 2021 Cole Robinson - 7.0.0-4 +- Increase meson test timeout to fix builds on s390x copr + +* Tue Feb 02 2021 Laine Stump - 7.0.0-3 +- disable netcf in build + * Tue Jan 26 2021 Fedora Release Engineering - 7.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild