[Pkg-libvirt-commits] [libvirt] 01/01: qemu: Don't try to parse -help for new QEMU

Guido Guenther agx at moszumanska.debian.org
Thu Feb 5 21:06:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to branch master
in repository libvirt.

commit 4c14b837b35a176fe72fde897197b4e94a92e544
Author: Guido Günther <agx at sigxcpu.org>
Date:   Thu Feb 5 21:26:16 2015 +0100

    qemu: Don't try to parse -help for new QEMU
    
    Closes; #777138
    Thanks: Mathieu Malaterre for the debugging
---
 ...-qemu-Don-t-try-to-parse-help-for-new-QEM.patch | 39 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/Description-qemu-Don-t-try-to-parse-help-for-new-QEM.patch b/debian/patches/Description-qemu-Don-t-try-to-parse-help-for-new-QEM.patch
new file mode 100644
index 0000000..1233098
--- /dev/null
+++ b/debian/patches/Description-qemu-Don-t-try-to-parse-help-for-new-QEM.patch
@@ -0,0 +1,39 @@
+From: Mathieu Malaterre <malat at debian.org>
+Date: Thu, 5 Feb 2015 16:05:49 +0100
+Subject: Description: qemu: Don't try to parse -help for new QEMU
+
+Since QEMU 1.2.0, we switched to QMP probing instead of parsing -help
+(and other commands, such as -cpu ?) output. However, if QMP probing
+failed, we still tried starting QEMU with various options and parsing
+the output, which was guaranteed to fail because the output changed.
+Let's just refuse parsing -help for QEMU >= 1.2.0.
+
+Author: Jiri Denemark <jdenemar redhat com>
+Bug-Debian: https://bugs.debian.org/776065
+Origin: upstream, https://www.redhat.com/archives/libvir-list/2014-November/msg00407.html
+Reviewed-By: Mathieu Malaterre <malat at debian.org>
+---
+ src/qemu/qemu_capabilities.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
+index a409aaf..9e0158c 100644
+--- a/src/qemu/qemu_capabilities.c
++++ b/src/qemu/qemu_capabilities.c
+@@ -1382,6 +1382,16 @@ int virQEMUCapsParseHelpStr(const char *qemu,
+ 
+     *version = (major * 1000 * 1000) + (minor * 1000) + micro;
+ 
++    /* Refuse to parse -help output for QEMU releases >= 1.2.0 that should be
++     * using QMP probing.
++     */
++    if (*version > 1002000) {
++        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
++                       _("QEMU %u.%u.%u is too new for help parsing"),
++                       major, minor, micro);
++        goto cleanup;
++    }
++
+     if (virQEMUCapsComputeCmdFlags(help, *version, *is_kvm, *kvm_version,
+                                    qemuCaps, check_yajl) < 0)
+         goto cleanup;
diff --git a/debian/patches/series b/debian/patches/series
index fb694c9..b58e7ce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,3 +26,4 @@ lxc-Don-t-crash-on-NULL-ifname_guest_actual.patch
 upstream/vbox-fix-a-bug-in-_machineStateInactive.patch
 security/CVE-2015-0236-qemu-Check-ACLs-when-dumping-security-.patch
 security/CVE-2015-0236-qemu-Check-ACLs-when-dumping-securi-14.patch
+Description-qemu-Don-t-try-to-parse-help-for-new-QEM.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git



More information about the Pkg-libvirt-commits mailing list