summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2018-05-10 13:51:02 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-05-10 16:43:28 -0400
commit2e8e06363369675c8cc15de418967392543a18a5 (patch)
tree0fe837f14ed0c02afa217d0d8149352642cfbfc0
parent13f586d091a8baa183f180df9f9fa56e29da34fe (diff)
downloadmeta-virtualization-2e8e06363369675c8cc15de418967392543a18a5.tar.gz
libvirt: fixups for glibc 2.27 - with Sun RPC Interfaces removed
With Sun RPC Interfaces removed from libc we need to use an external provider for rpc. Polling other distros there seems to be consensus to use libtirpc so we follow this trend. Unfortunately this should only require the DEPENDS addition to the recipe but the upstream project has a few flaws in their Makefiles and configure which we need to work around so we add 2 new patches to address these to allow for the use of a sysroot and to use the $XDR_CFLAGS in a few more places. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch62
-rw-r--r--recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch36
-rw-r--r--recipes-extended/libvirt/libvirt_1.3.5.bb4
3 files changed, 101 insertions, 1 deletions
diff --git a/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch b/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch
new file mode 100644
index 00000000..826cdd0a
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch
@@ -0,0 +1,62 @@
1From dcfc263db9e69e5381cb511c51836271dec577a3 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Thu, 10 May 2018 13:27:47 -0400
4Subject: [PATCH] Makefiles: Add more $XDR_CFLAGS as needed
5
6When building with libtirpc instead of libc-xdr the include search
7path needs to be used. In several places this was missing and it was
8only looking in /usr/include and failing.
9
10Upstream-Status: Inappropriate [old release]
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 src/Makefile.am | 5 +++--
15 tests/Makefile.am | 1 +
16 2 files changed, 4 insertions(+), 2 deletions(-)
17
18diff --git a/src/Makefile.am b/src/Makefile.am
19index e9ce941..38114b7 100644
20--- a/src/Makefile.am
21+++ b/src/Makefile.am
22@@ -1157,7 +1157,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver.la
23 libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
24
25 libvirt_driver_la_CFLAGS = \
26- $(GNUTLS_CFLAGS) $(CURL_CFLAGS) \
27+ $(GNUTLS_CFLAGS) $(CURL_CFLAGS) $(XDR_CFLAGS) \
28 -I$(srcdir)/conf $(AM_CFLAGS)
29 libvirt_driver_la_LIBADD = \
30 $(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
31@@ -1348,6 +1348,7 @@ endif ! WITH_DRIVER_MODULES
32
33 libvirt_driver_qemu_impl_la_CFLAGS = \
34 $(GNUTLS_CFLAGS) \
35+ $(XDR_CFLAGS) \
36 $(LIBNL_CFLAGS) \
37 -I$(srcdir)/access \
38 -I$(srcdir)/conf \
39@@ -2306,7 +2307,7 @@ libvirt_lxc_la_LDFLAGS = \
40 $(CYGWIN_EXTRA_LDFLAGS) \
41 $(MINGW_EXTRA_LDFLAGS) \
42 $(NULL)
43-libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
44+libvirt_lxc_la_CFLAGS = $(AM_CFLAGS) $(XDR_CFLAGS)
45 libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
46
47 # Since virt-login-shell will be setuid, we must do everything
48diff --git a/tests/Makefile.am b/tests/Makefile.am
49index 2f8b9eb..aec9a3e 100644
50--- a/tests/Makefile.am
51+++ b/tests/Makefile.am
52@@ -48,6 +48,7 @@ AM_CFLAGS = \
53 $(APPARMOR_CFLAGS) \
54 $(YAJL_CFLAGS) \
55 $(COVERAGE_CFLAGS) \
56+ $(XDR_CFLAGS) \
57 $(WARN_CFLAGS)
58
59 AM_LDFLAGS = \
60--
612.7.4
62
diff --git a/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch b/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch
new file mode 100644
index 00000000..edbadb63
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch
@@ -0,0 +1,36 @@
1From f10477f0fe5e4b7487a4a41faa216d10cd2bc7c3 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Thu, 10 May 2018 12:05:04 -0400
4Subject: [PATCH] configure.ac: search for rpc/rpc.h in the sysroot
5
6We want to avoid host contamination and use the sysroot as the base
7directory for our search so add the '=' the the '-I' when searching
8for libtirpc's rpc.h header.
9
10Upstream-Status: Inappropriate [old release]
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 configure.ac | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 5a6408c..6c19f6d 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -705,10 +705,10 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then
22 dnl check for cygwin's variation in xdr function names
23 AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include <rpc/xdr.h>])
24
25- dnl Cygwin/recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h>
26+ dnl Cygwin/recent glibc requires -I=/usr/include/tirpc for <rpc/rpc.h>
27 old_CFLAGS=$CFLAGS
28 AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [
29- for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do
30+ for add_CFLAGS in '' '-I=/usr/include/tirpc' 'missing'; do
31 if test x"$add_CFLAGS" = xmissing; then
32 lv_cv_xdr_cflags=missing; break
33 fi
34--
352.7.4
36
diff --git a/recipes-extended/libvirt/libvirt_1.3.5.bb b/recipes-extended/libvirt/libvirt_1.3.5.bb
index e7a2b235..35fd577e 100644
--- a/recipes-extended/libvirt/libvirt_1.3.5.bb
+++ b/recipes-extended/libvirt/libvirt_1.3.5.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7SECTION = "console/tools" 7SECTION = "console/tools"
8 8
9DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ 9DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
10 iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper \ 10 iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \
11 ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)}" 11 ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)}"
12 12
13# libvirt-guests.sh needs gettext.sh 13# libvirt-guests.sh needs gettext.sh
@@ -40,6 +40,8 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
40 file://0001-ptest-add-missing-test_helper-files.patch \ 40 file://0001-ptest-add-missing-test_helper-files.patch \
41 file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \ 41 file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \
42 file://0001-Added-configure-variable-for-placing-systemd-untis-l.patch \ 42 file://0001-Added-configure-variable-for-placing-systemd-untis-l.patch \
43 file://configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch \
44 file://Makefiles-Add-more-XDR_CFLAGS-as-needed.patch \
43 " 45 "
44 46
45SRC_URI[libvirt.md5sum] = "f9dc1e63d559eca50ae0ee798a4c6c6d" 47SRC_URI[libvirt.md5sum] = "f9dc1e63d559eca50ae0ee798a4c6c6d"