[Pkg-libvirt-commits] [SCM] Libvirt debian packaging branch, master, updated. debian/0.6.3-3

Guido Günther agx at sigxcpu.org
Tue May 19 18:01:19 UTC 2009


The following commit has been merged in the master branch:
commit df5f5a0ff811da537aa92d553cb93d3924564233
Author: Guido Günther <agx at sigxcpu.org>
Date:   Tue May 19 19:13:58 2009 +0200

    pull kvm/qemu patches from upstream

diff --git a/debian/patches/0006-Fix-QEMU-ARGV-detection-with-kvm-85.patch b/debian/patches/0006-Fix-QEMU-ARGV-detection-with-kvm-85.patch
new file mode 100644
index 0000000..4294580
--- /dev/null
+++ b/debian/patches/0006-Fix-QEMU-ARGV-detection-with-kvm-85.patch
@@ -0,0 +1,79 @@
+From: Daniel P. Berrange <berrange at redhat.com>
+Date: Mon, 11 May 2009 15:14:24 +0000
+Subject: [PATCH] Fix QEMU ARGV detection with kvm >= 85
+
+---
+ src/qemu_conf.c   |   18 ++++++++++++++----
+ src/qemu_driver.c |   12 ++----------
+ 2 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/src/qemu_conf.c b/src/qemu_conf.c
+index 64415ec..a0b406b 100644
+--- a/src/qemu_conf.c
++++ b/src/qemu_conf.c
+@@ -431,18 +431,28 @@ int qemudExtractVersionInfo(const char *qemu,
+         return -1;
+ 
+     char *help = NULL;
+-    enum { MAX_HELP_OUTPUT_SIZE = 8192 };
++    enum { MAX_HELP_OUTPUT_SIZE = 1024*64 };
+     int len = virFileReadLimFD(newstdout, MAX_HELP_OUTPUT_SIZE, &help);
+-    if (len < 0)
++    if (len < 0) {
++        virReportSystemError(NULL, errno, "%s",
++                             _("Unable to read QEMU help output"));
+         goto cleanup2;
++    }
+ 
+     if (sscanf(help, "QEMU PC emulator version %u.%u.%u (kvm-%u)",
+                &major, &minor, &micro, &kvm_version) != 4)
+         kvm_version = 0;
+ 
+-    if (!kvm_version && sscanf(help, "QEMU PC emulator version %u.%u.%u",
+-               &major, &minor, &micro) != 3)
++    if (!kvm_version &&
++        sscanf(help, "QEMU PC emulator version %u.%u.%u",
++               &major, &minor, &micro) != 3) {
++        char *eol = strchr(help, '\n');
++        if (eol) *eol = '\0';
++        qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
++                         _("cannot parse QEMU version number in '%s'"),
++                         help);
+         goto cleanup2;
++    }
+ 
+     version = (major * 1000 * 1000) + (minor * 1000) + micro;
+ 
+diff --git a/src/qemu_driver.c b/src/qemu_driver.c
+index f9fe2ba..4b51a65 100644
+--- a/src/qemu_driver.c
++++ b/src/qemu_driver.c
+@@ -1379,12 +1379,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
+ 
+     if (qemudExtractVersionInfo(emulator,
+                                 NULL,
+-                                &qemuCmdFlags) < 0) {
+-        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+-                         _("Cannot determine QEMU argv syntax %s"),
+-                         emulator);
++                                &qemuCmdFlags) < 0)
+         goto cleanup;
+-    }
+ 
+     if (qemuPrepareHostDevices(conn, vm->def) < 0)
+         goto cleanup;
+@@ -3614,12 +3610,8 @@ static int qemudDomainChangeEjectableMedia(virConnectPtr conn,
+ 
+     if (qemudExtractVersionInfo(vm->def->emulator,
+                                 NULL,
+-                                &qemuCmdFlags) < 0) {
+-        qemudReportError(conn, dom, NULL, VIR_ERR_INTERNAL_ERROR,
+-                         _("Cannot determine QEMU argv syntax %s"),
+-                         vm->def->emulator);
++                                &qemuCmdFlags) < 0)
+         return -1;
+-    }
+ 
+     if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE) {
+         if (!(devname = qemudDiskDeviceName(conn, newdisk)))
+-- 
diff --git a/debian/patches/0007-Declare-support-for-QEMU-migration-in-capabilities.patch b/debian/patches/0007-Declare-support-for-QEMU-migration-in-capabilities.patch
new file mode 100644
index 0000000..6003c95
--- /dev/null
+++ b/debian/patches/0007-Declare-support-for-QEMU-migration-in-capabilities.patch
@@ -0,0 +1,32 @@
+From: Daniel P. Berrange <berrange at redhat.com>
+Date: Mon, 18 May 2009 15:10:51 +0000
+Subject: [PATCH] Declare support for QEMU migration in capabilities
+
+---
+ src/qemu_conf.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/src/qemu_conf.c b/src/qemu_conf.c
+index a0b406b..4bd616a 100644
+--- a/src/qemu_conf.c
++++ b/src/qemu_conf.c
+@@ -370,7 +370,7 @@ virCapsPtr qemudCapsInit(void) {
+     uname (&utsname);
+ 
+     if ((caps = virCapabilitiesNew(utsname.machine,
+-                                   0, 0)) == NULL)
++                                   1, 1)) == NULL)
+         goto no_memory;
+ 
+     /* Using KVM's mac prefix for QEMU too */
+@@ -379,6 +379,9 @@ virCapsPtr qemudCapsInit(void) {
+     if (virCapsInitNUMA(caps) < 0)
+         goto no_memory;
+ 
++    virCapabilitiesAddHostMigrateTransport(caps,
++                                           "tcp");
++
+     /* First the pure HVM guests */
+     for (i = 0 ; i < ARRAY_CARDINALITY(arch_info_hvm) ; i++)
+         if (qemudCapsInitGuest(caps,
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index b0fea9a..bde3fe3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,5 @@
 0003-allow-libvirt-group-to-access-the-socket.patch
 0004-fix-Debian-specific-path-to-hvm-loader.patch
 0005-don-t-crash-with-def-NULL.patch
+0006-Fix-QEMU-ARGV-detection-with-kvm-85.patch
+0007-Declare-support-for-QEMU-migration-in-capabilities.patch

-- 
Libvirt debian packaging



More information about the Pkg-libvirt-commits mailing list