summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-03-25 16:48:36 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-03-25 16:48:36 -0400
commit2a355647b9cbf236f54d5099928371ffb0fd8ded (patch)
tree9dd1e36892530321183bcb72df77afc6d8eca5c8 /recipes-extended
parent82f8a454a37bff32b98eab004e20b9c25a818165 (diff)
downloadmeta-virtualization-2a355647b9cbf236f54d5099928371ffb0fd8ded.tar.gz
libvirt: uprev to 8.1.0
Bumping libvirt to a newer version. We drop our backported patches, update the checksums, change the meson configuration slightly and adjust the location of the systemd manipulations. Along with functionality changes and bugfixes, we pickup newer python components, so we can survive the depreciation of distutils more easily. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc3
-rw-r--r--recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch64
-rw-r--r--recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch56
-rw-r--r--recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch40
-rw-r--r--recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch48
-rw-r--r--recipes-extended/libvirt/libvirt_8.1.0.bb (renamed from recipes-extended/libvirt/libvirt_7.2.0.bb)11
6 files changed, 4 insertions, 218 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index a48aaea5..6e2c3677 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -17,8 +17,7 @@ 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] = "19bf22414a43d358581b9259b52047a7" 20SRC_URI[libvirt_python.sha256sum] = "a21ecfab6d29ac1bdd1bfd4aa3ef58447f9f70919aefecd03774613f65914e43"
21SRC_URI[libvirt_python.sha256sum] = "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
22 21
23export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" 22export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
24export LIBVIRT_CFLAGS = "-I${S}/include" 23export LIBVIRT_CFLAGS = "-I${S}/include"
diff --git a/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch b/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch
deleted file mode 100644
index 9dd650ee..00000000
--- a/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4
5From 54814c87f3706cc8eb894634ebef0f9cf7dabae6 Mon Sep 17 00:00:00 2001
6From: Martin Kletzander <mkletzan@redhat.com>
7Date: Mon, 21 Feb 2022 09:26:13 +0100
8Subject: [PATCH] docs: Fix template matching in page.xsl
9
10Our last default template had a match of "node()" which incidentally matched
11everything, including text nodes. Since this has the same priority according to
12the XSLT spec, section 5.5:
13
14 https://www.w3.org/TR/1999/REC-xslt-19991116#conflict
15
16this is an error. Also according to the same spec section, the XSLT processor
17may signal the error or pick the last rule.
18
19This was uncovered with libxslt 1.1.35 which contains the following commit:
20
21 https://gitlab.gnome.org/GNOME/libxslt/-/commit/b0074eeca3c6b21b4da14fdf712b853900c51635
22
23which makes the build fail with:
24
25 runtime error: file ../docs/page.xsl line 223 element element
26 xsl:element: The effective name '' is not a valid QName.
27
28because our last rule also matches text nodes and we are trying to extract the
29node name out of them.
30
31To fix this we change the match to "*" which only matches elements and not all
32the nodes, and to avoid any possible errors with different XSLT processors we
33also bump the priority of the match="text()" rule a little higher, just in case
34someone needs to use an XSLT processor that chooses signalling the error instead
35of the optional recovery.
36
37https://bugs.gentoo.org/833586
38
39Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
40---
41 docs/page.xsl | 4 ++--
42 1 file changed, 2 insertions(+), 2 deletions(-)
43
44diff --git a/docs/page.xsl b/docs/page.xsl
45index fd67918d3b..72a6fa0842 100644
46--- a/docs/page.xsl
47+++ b/docs/page.xsl
48@@ -215,11 +215,11 @@
49 </xsl:element>
50 </xsl:template>
51
52- <xsl:template match="text()" mode="copy">
53+ <xsl:template match="text()" mode="copy" priority="0">
54 <xsl:value-of select="."/>
55 </xsl:template>
56
57- <xsl:template match="node()" mode="copy">
58+ <xsl:template match="*" mode="copy">
59 <xsl:element name="{name()}">
60 <xsl:copy-of select="./@*"/>
61 <xsl:apply-templates mode="copy" />
62--
632.33.0
64
diff --git a/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch b/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch
deleted file mode 100644
index 2753503d..00000000
--- a/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 15073504dbb624d3f6c911e85557019d3620fdb2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
3Date: Mon, 28 Jun 2021 13:09:04 +0100
4Subject: [PATCH] security: fix SELinux label generation logic
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9A process can access a file if the set of MCS categories
10for the file is equal-to *or* a subset-of, the set of
11MCS categories for the process.
12
13If there are two VMs:
14
15 a) svirt_t:s0:c117
16 b) svirt_t:s0:c117,c720
17
18Then VM (b) is able to access files labelled for VM (a).
19
20IOW, we must discard case where the categories are equal
21because that is a subset of many other valid category pairs.
22
23Upstream-status: Backport
24
25Fixes: https://gitlab.com/libvirt/libvirt/-/issues/153
26CVE-2021-3631
27Reviewed-by: Peter Krempa <pkrempa@redhat.com>
28Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
29---
30 src/security/security_selinux.c | 10 +++++++++-
31 1 file changed, 9 insertions(+), 1 deletion(-)
32
33diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
34index b50f4463cc..0c2cf1d1c7 100644
35--- a/src/security/security_selinux.c
36+++ b/src/security/security_selinux.c
37@@ -383,7 +383,15 @@ virSecuritySELinuxMCSFind(virSecurityManager *mgr,
38 VIR_DEBUG("Try cat %s:c%d,c%d", sens, c1 + catMin, c2 + catMin);
39
40 if (c1 == c2) {
41- mcs = g_strdup_printf("%s:c%d", sens, catMin + c1);
42+ /*
43+ * A process can access a file if the set of MCS categories
44+ * for the file is equal-to *or* a subset-of, the set of
45+ * MCS categories for the process.
46+ *
47+ * IOW, we must discard case where the categories are equal
48+ * because that is a subset of other category pairs.
49+ */
50+ continue;
51 } else {
52 if (c1 > c2) {
53 int t = c1;
54--
552.17.1
56
diff --git a/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch b/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch
deleted file mode 100644
index 608322d9..00000000
--- a/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From d3e20e186ed531e196bb1529430f39b0c917e6dc Mon Sep 17 00:00:00 2001
2From: Peter Krempa <pkrempa@redhat.com>
3Date: Wed, 21 Jul 2021 11:22:25 +0200
4Subject: [PATCH] storage_driver: Unlock object on ACL fail in
5 storagePoolLookupByTargetPath
6
7'virStoragePoolObjListSearch' returns a locked and refed object, thus we
8must release it on ACL permission failure.
9
10Fixes: 7aa0e8c0cb8
11Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
12Signed-off-by: Peter Krempa <pkrempa@redhat.com>
13Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14
15Upstream-status: Backport
16CVE-2021-3667 [https://bugzilla.redhat.com/show_bug.cgi?id=1986094]
17Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
18---
19 src/storage/storage_driver.c | 4 +++-
20 1 file changed, 3 insertions(+), 1 deletion(-)
21
22diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
23index ecb5b86b4f..de66f1f9e5 100644
24--- a/src/storage/storage_driver.c
25+++ b/src/storage/storage_driver.c
26@@ -1739,8 +1739,10 @@ storagePoolLookupByTargetPath(virConnectPtr conn,
27 storagePoolLookupByTargetPathCallback,
28 cleanpath))) {
29 def = virStoragePoolObjGetDef(obj);
30- if (virStoragePoolLookupByTargetPathEnsureACL(conn, def) < 0)
31+ if (virStoragePoolLookupByTargetPathEnsureACL(conn, def) < 0) {
32+ virStoragePoolObjEndAPI(&obj);
33 return NULL;
34+ }
35
36 pool = virGetStoragePool(conn, def->name, def->uuid, NULL, NULL);
37 virStoragePoolObjEndAPI(&obj);
38--
392.27.0
40
diff --git a/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch b/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch
deleted file mode 100644
index 3201eede..00000000
--- a/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From c607266619c5ab78ad5d4179b3ea93cfb6348391 Mon Sep 17 00:00:00 2001
2From: Andrea Bolognani <abologna@redhat.com>
3Date: Mon, 3 May 2021 09:06:34 +0200
4Subject: [PATCH] meson: Fix compatibility with Meson 0.58
5
6Builds failed with
7
8 tests/meson.build:690:0: ERROR: List item must be one
9 of <class 'str'>, not <class 'list'>
10
11before this change.
12
13https://gitlab.com/libvirt/libvirt/-/issues/158
14
15Upstream-Status: Backport [https://gitlab.com/libvirt/libvirt/-/commit/c607266619c5ab78ad5d4179b3ea93cfb6348391]
16
17Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
18Signed-off-by: Andrea Bolognani <abologna@redhat.com>
19Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
21---
22 tests/meson.build | 8 ++++----
23 1 file changed, 4 insertions(+), 4 deletions(-)
24
25diff --git a/tests/meson.build b/tests/meson.build
26index 05c3e90195..9900983d0c 100644
27--- a/tests/meson.build
28+++ b/tests/meson.build
29@@ -687,12 +687,12 @@ foreach name : test_scripts
30 test(name, script, env: tests_env)
31 endforeach
32
33+testenv = runutf8
34+testenv += 'VIR_TEST_FILE_ACCESS=1'
35+
36 add_test_setup(
37 'access',
38- env: [
39- 'VIR_TEST_FILE_ACCESS=1',
40- runutf8,
41- ],
42+ env: testenv,
43 exe_wrapper: [ python3_prog, check_file_access_prog.path() ],
44 )
45
46--
47GitLab
48
diff --git a/recipes-extended/libvirt/libvirt_7.2.0.bb b/recipes-extended/libvirt/libvirt_8.1.0.bb
index 1fc55b8d..b90fb704 100644
--- a/recipes-extended/libvirt/libvirt_7.2.0.bb
+++ b/recipes-extended/libvirt/libvirt_8.1.0.bb
@@ -28,14 +28,9 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \
28 file://dnsmasq.conf \ 28 file://dnsmasq.conf \
29 file://hook_support.py \ 29 file://hook_support.py \
30 file://gnutls-helper.py \ 30 file://gnutls-helper.py \
31 file://0002-meson-Fix-compatibility-with-Meson-0.58.patch \
32 file://0001-security-fix-SELinux-label-generation-logic.patch \
33 file://0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch \
34 file://0001-docs-Fix-template-matching-in-page.xsl.patch \
35 " 31 "
36 32
37SRC_URI[libvirt.md5sum] = "92044b629216e44adce63224970a54a3" 33SRC_URI[libvirt.sha256sum] = "3c6c43becffeb34a3f397c616206aa69a893ff8bf5e8208393c84e8e75352934"
38SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b936a71d7e0ed1d0"
39 34
40inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative 35inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative
41USERADD_PACKAGES = "${PN}" 36USERADD_PACKAGES = "${PN}"
@@ -160,7 +155,7 @@ PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse,"
160PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit," 155PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit,"
161PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng," 156PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng,"
162PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil," 157PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil,"
163PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=true, -Dapparmor_profiles=false," 158PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=enabled, -Dapparmor_profiles=disabled,"
164PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled," 159PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled,"
165PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap" 160PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap"
166PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled," 161PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled,"
@@ -212,7 +207,7 @@ do_install:append() {
212 fi 207 fi
213 208
214 # This variable is used by libvirtd.service to start libvirtd in the right mode 209 # This variable is used by libvirtd.service to start libvirtd in the right mode
215 sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd 210 sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/init.d/libvirtd
216 211
217 # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. 212 # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
218 sed -i -e 's/Type=notify/Type=forking/' \ 213 sed -i -e 's/Type=notify/Type=forking/' \