diff --git a/libvirt-1.0.1-build-further-fixes-for-broken-if_bridge.h.patch b/libvirt-1.0.1-build-further-fixes-for-broken-if_bridge.h.patch new file mode 100644 index 0000000..8cc66e5 --- /dev/null +++ b/libvirt-1.0.1-build-further-fixes-for-broken-if_bridge.h.patch @@ -0,0 +1,51 @@ +From 1bf661caf4e926efcad6e85151a587cea5fd29f4 Mon Sep 17 00:00:00 2001 +From: Eric Blake +Date: Mon, 14 Jan 2013 10:47:41 -0700 +Subject: [PATCH] build: further fixes for broken if_bridge.h + +Commit c308a9ae was incomplete; it resolved the configure failure, +but not a later build failure. + +* src/util/virnetdevbridge.c: Include pre-req header. +* configure.ac (AC_CHECK_HEADERS): Prefer standard in.h over +non-standard ip6.h. +--- + configure.ac | 2 +- + src/util/virnetdevbridge.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3ab3c4e..712918f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -979,7 +979,7 @@ if test "$with_linux" = "yes"; then + if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then + AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, + [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])], +- [[#include ++ [[#include + ]]) + fi + fi +diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c +index b87c601..3c00be9 100644 +--- a/src/util/virnetdevbridge.c ++++ b/src/util/virnetdevbridge.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2007-2012 Red Hat, Inc. ++ * Copyright (C) 2007-2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #ifdef __linux__ + # include +-- +1.8.0.2 + diff --git a/libvirt-1.0.1-build-work-around-broken-kernel-header.patch b/libvirt-1.0.1-build-work-around-broken-kernel-header.patch new file mode 100644 index 0000000..1fcb526 --- /dev/null +++ b/libvirt-1.0.1-build-work-around-broken-kernel-header.patch @@ -0,0 +1,43 @@ +From c308a9ae153db619fc0366bad9fd8f6c49cfac58 Mon Sep 17 00:00:00 2001 +From: Eric Blake +Date: Mon, 14 Jan 2013 09:54:25 -0700 +Subject: [PATCH] build: work around broken kernel header + +I got this scary warning during ./configure on rawhide: + +checking linux/if_bridge.h usability... no +checking linux/if_bridge.h presence... yes +configure: WARNING: linux/if_bridge.h: present but cannot be compiled +configure: WARNING: linux/if_bridge.h: check for missing prerequisite headers? +configure: WARNING: linux/if_bridge.h: see the Autoconf documentation +configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be Compiled" +configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result +configure: WARNING: ## ------------------------------------- ## +configure: WARNING: ## Report this to libvir-list@redhat.com ## +configure: WARNING: ## ------------------------------------- ## +checking for linux/if_bridge.h... no + +* configure.ac (AC_CHECK_HEADERS): Provide struct in6_addr, since +linux/if_bridge.h uses it without declaring it. +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8a424e7..1d0add5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -978,7 +978,9 @@ dnl + if test "$with_linux" = "yes"; then + if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then + AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, +- AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])) ++ [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])], ++ [[#include ++ ]]) + fi + fi + +-- +1.8.0.2 + diff --git a/libvirt.spec b/libvirt.spec index 9a32dd0..420946c 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -11,7 +11,7 @@ # Default to skipping autoreconf. Distros can change just this one line # (or provide a command-line override) if they backport any patches that # touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 0} +%{!?enable_autotools:%define enable_autotools 1} # A client only build will create a libvirt.so only containing # the generic RPC driver, and test driver and no libvirtd @@ -351,6 +351,8 @@ URL: http://libvirt.org/ %define mainturl stable_updates/ %endif Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz +Patch1: %{name}-%{version}-build-work-around-broken-kernel-header.patch +Patch2: %{name}-%{version}-build-further-fixes-for-broken-if_bridge.h.patch %if %{with_libvirtd} Requires: libvirt-daemon = %{version}-%{release} @@ -1084,6 +1086,8 @@ of recent versions of Linux (and other OSes). %prep %setup -q +%patch1 -p1 +%patch2 -p1 %build %if ! %{with_xen} @@ -1996,6 +2000,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd %changelog * Fri Jan 18 2013 Daniel P. Berrange - 1.0.1-3 - Rebuild for libnl3 soname change +- Deal with broken kernel headers * Mon Dec 17 2012 Cole Robinson - 1.0.1-2 - Fix scriplet warning when uninstalling libvirt-client (bz #888071)