[libvirt] [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

Eric Blake eblake at redhat.com
Wed Sep 19 12:55:38 UTC 2012


Here's what I'm planning on squashing into Doug's patch; the
biggest changes are to libvirt.spec.in, and I'd appreciate a
review on that portion.

---
 configure.ac    |  1 +
 libvirt.spec.in | 19 ++++++++++++-------
 po/POTFILES.in  |  2 +-
 tools/virsh.c   |  4 ++--
 4 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 171dda5..3e90672 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1948,6 +1948,7 @@ AM_CONDITIONAL([WITH_NETCF], [test "$with_netcf" = "yes"])
 AC_SUBST([NETCF_CFLAGS])
 AC_SUBST([NETCF_LIBS])

+
 AC_ARG_WITH([secrets],
   AC_HELP_STRING([--with-secrets], [with local secrets management driver @<:@default=yes@:>@]),[],[with_secrets=yes])

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 853cef7..1192739 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -70,6 +70,7 @@
 %define with_parallels     0%{!?_without_parallels:1}

 # Then the secondary host drivers, which run inside libvirtd
+%define with_interface        0%{!?_without_interface:%{server_drivers}}
 %define with_network          0%{!?_without_network:%{server_drivers}}
 %define with_storage_fs       0%{!?_without_storage_fs:%{server_drivers}}
 %define with_storage_lvm      0%{!?_without_storage_lvm:%{server_drivers}}
@@ -92,7 +93,6 @@
 # A few optional bits off by default, we enable later
 %define with_polkit        0%{!?_without_polkit:0}
 %define with_capng         0%{!?_without_capng:0}
-%define with_interface     0%{!?_without_interface:0}
 %define with_netcf         0%{!?_without_netcf:0}
 %define with_udev          0%{!?_without_udev:0}
 %define with_hal           0%{!?_without_hal:0}
@@ -201,12 +201,6 @@
 %define with_netcf     0%{!?_without_netcf:%{server_drivers}}
 %endif

-# interface is the driver that wraps netcf or udev interface management
-# backends in Fedora 18 / RHEL-7 or newer
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
-%define with_interface     0%{!?_without_interface:%{server_drivers}}
-%endif
-
 # udev is used to manage host devices in Fedora 12 / RHEL-6 or newer
 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
 %define with_udev     0%{!?_without_udev:%{server_drivers}}
@@ -214,6 +208,11 @@
 %define with_hal       0%{!?_without_hal:%{server_drivers}}
 %endif

+# interface requires netcf
+%if ! 0%{?with_netcf}
+%define with_interface     0
+%endif
+
 # Enable yajl library for JSON mode with QEMU
 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
 %define with_yajl     0%{!?_without_yajl:%{server_drivers}}
@@ -233,6 +232,7 @@
 # Disable some drivers when building without libvirt daemon.
 # The logic is the same as in configure.ac
 %if ! %{with_libvirtd}
+%define with_interface 0
 %define with_network 0
 %define with_qemu 0
 %define with_lxc 0
@@ -1114,6 +1114,10 @@ of recent versions of Linux (and other OSes).
 %define _with_rhel5_api --with-rhel5-api
 %endif

+%if ! %{with_interface}
+%define _without_interface --without-interface
+%endif
+
 %if ! %{with_network}
 %define _without_network --without-network
 %endif
@@ -1250,6 +1254,7 @@ autoreconf -if
            %{?_without_hyperv} \
            %{?_without_vmware} \
            %{?_without_parallels} \
+           %{?_without_interface} \
            %{?_without_network} \
            %{?_with_rhel5_api} \
            %{?_without_storage_fs} \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7a91eb4..12a2b25 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -40,7 +40,7 @@ src/fdstream.c
 src/hyperv/hyperv_driver.c
 src/hyperv/hyperv_util.c
 src/hyperv/hyperv_wmi.c
-src/interface/netcf_driver.c
+src/interface/interface_backend_netcf.c
 src/internal.h
 src/libvirt.c
 src/libvirt-qemu.c
diff --git a/tools/virsh.c b/tools/virsh.c
index 6a7b89d..2c6df54 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2709,9 +2709,9 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
 #endif
 #if defined(WITH_INTERFACE)
     vshPrint(ctl, " Interface");
-#if defined(WITH_NETCF)
+# if defined(WITH_NETCF)
     vshPrint(ctl, " netcf");
-#endif
+# endif
 #endif
 #ifdef WITH_NWFILTER
     vshPrint(ctl, " Nwfilter");
-- 
1.7.11.4




More information about the libvir-list mailing list