diff options
| author | Yanfei Xu <yanfei.xu@windriver.com> | 2021-04-22 21:49:26 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-22 10:18:06 -0400 |
| commit | 9f359865c4512771f914dab99fe22f7da2fe029a (patch) | |
| tree | f9711ab799f9e8a64f31b2ebb83a89dcd0d585d8 | |
| parent | d5aa7e668db030f45d9e23b4cae0ddf2088d12d8 (diff) | |
| download | meta-virtualization-9f359865c4512771f914dab99fe22f7da2fe029a.tar.gz | |
libvirt: uprev v6.3 -> v7.2
This upgrade spans 9 small release. The detailed realese logs could
refer to: https://gitlab.com/libvirt/libvirt/-/blob/master/NEWS.rst
Libvirt's buildsystem has changed to meson, So this upgrade drop some
obsolete patches applied to makefile.
I ran libvirt testcase and ovs testcase for this upgrade, the summary
as follow:
libvirt_test (keyword: ) test results:
*1 Run libvirt_test testing(do_test1) PASS
*2 Check result (virsh_local_capabilities) PASS
*3 Check result (virsh_local_domcapabilities) PASS
*4 Check result (virsh_local_freecell) PASS
*5 Check result (virsh_local_help) PASS
*6 Check result (virsh_local_hostname) PASS
*7 Check result (virsh_local_iface-begin) PASS
*8 Check result (virsh_local_iface-commit) PASS
*9 Check result (virsh_local_iface-list) PASS
*10 Check result (virsh_local_list) PASS
*11 Check result (virsh_local_maxvcpus) PASS
*12 Check result (virsh_local_net-list) PASS
*13 Check result (virsh_local_nodecpumap) PASS
*14 Check result (virsh_local_nodecpustats) PASS
*15 Check result (virsh_local_nodedev-list) PASS
*16 Check result (virsh_local_nodeinfo) PASS
*17 Check result (virsh_local_node-memory-tune) PASS
*18 Check result (virsh_local_nodememstats) PASS
*19 Check result (virsh_local_nwfilter-binding-list) PASS
*20 Check result (virsh_local_nwfilter-list) PASS
*21 Check result (virsh_local_pool-capabilities) PASS
*22 Check result (virsh_local_pool-list) PASS
*23 Check result (virsh_local_pwd) PASS
*24 Check result (virsh_local_secret-list) PASS
*25 Check result (virsh_local_sysinfo) PASS
*26 Check result (virsh_local_uri) PASS
*27 Check result (virsh_local_version) PASS
openvswitch_vm2vm (keyword: qemux86) test results:
*1 openvswitch_vm2vm testing(do_test1) PASS
*2 Check result (ovs_vm2vm_boot_guest1) PASS
*3 Check result (ovs_vm2vm_boot_guest2) PASS
*4 Check result (ovs_vm2vm_netperf_test) PASS
*5 Check result (ovs_vm2vm_destroy_guest1) PASS
*6 Check result (ovs_vm2vm_destroy_guest2) PASS
*7 check testcase call trace(do_check_call_trace) PASS
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | conf/layer.conf | 2 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 4 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-build-drop-unnecessary-libgnu.la-reference.patch | 31 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-to-fix-build-error.patch | 47 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch | 34 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/install-missing-file.patch | 50 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch | 63 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch | 43 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch | 39 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/runptest.patch | 116 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch | 91 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt_7.2.0.bb (renamed from recipes-extended/libvirt/libvirt_6.3.0.bb) | 205 |
12 files changed, 59 insertions, 666 deletions
diff --git a/conf/layer.conf b/conf/layer.conf index f48ec255..0f0126b5 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
| @@ -67,3 +67,5 @@ K8S_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/k8s-versions.inc" | |||
| 67 | USER_CLASSES_append = " meta-virt-cfg" | 67 | USER_CLASSES_append = " meta-virt-cfg" |
| 68 | USER_CLASSES_append = " meta-virt-k8s-cfg" | 68 | USER_CLASSES_append = " meta-virt-k8s-cfg" |
| 69 | USER_CLASSES_append = " meta-virt-xen-cfg" | 69 | USER_CLASSES_append = " meta-virt-xen-cfg" |
| 70 | |||
| 71 | HOSTTOOLS_NONFATAL += "getent" | ||
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index bcd76572..0c661af8 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
| @@ -17,8 +17,8 @@ FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" | |||
| 17 | 17 | ||
| 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" |
| 19 | 19 | ||
| 20 | SRC_URI[libvirt_python.md5sum] = "4cf898350ee9a47f94986d402c153bdb" | 20 | SRC_URI[libvirt_python.md5sum] = "19bf22414a43d358581b9259b52047a7" |
| 21 | SRC_URI[libvirt_python.sha256sum] = "c772421ecc144f098f4ab15db700c62db9b9e6e76b876217edcfd62e9ce02750" | 21 | SRC_URI[libvirt_python.sha256sum] = "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7" |
| 22 | 22 | ||
| 23 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | 23 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" |
| 24 | export LIBVIRT_CFLAGS = "-I${S}/include" | 24 | export LIBVIRT_CFLAGS = "-I${S}/include" |
diff --git a/recipes-extended/libvirt/libvirt/0001-build-drop-unnecessary-libgnu.la-reference.patch b/recipes-extended/libvirt/libvirt/0001-build-drop-unnecessary-libgnu.la-reference.patch deleted file mode 100644 index f02a5d64..00000000 --- a/recipes-extended/libvirt/libvirt/0001-build-drop-unnecessary-libgnu.la-reference.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | From 30a056069cb35804434fb036e51ae97f33c02025 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Sat, 7 Mar 2020 21:36:27 -0500 | ||
| 4 | Subject: [PATCH] build: drop unnecessary libgnu.la reference | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 7 | |||
| 8 | --- | ||
| 9 | tools/Makefile.am | 2 -- | ||
| 10 | 1 file changed, 2 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/tools/Makefile.am b/tools/Makefile.am | ||
| 13 | index 2a0a989..93fe283 100644 | ||
| 14 | --- a/tools/Makefile.am | ||
| 15 | +++ b/tools/Makefile.am | ||
| 16 | @@ -168,7 +168,6 @@ virt_host_validate_LDADD = \ | ||
| 17 | |||
| 18 | if WITH_GNUTLS | ||
| 19 | virt_host_validate_LDADD += ../src/libvirt-net-rpc.la \ | ||
| 20 | - ../gnulib/lib/libgnu.la \ | ||
| 21 | $(NULL) | ||
| 22 | endif | ||
| 23 | |||
| 24 | @@ -270,7 +269,6 @@ BUILT_SOURCES = | ||
| 25 | |||
| 26 | if WITH_GNUTLS | ||
| 27 | virsh_LDADD += ../src/libvirt-net-rpc.la \ | ||
| 28 | - ../gnulib/lib/libgnu.la \ | ||
| 29 | $(NULL) | ||
| 30 | endif | ||
| 31 | |||
diff --git a/recipes-extended/libvirt/libvirt/0001-to-fix-build-error.patch b/recipes-extended/libvirt/libvirt/0001-to-fix-build-error.patch deleted file mode 100644 index b0148e5c..00000000 --- a/recipes-extended/libvirt/libvirt/0001-to-fix-build-error.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From 3566bcacaa6408fb8f655d1749a20b2f30e0c765 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Fri, 31 Jul 2015 03:17:07 +0900 | ||
| 4 | Subject: [PATCH] to fix build error | ||
| 5 | |||
| 6 | The error likes as following | ||
| 7 | |||
| 8 | | Generating internals/command.html.tmp | ||
| 9 | | /bin/sh: line 3: internals/command.html.tmp: No such file or directory | ||
| 10 | | rm: Generating internals/locking.html.tmp | ||
| 11 | | cannot remove `internals/command.html.tmp': No such file or directory | ||
| 12 | | make[3]: *** [internals/command.html.tmp] Error 1 | ||
| 13 | | make[3]: *** Waiting for unfinished jobs.... | ||
| 14 | |||
| 15 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 16 | [ywei: rebased to libvirt-1.3.2] | ||
| 17 | Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com> | ||
| 18 | [MA: rebase to v4.3.0] | ||
| 19 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 20 | |||
| 21 | --- | ||
| 22 | docs/Makefile.am | 5 ++--- | ||
| 23 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/docs/Makefile.am b/docs/Makefile.am | ||
| 26 | index ce3d296..2c8180f 100644 | ||
| 27 | --- a/docs/Makefile.am | ||
| 28 | +++ b/docs/Makefile.am | ||
| 29 | @@ -366,7 +366,7 @@ EXTRA_DIST= \ | ||
| 30 | aclperms.htmlinc \ | ||
| 31 | $(schema_DATA) | ||
| 32 | |||
| 33 | -acl_generated = aclperms.htmlinc | ||
| 34 | +acl.html:: $(srcdir)/aclperms.htmlinc | ||
| 35 | |||
| 36 | aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \ | ||
| 37 | $(top_srcdir)/scripts/genaclperms.py Makefile.am | ||
| 38 | @@ -432,8 +432,7 @@ manpages/%.html.in: manpages/%.rst | ||
| 39 | $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ | ||
| 40 | $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; } | ||
| 41 | |||
| 42 | -%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ | ||
| 43 | - $(acl_generated) | ||
| 44 | +%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl | ||
| 45 | $(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \ | ||
| 46 | genhtmlin=`echo $@ | sed -e 's/.tmp/.in/'`; \ | ||
| 47 | rst=`echo $@ | sed -e 's/.html.tmp/.rst/'`; \ | ||
diff --git a/recipes-extended/libvirt/libvirt/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch b/recipes-extended/libvirt/libvirt/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch deleted file mode 100644 index 395d5610..00000000 --- a/recipes-extended/libvirt/libvirt/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 79f5975db01af0599860ccca7ef44b0e27105a04 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 3 | Date: Thu, 10 May 2018 12:05:04 -0400 | ||
| 4 | Subject: [PATCH] configure.ac: search for rpc/rpc.h in the sysroot | ||
| 5 | |||
| 6 | We want to avoid host contamination and use the sysroot as the base | ||
| 7 | directory for our search so add the '=' the the '-I' when searching | ||
| 8 | for libtirpc's rpc.h header. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [old release] | ||
| 11 | |||
| 12 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | m4/virt-xdr.m4 | 4 ++-- | ||
| 16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/m4/virt-xdr.m4 b/m4/virt-xdr.m4 | ||
| 19 | index 8375415..12b51f7 100644 | ||
| 20 | --- a/m4/virt-xdr.m4 | ||
| 21 | +++ b/m4/virt-xdr.m4 | ||
| 22 | @@ -30,10 +30,10 @@ AC_DEFUN([LIBVIRT_CHECK_XDR], [ | ||
| 23 | ]) | ||
| 24 | with_xdr="yes" | ||
| 25 | |||
| 26 | - dnl Recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h> | ||
| 27 | + dnl Recent glibc requires -I=/usr/include/tirpc for <rpc/rpc.h> | ||
| 28 | old_CFLAGS=$CFLAGS | ||
| 29 | AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [ | ||
| 30 | - for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do | ||
| 31 | + for add_CFLAGS in '' '-I=/usr/include/tirpc' 'missing'; do | ||
| 32 | if test x"$add_CFLAGS" = xmissing; then | ||
| 33 | lv_cv_xdr_cflags=missing; break | ||
| 34 | fi | ||
diff --git a/recipes-extended/libvirt/libvirt/install-missing-file.patch b/recipes-extended/libvirt/libvirt/install-missing-file.patch deleted file mode 100644 index 6aa36df8..00000000 --- a/recipes-extended/libvirt/libvirt/install-missing-file.patch +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | From aa75f5136066d239d48a21373b3d96ee12378e8d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dengke Du <dengke.du@windriver.com> | ||
| 3 | Date: Wed, 8 May 2019 17:24:17 +0800 | ||
| 4 | Subject: [PATCH] Install missing conf file | ||
| 5 | |||
| 6 | openvzutilstest.conf file is needed by openvzutilstest test. | ||
| 7 | |||
| 8 | Upstream-Status: Inapproriate | ||
| 9 | |||
| 10 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
| 11 | [KK: Update context for 1.3.5.] | ||
| 12 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 13 | [MA: Update context for v4.3.0] | ||
| 14 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 15 | [DDU: Update context for v5.3.0] | ||
| 16 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | tests/Makefile.am | 4 +++- | ||
| 20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
| 23 | index 4a808dd..0c3e799 100644 | ||
| 24 | --- a/tests/Makefile.am | ||
| 25 | +++ b/tests/Makefile.am | ||
| 26 | @@ -173,6 +173,7 @@ EXTRA_DIST = \ | ||
| 27 | $(NULL) | ||
| 28 | |||
| 29 | test_helpers = commandhelper ssh | ||
| 30 | +test_misc = | ||
| 31 | test_programs = virshtest sockettest \ | ||
| 32 | virhostcputest virbuftest \ | ||
| 33 | commandtest seclabeltest \ | ||
| 34 | @@ -311,6 +312,7 @@ endif WITH_LXC | ||
| 35 | |||
| 36 | if WITH_OPENVZ | ||
| 37 | test_programs += openvzutilstest | ||
| 38 | +test_misc += openvzutilstest.conf | ||
| 39 | endif WITH_OPENVZ | ||
| 40 | |||
| 41 | if WITH_ESX | ||
| 42 | @@ -1551,7 +1553,7 @@ endif ! WITH_LINUX | ||
| 43 | |||
| 44 | buildtest-TESTS: $(TESTS) $(test_libraries) $(test_helpers) | ||
| 45 | |||
| 46 | -PTESTS = $(TESTS) $(test_helpers) test-lib.sh virschematest | ||
| 47 | +PTESTS = $(TESTS) $(test_helpers) $(test_misc) test-lib.sh virschematest | ||
| 48 | |||
| 49 | install-ptest: | ||
| 50 | list='$(TESTS) $(test_helpers) test-lib.sh virschematest' | ||
diff --git a/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch b/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch deleted file mode 100644 index 558d5ef6..00000000 --- a/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | From ad5d9cee87357f9f38f62583119606ef95ba10df Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
| 3 | Date: Fri, 24 May 2013 16:46:00 +0300 | ||
| 4 | Subject: [PATCH] Fix thread safety in LXC callback handling | ||
| 5 | |||
| 6 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
| 7 | --- | ||
| 8 | src/lxc/lxc_process.c | 18 +++++++++++++++++- | ||
| 9 | 1 file changed, 17 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c | ||
| 12 | index aaa81a7..0eadc67 100644 | ||
| 13 | --- a/src/lxc/lxc_process.c | ||
| 14 | +++ b/src/lxc/lxc_process.c | ||
| 15 | @@ -609,8 +609,13 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED | ||
| 16 | virLXCProtocolExitStatus status, | ||
| 17 | virDomainObjPtr vm) | ||
| 18 | { | ||
| 19 | + virLXCDriverPtr driver = lxc_driver; | ||
| 20 | virLXCDomainObjPrivatePtr priv = vm->privateData; | ||
| 21 | |||
| 22 | + lxcDriverLock(driver); | ||
| 23 | + virObjectLock(vm); | ||
| 24 | + lxcDriverUnlock(driver); | ||
| 25 | + | ||
| 26 | switch (status) { | ||
| 27 | case VIR_LXC_PROTOCOL_EXIT_STATUS_SHUTDOWN: | ||
| 28 | priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN; | ||
| 29 | @@ -628,6 +633,8 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED | ||
| 30 | } | ||
| 31 | VIR_DEBUG("Domain shutoff reason %d (from status %d)", | ||
| 32 | priv->stopReason, status); | ||
| 33 | + | ||
| 34 | + virObjectUnlock(vm); | ||
| 35 | } | ||
| 36 | |||
| 37 | /* XXX a little evil */ | ||
| 38 | @@ -636,12 +643,21 @@ static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED | ||
| 39 | pid_t initpid, | ||
| 40 | virDomainObjPtr vm) | ||
| 41 | { | ||
| 42 | - virLXCDomainObjPrivatePtr priv = vm->privateData; | ||
| 43 | + virLXCDriverPtr driver = lxc_driver; | ||
| 44 | + virLXCDomainObjPrivatePtr priv; | ||
| 45 | + | ||
| 46 | + lxcDriverLock(driver); | ||
| 47 | + virObjectLock(vm); | ||
| 48 | + lxcDriverUnlock(driver); | ||
| 49 | + | ||
| 50 | + priv = vm->privateData; | ||
| 51 | priv->initpid = initpid; | ||
| 52 | virDomainAuditInit(vm, initpid); | ||
| 53 | |||
| 54 | if (virDomainSaveStatus(lxc_driver->caps, lxc_driver->stateDir, vm) < 0) | ||
| 55 | VIR_WARN("Cannot update XML with PID for LXC %s", vm->def->name); | ||
| 56 | + | ||
| 57 | + virObjectUnlock(vm); | ||
| 58 | } | ||
| 59 | |||
| 60 | static virLXCMonitorCallbacks monitorCallbacks = { | ||
| 61 | -- | ||
| 62 | 1.7.11.7 | ||
| 63 | |||
diff --git a/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch b/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch deleted file mode 100644 index 87b55915..00000000 --- a/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From 94bd514e1b6e602a48285db94e65050f8f0c2585 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 3 | Date: Wed, 8 Apr 2015 13:03:03 -0400 | ||
| 4 | Subject: [PATCH] libvirt: use pkg-config to locate libcap | ||
| 5 | |||
| 6 | libvirt wants to use pcap-config to locate the exisence and location | ||
| 7 | of libpcap. oe-core stubs this script and replaces it with pkg-config, | ||
| 8 | which can lead to the host pcap-config triggering and either breaking | ||
| 9 | the build or introducing host contamination. | ||
| 10 | |||
| 11 | To fix this issue, we patch configure to use 'pkg-config libcap' to | ||
| 12 | locate the correct libraries. | ||
| 13 | |||
| 14 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 15 | [MA: Update to apply agains v4.3.0] | ||
| 16 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | m4/virt-libpcap.m4 | 6 +++--- | ||
| 20 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/m4/virt-libpcap.m4 b/m4/virt-libpcap.m4 | ||
| 23 | index 605c2fd..e0ab018 100644 | ||
| 24 | --- a/m4/virt-libpcap.m4 | ||
| 25 | +++ b/m4/virt-libpcap.m4 | ||
| 26 | @@ -23,14 +23,14 @@ AC_DEFUN([LIBVIRT_ARG_LIBPCAP], [ | ||
| 27 | |||
| 28 | AC_DEFUN([LIBVIRT_CHECK_LIBPCAP], [ | ||
| 29 | LIBPCAP_REQUIRED="1.5.0" | ||
| 30 | - LIBPCAP_CONFIG="pcap-config" | ||
| 31 | + LIBPCAP_CONFIG="pkg-config libpcap" | ||
| 32 | LIBPCAP_CFLAGS="" | ||
| 33 | LIBPCAP_LIBS="" | ||
| 34 | |||
| 35 | if test "x$with_libpcap" != "xno"; then | ||
| 36 | case $with_libpcap in | ||
| 37 | - ''|yes|check) LIBPCAP_CONFIG="pcap-config" ;; | ||
| 38 | - *) LIBPCAP_CONFIG="$with_libpcap/bin/pcap-config" ;; | ||
| 39 | + ''|yes|check) LIBPCAP_CONFIG="pkg-config libpcap" ;; | ||
| 40 | + *) LIBPCAP_CONFIG="$with_libpcap/bin/pkg-config libpcap" ;; | ||
| 41 | esac | ||
| 42 | AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [ | ||
| 43 | AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED ) | ||
diff --git a/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch b/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch deleted file mode 100644 index 3cf9e839..00000000 --- a/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | From 74bff2509080912ea8abf1de8fd95fa2412b659a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com> | ||
| 3 | Date: Thu, 11 Apr 2013 11:37:25 +0200 | ||
| 4 | Subject: [PATCH] qemu: fix crash in qemuOpen | ||
| 5 | |||
| 6 | commit 74bff2509080912ea8abf1de8fd95fa2412b659a from upsteam | ||
| 7 | git://libvirt.org/libvirt.git | ||
| 8 | |||
| 9 | If the path part of connection URI is not present, cfg is used | ||
| 10 | unitialized. | ||
| 11 | |||
| 12 | https://bugzilla.redhat.com/show_bug.cgi?id=950855 | ||
| 13 | --- | ||
| 14 | src/qemu/qemu_driver.c | 2 +- | ||
| 15 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c | ||
| 18 | index 2c0d7d1..0d41e39 100644 | ||
| 19 | --- a/src/qemu/qemu_driver.c | ||
| 20 | +++ b/src/qemu/qemu_driver.c | ||
| 21 | @@ -1026,6 +1026,7 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn, | ||
| 22 | goto cleanup; | ||
| 23 | } | ||
| 24 | |||
| 25 | + cfg = virQEMUDriverGetConfig(qemu_driver); | ||
| 26 | if (conn->uri->path == NULL) { | ||
| 27 | virReportError(VIR_ERR_INTERNAL_ERROR, | ||
| 28 | _("no QEMU URI path given, try %s"), | ||
| 29 | @@ -1033,7 +1034,6 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn, | ||
| 30 | goto cleanup; | ||
| 31 | } | ||
| 32 | |||
| 33 | - cfg = virQEMUDriverGetConfig(qemu_driver); | ||
| 34 | if (cfg->privileged) { | ||
| 35 | if (STRNEQ(conn->uri->path, "/system") && | ||
| 36 | STRNEQ(conn->uri->path, "/session")) { | ||
| 37 | -- | ||
| 38 | 1.7.1 | ||
| 39 | |||
diff --git a/recipes-extended/libvirt/libvirt/runptest.patch b/recipes-extended/libvirt/libvirt/runptest.patch deleted file mode 100644 index f6bc7736..00000000 --- a/recipes-extended/libvirt/libvirt/runptest.patch +++ /dev/null | |||
| @@ -1,116 +0,0 @@ | |||
| 1 | From d210838a4433dd254c1a11b08b804ebe9ff5f378 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dengke Du <dengke.du@windriver.com> | ||
| 3 | Date: Wed, 8 May 2019 10:20:47 +0800 | ||
| 4 | Subject: [PATCH] Add 'install-ptest' rule | ||
| 5 | |||
| 6 | Change TESTS_ENVIRONMENT to allow running outside build dir. | ||
| 7 | |||
| 8 | Upstream-status: Pending | ||
| 9 | Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> | ||
| 10 | [KK: Update context for 1.3.5.] | ||
| 11 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 12 | [MA: Allow separate source and build dirs] | ||
| 13 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 14 | [ZH: add missing test_helper files] | ||
| 15 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
| 16 | [MA: Update context for v4.3.0] | ||
| 17 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 18 | [DDU: Update context for v5.3.0] | ||
| 19 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
| 20 | |||
| 21 | --- | ||
| 22 | tests/Makefile.am | 68 +++++++++++++++++++++++++++++++++++++++++------ | ||
| 23 | 1 file changed, 60 insertions(+), 8 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
| 26 | index ada5b8f..4a808dd 100644 | ||
| 27 | --- a/tests/Makefile.am | ||
| 28 | +++ b/tests/Makefile.am | ||
| 29 | @@ -28,11 +28,13 @@ AM_CPPFLAGS = \ | ||
| 30 | |||
| 31 | WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS) | ||
| 32 | |||
| 33 | +PTEST_DIR ?= $(libdir)/libvirt/ptest | ||
| 34 | + | ||
| 35 | AM_CFLAGS = \ | ||
| 36 | - -Dabs_builddir="\"$(abs_builddir)\"" \ | ||
| 37 | - -Dabs_top_builddir="\"$(abs_top_builddir)\"" \ | ||
| 38 | - -Dabs_srcdir="\"$(abs_srcdir)\"" \ | ||
| 39 | - -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \ | ||
| 40 | + -Dabs_builddir="\"$(PTEST_DIR)/tests\"" \ | ||
| 41 | + -Dabs_top_builddir="\"$(PTEST_DIR)\"" \ | ||
| 42 | + -Dabs_srcdir="\"$(PTEST_DIR)/tests\"" \ | ||
| 43 | + -Dabs_top_srcdir="\"$(PTEST_DIR)\"" \ | ||
| 44 | $(LIBXML_CFLAGS) \ | ||
| 45 | $(GLIB_CFLAGS) \ | ||
| 46 | $(LIBNL_CFLAGS) \ | ||
| 47 | @@ -474,10 +476,10 @@ TESTS = $(test_programs) \ | ||
| 48 | |||
| 49 | VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT) | ||
| 50 | TESTS_ENVIRONMENT = \ | ||
| 51 | - abs_top_builddir="$(abs_top_builddir)" \ | ||
| 52 | - abs_top_srcdir="$(abs_top_srcdir)" \ | ||
| 53 | - abs_builddir="$(abs_builddir)" \ | ||
| 54 | - abs_srcdir="$(abs_srcdir)" \ | ||
| 55 | + abs_top_builddir="$(PTEST_DIR)" \ | ||
| 56 | + abs_top_srcdir="$(PTEST_DIR)" \ | ||
| 57 | + abs_builddir="$(PTEST_DIR)/tests" \ | ||
| 58 | + abs_srcdir="$(PTEST_DIR)/tests" \ | ||
| 59 | LIBVIRT_AUTOSTART=0 \ | ||
| 60 | LC_ALL=C \ | ||
| 61 | VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \ | ||
| 62 | @@ -1547,4 +1549,54 @@ else ! WITH_LINUX | ||
| 63 | EXTRA_DIST += virscsitest.c | ||
| 64 | endif ! WITH_LINUX | ||
| 65 | |||
| 66 | +buildtest-TESTS: $(TESTS) $(test_libraries) $(test_helpers) | ||
| 67 | + | ||
| 68 | +PTESTS = $(TESTS) $(test_helpers) test-lib.sh virschematest | ||
| 69 | + | ||
| 70 | +install-ptest: | ||
| 71 | + list='$(TESTS) $(test_helpers) test-lib.sh virschematest' | ||
| 72 | + install -d $(DEST_DIR)/tools | ||
| 73 | + @(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \ | ||
| 74 | + install * $(DEST_DIR)/tools) | ||
| 75 | + install -d $(DEST_DIR)/src/network | ||
| 76 | + cp $(top_srcdir)/src/network/*.xml $(DEST_DIR)/src/network | ||
| 77 | + install -d $(DEST_DIR)/src/cpu_map | ||
| 78 | + cp $(top_srcdir)/src/cpu_map/*.xml $(DEST_DIR)/src/cpu_map | ||
| 79 | + install ../src/libvirt_iohelper $(DEST_DIR)/src | ||
| 80 | + install -D ../src/libvirtd $(DEST_DIR)/src/libvirtd | ||
| 81 | + install -d $(DEST_DIR)/src/remote | ||
| 82 | + install -D $(top_srcdir)/../build/src/remote/libvirtd.conf $(DEST_DIR)/src/remote/libvirtd.conf | ||
| 83 | + install -d $(DEST_DIR)/src/remote/.libs | ||
| 84 | + @(if [ -d ../src/remote/.libs ] ; then cd ../src/remote/.libs; fi; \ | ||
| 85 | + install * $(DEST_DIR)/src/remote/.libs) | ||
| 86 | + install -d $(DEST_DIR)/src/.libs | ||
| 87 | + @(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \ | ||
| 88 | + install * $(DEST_DIR)/src/.libs) | ||
| 89 | + install -d $(DEST_DIR)/docs/schemas | ||
| 90 | + cp $(top_srcdir)/docs/schemas/*.rng $(DEST_DIR)/docs/schemas | ||
| 91 | + cp -r $(top_srcdir)/build-aux $(DEST_DIR) | ||
| 92 | + install -d $(DEST_DIR)/examples/xml | ||
| 93 | + cp -r $(top_srcdir)/examples/xml/test $(DEST_DIR)/examples/xml | ||
| 94 | + install -d $(DEST_DIR)/tests/.libs | ||
| 95 | + find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \; | ||
| 96 | + find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \; | ||
| 97 | + @(for file in $(PTESTS); do \ | ||
| 98 | + if [ -f .libs/$$file ]; then \ | ||
| 99 | + install .libs/$$file $(DEST_DIR)/tests; \ | ||
| 100 | + elif [ -f $(srcdir)/$$file ]; then \ | ||
| 101 | + install $(srcdir)/$$file $(DEST_DIR)/tests; \ | ||
| 102 | + else \ | ||
| 103 | + install $(builddir)/$$file $(DEST_DIR)/tests; \ | ||
| 104 | + fi; \ | ||
| 105 | + done;) | ||
| 106 | + @(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;) | ||
| 107 | + cp ../config.h $(DEST_DIR) | ||
| 108 | + cp Makefile $(DEST_DIR)/tests | ||
| 109 | + sed -i -e 's/^Makefile:/_Makefile:/' $(DEST_DIR)/tests/Makefile | ||
| 110 | + cp ../Makefile $(DEST_DIR) | ||
| 111 | + sed -i -e 's|^Makefile:|_Makefile:|' $(DEST_DIR)/Makefile | ||
| 112 | + sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/tests/Makefile | ||
| 113 | + sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/Makefile | ||
| 114 | + sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(DEST_DIR)/tests/Makefile | ||
| 115 | + | ||
| 116 | CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda | ||
diff --git a/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch b/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch deleted file mode 100644 index bb500fde..00000000 --- a/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | From 7dc21edd851b260485b432c096f8e90f6fa07778 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dengke Du <dengke.du@windriver.com> | ||
| 3 | Date: Tue, 7 May 2019 15:26:32 +0800 | ||
| 4 | Subject: [PATCH] tools: add libvirt-net-rpc to virt-host-validate when TLS is | ||
| 5 | enabled | ||
| 6 | |||
| 7 | When gnu-tls is enabled for libvirt references to virNetTLSInit are | ||
| 8 | generated in libvirt. Any binaries linking against libvirt, must also | ||
| 9 | link against libvirt-net-rpc which provides the implementation. | ||
| 10 | |||
| 11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 12 | [ywei: rebased to libvirt-1.3.2] | ||
| 13 | Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com> | ||
| 14 | [MA: rebase to v4.3.0] | ||
| 15 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 16 | [ddu: rebase to v5.3.0] | ||
| 17 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
| 18 | |||
| 19 | --- | ||
| 20 | examples/Makefile.am | 20 ++++++++++++++++++++ | ||
| 21 | tools/Makefile.am | 12 ++++++++++++ | ||
| 22 | 2 files changed, 32 insertions(+) | ||
| 23 | |||
| 24 | diff --git a/examples/Makefile.am b/examples/Makefile.am | ||
| 25 | index ad635bd..a94f41d 100644 | ||
| 26 | --- a/examples/Makefile.am | ||
| 27 | +++ b/examples/Makefile.am | ||
| 28 | @@ -74,6 +74,10 @@ LDADD = \ | ||
| 29 | $(top_builddir)/src/libvirt-admin.la \ | ||
| 30 | $(NULL) | ||
| 31 | |||
| 32 | +if WITH_GNUTLS | ||
| 33 | +LDADD += $(top_builddir)/src/libvirt-net-rpc.la | ||
| 34 | +endif | ||
| 35 | + | ||
| 36 | noinst_PROGRAMS = \ | ||
| 37 | c/admin/client_close \ | ||
| 38 | c/admin/client_info \ | ||
| 39 | @@ -111,6 +115,22 @@ c_misc_openauth_SOURCES = c/misc/openauth.c | ||
| 40 | examplesdir = $(docdir)/examples | ||
| 41 | |||
| 42 | adminexamplesdir = $(examplesdir)/c/admin | ||
| 43 | + | ||
| 44 | +if WITH_GNUTLS | ||
| 45 | +dominfo_info1_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \ | ||
| 46 | + $(LDADD) \ | ||
| 47 | + $(NULL) | ||
| 48 | +domsuspend_suspend_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \ | ||
| 49 | + $(LDADD) \ | ||
| 50 | + $(NULL) | ||
| 51 | +hellolibvirt_hellolibvirt_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \ | ||
| 52 | + $(LDADD) \ | ||
| 53 | + $(NULL) | ||
| 54 | +openauth_openauth_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \ | ||
| 55 | + $(LDADD) \ | ||
| 56 | + $(NULL) | ||
| 57 | +endif | ||
| 58 | + | ||
| 59 | adminexamples_DATA = $(ADMIN_EXAMPLES) | ||
| 60 | |||
| 61 | domainexamplesdir = $(examplesdir)/c/domain | ||
| 62 | diff --git a/tools/Makefile.am b/tools/Makefile.am | ||
| 63 | index 53df930..2a0a989 100644 | ||
| 64 | --- a/tools/Makefile.am | ||
| 65 | +++ b/tools/Makefile.am | ||
| 66 | @@ -166,6 +166,12 @@ virt_host_validate_LDADD = \ | ||
| 67 | $(GLIB_LIBS) \ | ||
| 68 | $(NULL) | ||
| 69 | |||
| 70 | +if WITH_GNUTLS | ||
| 71 | +virt_host_validate_LDADD += ../src/libvirt-net-rpc.la \ | ||
| 72 | + ../gnulib/lib/libgnu.la \ | ||
| 73 | + $(NULL) | ||
| 74 | +endif | ||
| 75 | + | ||
| 76 | virt_host_validate_CFLAGS = \ | ||
| 77 | $(AM_CFLAGS) \ | ||
| 78 | $(NULL) | ||
| 79 | @@ -262,6 +268,12 @@ virt_admin_CFLAGS = \ | ||
| 80 | $(READLINE_CFLAGS) | ||
| 81 | BUILT_SOURCES = | ||
| 82 | |||
| 83 | +if WITH_GNUTLS | ||
| 84 | +virsh_LDADD += ../src/libvirt-net-rpc.la \ | ||
| 85 | + ../gnulib/lib/libgnu.la \ | ||
| 86 | + $(NULL) | ||
| 87 | +endif | ||
| 88 | + | ||
| 89 | if WITH_WIN_ICON | ||
| 90 | virsh_LDADD += virsh_win_icon.$(OBJEXT) | ||
| 91 | |||
diff --git a/recipes-extended/libvirt/libvirt_6.3.0.bb b/recipes-extended/libvirt/libvirt_7.2.0.bb index eeb1bf8a..24748efa 100644 --- a/recipes-extended/libvirt/libvirt_6.3.0.bb +++ b/recipes-extended/libvirt/libvirt_7.2.0.bb | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." | 1 | DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." |
| 2 | HOMEPAGE = "http://libvirt.org" | 2 | HOMEPAGE = "http://libvirt.org" |
| 3 | LICENSE = "LGPLv2.1+ & GPLv2+" | 3 | LICENSE = "LGPLv2.1+ & GPLv2+" |
| 4 | LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1+" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 6 | file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" | 5 | file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" |
| 7 | SECTION = "console/tools" | 6 | SECTION = "console/tools" |
| @@ -16,9 +15,7 @@ DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux | |||
| 16 | # | 15 | # |
| 17 | RDEPENDS_${PN} = "gettext-runtime" | 16 | RDEPENDS_${PN} = "gettext-runtime" |
| 18 | 17 | ||
| 19 | RDEPENDS_${PN}-ptest += "make gawk perl bash" | 18 | RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables" |
| 20 | |||
| 21 | RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd" | ||
| 22 | RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" | 19 | RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" |
| 23 | RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" | 20 | RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" |
| 24 | 21 | ||
| @@ -26,88 +23,33 @@ RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" | |||
| 26 | RCONFLICTS_${PN}_libvirtd = "connman" | 23 | RCONFLICTS_${PN}_libvirtd = "connman" |
| 27 | 24 | ||
| 28 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | 25 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ |
| 29 | file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \ | ||
| 30 | file://libvirtd.sh \ | 26 | file://libvirtd.sh \ |
| 31 | file://libvirtd.conf \ | 27 | file://libvirtd.conf \ |
| 32 | file://dnsmasq.conf \ | 28 | file://dnsmasq.conf \ |
| 33 | file://runptest.patch \ | ||
| 34 | file://run-ptest \ | ||
| 35 | file://libvirt-use-pkg-config-to-locate-libcap.patch \ | ||
| 36 | file://0001-to-fix-build-error.patch \ | ||
| 37 | file://install-missing-file.patch \ | ||
| 38 | file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \ | ||
| 39 | file://configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch \ | ||
| 40 | file://0001-build-drop-unnecessary-libgnu.la-reference.patch \ | ||
| 41 | file://hook_support.py \ | 29 | file://hook_support.py \ |
| 42 | file://gnutls-helper.py \ | 30 | file://gnutls-helper.py \ |
| 43 | " | 31 | " |
| 44 | 32 | ||
| 45 | SRC_URI[libvirt.md5sum] = "1bd4435f77924f5ec9928b538daf4a02" | 33 | SRC_URI[libvirt.md5sum] = "92044b629216e44adce63224970a54a3" |
| 46 | SRC_URI[libvirt.sha256sum] = "74069438d34082336e99a88146349e21130552b96efc3b7c562f6878127996f5" | 34 | SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b936a71d7e0ed1d0" |
| 47 | 35 | ||
| 48 | inherit autotools gettext update-rc.d pkgconfig ptest systemd useradd perlnative | 36 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative |
| 49 | USERADD_PACKAGES = "${PN}" | 37 | USERADD_PACKAGES = "${PN}" |
| 50 | GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" | 38 | GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" |
| 51 | USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" | 39 | USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" |
| 52 | 40 | ||
| 53 | # Override the default set in autotools.bbclass so that we will use relative pathnames | 41 | |
| 54 | # to our local m4 files. This prevents an "Argument list too long" error during configuration | 42 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" |
| 55 | # if our project is in a directory with an absolute pathname of more than about 125 characters. | 43 | do_write_config_append() { |
| 56 | # | 44 | cat >${WORKDIR}/meson-${PN}.cross <<EOF |
| 57 | acpaths = "-I ./m4" | 45 | [binaries] |
| 58 | 46 | iptables = '/usr/sbin/iptables' | |
| 59 | CACHED_CONFIGUREVARS += "\ | 47 | ip6tables = '/usr/sbin/ip6tables' |
| 60 | ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ | 48 | dmidecode = '/usr/sbin/dmidecode' |
| 61 | ac_cv_path_AUGPARSE=/usr/bin/augparse \ | 49 | ebtables = '/sbin/ebtables' |
| 62 | ac_cv_path_DMIDECODE=/usr/sbin/dmidecode \ | 50 | dnsmasq = '/usr/bin/dnsmasq' |
| 63 | ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ | 51 | EOF |
| 64 | ac_cv_path_BRCTL=/usr/sbin/brctl \ | 52 | } |
| 65 | ac_cv_path_TC=/sbin/tc \ | ||
| 66 | ac_cv_path_UDEVADM=/sbin/udevadm \ | ||
| 67 | ac_cv_path_MODPROBE=/sbin/modprobe \ | ||
| 68 | ac_cv_path_IP_PATH=/bin/ip \ | ||
| 69 | ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ | ||
| 70 | ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ | ||
| 71 | ac_cv_path_MOUNT=/bin/mount \ | ||
| 72 | ac_cv_path_UMOUNT=/bin/umount \ | ||
| 73 | ac_cv_path_MKFS=/usr/sbin/mkfs \ | ||
| 74 | ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ | ||
| 75 | ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ | ||
| 76 | ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ | ||
| 77 | ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ | ||
| 78 | ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ | ||
| 79 | ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ | ||
| 80 | ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ | ||
| 81 | ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ | ||
| 82 | ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ | ||
| 83 | ac_cv_path_VGSCAN=/usr/sbin/vgscan \ | ||
| 84 | ac_cv_path_PVS=/usr/sbin/pvs \ | ||
| 85 | ac_cv_path_VGS=/usr/sbin/vgs \ | ||
| 86 | ac_cv_path_LVS=/usr/sbin/lvs \ | ||
| 87 | ac_cv_path_PARTED=/usr/sbin/parted \ | ||
| 88 | ac_cv_path_DMSETUP=/usr/sbin/dmsetup" | ||
| 89 | |||
| 90 | # Ensure that libvirt uses polkit rather than policykit, whether the host has | ||
| 91 | # pkcheck installed or not, and ensure the path is correct per our config. | ||
| 92 | CACHED_CONFIGUREVARS += "ac_cv_path_PKCHECK_PATH=${bindir}/pkcheck" | ||
| 93 | |||
| 94 | # Some other possible paths we are not yet setting | ||
| 95 | #ac_cv_path_RPCGEN= | ||
| 96 | #ac_cv_path_XSLTPROC= | ||
| 97 | #ac_cv_path_RADVD= | ||
| 98 | #ac_cv_path_UDEVSETTLE= | ||
| 99 | #ac_cv_path_EBTABLES_PATH= | ||
| 100 | #ac_cv_path_PKG_CONFIG= | ||
| 101 | #ac_cv_path_ac_pt_PKG_CONFIG | ||
| 102 | #ac_cv_path_POLKIT_AUTH= | ||
| 103 | #ac_cv_path_DTRACE= | ||
| 104 | #ac_cv_path_ISCSIADM= | ||
| 105 | #ac_cv_path_MSGFMT= | ||
| 106 | #ac_cv_path_GMSGFMT= | ||
| 107 | #ac_cv_path_XGETTEXT= | ||
| 108 | #ac_cv_path_MSGMERGE= | ||
| 109 | #ac_cv_path_SCRUB= | ||
| 110 | #ac_cv_path_PYTHON= | ||
| 111 | 53 | ||
| 112 | ALLOW_EMPTY_${PN} = "1" | 54 | ALLOW_EMPTY_${PN} = "1" |
| 113 | 55 | ||
| @@ -167,31 +109,12 @@ SYSTEMD_SERVICE_${PN}-libvirtd = " \ | |||
| 167 | virtlockd.socket \ | 109 | virtlockd.socket \ |
| 168 | " | 110 | " |
| 169 | 111 | ||
| 170 | |||
| 171 | PRIVATE_LIBS_${PN}-ptest = " \ | ||
| 172 | libvirt-lxc.so.0 \ | ||
| 173 | libvirt.so.0 \ | ||
| 174 | libvirt-qemu.so.0 \ | ||
| 175 | lockd.so \ | ||
| 176 | libvirt_driver_secret.so \ | ||
| 177 | libvirt_driver_nodedev.so \ | ||
| 178 | libvirt_driver_vbox.so \ | ||
| 179 | libvirt_driver_interface.so \ | ||
| 180 | libvirt_driver_uml.so \ | ||
| 181 | libvirt_driver_network.so \ | ||
| 182 | libvirt_driver_nwfilter.so \ | ||
| 183 | libvirt_driver_qemu.so \ | ||
| 184 | libvirt_driver_storage.so \ | ||
| 185 | libvirt_driver_lxc.so \ | ||
| 186 | " | ||
| 187 | |||
| 188 | # xen-minimal config | 112 | # xen-minimal config |
| 189 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" | 113 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" |
| 190 | 114 | ||
| 191 | # full config | 115 | # full config |
| 192 | PACKAGECONFIG ??= "qemu yajl openvz vmware vbox esx iproute2 lxc test \ | 116 | PACKAGECONFIG ??= "gnutls qemu yajl openvz vmware vbox esx lxc test remote \ |
| 193 | remote macvtap libvirtd netcf udev python ebtables \ | 117 | libvirtd netcf udev python fuse firewalld libpcap \ |
| 194 | fuse iproute2 firewalld libpcap \ | ||
| 195 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ | 118 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ |
| 196 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ | 119 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ |
| 197 | ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'polkit', '', d)} \ | 120 | ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'polkit', '', d)} \ |
| @@ -208,37 +131,34 @@ PACKAGECONFIG_remove_armeb = "numactl" | |||
| 208 | # enable,disable,depends,rdepends | 131 | # enable,disable,depends,rdepends |
| 209 | # | 132 | # |
| 210 | PACKAGECONFIG[gnutls] = ",,,gnutls-bin" | 133 | PACKAGECONFIG[gnutls] = ",,,gnutls-bin" |
| 211 | PACKAGECONFIG[qemu] = "--with-qemu --with-qemu-user=qemu --with-qemu-group=qemu,--without-qemu,qemu," | 134 | PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu," |
| 212 | PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" | 135 | PACKAGECONFIG[yajl] = "-Dyajl=enabled,-Dyajl=disabled,yajl,yajl" |
| 213 | PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen," | 136 | PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen," |
| 214 | PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,," | 137 | PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,," |
| 215 | PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,," | 138 | PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,," |
| 216 | PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,," | 139 | PACKAGECONFIG[vbox] = "-Ddriver_vbox=enabled,-Ddriver_vbox=disabled,," |
| 217 | PACKAGECONFIG[esx] = "--with-esx,--without-esx,," | 140 | PACKAGECONFIG[esx] = "-Ddriver_esx=enabled,-Ddriver_esx=disabled,," |
| 218 | PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,," | 141 | PACKAGECONFIG[hyperv] = "-Ddriver_hyperv=enabled,-Ddriver_hyperv=disabled,," |
| 219 | PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" | 142 | PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit,polkit" |
| 220 | PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc," | 143 | PACKAGECONFIG[lxc] = "-Ddriver_lxc=enabled,-Ddriver_lxc=disabled,lxc," |
| 221 | PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,," | 144 | PACKAGECONFIG[test] = "-Ddriver_test=enabled,-Ddriver_test=disabled,," |
| 222 | PACKAGECONFIG[remote] = "--with-remote,--without-remote,," | 145 | PACKAGECONFIG[remote] = "-Ddriver_remote=enabled,-Ddriver_remote=disabled,," |
| 223 | PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" | 146 | PACKAGECONFIG[libvirtd] = "-Ddriver_libvirtd=enabled,-Ddriver_libvirtd=disabled,," |
| 224 | PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,," | 147 | PACKAGECONFIG[netcf] = "-Dnetcf=enabled,-Dnetcf=disabled,netcf,netcf" |
| 225 | PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" | 148 | PACKAGECONFIG[dtrace] = "-Ddtrace=enabled,-Ddtrace=disabled,," |
| 226 | PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,," | 149 | PACKAGECONFIG[udev] = "-Dudev=enabled -Dpciaccess=enabled,-Dudev=disabled,udev libpciaccess," |
| 227 | PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess," | 150 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux," |
| 228 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," | ||
| 229 | PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables" | ||
| 230 | PACKAGECONFIG[python] = ",,python3," | 151 | PACKAGECONFIG[python] = ",,python3," |
| 231 | PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl" | 152 | PACKAGECONFIG[sasl] = "-Dsasl=enabled,-Dsasl=disabled,cyrus-sasl,cyrus-sasl" |
| 232 | PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2" | 153 | PACKAGECONFIG[numactl] = "-Dnumactl=enabled,-Dnumactl=disabled,numactl," |
| 233 | PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl," | 154 | PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse," |
| 234 | PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse," | 155 | PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit," |
| 235 | PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," | 156 | PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng," |
| 236 | PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng," | 157 | PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil," |
| 237 | PACKAGECONFIG[wireshark] = "--with-wireshark-dissector,--without-wireshark-dissector,wireshark libwsutil," | 158 | PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=true, -Dapparmor_profiles=false," |
| 238 | PACKAGECONFIG[apparmor-profiles] = "--with-apparmor-profiles, --without-apparmor-profiles," | 159 | PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled," |
| 239 | PACKAGECONFIG[firewalld] = "--with-firewalld, --without-firewalld," | 160 | PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap" |
| 240 | PACKAGECONFIG[libpcap] = "--with-libpcap, --without-libpcap,libpcap,libpcap" | 161 | PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled," |
| 241 | PACKAGECONFIG[numad] = "--with-numad, --without-numad," | ||
| 242 | 162 | ||
| 243 | # Enable the Python tool support | 163 | # Enable the Python tool support |
| 244 | require libvirt-python.inc | 164 | require libvirt-python.inc |
| @@ -255,7 +175,7 @@ do_compile() { | |||
| 255 | 175 | ||
| 256 | cd ${B} | 176 | cd ${B} |
| 257 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" | 177 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" |
| 258 | oe_runmake all | 178 | ninja all |
| 259 | } | 179 | } |
| 260 | 180 | ||
| 261 | do_install_prepend() { | 181 | do_install_prepend() { |
| @@ -278,6 +198,8 @@ do_install_append() { | |||
| 278 | fi | 198 | fi |
| 279 | 199 | ||
| 280 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 200 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 201 | mkdir -p ${D}/lib | ||
| 202 | mv ${D}/usr/lib/systemd ${D}/lib | ||
| 281 | # This variable is used by libvirtd.service to start libvirtd in the right mode | 203 | # This variable is used by libvirtd.service to start libvirtd in the right mode |
| 282 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd | 204 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd |
| 283 | 205 | ||
| @@ -285,6 +207,8 @@ do_install_append() { | |||
| 285 | sed -i -e 's/Type=notify/Type=forking/' \ | 207 | sed -i -e 's/Type=notify/Type=forking/' \ |
| 286 | -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ | 208 | -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ |
| 287 | ${D}/${systemd_unitdir}/system/libvirtd.service | 209 | ${D}/${systemd_unitdir}/system/libvirtd.service |
| 210 | else | ||
| 211 | rm -rf ${D}/usr/lib/systemd | ||
| 288 | fi | 212 | fi |
| 289 | 213 | ||
| 290 | # The /run/libvirt directories created by the Makefile are | 214 | # The /run/libvirt directories created by the Makefile are |
| @@ -360,7 +284,7 @@ do_install_append() { | |||
| 360 | # connection via 127.0.0.1 is available out of box. | 284 | # connection via 127.0.0.1 is available out of box. |
| 361 | install -d ${D}/etc/pki/CA | 285 | install -d ${D}/etc/pki/CA |
| 362 | install -d ${D}/etc/pki/libvirt/private | 286 | install -d ${D}/etc/pki/libvirt/private |
| 363 | install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir} | 287 | install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir} |
| 364 | install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem | 288 | install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem |
| 365 | install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem | 289 | install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem |
| 366 | install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem | 290 | install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem |
| @@ -376,10 +300,10 @@ do_install_append() { | |||
| 376 | chmod 4755 ${D}${bindir}/virt-login-shell | 300 | chmod 4755 ${D}${bindir}/virt-login-shell |
| 377 | } | 301 | } |
| 378 | 302 | ||
| 379 | EXTRA_OECONF += " \ | 303 | EXTRA_OEMESON += " \ |
| 380 | --with-init-script=systemd \ | 304 | -Dinit_script=systemd \ |
| 381 | --with-test-suite \ | 305 | -Drunstatedir=/run \ |
| 382 | --with-runstatedir=/run \ | 306 | -Dtests=enabled \ |
| 383 | " | 307 | " |
| 384 | 308 | ||
| 385 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then | 309 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then |
| @@ -387,25 +311,6 @@ EXTRA_OECONF += " \ | |||
| 387 | SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" | 311 | SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" |
| 388 | SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" | 312 | SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" |
| 389 | 313 | ||
| 390 | EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH} SYSTEMD_UNIT_DIR=${systemd_system_unitdir}" | ||
| 391 | |||
| 392 | PRIVATE_LIBS_${PN}-ptest_append = "libvirt-admin.so.0" | ||
| 393 | |||
| 394 | do_compile_ptest() { | ||
| 395 | oe_runmake -C tests buildtest-TESTS | ||
| 396 | } | ||
| 397 | |||
| 398 | do_install_ptest() { | ||
| 399 | oe_runmake -C tests install-ptest | ||
| 400 | |||
| 401 | find ${S}/tests -maxdepth 1 -type d -exec cp -r {} ${D}${PTEST_PATH}/tests/ \; | ||
| 402 | |||
| 403 | # remove .la files for ptest, they aren't required and can trigger QA errors | ||
| 404 | for i in `find ${D}${PTEST_PATH} -type f \( -name *.la -o -name *.o \)`; do | ||
| 405 | rm -f $i | ||
| 406 | done | ||
| 407 | } | ||
| 408 | |||
| 409 | pkg_postinst_${PN}() { | 314 | pkg_postinst_${PN}() { |
| 410 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | 315 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 411 | /etc/init.d/populate-volatile.sh update | 316 | /etc/init.d/populate-volatile.sh update |
