diff --git a/libvirt-fix-drv-supports-feature-bogus-error.patch b/libvirt-fix-drv-supports-feature-bogus-error.patch new file mode 100644 index 0000000..3e90eb1 --- /dev/null +++ b/libvirt-fix-drv-supports-feature-bogus-error.patch @@ -0,0 +1,32 @@ +From 2f6e857ac7d6ed5cd417e684147dd9c98775ab3d Mon Sep 17 00:00:00 2001 +From: Chris Lalancette +Date: Mon, 21 Sep 2009 14:53:31 +0200 +Subject: [PATCH] Don't do virSetConnError when virDrvSupportsFeature is successful. + +Signed-off-by: Chris Lalancette +Fedora-patch: libvirt-fix-drv-supports-feature-bogus-error.patch +--- + src/libvirt.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/libvirt.c b/src/libvirt.c +index 4a11688..fa59dc7 100644 +--- a/src/libvirt.c ++++ b/src/libvirt.c +@@ -1349,8 +1349,11 @@ virDrvSupportsFeature (virConnectPtr conn, int feature) + } + + ret = VIR_DRV_SUPPORTS_FEATURE (conn->driver, conn, feature); +- /* Copy to connection error object for back compatability */ +- virSetConnError(conn); ++ ++ if (ret < 0) ++ /* Copy to connection error object for back compatability */ ++ virSetConnError(conn); ++ + return ret; + } + +-- +1.6.2.5 + diff --git a/libvirt-fix-net-hotunplug-double-free.patch b/libvirt-fix-net-hotunplug-double-free.patch index 3eda788..7a302d6 100644 --- a/libvirt-fix-net-hotunplug-double-free.patch +++ b/libvirt-fix-net-hotunplug-double-free.patch @@ -1,4 +1,4 @@ -From 18067a3cde7183fd17eea199fac2e49edfe1cb22 Mon Sep 17 00:00:00 2001 +From d09ff3c35c29d14760d5ea03559042cc024e09ab Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 17 Sep 2009 15:31:08 +0100 Subject: [PATCH] Fix net/disk hot-unplug segfault @@ -12,6 +12,8 @@ Reported by Michal Nowak here: * src/qemu_driver.c: fix double free +(cherry-picked from commit 8881ae1bf8783006777429403cc543c33187175d) + Fedora-patch: libvirt-fix-net-hotunplug-double-free.patch --- src/qemu_driver.c | 4 ++-- diff --git a/libvirt-fix-pci-hostdev-hotunplug-leak.patch b/libvirt-fix-pci-hostdev-hotunplug-leak.patch index 9e085fc..9772d3e 100644 --- a/libvirt-fix-pci-hostdev-hotunplug-leak.patch +++ b/libvirt-fix-pci-hostdev-hotunplug-leak.patch @@ -1,4 +1,4 @@ -From 9ef0cb152e92db1aa87d89529812328935c8535a Mon Sep 17 00:00:00 2001 +From d04ac8624f5fabe7587982796f2e2161220b0fcc Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 17 Sep 2009 15:32:45 +0100 Subject: [PATCH] Fix leak in PCI hostdev hot-unplug @@ -6,6 +6,8 @@ Subject: [PATCH] Fix leak in PCI hostdev hot-unplug * src/qemu_driver.c: sync the hostdev hot-unplug code with the disk/net code. +(cherry-picked from commit a70da51ff76ed860bfc0cdee2e1d556da997c557) + Fedora-patch: libvirt-fix-pci-hostdev-hotunplug-leak.patch --- src/qemu_driver.c | 20 +++++++++++++------- diff --git a/libvirt-fix-qemu-raw-format-save.patch b/libvirt-fix-qemu-raw-format-save.patch new file mode 100644 index 0000000..19a0469 --- /dev/null +++ b/libvirt-fix-qemu-raw-format-save.patch @@ -0,0 +1,53 @@ +From e50c91fdcea5d81e3eb2051c05f4e51a16c3e692 Mon Sep 17 00:00:00 2001 +From: Charles Duffy +Date: Fri, 18 Sep 2009 11:32:35 -0500 +Subject: [PATCH] Prevent attempt to call cat -c during virDomainSave to raw + +Fedora-patch: libvirt-fix-qemu-raw-format-save.patch +--- + src/qemu_driver.c | 28 ++++++++++++++++++---------- + 1 files changed, 18 insertions(+), 10 deletions(-) + +diff --git a/src/qemu_driver.c b/src/qemu_driver.c +index 2ddcdc0..7c7b985 100644 +--- a/src/qemu_driver.c ++++ b/src/qemu_driver.c +@@ -3905,17 +3905,25 @@ static int qemudDomainSave(virDomainPtr dom, + goto cleanup; + } + +- const char *prog = qemudSaveCompressionTypeToString(header.compressed); +- if (prog == NULL) { +- qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR, +- _("Invalid compress format %d"), header.compressed); +- goto cleanup; +- } ++ { ++ const char *prog = qemudSaveCompressionTypeToString(header.compressed); ++ const char *args; + +- if (STREQ (prog, "raw")) +- prog = "cat"; +- internalret = virAsprintf(&command, "migrate \"exec:" +- "%s -c >> '%s' 2>/dev/null\"", prog, safe_path); ++ if (prog == NULL) { ++ qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR, ++ _("Invalid compress format %d"), header.compressed); ++ goto cleanup; ++ } ++ ++ if (STREQ (prog, "raw")) { ++ prog = "cat"; ++ args = ""; ++ } else { ++ args = "-c"; ++ } ++ internalret = virAsprintf(&command, "migrate \"exec:" ++ "%s %s >> '%s' 2>/dev/null\"", prog, args, safe_path); ++ } + + if (internalret < 0) { + virReportOOMError(dom->conn); +-- +1.6.2.5 + diff --git a/libvirt.spec b/libvirt.spec index 3677154..27e8add 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -151,7 +151,7 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.7.1 -Release: 4%{?dist}%{?extra_release} +Release: 5%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz @@ -164,6 +164,12 @@ Patch00: libvirt-0.6.4-svirt-sound.patch Patch01: libvirt-fix-net-hotunplug-double-free.patch Patch02: libvirt-fix-pci-hostdev-hotunplug-leak.patch +# Don't set a bogus error in virDrvSupportsFeature() +Patch03: libvirt-fix-drv-supports-feature-bogus-error.patch + +# Fix raw save format +Patch04: libvirt-fix-qemu-raw-format-save.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/ BuildRequires: python-devel @@ -379,6 +385,8 @@ of recent versions of Linux (and other OSes). %patch00 -p1 %patch01 -p1 %patch02 -p1 +%patch03 -p1 +%patch04 -p1 %build %if ! %{with_xen} @@ -769,6 +777,10 @@ fi %endif %changelog +* Mon Sep 21 2009 Mark McLoughlin - 0.7.1-5 +- Don't set a bogus error in virDrvSupportsFeature() +- Fix raw save format + * Thu Sep 17 2009 Mark McLoughlin - 0.7.1-4 - A couple of hot-unplug memory handling fixes (#523953)