[Pkg-libvirt-commits] [libvirt] 03/04: Add patch to improve qemu v2.6+ compatibility (Closes: #841291)
Guido Guenther
agx at moszumanska.debian.org
Sun Mar 19 17:41:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian/jessie
in repository libvirt.
commit fffb13289022cb96622494c7003158631db5c642
Author: Hilko Bengen <bengen at debian.org>
Date: Thu Feb 9 20:29:03 2017 +0100
Add patch to improve qemu v2.6+ compatibility (Closes: #841291)
---
debian/patches/series | 1 +
...ecify-format-iff-disk-source-is-not-empty.patch | 52 ++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index b30557b..7d8ea48 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,3 +34,4 @@ upstream/Report-original-error-when-QMP-probing-fails-with-ne.patch
security/CVE-2015-5313-storage-don-t-allow-in-filesystem-volu.patch
debian/Debianize-bridge-helper-path.patch
security/CVE-2016-5008-qemu-Let-empty-default-VNC-password-work-as.patch
+upstream/qemu-Specify-format-iff-disk-source-is-not-empty.patch
diff --git a/debian/patches/upstream/qemu-Specify-format-iff-disk-source-is-not-empty.patch b/debian/patches/upstream/qemu-Specify-format-iff-disk-source-is-not-empty.patch
new file mode 100644
index 0000000..5738fab
--- /dev/null
+++ b/debian/patches/upstream/qemu-Specify-format-iff-disk-source-is-not-empty.patch
@@ -0,0 +1,52 @@
+From: Michal Privoznik <mprivozn at redhat.com>
+Date: Mon, 28 Dec 2015 15:13:52 +0100
+Subject: qemu: Specify format= iff disk source is not empty
+
+Just recently, qemu forbade specifying format for sourceless
+disks (qemu commit 39c4ae941ed992a3bb5). It kind of makes sense.
+If there's no file to open, why specify its format. Anyway, I
+have a domain like this:
+
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hda' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+
+and obviously I am unable to start it. Therefore, a fix on our
+side is needed too.
+
+Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
+---
+ src/qemu/qemu_command.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
+index eb72451..755671d 100644
+--- a/src/qemu/qemu_command.c
++++ b/src/qemu/qemu_command.c
+@@ -3467,6 +3467,11 @@ qemuBuildDriveStr(virConnectPtr conn,
+ }
+
+ virBufferEscape(&opt, ',', ",", "%s,", source);
++
++ if (disk->src->format > 0 &&
++ disk->src->type != VIR_STORAGE_TYPE_DIR)
++ virBufferAsprintf(&opt, "format=%s,",
++ virStorageFileFormatTypeToString(disk->src->format));
+ }
+ VIR_FREE(source);
+
+@@ -3527,11 +3532,6 @@ qemuBuildDriveStr(virConnectPtr conn,
+ _("transient disks not supported yet"));
+ goto error;
+ }
+- if (disk->src->format > 0 &&
+- disk->src->type != VIR_STORAGE_TYPE_DIR &&
+- virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT))
+- virBufferAsprintf(&opt, ",format=%s",
+- virStorageFileFormatTypeToString(disk->src->format));
+
+ /* generate geometry command string */
+ if (disk->geometry.cylinders > 0 &&
--
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