Re: [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/19/2012 08:55 AM, Eric Blake wrote:
> 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])
>
> +

What? Spurious whitespace changes from you? :-)

>  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
> -


Right - whether or not with_interface is on has nothing to do with
whether or not we're on fedora 18+ or RHEL7+

>  # 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

Right - it should only have an effect on code that's linked into
libvirtd anyway.

>  %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
> +

Explicitly adding --without-interface when the specfile reaches that
conclusion.

>  %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");

ACK.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]