control: tag -1 patch Hi Guido,
I have just built and tested libvirt/1.2.9-9+deb8u3 plus the upstream patch you suggested with qemu/1:2.8+dfsg-2~bpo8+1. A VM with a CD-ROM drive that could not be started before no longer shows any trouble -- the CD-ROM could be used to boot the Stretch RC2 netinst image. The patch did not apply quite cleanly due to some upstream reorganization, I have attached my three patches that I applied onto libvirt/1.2.9-9+deb8u3. Cheers, -Hilko
>From bfcb46f3a177226e8c2aeb0ba8f471b625a7edc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]> Date: Fri, 6 Dec 2013 10:18:41 +0100 Subject: [PATCH 1/3] Make sure the cgroup update notice is also shown in backports --- debian/libvirt-daemon.NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/libvirt-daemon.NEWS b/debian/libvirt-daemon.NEWS index 823e8aa..59bdd40 100644 --- a/debian/libvirt-daemon.NEWS +++ b/debian/libvirt-daemon.NEWS @@ -1,4 +1,4 @@ -libvirt (1.1.4-2) unstable; urgency=low +libvirt (1.1.4-2~) unstable; urgency=low If you're using cgroups make sure you're using a different mount per cgroup controller (cpu, memory, ...) that is mounted to /sys/fs/cgroup/<controller>. -- 2.1.4
>From 52d732341a3050bdf56803d64be97bbf65f3591b Mon Sep 17 00:00:00 2001 From: Hilko Bengen <[email protected]> Date: Thu, 9 Feb 2017 20:29:03 +0100 Subject: [PATCH 2/3] 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(+) create mode 100644 debian/patches/upstream/qemu-Specify-format-iff-disk-source-is-not-empty.patch 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 <[email protected]> +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 <[email protected]> +--- + 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 && -- 2.1.4
>From 85750cfb656b365d398178f810d917d1460730ff Mon Sep 17 00:00:00 2001 From: Hilko Bengen <[email protected]> Date: Thu, 9 Feb 2017 20:31:24 +0100 Subject: [PATCH 3/3] Document changes for 1.2.9-9+deb8u3.1 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0c6761f..67847b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +libvirt (1.2.9-9+deb8u3.1) jessie; urgency=medium + + [ Guido Günther ] + * Make sure the cgroup update notice is also shown in backports + + [ Hilko Bengen ] + * Add patch to improve qemu v2.6+ compatibility (Closes: #841291) + + -- Hilko Bengen <[email protected]> Thu, 09 Feb 2017 20:47:58 +0100 + libvirt (1.2.9-9+deb8u3) jessie-security; urgency=high * [9da83d8] CVE-2016-5008: qemu: Let empty default VNC password work as -- 2.1.4

