aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2020-11-17 13:22:45 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2020-11-17 13:24:29 +0000
commit3bbb400149ae5615120eeeafda6032b37a0e2f3c (patch)
treecdfc5c07d86626ba2d2aaaa1589c69a631571105
parente4625146157e9ef1ea69d18ebb0f0cc7503a3192 (diff)
downloadaports-3bbb400149ae5615120eeeafda6032b37a0e2f3c.tar.gz
aports-3bbb400149ae5615120eeeafda6032b37a0e2f3c.tar.bz2
aports-3bbb400149ae5615120eeeafda6032b37a0e2f3c.tar.xz
main/libvirt: fix for virsh requires btrfs to create dir based pool
Upstream patch: https://gitlab.com/libvirt/libvirt/-/issues/73 Fix issues #12073
-rw-r--r--main/libvirt/APKBUILD6
-rw-r--r--main/libvirt/fix-logic-virfilesetcow.patch37
2 files changed, 41 insertions, 2 deletions
diff --git a/main/libvirt/APKBUILD b/main/libvirt/APKBUILD
index 91467d3f21..aece0b170a 100644
--- a/main/libvirt/APKBUILD
+++ b/main/libvirt/APKBUILD
@@ -2,7 +2,7 @@
pkgname=libvirt
pkgver=6.6.0
_ver="${pkgver/_rc/-rc}"
-pkgrel=3
+pkgrel=4
pkgdesc="A virtualization API for several hypervisor and container systems"
url="https://libvirt.org/"
arch="all"
@@ -36,6 +36,7 @@ source="https://libvirt.org/sources/libvirt-$pkgver.tar.xz
avoid-free-when-reset-log-after-fork.patch
improve-generic-mass-close-of-fds.patch
CVE-2020-25637.patch
+ fix-logic-virfilesetcow.patch
"
if [ "$CARCH" = "x86_64" ]; then
subpackages="$subpackages $pkgname-xen"
@@ -206,4 +207,5 @@ dfe042c596028125bf8548115de2922683829c4716f6b0efb8efc38518670e3e848481661b9714bb
d32551d56eae2c33bab7571964f76421336967918c293cd1d18fc66626a7ead3551b5672a9e3fc3d8b7bca82cc0abb17e428ee8271d04d73bc06fd16309918b3 stderr-fix.patch
64d59e46caa2cf234cc35e1e804572260b850c1fbc7e3d064129149d678b6b4eb0444581c19e776adf072b044260b5342d4d0a7e71f8093c018d3c2c34d7cd28 avoid-free-when-reset-log-after-fork.patch
6c6bf3fe364f31d5cd39e5436e3d3e416d52edce1101782043ee43bfc646058b53687bee141349b11c7dbb3e2b528f29af21ff59940981a66f968267704b675a improve-generic-mass-close-of-fds.patch
-712db7e9f1c4f2c6de8d8583492f9d4434a82da00fb09f9b9791a29aff6db9bb5c88a46a060b8ba62b43bc43564f5145fadcd99d2d45ecdab4e68c974dcb78db CVE-2020-25637.patch"
+712db7e9f1c4f2c6de8d8583492f9d4434a82da00fb09f9b9791a29aff6db9bb5c88a46a060b8ba62b43bc43564f5145fadcd99d2d45ecdab4e68c974dcb78db CVE-2020-25637.patch
+072934b56253dbd977e930ef010e592b08ff9be637fc6b888aebc991237b1d09ee52f40195fcf820455af5c5cc6e2a847a49a123732cfa6f6af217de02cb0681 fix-logic-virfilesetcow.patch"
diff --git a/main/libvirt/fix-logic-virfilesetcow.patch b/main/libvirt/fix-logic-virfilesetcow.patch
new file mode 100644
index 0000000000..c7ae0d982d
--- /dev/null
+++ b/main/libvirt/fix-logic-virfilesetcow.patch
@@ -0,0 +1,37 @@
+From 2edd63a0dbd445112db23596ee0128521e8f1ff5 Mon Sep 17 00:00:00 2001
+From: Jiri Denemark <jdenemar@redhat.com>
+Date: Wed, 5 Aug 2020 10:01:45 +0200
+Subject: [PATCH] util: Fix logic in virFileSetCOW
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When COW is not explicitly requested to be disabled or enabled, the
+function is supposed to do nothing on non-BTRFS file systems.
+
+Fixes commit 7230bc95aa78379c9ee20cf59394c5fc4305b75b.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1866157
+
+Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
+Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+---
+ src/util/virfile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/virfile.c b/src/util/virfile.c
+index 6ada3a708c..7f22884b07 100644
+--- a/src/util/virfile.c
++++ b/src/util/virfile.c
+@@ -4522,7 +4522,7 @@ virFileSetCOW(const char *path,
+ }
+
+ if (buf.f_type != BTRFS_SUPER_MAGIC) {
+- if (state == VIR_TRISTATE_BOOL_ABSENT) {
++ if (state != VIR_TRISTATE_BOOL_ABSENT) {
+ virReportSystemError(ENOSYS,
+ _("unable to control COW flag on '%s', not btrfs"),
+ path);
+--
+GitLab
+