forked from pool/libvirt
fix factory build
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=65
This commit is contained in:
parent
3ff493eca9
commit
05eb51b723
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 28 14:20:32 MDT 2010 - jfehlig@novell.com
|
||||
|
||||
- Fix build when virtualport support is available but macvtap is
|
||||
disabled.
|
||||
vport-configure.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 23 02:42:39 MDT 2010 - jfehlig@novell.com
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
%define with_hal 0
|
||||
%define with_yajl 0
|
||||
%define with_macvtap 0
|
||||
%define with_virtualport 0
|
||||
|
||||
# Xen is available only on i386 x86_64
|
||||
%ifnarch %ix86 x86_64
|
||||
@ -148,6 +149,7 @@ Requires: PolicyKit >= 0.6
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: libvirtd.init
|
||||
# Upstream patches
|
||||
Patch0: vport-configure.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch102: clone.patch
|
||||
@ -259,6 +261,7 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch100 -p1
|
||||
%patch102
|
||||
%patch103 -p1
|
||||
@ -321,6 +324,9 @@ Authors:
|
||||
%if ! %{with_macvtap}
|
||||
%define _without_macvtap --without-macvtap
|
||||
%endif
|
||||
%if ! %{with_virtualport}
|
||||
%define _without_virtualport --without-virtualport
|
||||
%endif
|
||||
autoreconf -f -i
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%configure --disable-static --with-pic \
|
||||
@ -343,6 +349,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%{?_without_udev} \
|
||||
%{?_without_yajl} \
|
||||
%{?_without_macvtap} \
|
||||
%{?_without_virtualport} \
|
||||
--without-xen-proxy \
|
||||
--libexecdir=%{_libdir}/%{name} \
|
||||
--with-init-script=none \
|
||||
|
82
vport-configure.patch
Normal file
82
vport-configure.patch
Normal file
@ -0,0 +1,82 @@
|
||||
Rework configure logic for virtualport support
|
||||
|
||||
V2:
|
||||
- added missing AC_ARG_WITH() for --with-virtualport
|
||||
|
||||
In this patch I am reworking the logic around detecting virtual port support and requiring the libnl dependency.
|
||||
|
||||
- It requires --with-macvtap and displays an error in case of --without-macvtap --with-virtualport.
|
||||
- It tests for availability of certain data in include files and displays an error in case the include file is not at the correct level and --with-virtualport was chosen
|
||||
- displays 'checking' messages for macvtap and virtualport support and results
|
||||
- libnl support is required when macvtap is found or requested; if libnl is not there, please supply without-macvtap
|
||||
|
||||
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
|
||||
|
||||
Index: libvirt-0.8.4/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-0.8.4.orig/configure.ac
|
||||
+++ libvirt-0.8.4/configure.ac
|
||||
@@ -2060,6 +2060,7 @@ AC_ARG_WITH([macvtap],
|
||||
[with_macvtap=${withval}],
|
||||
[with_macvtap=check])
|
||||
|
||||
+AC_MSG_CHECKING([whether to compile with macvtap support])
|
||||
if test "$with_macvtap" != "no" ; then
|
||||
AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||
#include <linux/rtnetlink.h> ],
|
||||
@@ -2077,19 +2078,35 @@ if test "$with_macvtap" != "no" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_MACVTAP], $val, [whether macvtap support is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
|
||||
+AC_MSG_RESULT([$with_macvtap])
|
||||
|
||||
-AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||
- #include <linux/rtnetlink.h> ],
|
||||
- [ int x = IFLA_PORT_MAX; ],
|
||||
- [ with_virtualport=yes ],
|
||||
- [ with_virtualport=no ])
|
||||
-if test "$with_virtualport" = "yes"; then
|
||||
- val=1
|
||||
-else
|
||||
- val=0
|
||||
+AC_ARG_WITH([virtualport],
|
||||
+ AC_HELP_STRING([--with-virtualport],[enable virtual port support @<:@default=check@:>@]),
|
||||
+ [with_virtualport=${withval}],
|
||||
+ [with_virtualport=check])
|
||||
+
|
||||
+if test "$with_virtualport" != "no"; then
|
||||
+ if test "$with_macvtap" = "no"; then
|
||||
+ AC_MSG_ERROR([--with-virtualport requires --with-macvtap])
|
||||
+ fi
|
||||
+ AC_MSG_CHECKING([whether to compile with virtual port support])
|
||||
+ AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||
+ #include <linux/rtnetlink.h> ],
|
||||
+ [ int x = IFLA_PORT_MAX; ],
|
||||
+ [ with_virtualport=yes ],
|
||||
+ [ if test "$with_virtualport" = "yes" ; then
|
||||
+ AC_MSG_ERROR([Installed linux headers don't show support for virtual port support.])
|
||||
+ fi
|
||||
+ with_virtualport=no ])
|
||||
+ if test "$with_virtualport" = "yes"; then
|
||||
+ val=1
|
||||
+ else
|
||||
+ val=0
|
||||
+ fi
|
||||
+ AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
|
||||
+ [whether vsi vepa support is enabled])
|
||||
+ AC_MSG_RESULT([$with_virtualport])
|
||||
fi
|
||||
-AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
|
||||
- [whether vsi vepa support is enabled])
|
||||
AM_CONDITIONAL([WITH_VIRTUALPORT], [test "$with_virtualport" = "yes"])
|
||||
|
||||
|
||||
@@ -2098,7 +2115,7 @@ dnl netlink library
|
||||
LIBNL_CFLAGS=""
|
||||
LIBNL_LIBS=""
|
||||
|
||||
-if test "$with_macvtap" = "yes" || test "$with_virtualport" = "yes"; then
|
||||
+if test "$with_macvtap" = "yes"; then
|
||||
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
||||
], [
|
||||
AC_MSG_ERROR([libnl >= $LIBNL_REQUIRED is required for macvtap support])
|
Loading…
Reference in New Issue
Block a user