summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorYanfei Xu <yanfei.xu@windriver.com>2021-04-22 21:49:26 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-04-22 10:18:06 -0400
commit9f359865c4512771f914dab99fe22f7da2fe029a (patch)
treef9711ab799f9e8a64f31b2ebb83a89dcd0d585d8 /recipes-extended
parentd5aa7e668db030f45d9e23b4cae0ddf2088d12d8 (diff)
downloadmeta-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>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc4
-rw-r--r--recipes-extended/libvirt/libvirt/0001-build-drop-unnecessary-libgnu.la-reference.patch31
-rw-r--r--recipes-extended/libvirt/libvirt/0001-to-fix-build-error.patch47
-rw-r--r--recipes-extended/libvirt/libvirt/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch34
-rw-r--r--recipes-extended/libvirt/libvirt/install-missing-file.patch50
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch63
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch43
-rw-r--r--recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch39
-rw-r--r--recipes-extended/libvirt/libvirt/runptest.patch116
-rw-r--r--recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch91
-rw-r--r--recipes-extended/libvirt/libvirt_7.2.0.bb (renamed from recipes-extended/libvirt/libvirt_6.3.0.bb)205
11 files changed, 57 insertions, 666 deletions
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
18SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" 18SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python"
19 19
20SRC_URI[libvirt_python.md5sum] = "4cf898350ee9a47f94986d402c153bdb" 20SRC_URI[libvirt_python.md5sum] = "19bf22414a43d358581b9259b52047a7"
21SRC_URI[libvirt_python.sha256sum] = "c772421ecc144f098f4ab15db700c62db9b9e6e76b876217edcfd62e9ce02750" 21SRC_URI[libvirt_python.sha256sum] = "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
22 22
23export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" 23export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
24export LIBVIRT_CFLAGS = "-I${S}/include" 24export 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 @@
1From 30a056069cb35804434fb036e51ae97f33c02025 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Sat, 7 Mar 2020 21:36:27 -0500
4Subject: [PATCH] build: drop unnecessary libgnu.la reference
5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
7
8---
9 tools/Makefile.am | 2 --
10 1 file changed, 2 deletions(-)
11
12diff --git a/tools/Makefile.am b/tools/Makefile.am
13index 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 @@
1From 3566bcacaa6408fb8f655d1749a20b2f30e0c765 Mon Sep 17 00:00:00 2001
2From: Lei Maohui <leimaohui@cn.fujitsu.com>
3Date: Fri, 31 Jul 2015 03:17:07 +0900
4Subject: [PATCH] to fix build error
5
6The 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
15Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
16[ywei: rebased to libvirt-1.3.2]
17Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
18[MA: rebase to v4.3.0]
19Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
20
21---
22 docs/Makefile.am | 5 ++---
23 1 file changed, 2 insertions(+), 3 deletions(-)
24
25diff --git a/docs/Makefile.am b/docs/Makefile.am
26index 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 @@
1From 79f5975db01af0599860ccca7ef44b0e27105a04 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---
15 m4/virt-xdr.m4 | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/m4/virt-xdr.m4 b/m4/virt-xdr.m4
19index 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 @@
1From aa75f5136066d239d48a21373b3d96ee12378e8d Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 8 May 2019 17:24:17 +0800
4Subject: [PATCH] Install missing conf file
5
6openvzutilstest.conf file is needed by openvzutilstest test.
7
8Upstream-Status: Inapproriate
9
10Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
11[KK: Update context for 1.3.5.]
12Signed-off-by: Kai Kang <kai.kang@windriver.com>
13[MA: Update context for v4.3.0]
14Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
15[DDU: Update context for v5.3.0]
16Signed-off-by: Dengke Du <dengke.du@windriver.com>
17
18---
19 tests/Makefile.am | 4 +++-
20 1 file changed, 3 insertions(+), 1 deletion(-)
21
22diff --git a/tests/Makefile.am b/tests/Makefile.am
23index 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 @@
1From ad5d9cee87357f9f38f62583119606ef95ba10df Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Fri, 24 May 2013 16:46:00 +0300
4Subject: [PATCH] Fix thread safety in LXC callback handling
5
6Signed-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
11diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
12index 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--
621.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 @@
1From 94bd514e1b6e602a48285db94e65050f8f0c2585 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Wed, 8 Apr 2015 13:03:03 -0400
4Subject: [PATCH] libvirt: use pkg-config to locate libcap
5
6libvirt wants to use pcap-config to locate the exisence and location
7of libpcap. oe-core stubs this script and replaces it with pkg-config,
8which can lead to the host pcap-config triggering and either breaking
9the build or introducing host contamination.
10
11To fix this issue, we patch configure to use 'pkg-config libcap' to
12locate the correct libraries.
13
14Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
15[MA: Update to apply agains v4.3.0]
16Signed-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
22diff --git a/m4/virt-libpcap.m4 b/m4/virt-libpcap.m4
23index 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 @@
1From 74bff2509080912ea8abf1de8fd95fa2412b659a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
3Date: Thu, 11 Apr 2013 11:37:25 +0200
4Subject: [PATCH] qemu: fix crash in qemuOpen
5
6commit 74bff2509080912ea8abf1de8fd95fa2412b659a from upsteam
7git://libvirt.org/libvirt.git
8
9If the path part of connection URI is not present, cfg is used
10unitialized.
11
12https://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
17diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
18index 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--
381.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 @@
1From d210838a4433dd254c1a11b08b804ebe9ff5f378 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 8 May 2019 10:20:47 +0800
4Subject: [PATCH] Add 'install-ptest' rule
5
6Change TESTS_ENVIRONMENT to allow running outside build dir.
7
8Upstream-status: Pending
9Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
10[KK: Update context for 1.3.5.]
11Signed-off-by: Kai Kang <kai.kang@windriver.com>
12[MA: Allow separate source and build dirs]
13Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
14[ZH: add missing test_helper files]
15Signed-off-by: He Zhe <zhe.he@windriver.com>
16[MA: Update context for v4.3.0]
17Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
18[DDU: Update context for v5.3.0]
19Signed-off-by: Dengke Du <dengke.du@windriver.com>
20
21---
22 tests/Makefile.am | 68 +++++++++++++++++++++++++++++++++++++++++------
23 1 file changed, 60 insertions(+), 8 deletions(-)
24
25diff --git a/tests/Makefile.am b/tests/Makefile.am
26index 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 @@
1From 7dc21edd851b260485b432c096f8e90f6fa07778 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 7 May 2019 15:26:32 +0800
4Subject: [PATCH] tools: add libvirt-net-rpc to virt-host-validate when TLS is
5 enabled
6
7When gnu-tls is enabled for libvirt references to virNetTLSInit are
8generated in libvirt. Any binaries linking against libvirt, must also
9link against libvirt-net-rpc which provides the implementation.
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12[ywei: rebased to libvirt-1.3.2]
13Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
14[MA: rebase to v4.3.0]
15Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
16[ddu: rebase to v5.3.0]
17Signed-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
24diff --git a/examples/Makefile.am b/examples/Makefile.am
25index 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
62diff --git a/tools/Makefile.am b/tools/Makefile.am
63index 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 @@
1DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." 1DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux."
2HOMEPAGE = "http://libvirt.org" 2HOMEPAGE = "http://libvirt.org"
3LICENSE = "LGPLv2.1+ & GPLv2+" 3LICENSE = "LGPLv2.1+ & GPLv2+"
4LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" 5 file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d"
7SECTION = "console/tools" 6SECTION = "console/tools"
@@ -16,9 +15,7 @@ DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux
16# 15#
17RDEPENDS_${PN} = "gettext-runtime" 16RDEPENDS_${PN} = "gettext-runtime"
18 17
19RDEPENDS_${PN}-ptest += "make gawk perl bash" 18RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables"
20
21RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd"
22RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" 19RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode"
23RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" 20RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode"
24 21
@@ -26,88 +23,33 @@ RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode"
26RCONFLICTS_${PN}_libvirtd = "connman" 23RCONFLICTS_${PN}_libvirtd = "connman"
27 24
28SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ 25SRC_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
45SRC_URI[libvirt.md5sum] = "1bd4435f77924f5ec9928b538daf4a02" 33SRC_URI[libvirt.md5sum] = "92044b629216e44adce63224970a54a3"
46SRC_URI[libvirt.sha256sum] = "74069438d34082336e99a88146349e21130552b96efc3b7c562f6878127996f5" 34SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b936a71d7e0ed1d0"
47 35
48inherit autotools gettext update-rc.d pkgconfig ptest systemd useradd perlnative 36inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative
49USERADD_PACKAGES = "${PN}" 37USERADD_PACKAGES = "${PN}"
50GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" 38GROUPADD_PARAM_${PN} = "-r qemu; -r kvm"
51USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" 39USERADD_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 42EXTRA_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. 43do_write_config_append() {
56# 44 cat >${WORKDIR}/meson-${PN}.cross <<EOF
57acpaths = "-I ./m4" 45[binaries]
58 46iptables = '/usr/sbin/iptables'
59CACHED_CONFIGUREVARS += "\ 47ip6tables = '/usr/sbin/ip6tables'
60ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ 48dmidecode = '/usr/sbin/dmidecode'
61ac_cv_path_AUGPARSE=/usr/bin/augparse \ 49ebtables = '/sbin/ebtables'
62ac_cv_path_DMIDECODE=/usr/sbin/dmidecode \ 50dnsmasq = '/usr/bin/dnsmasq'
63ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ 51EOF
64ac_cv_path_BRCTL=/usr/sbin/brctl \ 52}
65ac_cv_path_TC=/sbin/tc \
66ac_cv_path_UDEVADM=/sbin/udevadm \
67ac_cv_path_MODPROBE=/sbin/modprobe \
68ac_cv_path_IP_PATH=/bin/ip \
69ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \
70ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \
71ac_cv_path_MOUNT=/bin/mount \
72ac_cv_path_UMOUNT=/bin/umount \
73ac_cv_path_MKFS=/usr/sbin/mkfs \
74ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
75ac_cv_path_PVCREATE=/usr/sbin/pvcreate \
76ac_cv_path_VGCREATE=/usr/sbin/vgcreate \
77ac_cv_path_LVCREATE=/usr/sbin/lvcreate \
78ac_cv_path_PVREMOVE=/usr/sbin/pvremove \
79ac_cv_path_VGREMOVE=/usr/sbin/vgremove \
80ac_cv_path_LVREMOVE=/usr/sbin/lvremove \
81ac_cv_path_LVCHANGE=/usr/sbin/lvchange \
82ac_cv_path_VGCHANGE=/usr/sbin/vgchange \
83ac_cv_path_VGSCAN=/usr/sbin/vgscan \
84ac_cv_path_PVS=/usr/sbin/pvs \
85ac_cv_path_VGS=/usr/sbin/vgs \
86ac_cv_path_LVS=/usr/sbin/lvs \
87ac_cv_path_PARTED=/usr/sbin/parted \
88ac_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.
92CACHED_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
112ALLOW_EMPTY_${PN} = "1" 54ALLOW_EMPTY_${PN} = "1"
113 55
@@ -167,31 +109,12 @@ SYSTEMD_SERVICE_${PN}-libvirtd = " \
167 virtlockd.socket \ 109 virtlockd.socket \
168 " 110 "
169 111
170
171PRIVATE_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
192PACKAGECONFIG ??= "qemu yajl openvz vmware vbox esx iproute2 lxc test \ 116PACKAGECONFIG ??= "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#
210PACKAGECONFIG[gnutls] = ",,,gnutls-bin" 133PACKAGECONFIG[gnutls] = ",,,gnutls-bin"
211PACKAGECONFIG[qemu] = "--with-qemu --with-qemu-user=qemu --with-qemu-group=qemu,--without-qemu,qemu," 134PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu,"
212PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" 135PACKAGECONFIG[yajl] = "-Dyajl=enabled,-Dyajl=disabled,yajl,yajl"
213PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen," 136PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen,"
214PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,," 137PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,,"
215PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,," 138PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,,"
216PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,," 139PACKAGECONFIG[vbox] = "-Ddriver_vbox=enabled,-Ddriver_vbox=disabled,,"
217PACKAGECONFIG[esx] = "--with-esx,--without-esx,," 140PACKAGECONFIG[esx] = "-Ddriver_esx=enabled,-Ddriver_esx=disabled,,"
218PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,," 141PACKAGECONFIG[hyperv] = "-Ddriver_hyperv=enabled,-Ddriver_hyperv=disabled,,"
219PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" 142PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit,polkit"
220PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc," 143PACKAGECONFIG[lxc] = "-Ddriver_lxc=enabled,-Ddriver_lxc=disabled,lxc,"
221PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,," 144PACKAGECONFIG[test] = "-Ddriver_test=enabled,-Ddriver_test=disabled,,"
222PACKAGECONFIG[remote] = "--with-remote,--without-remote,," 145PACKAGECONFIG[remote] = "-Ddriver_remote=enabled,-Ddriver_remote=disabled,,"
223PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" 146PACKAGECONFIG[libvirtd] = "-Ddriver_libvirtd=enabled,-Ddriver_libvirtd=disabled,,"
224PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,," 147PACKAGECONFIG[netcf] = "-Dnetcf=enabled,-Dnetcf=disabled,netcf,netcf"
225PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" 148PACKAGECONFIG[dtrace] = "-Ddtrace=enabled,-Ddtrace=disabled,,"
226PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,," 149PACKAGECONFIG[udev] = "-Dudev=enabled -Dpciaccess=enabled,-Dudev=disabled,udev libpciaccess,"
227PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess," 150PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"
228PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
229PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables"
230PACKAGECONFIG[python] = ",,python3," 151PACKAGECONFIG[python] = ",,python3,"
231PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl" 152PACKAGECONFIG[sasl] = "-Dsasl=enabled,-Dsasl=disabled,cyrus-sasl,cyrus-sasl"
232PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2" 153PACKAGECONFIG[numactl] = "-Dnumactl=enabled,-Dnumactl=disabled,numactl,"
233PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl," 154PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse,"
234PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse," 155PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit,"
235PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," 156PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng,"
236PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng," 157PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil,"
237PACKAGECONFIG[wireshark] = "--with-wireshark-dissector,--without-wireshark-dissector,wireshark libwsutil," 158PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=true, -Dapparmor_profiles=false,"
238PACKAGECONFIG[apparmor-profiles] = "--with-apparmor-profiles, --without-apparmor-profiles," 159PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled,"
239PACKAGECONFIG[firewalld] = "--with-firewalld, --without-firewalld," 160PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap"
240PACKAGECONFIG[libpcap] = "--with-libpcap, --without-libpcap,libpcap,libpcap" 161PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled,"
241PACKAGECONFIG[numad] = "--with-numad, --without-numad,"
242 162
243# Enable the Python tool support 163# Enable the Python tool support
244require libvirt-python.inc 164require 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
261do_install_prepend() { 181do_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
379EXTRA_OECONF += " \ 303EXTRA_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 += " \
387SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" 311SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og"
388SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" 312SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2"
389 313
390EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH} SYSTEMD_UNIT_DIR=${systemd_system_unitdir}"
391
392PRIVATE_LIBS_${PN}-ptest_append = "libvirt-admin.so.0"
393
394do_compile_ptest() {
395 oe_runmake -C tests buildtest-TESTS
396}
397
398do_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
409pkg_postinst_${PN}() { 314pkg_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