diff --git a/0001-Move-virDomainDefPostParseInternal-after-virDomainDe.patch b/0001-Move-virDomainDefPostParseInternal-after-virDomainDe.patch deleted file mode 100644 index 0e74750..0000000 --- a/0001-Move-virDomainDefPostParseInternal-after-virDomainDe.patch +++ /dev/null @@ -1,109 +0,0 @@ -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Wed, 11 May 2016 11:57:33 +0200 -Subject: [PATCH] Move virDomainDefPostParseInternal after - virDomainDeviceDefPostParse - -Future commit will call DeviceDefPostParse on a device auto-added -in DomainDefPostParse. - -(cherry picked from commit e4d131b8cb12679814b6fda159281f472b615524) ---- - src/conf/domain_conf.c | 78 +++++++++++++++++++++++++------------------------- - 1 file changed, 39 insertions(+), 39 deletions(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index d93d981..e9206f9 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -3905,45 +3905,6 @@ virDomainDefPostParseTimer(virDomainDefPtr def) - } - - --static int --virDomainDefPostParseInternal(virDomainDefPtr def, -- virCapsPtr caps ATTRIBUTE_UNUSED, -- unsigned int parseFlags) --{ -- /* verify init path for container based domains */ -- if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) { -- virReportError(VIR_ERR_XML_ERROR, "%s", -- _("init binary must be specified")); -- return -1; -- } -- -- if (virDomainDefPostParseMemory(def, parseFlags) < 0) -- return -1; -- -- if (virDomainDefRejectDuplicateControllers(def) < 0) -- return -1; -- -- if (virDomainDefRejectDuplicatePanics(def) < 0) -- return -1; -- -- if (virDomainDefPostParseTimer(def) < 0) -- return -1; -- -- if (virDomainDefAddImplicitDevices(def) < 0) -- return -1; -- -- /* Mark the first video as primary. If the user specified primary="yes", -- * the parser already inserted the device at def->videos[0] */ -- if (def->nvideos != 0) -- def->videos[0]->primary = true; -- -- /* clean up possibly duplicated metadata entries */ -- virDomainDefMetadataSanitize(def); -- -- return 0; --} -- -- - /* Check if a drive type address $controller:$bus:$target:$unit is already - * taken by a disk or not. - */ -@@ -4358,6 +4319,45 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED, - } - - -+static int -+virDomainDefPostParseInternal(virDomainDefPtr def, -+ virCapsPtr caps ATTRIBUTE_UNUSED, -+ unsigned int parseFlags) -+{ -+ /* verify init path for container based domains */ -+ if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) { -+ virReportError(VIR_ERR_XML_ERROR, "%s", -+ _("init binary must be specified")); -+ return -1; -+ } -+ -+ if (virDomainDefPostParseMemory(def, parseFlags) < 0) -+ return -1; -+ -+ if (virDomainDefRejectDuplicateControllers(def) < 0) -+ return -1; -+ -+ if (virDomainDefRejectDuplicatePanics(def) < 0) -+ return -1; -+ -+ if (virDomainDefPostParseTimer(def) < 0) -+ return -1; -+ -+ if (virDomainDefAddImplicitDevices(def) < 0) -+ return -1; -+ -+ /* Mark the first video as primary. If the user specified primary="yes", -+ * the parser already inserted the device at def->videos[0] */ -+ if (def->nvideos != 0) -+ def->videos[0]->primary = true; -+ -+ /* clean up possibly duplicated metadata entries */ -+ virDomainDefMetadataSanitize(def); -+ -+ return 0; -+} -+ -+ - int - virDomainDefPostParse(virDomainDefPtr def, - virCapsPtr caps, diff --git a/0002-Call-per-device-post-parse-callback-even-on-implicit.patch b/0002-Call-per-device-post-parse-callback-even-on-implicit.patch deleted file mode 100644 index 7e4ca6a..0000000 --- a/0002-Call-per-device-post-parse-callback-even-on-implicit.patch +++ /dev/null @@ -1,86 +0,0 @@ -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Wed, 11 May 2016 12:13:51 +0200 -Subject: [PATCH] Call per-device post-parse callback even on implicit video - -Commit 6879be48 moved adding of an implicit video device after XML -parsing. As a result, libxlDomainDeviceDefPostParse() is no longer -called to set the default vram when adding an implicit device. -Commit 6879be48 assumes virDomainVideoDefaultRAM() will set the -default vram, but it returns 0 if the domain virtType is -VIR_DOMAIN_VIRT_XEN. Attempting to start an HVM domain with vram=0 -results in - -error: unsupported configuration: videoram must be at least 4MB for CIRRUS - -The default vram setting for Xen HVM domains depends on the device -model used (qemu-xen vs qemu-traditional), hence setting the -default is deferred to libxlDomainDeviceDefPostParse(). - -Call the device post-parse callback even for implicit video, -to fill out the default vram even for VIR_DOMAIN_VIRT_XEN. - -https://bugzilla.redhat.com/show_bug.cgi?id=1334557 -Most-of-commit-message-by: Jim Fehlig -(cherry picked from commit 3e4286703273b06a21ae07f3e76a66f9661199dc) ---- - src/conf/domain_conf.c | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index e9206f9..aa0268b 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -4321,8 +4321,7 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED, - - static int - virDomainDefPostParseInternal(virDomainDefPtr def, -- virCapsPtr caps ATTRIBUTE_UNUSED, -- unsigned int parseFlags) -+ struct virDomainDefPostParseDeviceIteratorData *data) - { - /* verify init path for container based domains */ - if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) { -@@ -4331,7 +4330,7 @@ virDomainDefPostParseInternal(virDomainDefPtr def, - return -1; - } - -- if (virDomainDefPostParseMemory(def, parseFlags) < 0) -+ if (virDomainDefPostParseMemory(def, data->parseFlags) < 0) - return -1; - - if (virDomainDefRejectDuplicateControllers(def) < 0) -@@ -4346,11 +4345,22 @@ virDomainDefPostParseInternal(virDomainDefPtr def, - if (virDomainDefAddImplicitDevices(def) < 0) - return -1; - -- /* Mark the first video as primary. If the user specified primary="yes", -- * the parser already inserted the device at def->videos[0] */ -- if (def->nvideos != 0) -+ if (def->nvideos != 0) { -+ virDomainDeviceDef device = { -+ .type = VIR_DOMAIN_DEVICE_VIDEO, -+ .data.video = def->videos[0], -+ }; -+ -+ /* Mark the first video as primary. If the user specified primary="yes", -+ * the parser already inserted the device at def->videos[0] */ - def->videos[0]->primary = true; - -+ /* videos[0] might have been added in AddImplicitDevices, after we've -+ * done the per-device post-parse */ -+ if (virDomainDefPostParseDeviceIterator(NULL, &device, NULL, data) < 0) -+ return -1; -+ } -+ - /* clean up possibly duplicated metadata entries */ - virDomainDefMetadataSanitize(def); - -@@ -4388,7 +4398,7 @@ virDomainDefPostParse(virDomainDefPtr def, - return ret; - - -- if ((ret = virDomainDefPostParseInternal(def, caps, parseFlags)) < 0) -+ if ((ret = virDomainDefPostParseInternal(def, &data)) < 0) - return ret; - - if (virDomainDefPostParseCheckFeatures(def, xmlopt) < 0) diff --git a/0003-Fill-out-default-vram-in-DeviceDefPostParse.patch b/0003-Fill-out-default-vram-in-DeviceDefPostParse.patch deleted file mode 100644 index b091267..0000000 --- a/0003-Fill-out-default-vram-in-DeviceDefPostParse.patch +++ /dev/null @@ -1,85 +0,0 @@ -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Wed, 11 May 2016 12:39:52 +0200 -Subject: [PATCH] Fill out default vram in DeviceDefPostParse - -Move filling out the default video (v)ram to DeviceDefPostParse. - -This means it can be removed from virDomainVideoDefParseXML -and qemuParseCommandLine. Also, we no longer need to special case -VIR_DOMAIN_VIRT_XEN, since the per-driver callback gets called -before the generic one. - -(cherry picked from commit 538012c8a30230065d1bfe09892279dd8b89193f) ---- - src/conf/domain_conf.c | 15 ++++++--------- - src/qemu/qemu_parse_command.c | 2 -- - 2 files changed, 6 insertions(+), 11 deletions(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index aa0268b..7a0b8c5 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -4155,6 +4155,12 @@ virDomainDeviceDefPostParseInternal(virDomainDeviceDefPtr dev, - - if (dev->type == VIR_DOMAIN_DEVICE_VIDEO) { - virDomainVideoDefPtr video = dev->data.video; -+ /* Fill out (V)RAM if the driver-specific callback did not do so */ -+ if (video->ram == 0 && video->type == VIR_DOMAIN_VIDEO_TYPE_QXL) -+ video->ram = virDomainVideoDefaultRAM(def, video->type); -+ if (video->vram == 0) -+ video->vram = virDomainVideoDefaultRAM(def, video->type); -+ - video->ram = VIR_ROUND_UP_POWER_OF_TWO(video->ram); - video->vram = VIR_ROUND_UP_POWER_OF_TWO(video->vram); - } -@@ -11970,10 +11976,6 @@ unsigned int - virDomainVideoDefaultRAM(const virDomainDef *def, - const virDomainVideoType type) - { -- /* Defer setting default vram to the Xen drivers */ -- if (def->virtType == VIR_DOMAIN_VIRT_XEN) -- return 0; -- - switch (type) { - case VIR_DOMAIN_VIDEO_TYPE_VGA: - case VIR_DOMAIN_VIDEO_TYPE_CIRRUS: -@@ -12152,8 +12154,6 @@ virDomainVideoDefParseXML(xmlNodePtr node, - _("cannot parse video ram '%s'"), ram); - goto error; - } -- } else if (def->type == VIR_DOMAIN_VIDEO_TYPE_QXL) { -- def->ram = virDomainVideoDefaultRAM(dom, def->type); - } - - if (vram) { -@@ -12162,8 +12162,6 @@ virDomainVideoDefParseXML(xmlNodePtr node, - _("cannot parse video vram '%s'"), vram); - goto error; - } -- } else { -- def->vram = virDomainVideoDefaultRAM(dom, def->type); - } - - if (vram64) { -@@ -18612,7 +18610,6 @@ virDomainDefAddImplicitVideo(virDomainDefPtr def) - _("cannot determine default video type")); - goto cleanup; - } -- video->vram = virDomainVideoDefaultRAM(def, video->type); - video->heads = 1; - if (VIR_APPEND_ELEMENT(def->videos, def->nvideos, video) < 0) - goto cleanup; -diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c -index 79f5b92..6dc597a 100644 ---- a/src/qemu/qemu_parse_command.c -+++ b/src/qemu/qemu_parse_command.c -@@ -2585,9 +2585,7 @@ qemuParseCommandLine(virCapsPtr caps, - vid->type = VIR_DOMAIN_VIDEO_TYPE_XEN; - else - vid->type = video; -- vid->vram = virDomainVideoDefaultRAM(def, vid->type); - if (vid->type == VIR_DOMAIN_VIDEO_TYPE_QXL) { -- vid->ram = virDomainVideoDefaultRAM(def, vid->type); - vid->vgamem = QEMU_QXL_VGAMEM_DEFAULT; - } else { - vid->ram = 0; diff --git a/0004-Fix-tests-to-include-video-ram-size.patch b/0004-Fix-tests-to-include-video-ram-size.patch deleted file mode 100644 index f07ea83..0000000 --- a/0004-Fix-tests-to-include-video-ram-size.patch +++ /dev/null @@ -1,1033 +0,0 @@ -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 12 May 2016 14:19:52 +0200 -Subject: [PATCH] Fix tests to include video ram size - -My commit 3e42867 started filling out the video size in post-parse, -but did not adjust the tests. - -(cherry picked from commit 96b21fb0ecf8242ceb298607da61b5718511a388) ---- - tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-fv.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 2 +- - tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 2 +- - tests/xlconfigdata/test-disk-positional-parms-full.xml | 2 +- - tests/xlconfigdata/test-disk-positional-parms-partial.xml | 2 +- - tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml | 2 +- - tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml | 2 +- - tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml | 2 +- - tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- - tests/xlconfigdata/test-fullvirt-nohap.xml | 2 +- - tests/xlconfigdata/test-new-disk.xml | 2 +- - tests/xlconfigdata/test-rbd-multihost-noauth.xml | 2 +- - tests/xlconfigdata/test-spice-features.xml | 2 +- - tests/xlconfigdata/test-spice.xml | 2 +- - tests/xlconfigdata/test-vif-rate.xml | 2 +- - tests/xmconfigdata/test-escape-paths.xml | 2 +- - tests/xmconfigdata/test-fullvirt-default-feature.xml | 2 +- - tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- - tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +- - tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +- - tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +- - tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- - tests/xmconfigdata/test-fullvirt-nohap.xml | 2 +- - tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- - tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +- - tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- - tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- - tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- - tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- - tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- - tests/xmconfigdata/test-paravirt-net-e1000.xml | 2 +- - tests/xmconfigdata/test-paravirt-net-vifname.xml | 2 +- - tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml | 2 +- - tests/xmconfigdata/test-paravirt-new-pvfb.xml | 2 +- - tests/xmconfigdata/test-pci-devs.xml | 2 +- - 73 files changed, 73 insertions(+), 73 deletions(-) - -diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml -index a2668d1..6932e33 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml -@@ -35,7 +35,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml -index c4b22f6..fdd7c7d 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml -@@ -51,7 +51,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml -index 17d4016..42d529c 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml -@@ -44,7 +44,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml -index 20a0d76..5e26804 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml -@@ -47,7 +47,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml -index 13fb299..f6af578 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml -@@ -47,7 +47,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml -index 1380426..aba6045 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml -@@ -44,7 +44,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml -index 64111fe..22e2035 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml -@@ -45,7 +45,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml -index f362aee..aa5122b 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml -index 4d3bdde..bcccb94 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml -@@ -56,7 +56,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml -index d3eaf82..82c41a6 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml -index 0f209d6..062f349 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml -index b157f63..38a2fb3 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml -@@ -50,7 +50,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml -index d9cd840..4d76e34 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml -index 2cffa65..e0f90ef 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml -@@ -50,7 +50,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml -index 6e473d4..7de5731 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml -@@ -50,7 +50,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml -index f03bd29..c22e2a5 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml -index 2e9c629..439a66e 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml -index 3f3f676..b4bdc8a 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml -index 4f28511..af9f928 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml -index f934a85..d0240c4 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml -index f934a85..d0240c4 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml -index 8b5887e..e84e172 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml -@@ -45,7 +45,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml -index 3e4b366..187d867 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml -@@ -45,7 +45,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml -index 9c2b9e3..2816f4a 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml -@@ -44,7 +44,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml -index 9c2b9e3..2816f4a 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml -@@ -44,7 +44,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml -index 9c2b9e3..2816f4a 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-fv.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml -@@ -44,7 +44,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml -index 97d9482..41fb3b7 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml -index dbdacf9..72fec25 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml -@@ -30,7 +30,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml -index c415aab..0fd7a88 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml -@@ -30,7 +30,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml -index c1acba1..ee24536 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml -@@ -33,7 +33,7 @@ - - - - - -diff --git a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml -index 45887e5..1ebd5f0 100644 ---- a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml -+++ b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.xml b/tests/xlconfigdata/test-disk-positional-parms-full.xml -index 3d4868c..41e8804 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-full.xml -+++ b/tests/xlconfigdata/test-disk-positional-parms-full.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.xml b/tests/xlconfigdata/test-disk-positional-parms-partial.xml -index 402f479..6578e59 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-partial.xml -+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml -index 686a409..3738c8e 100644 ---- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml -+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml -index 686a409..3738c8e 100644 ---- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml -+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml -index 686a409..3738c8e 100644 ---- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml -+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml -index 5ec72c4..d7df23a 100644 ---- a/tests/xlconfigdata/test-fullvirt-multiusb.xml -+++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml -index a997c7a..9cd7b0b 100644 ---- a/tests/xlconfigdata/test-fullvirt-nohap.xml -+++ b/tests/xlconfigdata/test-fullvirt-nohap.xml -@@ -56,7 +56,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml -index 3d4868c..41e8804 100644 ---- a/tests/xlconfigdata/test-new-disk.xml -+++ b/tests/xlconfigdata/test-new-disk.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.xml b/tests/xlconfigdata/test-rbd-multihost-noauth.xml -index f8f663f..728aa1e 100644 ---- a/tests/xlconfigdata/test-rbd-multihost-noauth.xml -+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml -index f9eb857..3820732 100644 ---- a/tests/xlconfigdata/test-spice-features.xml -+++ b/tests/xlconfigdata/test-spice-features.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml -index fc2fa3f..f33691f 100644 ---- a/tests/xlconfigdata/test-spice.xml -+++ b/tests/xlconfigdata/test-spice.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xlconfigdata/test-vif-rate.xml b/tests/xlconfigdata/test-vif-rate.xml -index 0e13f2e..3620e2a 100644 ---- a/tests/xlconfigdata/test-vif-rate.xml -+++ b/tests/xlconfigdata/test-vif-rate.xml -@@ -55,7 +55,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml -index 6373fdf..a5daa2c 100644 ---- a/tests/xmconfigdata/test-escape-paths.xml -+++ b/tests/xmconfigdata/test-escape-paths.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml -index 6f4dae6..ce1280d 100644 ---- a/tests/xmconfigdata/test-fullvirt-default-feature.xml -+++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml -index 6f4dae6..ce1280d 100644 ---- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml -+++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml -index 6015405..7636f31 100644 ---- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml -+++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml -index 5f81e25..b3adf86 100644 ---- a/tests/xmconfigdata/test-fullvirt-localtime.xml -+++ b/tests/xmconfigdata/test-fullvirt-localtime.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml -index cb0615b..c22ad8d 100644 ---- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml -+++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml -index d29892e..2bb3d72 100644 ---- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml -+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml -index f38366c..234856c 100644 ---- a/tests/xmconfigdata/test-fullvirt-nohap.xml -+++ b/tests/xmconfigdata/test-fullvirt-nohap.xml -@@ -47,7 +47,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml -index 3269aee..be149fd 100644 ---- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml -+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml -@@ -51,7 +51,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml -index a20d6c8..753043d 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml -@@ -58,7 +58,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml -index 8344da3..a104c6f 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml -index b9439d7..f27aba9 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-file.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml -index 6e8196b..ea29944 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-null.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml -index da0c9bd..69bf51c 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml -index acff588..0c6e477 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml -index 6909053..1f12081 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml -@@ -52,7 +52,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml -index a3fd449..47544df 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml -@@ -56,7 +56,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml -index 9dba76d..8f1777a 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml -@@ -56,7 +56,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml -index 3577f92..c59e2b6 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml -@@ -56,7 +56,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml -index 919108b..e678786 100644 ---- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml -+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml -@@ -54,7 +54,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml -index 0e85953..3bd2e76 100644 ---- a/tests/xmconfigdata/test-fullvirt-sound.xml -+++ b/tests/xmconfigdata/test-fullvirt-sound.xml -@@ -48,7 +48,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml -index 8eb5aa5..f1421b6 100644 ---- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml -+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml -@@ -47,7 +47,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml -index dcdd951..566c842 100644 ---- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml -+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml -@@ -47,7 +47,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml -index d29892e..2bb3d72 100644 ---- a/tests/xmconfigdata/test-fullvirt-utc.xml -+++ b/tests/xmconfigdata/test-fullvirt-utc.xml -@@ -46,7 +46,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml -index d4c2fd6..246123c 100644 ---- a/tests/xmconfigdata/test-no-source-cdrom.xml -+++ b/tests/xmconfigdata/test-no-source-cdrom.xml -@@ -49,7 +49,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml -index ad44d11..735e8b0 100644 ---- a/tests/xmconfigdata/test-paravirt-net-e1000.xml -+++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml -@@ -33,7 +33,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml -index e94b685..3ce3639 100644 ---- a/tests/xmconfigdata/test-paravirt-net-vifname.xml -+++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml -@@ -34,7 +34,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml -index 3ca3023..20c31ec 100644 ---- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml -+++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml -@@ -32,7 +32,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml -index d97799a..33c48f4 100644 ---- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml -+++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml -@@ -32,7 +32,7 @@ - - - - - -diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml -index 4c3f5f2..a88853d 100644 ---- a/tests/xmconfigdata/test-pci-devs.xml -+++ b/tests/xmconfigdata/test-pci-devs.xml -@@ -49,7 +49,7 @@ - - - - - diff --git a/0005-libxl-don-t-attempt-to-probe-a-non-existent-emulator.patch b/0005-libxl-don-t-attempt-to-probe-a-non-existent-emulator.patch deleted file mode 100644 index 4abc3ca..0000000 --- a/0005-libxl-don-t-attempt-to-probe-a-non-existent-emulator.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Jim Fehlig -Date: Thu, 12 May 2016 14:40:28 -0600 -Subject: [PATCH] libxl: don't attempt to probe a non-existent emulator - -When probing the with '-help' to determine if -it is the old qemu, errors are reported if the emulator -doesn't exist - -libvirt: error : internal error: Child process -(/usr/lib/xen/bin/qemu-dm -help) unexpected exit status 127: -libvirt: error : cannot execute binary /usr/lib/xen/bin/qemu-dm: -No such file or directory - -Avoid the probe if the specified emulator doesn't exist, -squelching the error. There is no behavior change since -libxlDomainGetEmulatorType() would return -LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN if the probe failed -via virCommandRun(). - -Signed-off-by: Jim Fehlig -(cherry picked from commit 400e716d7d8371fa718c27bb4f05b9a68929e64a) ---- - src/libxl/libxl_conf.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c -index 30f2ce9..bcbb773 100644 ---- a/src/libxl/libxl_conf.c -+++ b/src/libxl/libxl_conf.c -@@ -916,6 +916,9 @@ libxlDomainGetEmulatorType(const virDomainDef *def) - - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { - if (def->emulator) { -+ if (!virFileExists(def->emulator)) -+ goto cleanup; -+ - cmd = virCommandNew(def->emulator); - - virCommandAddArgList(cmd, "-help", NULL); diff --git a/0006-xlconfigtests-use-qemu-xen-in-all-test-data-files.patch b/0006-xlconfigtests-use-qemu-xen-in-all-test-data-files.patch deleted file mode 100644 index e2cb437..0000000 --- a/0006-xlconfigtests-use-qemu-xen-in-all-test-data-files.patch +++ /dev/null @@ -1,276 +0,0 @@ -From: Jim Fehlig -Date: Thu, 12 May 2016 14:40:29 -0600 -Subject: [PATCH] xlconfigtests: use qemu-xen in all test data files - -Some of the test configuration files in tests/xlconfigdata -use the old qemu-dm as the emulator. Many of the configuration -features tested (spice, rbd, multi-usb) are not even usable with -the old qemu. Change these files to use the new qemu-xen (also -known as qemu upstream) emulator. - -Note: This change fixes xlconfigtest failures when the old -qemu is actually installed on the system. During device post -parse, the libxl driver attempts to invoke the emulator to -determine if it is the old or new qemu so it can properly set -video RAM defaults. With the old qemu installed, the default -video RAM was set differently than the expected value. -Changing all the test data files to use qemu-xen ensures -predictable results wrt default video RAM size. - -Signed-off-by: Jim Fehlig -(cherry picked from commit b90c4b5f505698d600303c5b4f03f5d229b329dd) ---- - tests/xlconfigdata/test-disk-positional-parms-full.cfg | 2 +- - tests/xlconfigdata/test-disk-positional-parms-full.xml | 2 +- - tests/xlconfigdata/test-disk-positional-parms-partial.cfg | 2 +- - tests/xlconfigdata/test-disk-positional-parms-partial.xml | 2 +- - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 2 +- - tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- - tests/xlconfigdata/test-fullvirt-nohap.cfg | 2 +- - tests/xlconfigdata/test-fullvirt-nohap.xml | 2 +- - tests/xlconfigdata/test-new-disk.cfg | 2 +- - tests/xlconfigdata/test-new-disk.xml | 2 +- - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 2 +- - tests/xlconfigdata/test-rbd-multihost-noauth.xml | 2 +- - tests/xlconfigdata/test-spice-features.cfg | 2 +- - tests/xlconfigdata/test-spice-features.xml | 2 +- - tests/xlconfigdata/test-spice.cfg | 2 +- - tests/xlconfigdata/test-spice.xml | 2 +- - tests/xlconfigdata/test-vif-rate.cfg | 2 +- - tests/xlconfigdata/test-vif-rate.xml | 2 +- - 18 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.cfg b/tests/xlconfigdata/test-disk-positional-parms-full.cfg -index c5bbb03..217d4dc 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-full.cfg -+++ b/tests/xlconfigdata/test-disk-positional-parms-full.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.xml b/tests/xlconfigdata/test-disk-positional-parms-full.xml -index 41e8804..1bc5b43 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-full.xml -+++ b/tests/xlconfigdata/test-disk-positional-parms-full.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg -index 09eeb94..fd16db0 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg -+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.xml b/tests/xlconfigdata/test-disk-positional-parms-partial.xml -index 6578e59..e86a5be 100644 ---- a/tests/xlconfigdata/test-disk-positional-parms-partial.xml -+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.cfg b/tests/xlconfigdata/test-fullvirt-multiusb.cfg -index 003eb2b..6d456de 100755 ---- a/tests/xlconfigdata/test-fullvirt-multiusb.cfg -+++ b/tests/xlconfigdata/test-fullvirt-multiusb.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml -index d7df23a..fcd14e9 100644 ---- a/tests/xlconfigdata/test-fullvirt-multiusb.xml -+++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-fullvirt-nohap.cfg b/tests/xlconfigdata/test-fullvirt-nohap.cfg -index 44bfa3c..e7e933d 100644 ---- a/tests/xlconfigdata/test-fullvirt-nohap.cfg -+++ b/tests/xlconfigdata/test-fullvirt-nohap.cfg -@@ -13,7 +13,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml -index 9cd7b0b..e57e28b 100644 ---- a/tests/xlconfigdata/test-fullvirt-nohap.xml -+++ b/tests/xlconfigdata/test-fullvirt-nohap.xml -@@ -20,7 +20,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-new-disk.cfg b/tests/xlconfigdata/test-new-disk.cfg -index b079056..4fe76b2 100644 ---- a/tests/xlconfigdata/test-new-disk.cfg -+++ b/tests/xlconfigdata/test-new-disk.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml -index 41e8804..1bc5b43 100644 ---- a/tests/xlconfigdata/test-new-disk.xml -+++ b/tests/xlconfigdata/test-new-disk.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg -index 99f0889..01c15d5 100644 ---- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg -+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.xml b/tests/xlconfigdata/test-rbd-multihost-noauth.xml -index 728aa1e..ef9bd17 100644 ---- a/tests/xlconfigdata/test-rbd-multihost-noauth.xml -+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-spice-features.cfg b/tests/xlconfigdata/test-spice-features.cfg -index 48dcd86..f8a25e4 100644 ---- a/tests/xlconfigdata/test-spice-features.cfg -+++ b/tests/xlconfigdata/test-spice-features.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] - parallel = "none" - serial = "none" -diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml -index 3820732..8175760 100644 ---- a/tests/xlconfigdata/test-spice-features.xml -+++ b/tests/xlconfigdata/test-spice-features.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-spice.cfg b/tests/xlconfigdata/test-spice.cfg -index 7ab23e1..abdf63d 100644 ---- a/tests/xlconfigdata/test-spice.cfg -+++ b/tests/xlconfigdata/test-spice.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] - parallel = "none" - serial = "none" -diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml -index f33691f..32cad27 100644 ---- a/tests/xlconfigdata/test-spice.xml -+++ b/tests/xlconfigdata/test-spice.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - -diff --git a/tests/xlconfigdata/test-vif-rate.cfg b/tests/xlconfigdata/test-vif-rate.cfg -index db932e5..34a19a2 100644 ---- a/tests/xlconfigdata/test-vif-rate.cfg -+++ b/tests/xlconfigdata/test-vif-rate.cfg -@@ -12,7 +12,7 @@ localtime = 0 - on_poweroff = "destroy" - on_reboot = "restart" - on_crash = "restart" --device_model = "/usr/lib/xen/bin/qemu-dm" -+device_model = "/usr/lib/xen/bin/qemu-system-i386" - sdl = 0 - vnc = 1 - vncunused = 1 -diff --git a/tests/xlconfigdata/test-vif-rate.xml b/tests/xlconfigdata/test-vif-rate.xml -index 3620e2a..3ab7488 100644 ---- a/tests/xlconfigdata/test-vif-rate.xml -+++ b/tests/xlconfigdata/test-vif-rate.xml -@@ -19,7 +19,7 @@ - restart - restart - -- /usr/lib/xen/bin/qemu-dm -+ /usr/lib/xen/bin/qemu-system-i386 - - - diff --git a/0101-spec-Advertise-nvram-paths-of-official-fedora-edk2-b.patch b/0101-spec-Advertise-nvram-paths-of-official-fedora-edk2-b.patch deleted file mode 100644 index 6c018e5..0000000 --- a/0101-spec-Advertise-nvram-paths-of-official-fedora-edk2-b.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Cole Robinson -Date: Fri, 20 May 2016 15:50:16 -0400 -Subject: [PATCH] spec: Advertise nvram paths of official fedora edk2 builds - -Fedora now ships edk2 firmware in its official repos, so adapt -the nvram path list to match. Eventually we can remove the nightly -links as well once some integration kinks have been worked out, -and documentation updated. - -Move the macro building into the %build target, which lets us -build up a shell variable and make things a bit more readable - -https://bugzilla.redhat.com/show_bug.cgi?id=1335395 ---- - libvirt.spec.in | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/libvirt.spec.in b/libvirt.spec.in -index 935ca89..20aecf6 100644 ---- a/libvirt.spec.in -+++ b/libvirt.spec.in -@@ -348,12 +348,6 @@ - %endif - - --# Advertise OVMF and AAVMF from nightly firmware repo --%if 0%{?fedora} -- %define with_loader_nvram --with-loader-nvram="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw" --%endif -- -- - # The RHEL-5 Xen package has some feature backports. This - # flag is set to enable use of those special bits on RHEL-5 - %if 0%{?rhel} == 5 -@@ -1488,6 +1482,18 @@ rm -rf .git - %endif - %endif - -+%if 0%{?fedora} -+ # Nightly firmware repo x86/OVMF -+ LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd" -+ # Nightly firmware repo aarch64/AAVMF -+ LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw" -+ # Fedora official x86/OVMF -+ LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd" -+ # Fedora official aarch64/AAVMF -+ LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw" -+ %define with_loader_nvram --with-loader-nvram="$LOADERS" -+%endif -+ - # place macros above and build commands below this comment - - %if 0%{?enable_autotools} diff --git a/libvirt.spec b/libvirt.spec index f99e067..cfbb4ef 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,13 +1,12 @@ # -*- rpm-spec -*- -# This spec file assumes you are building for Fedora 13 or newer, -# or for RHEL 5 or newer. It may need some tweaks for other distros. +# This spec file assumes you are building for Fedora 20 or newer, +# or for RHEL 6 or newer. It may need some tweaks for other distros. # If neither fedora nor rhel was defined, try to guess them from dist -%if !0%{?rhel} && !0%{?fedora} -%{expand:%(echo "%{?dist}" | \ - sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')} -%{expand:%(echo "%{?dist}" | \ - sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')} +%if (0%{?fedora} && 0%{?fedora} >= 20) || (0%{?rhel} && 0%{?rhel} >= 6) + %define supported_platform 1 +%else + %define supported_platform 0 %endif # Default to skipping autoreconf. Distros can change just this one line @@ -15,64 +14,21 @@ # touch configure.ac or Makefile.am. %{!?enable_autotools:%global enable_autotools 0} -# A client only build will create a libvirt.so only containing -# the generic RPC driver, and test driver and no libvirtd -# Default to a full server + client build, but with the possibility -# of a command-line or ~/.rpmmacros override for client-only. -%{!?client_only:%global client_only 0} - -# Now turn off server build in certain cases - -# RHEL-5 builds are client-only for s390, ppc -%if 0%{?rhel} == 5 - %ifnarch %{ix86} x86_64 ia64 - %define client_only 1 - %endif -%endif - -# Disable all server side drivers if client only build requested -%if %{client_only} - %define server_drivers 0 -%else - %define server_drivers 1 -%endif - -# Always build with dlopen'd modules -%define with_driver_modules 1 - -# Now set the defaults for all the important features, independent -# of any particular OS -# First the daemon itself -%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}} -%define with_avahi 0%{!?_without_avahi:%{server_drivers}} - -# Then the hypervisor drivers that run in libvirtd -%define with_xen 0%{!?_without_xen:%{server_drivers}} -%define with_qemu 0%{!?_without_qemu:%{server_drivers}} -%define with_lxc 0%{!?_without_lxc:%{server_drivers}} -%define with_uml 0%{!?_without_uml:%{server_drivers}} -%define with_libxl 0%{!?_without_libxl:%{server_drivers}} -%define with_vbox 0%{!?_without_vbox:%{server_drivers}} +# The hypervisor drivers that run in libvirtd +%define with_xen 0%{!?_without_xen:1} +%define with_qemu 0%{!?_without_qemu:1} +%define with_lxc 0%{!?_without_lxc:1} +%define with_uml 0%{!?_without_uml:1} +%define with_libxl 0%{!?_without_libxl:1} +%define with_vbox 0%{!?_without_vbox:1} %define with_qemu_tcg %{with_qemu} %define qemu_kvm_arches %{ix86} x86_64 %if 0%{?fedora} - %if 0%{?fedora} < 16 - # Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc - # I think F17 is the first release with the power64 macro - %ifarch ppc64 - %define with_qemu_tcg 0 - %endif - %endif - %if 0%{?fedora} >= 18 - %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x - %endif - %if 0%{?fedora} >= 20 - %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64 - %endif + %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64 %endif %if 0%{?rhel} @@ -99,52 +55,23 @@ %define with_phyp 0%{!?_without_phyp:1} %define with_esx 0%{!?_without_esx:1} %define with_hyperv 0%{!?_without_hyperv:1} -%define with_xenapi 0%{!?_without_xenapi:1} -%define with_vz 0%{!?_without_vz:1} -# No test for bhyve, because it does not build on Linux # Then the secondary host drivers, which run inside libvirtd -%define with_interface 0%{!?_without_interface:%{server_drivers}} -%define with_network 0%{!?_without_network:%{server_drivers}} -%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}} -%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}} -%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}} -%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}} -%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} -%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7 - %define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}} +%if 0%{?fedora} || 0%{?rhel} >= 7 + %define with_storage_rbd 0%{!?_without_storage_rbd:1} %else %define with_storage_rbd 0 %endif -%if 0%{?fedora} >= 17 - %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}} +%if 0%{?fedora} + %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1} %else %define with_storage_sheepdog 0 %endif -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 6 - %define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}} -%else - %define with_storage_gluster 0 -%endif -%define with_numactl 0%{!?_without_numactl:%{server_drivers}} -%define with_selinux 0%{!?_without_selinux:%{server_drivers}} - -# Just hardcode to off, since few people ever have apparmor RPMs installed -%define with_apparmor 0%{!?_without_apparmor:0} +%define with_storage_gluster 0%{!?_without_storage_gluster:1} +%define with_numactl 0%{!?_without_numactl:1} # A few optional bits off by default, we enable later -%define with_polkit 0%{!?_without_polkit:0} -%define with_capng 0%{!?_without_capng:0} %define with_fuse 0%{!?_without_fuse:0} -%define with_netcf 0%{!?_without_netcf:0} -%define with_udev 0%{!?_without_udev:0} -%define with_hal 0%{!?_without_hal:0} -%define with_yajl 0%{!?_without_yajl:0} -%define with_nwfilter 0%{!?_without_nwfilter:0} -%define with_libpcap 0%{!?_without_libpcap:0} -%define with_macvtap 0%{!?_without_macvtap:0} -%define with_libnl 0%{!?_without_libnl:0} -%define with_dtrace 0%{!?_without_dtrace:0} %define with_cgconfig 0%{!?_without_cgconfig:0} %define with_sanlock 0%{!?_without_sanlock:0} %define with_systemd 0%{!?_without_systemd:0} @@ -155,12 +82,6 @@ %define with_systemd_daemon 0%{!?_without_systemd_daemon:0} %define with_pm_utils 1 -# Non-server/HV driver defaults which are always enabled -%define with_sasl 0%{!?_without_sasl:1} -%define with_audit 0%{!?_without_audit:1} -%define with_nss_plugin 0%{!?_without_nss_plugin:1} - - # Finally set the OS / architecture specific special cases # Xen is available only on i386 x86_64 ia64 @@ -181,7 +102,7 @@ # libgfapi is built only on x86_64 on rhel %ifnarch x86_64 - %if 0%{?rhel} >= 6 + %if 0%{?rhel} %define with_storage_gluster 0 %endif %endif @@ -210,67 +131,40 @@ # Fedora 17 / RHEL-7 are first where we use systemd. Although earlier # Fedora has systemd, libvirt still used sysvinit there. -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %define with_systemd 1 %define with_systemd_daemon 1 %define with_pm_utils 0 %endif # Fedora 18 / RHEL-7 are first where firewalld support is enabled -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %define with_firewalld 1 %endif -# RHEL-5 is too old for LXC -%if 0%{?rhel} == 5 - %define with_lxc 0 -%endif - # RHEL-6 stopped including Xen on all archs. -%if 0%{?rhel} >= 6 +%if 0%{?rhel} %define with_xen 0 %endif -# Fedora doesn't have new enough Xen for libxl until F18 -%if 0%{?fedora} && 0%{?fedora} < 18 - %define with_libxl 0 -%endif - # fuse is used to provide virtualized /proc for LXC -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %define with_fuse 0%{!?_without_fuse:1} %endif -# RHEL 5 lacks newer tools -%if 0%{?rhel} == 5 - %define with_hal 0%{!?_without_hal:%{server_drivers}} -%else - %define with_polkit 0%{!?_without_polkit:1} - %define with_capng 0%{!?_without_capng:1} - %define with_netcf 0%{!?_without_netcf:%{server_drivers}} - %define with_udev 0%{!?_without_udev:%{server_drivers}} - %define with_yajl 0%{!?_without_yajl:%{server_drivers}} - %define with_dtrace 1 -%endif - -# interface requires netcf -%if ! 0%{?with_netcf} - %define with_interface 0 -%endif - # Enable sanlock library for lock management with QEMU # Sanlock is available only on arches where kvm is available for RHEL -%if 0%{?fedora} >= 16 - %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} +%if 0%{?fedora} + %define with_sanlock 0%{!?_without_sanlock:1} %endif -%if 0%{?rhel} >= 6 +%if 0%{?rhel} %ifarch %{qemu_kvm_arches} - %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} + %define with_sanlock 0%{!?_without_sanlock:1} %endif %endif # Enable libssh2 transport for new enough distros -%if 0%{?fedora} >= 17 +%if 0%{?fedora} %define with_libssh2 0%{!?_without_libssh2:1} %endif @@ -279,90 +173,26 @@ %define with_wireshark 0%{!?_without_wireshark:1} %endif -# Disable some drivers when building without libvirt daemon. -# The logic is the same as in configure.ac -%if ! %{with_libvirtd} - %define with_interface 0 - %define with_network 0 - %define with_qemu 0 - %define with_lxc 0 - %define with_uml 0 - %define with_hal 0 - %define with_udev 0 - %define with_storage_fs 0 - %define with_storage_lvm 0 - %define with_storage_iscsi 0 - %define with_storage_mpath 0 - %define with_storage_rbd 0 - %define with_storage_sheepdog 0 - %define with_storage_gluster 0 - %define with_storage_disk 0 -%endif %if %{with_qemu} || %{with_lxc} || %{with_uml} - %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}} -# Enable libpcap library - %define with_libpcap 0%{!?_without_libpcap:%{server_drivers}} - %define with_macvtap 0%{!?_without_macvtap:%{server_drivers}} - # numad is used to manage the CPU and memory placement dynamically, # it's not available on s390[x] and ARM. - %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 - %ifnarch s390 s390x %{arm} - %define with_numad 0%{!?_without_numad:%{server_drivers}} - %endif + %ifnarch s390 s390x %{arm} + %define with_numad 0%{!?_without_numad:1} %endif %endif -%if %{with_macvtap} - %define with_libnl 1 -%endif - # Pull in cgroups config system -%if 0%{?fedora} || 0%{?rhel} >= 6 - %if %{with_qemu} || %{with_lxc} - %define with_cgconfig 0%{!?_without_cgconfig:1} - %endif -%endif - -%if %{with_udev} || %{with_hal} - %define with_nodedev 1 -%else - %define with_nodedev 0 -%endif - -%if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk} - %define with_storage 1 -%else - %define with_storage 0 +%if %{with_qemu} || %{with_lxc} + %define with_cgconfig 0%{!?_without_cgconfig:1} %endif - # Force QEMU to run as non-root -%if 0%{?fedora} || 0%{?rhel} >= 6 - %define qemu_user qemu - %define qemu_group qemu -%else - %define qemu_user root - %define qemu_group root -%endif +%define qemu_user qemu +%define qemu_group qemu -# Advertise OVMF and AAVMF from nightly firmware repo -%if 0%{?fedora} - %define with_loader_nvram --with-loader-nvram="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw" -%endif - - -# The RHEL-5 Xen package has some feature backports. This -# flag is set to enable use of those special bits on RHEL-5 -%if 0%{?rhel} == 5 - %define with_rhel5 1 -%else - %define with_rhel5 0 -%endif - -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %define with_systemd_macros 1 %else %define with_systemd_macros 0 @@ -381,8 +211,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 1.3.4 -Release: 2%{?dist}%{?extra_release} +Version: 1.3.5 +Release: 1%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -393,56 +223,34 @@ URL: http://libvirt.org/ %endif Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz -# Fix libxl video config via virt-install (bz #1334557) -Patch0001: 0001-Move-virDomainDefPostParseInternal-after-virDomainDe.patch -Patch0002: 0002-Call-per-device-post-parse-callback-even-on-implicit.patch -Patch0003: 0003-Fill-out-default-vram-in-DeviceDefPostParse.patch -Patch0004: 0004-Fix-tests-to-include-video-ram-size.patch -Patch0005: 0005-libxl-don-t-attempt-to-probe-a-non-existent-emulator.patch -Patch0006: 0006-xlconfigtests-use-qemu-xen-in-all-test-data-files.patch -# Advertise fedora edk2 firmware builds to apps (bz #1335395) -Patch0101: 0101-spec-Advertise-nvram-paths-of-official-fedora-edk2-b.patch - -%if %{with_libvirtd} Requires: libvirt-daemon = %{version}-%{release} - %if %{with_network} Requires: libvirt-daemon-config-network = %{version}-%{release} - %endif - %if %{with_nwfilter} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} - %endif - %if %{with_driver_modules} - %if %{with_libxl} +%if %{with_libxl} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} - %endif - %if %{with_lxc} +%endif +%if %{with_lxc} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} - %endif - %if %{with_qemu} +%endif +%if %{with_qemu} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} - %endif - %if %{with_uml} +%endif +%if %{with_uml} Requires: libvirt-daemon-driver-uml = %{version}-%{release} - %endif - %if %{with_xen} +%endif +%if %{with_xen} Requires: libvirt-daemon-driver-xen = %{version}-%{release} - %endif - %if %{with_vbox} +%endif +%if %{with_vbox} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} - %endif - %if %{with_nwfilter} +%endif Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} - %endif - %if %{with_interface} Requires: libvirt-daemon-driver-interface = %{version}-%{release} - %endif Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} - %endif -%endif Requires: libvirt-client = %{version}-%{release} # All build-time requirements. Run-time requirements are @@ -473,93 +281,47 @@ BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: gettext BuildRequires: libtasn1-devel -%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 19) +%if (0%{?rhel} && 0%{?rhel} < 7) BuildRequires: libgcrypt-devel %endif BuildRequires: gnutls-devel BuildRequires: libattr-devel -%if %{with_libvirtd} # For pool-build probing for existing pools BuildRequires: libblkid-devel >= 2.17 -%endif -%if 0%{?fedora} || 0%{?rhel} >= 6 # for augparse, optionally used in testing BuildRequires: augeas -%endif -%if %{with_hal} -BuildRequires: hal-devel -%endif -%if %{with_udev} - %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: systemd-devel >= 185 - %else +%else BuildRequires: libudev-devel >= 145 - %endif -BuildRequires: libpciaccess-devel >= 0.10.9 %endif -%if %{with_yajl} +BuildRequires: libpciaccess-devel >= 0.10.9 BuildRequires: yajl-devel -%endif %if %{with_sanlock} -# make sure libvirt is built with new enough sanlock on -# distros that have it; required for on_lockfailure - %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 BuildRequires: sanlock-devel >= 2.4 - %else -BuildRequires: sanlock-devel >= 1.8 - %endif %endif -%if %{with_libpcap} BuildRequires: libpcap-devel -%endif -%if %{with_libnl} - %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 BuildRequires: libnl3-devel - %else -BuildRequires: libnl-devel - %endif -%endif -%if %{with_avahi} BuildRequires: avahi-devel -%endif -%if %{with_selinux} BuildRequires: libselinux-devel -%endif -%if %{with_apparmor} -BuildRequires: libapparmor-devel -%endif -%if %{with_network} BuildRequires: dnsmasq >= 2.41 BuildRequires: iptables - %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7) +%if 0%{?rhel} && 0%{?rhel} < 7 BuildRequires: iptables-ipv6 - %endif -BuildRequires: radvd %endif -%if %{with_nwfilter} +BuildRequires: radvd BuildRequires: ebtables -%endif BuildRequires: module-init-tools -%if %{with_sasl} BuildRequires: cyrus-sasl-devel -%endif -%if %{with_polkit} - %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 # F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck BuildRequires: polkit >= 0.112 BuildRequires: polkit-devel >= 0.112 - %else - %if 0%{?fedora} || 0%{?rhel} >= 6 +%else BuildRequires: polkit-devel >= 0.93 - %else -BuildRequires: PolicyKit-devel >= 0.6 - %endif - %endif %endif -%if %{with_storage_fs} # For mount/umount in FS driver BuildRequires: util-linux -%endif %if %{with_qemu} # From QEMU RPMs BuildRequires: /usr/bin/qemu-img @@ -569,31 +331,14 @@ BuildRequires: /usr/bin/qemu-img BuildRequires: /usr/sbin/qcow-create %endif %endif -%if %{with_storage_lvm} # For LVM drivers BuildRequires: lvm2 -%endif -%if %{with_storage_iscsi} # For ISCSI driver BuildRequires: iscsi-initiator-utils -%endif -%if %{with_storage_disk} # For disk driver BuildRequires: parted-devel - %if 0%{?rhel} == 5 -# Broken RHEL-5 parted RPM is missing a dep -BuildRequires: e2fsprogs-devel - %endif -%endif -%if %{with_storage_mpath} || %{with_storage_disk} # For Multipath support - %if 0%{?rhel} == 5 -# Broken RHEL-5 packaging has header files in main RPM :-( -BuildRequires: device-mapper - %else BuildRequires: device-mapper-devel - %endif -%endif %if %{with_storage_rbd} %if 0%{?rhel} >= 7 BuildRequires: librados2-devel @@ -603,21 +348,17 @@ BuildRequires: ceph-devel %endif %endif %if %{with_storage_gluster} - %if 0%{?rhel} >= 6 -BuildRequires: glusterfs-api-devel >= 3.4.0 -BuildRequires: glusterfs-devel >= 3.4.0 - %else BuildRequires: glusterfs-api-devel >= 3.4.1 BuildRequires: glusterfs-devel >= 3.4.1 - %endif +%endif +%if %{with_storage_sheepdog} +BuildRequires: sheepdog %endif %if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel %endif -%if %{with_capng} BuildRequires: libcap-ng-devel >= 0.5.0 -%endif %if %{with_fuse} BuildRequires: fuse-devel >= 2.8.6 %endif @@ -625,46 +366,28 @@ BuildRequires: fuse-devel >= 2.8.6 BuildRequires: libssh2-devel >= 1.3.0 %endif -%if %{with_netcf} - %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: netcf-devel >= 0.2.2 - %else - %if 0%{?fedora} >= 16 || 0%{?rhel} >= 6 +%else BuildRequires: netcf-devel >= 0.1.8 - %else -BuildRequires: netcf-devel >= 0.1.4 - %endif - %endif %endif %if %{with_esx} - %if 0%{?fedora} || 0%{?rhel} >= 6 BuildRequires: libcurl-devel - %else -BuildRequires: curl-devel - %endif %endif %if %{with_hyperv} BuildRequires: libwsman-devel >= 2.2.3 %endif -%if %{with_audit} BuildRequires: audit-libs-devel -%endif -%if %{with_dtrace} # we need /usr/sbin/dtrace BuildRequires: systemtap-sdt-devel -%endif -%if %{with_storage_fs} # For mount/umount in FS driver BuildRequires: util-linux # For showmount in FS driver (netfs discovery) BuildRequires: nfs-utils -%endif -%if %{with_firewalld} || %{with_polkit} # Communication with the firewall and polkit daemons use DBus BuildRequires: dbus-devel -%endif # Fedora build root suckage BuildRequires: gawk @@ -695,7 +418,6 @@ Group: Development/Libraries Includes the API reference for the libvirt C library, and a complete copy of the libvirt.org website documentation. -%if %{with_libvirtd} %package daemon Summary: Server side daemon and supporting files for libvirt library Group: Development/Libraries @@ -710,41 +432,29 @@ Requires: %{name}-client = %{version}-%{release} Requires: module-init-tools # for /sbin/ip & /sbin/tc Requires: iproute - %if %{with_avahi} - %if 0%{?rhel} == 5 -Requires: avahi - %else Requires: avahi-libs - %endif - %endif - %if %{with_polkit} - %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 Requires: polkit >= 0.112 - %else - %if 0%{?fedora} || 0%{?rhel} >=6 +%else Requires: polkit >= 0.93 - %else -Requires: PolicyKit >= 0.6 - %endif - %endif - %endif - %if %{with_cgconfig} +%endif +%if %{with_cgconfig} Requires: libcgroup - %endif - %ifarch %{ix86} x86_64 ia64 +%endif +%ifarch %{ix86} x86_64 ia64 # For virConnectGetSysinfo Requires: dmidecode - %endif +%endif # For service management - %if %{with_systemd} +%if %{with_systemd} Requires(post): systemd-units Requires(post): systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units - %endif - %if %{with_numad} +%endif +%if %{with_numad} Requires: numad - %endif +%endif # libvirtd depends on 'messagebus' service Requires: dbus # For uid creation during pre @@ -755,36 +465,26 @@ Server side daemon required to manage the virtualization capabilities of recent versions of Linux. Requires a hypervisor specific sub-RPM for specific drivers. - %if %{with_network} %package daemon-config-network Summary: Default configuration files for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-network = %{version}-%{release} - %endif %description daemon-config-network Default configuration files for setting up NAT based networking - %endif - %if %{with_nwfilter} %package daemon-config-nwfilter Summary: Network filter configuration files for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} - %endif %description daemon-config-nwfilter Network filter configuration files for cleaning guest traffic - %endif - %if %{with_driver_modules} - %if %{with_network} %package daemon-driver-network Summary: Network driver plugin for the libvirtd daemon Group: Development/Libraries @@ -792,73 +492,61 @@ Requires: libvirt-daemon = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: radvd Requires: iptables - %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7) +%if 0%{?rhel} && 0%{?rhel} < 7 Requires: iptables-ipv6 - %endif +%endif %description daemon-driver-network The network driver plugin for the libvirtd daemon, providing an implementation of the virtual network APIs using the Linux bridge capabilities. - %endif - %if %{with_nwfilter} %package daemon-driver-nwfilter Summary: Nwfilter driver plugin for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} Requires: iptables - %if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7) +%if 0%{?rhel} && 0%{?rhel} < 7 Requires: iptables-ipv6 - %endif +%endif Requires: ebtables %description daemon-driver-nwfilter The nwfilter driver plugin for the libvirtd daemon, providing an implementation of the firewall APIs using the ebtables, iptables and ip6tables capabilities - %endif - %if %{with_nodedev} %package daemon-driver-nodedev Summary: Nodedev driver plugin for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} # needed for device enumeration - %if %{with_hal} -Requires: hal - %endif - %if %{with_udev} - %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 Requires: systemd >= 185 - %else +%else Requires: udev >= 145 - %endif - %endif +%endif %description daemon-driver-nodedev The nodedev driver plugin for the libvirtd daemon, providing an implementation of the node device APIs using the udev capabilities. - %endif - %if %{with_interface} %package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7) +%if (0%{?fedora} || 0%{?rhel} >= 7) Requires: netcf-libs >= 0.2.2 - %endif +%endif %description daemon-driver-interface The interface driver plugin for the libvirtd daemon, providing an implementation of the network interface APIs using the netcf library - %endif %package daemon-driver-secret @@ -871,59 +559,47 @@ The secret driver plugin for the libvirtd daemon, providing an implementation of the secret key APIs. - %if %{with_storage} %package daemon-driver-storage Summary: Storage driver plugin for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_storage_fs} Requires: nfs-utils # For mkfs Requires: util-linux # For glusterfs - %if 0%{?fedora} +%if 0%{?fedora} Requires: glusterfs-client >= 2.0.1 - %endif - %endif - %if %{with_storage_lvm} +%endif # For LVM drivers Requires: lvm2 - %endif - %if %{with_storage_iscsi} # For ISCSI driver Requires: iscsi-initiator-utils - %endif - %if %{with_storage_disk} # For disk driver Requires: parted Requires: device-mapper - %endif - %if %{with_storage_mpath} # For multipath support Requires: device-mapper - %endif - %if %{with_storage_sheepdog} +%if %{with_storage_sheepdog} # For Sheepdog support Requires: sheepdog - %endif - %if %{with_qemu} +%endif +%if %{with_qemu} # From QEMU RPMs Requires: /usr/bin/qemu-img - %else - %if %{with_xen} +%else + %if %{with_xen} # From Xen RPMs Requires: /usr/sbin/qcow-create - %endif - %endif + %endif +%endif %description daemon-driver-storage The storage driver plugin for the libvirtd daemon, providing an implementation of the storage APIs using LVM, iSCSI, parted and more. - %endif - %if %{with_qemu} +%if %{with_qemu} %package daemon-driver-qemu Summary: Qemu driver plugin for the libvirtd daemon Group: Development/Libraries @@ -941,10 +617,10 @@ Requires: xz The qemu driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using QEMU - %endif +%endif - %if %{with_lxc} +%if %{with_lxc} %package daemon-driver-lxc Summary: LXC driver plugin for the libvirtd daemon Group: Development/Libraries @@ -956,10 +632,10 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release} The LXC driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using the Linux kernel - %endif +%endif - %if %{with_uml} +%if %{with_uml} %package daemon-driver-uml Summary: Uml driver plugin for the libvirtd daemon Group: Development/Libraries @@ -969,10 +645,10 @@ Requires: libvirt-daemon = %{version}-%{release} The UML driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using User Mode Linux - %endif +%endif - %if %{with_xen} +%if %{with_xen} %package daemon-driver-xen Summary: Xen driver plugin for the libvirtd daemon Group: Development/Libraries @@ -982,10 +658,10 @@ Requires: libvirt-daemon = %{version}-%{release} The Xen driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using Xen - %endif +%endif - %if %{with_vbox} +%if %{with_vbox} %package daemon-driver-vbox Summary: VirtualBox driver plugin for the libvirtd daemon Group: Development/Libraries @@ -995,10 +671,10 @@ Requires: libvirt-daemon = %{version}-%{release} The vbox driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using VirtualBox - %endif +%endif - %if %{with_libxl} +%if %{with_libxl} %package daemon-driver-libxl Summary: Libxl driver plugin for the libvirtd daemon Group: Development/Libraries @@ -1008,18 +684,16 @@ Requires: libvirt-daemon = %{version}-%{release} The Libxl driver plugin for the libvirtd daemon, providing an implementation of the hypervisor driver APIs using Libxl - %endif - %endif # %{with_driver_modules} +%endif - %if %{with_qemu_tcg} +%if %{with_qemu_tcg} %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -1027,22 +701,20 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif Requires: qemu %description daemon-qemu Server side daemon and driver required to manage the virtualization capabilities of the QEMU TCG emulators - %endif +%endif - %if %{with_qemu_kvm} +%if %{with_qemu_kvm} %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -1050,22 +722,20 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif Requires: qemu-kvm %description daemon-kvm Server side daemon and driver required to manage the virtualization capabilities of the KVM hypervisor - %endif +%endif - %if %{with_lxc} +%if %{with_lxc} %package daemon-lxc Summary: Server side daemon & driver required to run LXC guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -1073,21 +743,19 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif %description daemon-lxc Server side daemon and driver required to manage the virtualization capabilities of LXC - %endif +%endif - %if %{with_uml} +%if %{with_uml} %package daemon-uml Summary: Server side daemon & driver required to run UML guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-uml = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -1095,49 +763,45 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif # There are no UML kernel RPMs in Fedora/RHEL to depend on. %description daemon-uml Server side daemon and driver required to manage the virtualization capabilities of UML - %endif +%endif - %if %{with_xen} || %{with_libxl} +%if %{with_xen} || %{with_libxl} %package daemon-xen Summary: Server side daemon & driver required to run XEN guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} - %if %{with_xen} + %if %{with_xen} Requires: libvirt-daemon-driver-xen = %{version}-%{release} - %endif - %if %{with_libxl} + %endif + %if %{with_libxl} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} - %endif + %endif Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif Requires: xen %description daemon-xen Server side daemon and driver required to manage the virtualization capabilities of XEN - %endif +%endif - %if %{with_vbox} +%if %{with_vbox} %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_driver_modules} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -1145,13 +809,11 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} - %endif %description daemon-vbox Server side daemon and driver required to manage the virtualization capabilities of VirtualBox - %endif -%endif # %{with_libvirtd} +%endif %package client Summary: Client side library and utilities of the libvirt library @@ -1169,12 +831,10 @@ Requires: gnutls-utils # Needed for probing the power management features of the host. Requires: pm-utils %endif -%if %{with_sasl} Requires: cyrus-sasl # Not technically required, but makes 'out-of-box' config # work correctly & doesn't have onerous dependencies Requires: cyrus-sasl-md5 -%endif %description client Shared libraries and client binaries needed to access to the @@ -1216,11 +876,7 @@ Include header files & development libraries for the libvirt C library. %package lock-sanlock Summary: Sanlock lock manager plugin for QEMU driver Group: Development/Libraries - %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 Requires: sanlock >= 2.4 - %else -Requires: sanlock >= 1.8 - %endif #for virt-sanlock-cleanup require augeas Requires: augeas Requires: %{name}-daemon = %{version}-%{release} @@ -1231,7 +887,6 @@ Includes the Sanlock lock manager plugin for the QEMU driver %endif -%if %{with_nss_plugin} %package nss Summary: Libvirt plugin for Name Service Switch Group: Development/Libraries @@ -1239,10 +894,14 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release} %description nss Libvirt plugin for NSS for translating domain names into IP addresses. -%endif %prep +%if ! %{supported_platform} +echo "This RPM requires either Fedora >= 20 or RHEL >= 6" +exit 1 +%endif + %setup -q # Patches have to be stored in a temporary file because RPM has @@ -1282,220 +941,166 @@ rm -f $PATCHLIST rm -rf .git %build -%if ! %{with_xen} - %define _without_xen --without-xen -%endif - -%if ! %{with_qemu} - %define _without_qemu --without-qemu -%endif - -%if ! %{with_openvz} - %define _without_openvz --without-openvz -%endif - -%if ! %{with_lxc} - %define _without_lxc --without-lxc -%endif - -%if ! %{with_vbox} - %define _without_vbox --without-vbox -%endif - -%if ! %{with_xenapi} - %define _without_xenapi --without-xenapi -%endif - -%if ! %{with_libxl} - %define _without_libxl --without-libxl -%endif - -%if ! %{with_sasl} - %define _without_sasl --without-sasl -%endif - -%if ! %{with_avahi} - %define _without_avahi --without-avahi -%endif - -%if ! %{with_phyp} - %define _without_phyp --without-phyp -%endif - -%if ! %{with_esx} - %define _without_esx --without-esx -%endif - -%if ! %{with_hyperv} - %define _without_hyperv --without-hyperv -%endif - -%if ! %{with_vmware} - %define _without_vmware --without-vmware -%endif - -%if ! %{with_vz} - %define _without_vz --without-vz -%endif - -%if ! %{with_polkit} - %define _without_polkit --without-polkit -%endif - -%if ! %{with_libvirtd} - %define _without_libvirtd --without-libvirtd -%endif - -%if ! %{with_uml} - %define _without_uml --without-uml -%endif - -%if %{with_rhel5} - %define _with_rhel5_api --with-rhel5-api -%endif - -%if ! %{with_interface} - %define _without_interface --without-interface -%endif - -%if ! %{with_network} - %define _without_network --without-network -%endif - -%if ! %{with_storage_fs} - %define _without_storage_fs --without-storage-fs -%endif - -%if ! %{with_storage_lvm} - %define _without_storage_lvm --without-storage-lvm -%endif - -%if ! %{with_storage_iscsi} - %define _without_storage_iscsi --without-storage-iscsi -%endif - -%if ! %{with_storage_disk} - %define _without_storage_disk --without-storage-disk -%endif - -%if ! %{with_storage_mpath} - %define _without_storage_mpath --without-storage-mpath -%endif - -%if ! %{with_storage_rbd} - %define _without_storage_rbd --without-storage-rbd -%endif - -%if ! %{with_storage_sheepdog} - %define _without_storage_sheepdog --without-storage-sheepdog +%if %{with_xen} + %define arg_xen --with-xen +%else + %define arg_xen --without-xen %endif -%if ! %{with_storage_gluster} - %define _without_storage_gluster --without-storage-gluster +%if %{with_qemu} + %define arg_qemu --with-qemu +%else + %define arg_qemu --without-qemu %endif -%if ! %{with_numactl} - %define _without_numactl --without-numactl +%if %{with_openvz} + %define arg_openvz --with-openvz +%else + %define arg_openvz --without-openvz %endif -%if ! %{with_numad} - %define _without_numad --without-numad +%if %{with_lxc} + %define arg_lxc --with-lxc +%else + %define arg_lxc --without-lxc %endif -%if ! %{with_capng} - %define _without_capng --without-capng +%if %{with_vbox} + %define arg_vbox --with-vbox +%else + %define arg_vbox --without-vbox %endif -%if ! %{with_fuse} - %define _without_fuse --without-fuse +%if %{with_libxl} + %define arg_libxl --with-libxl +%else + %define arg_libxl --without-libxl %endif -%if ! %{with_netcf} - %define _without_netcf --without-netcf +%if %{with_phyp} + %define arg_phyp --with-phyp +%else + %define arg_phyp --without-phyp %endif -%if ! %{with_selinux} - %define _without_selinux --without-selinux +%if %{with_esx} + %define arg_esx --with-esx +%else + %define arg_esx --without-esx %endif -%if ! %{with_apparmor} - %define _without_apparmor --without-apparmor +%if %{with_hyperv} + %define arg_hyperv --with-hyperv +%else + %define arg_hyperv --without-hyperv %endif -%if ! %{with_hal} - %define _without_hal --without-hal +%if %{with_vmware} + %define arg_vmware --with-vmware +%else + %define arg_vmware --without-vmware %endif -%if ! %{with_udev} - %define _without_udev --without-udev +%if %{with_uml} + %define arg_uml --with-uml +%else + %define arg_uml --without-uml %endif -%if ! %{with_yajl} - %define _without_yajl --without-yajl +%if %{with_storage_rbd} + %define arg_storage_rbd --with-storage-rbd +%else + %define arg_storage_rbd --without-storage-rbd %endif -%if ! %{with_sanlock} - %define _without_sanlock --without-sanlock +%if %{with_storage_sheepdog} + %define arg_storage_sheepdog --with-storage-sheepdog +%else + %define arg_storage_sheepdog --without-storage-sheepdog %endif -%if ! %{with_libpcap} - %define _without_libpcap --without-libpcap +%if %{with_storage_gluster} + %define arg_storage_gluster --with-storage-gluster +%else + %define arg_storage_gluster --without-storage-gluster %endif -%if ! %{with_macvtap} - %define _without_macvtap --without-macvtap +%if %{with_numactl} + %define arg_numactl --with-numactl +%else + %define arg_numactl --without-numactl %endif -%if ! %{with_audit} - %define _without_audit --without-audit +%if %{with_numad} + %define arg_numad --with-numad +%else + %define arg_numad --without-numad %endif -%if ! %{with_dtrace} - %define _without_dtrace --without-dtrace +%if %{with_fuse} + %define arg_fuse --with-fuse +%else + %define arg_fuse --without-fuse %endif -%if ! %{with_driver_modules} - %define _without_driver_modules --without-driver-modules +%if %{with_sanlock} + %define arg_sanlock --with-sanlock +%else + %define arg_sanlock --without-sanlock %endif %if %{with_firewalld} - %define _with_firewalld --with-firewalld -%endif - -%if ! %{with_wireshark} - %define _without_wireshark --without-wireshark-dissector + %define arg_firewalld --with-firewalld +%else + %define arg_firewalld --without-firewalld %endif -%if ! %{with_systemd_daemon} - %define _without_systemd_daemon --without-systemd-daemon +%if %{with_wireshark} + %define arg_wireshark --with-wireshark-dissector +%else + %define arg_wireshark --without-wireshark-dissector %endif -%if ! %{with_pm_utils} - %define _without_pm_utils --without-pm-utils +%if %{with_systemd_daemon} + %define arg_systemd_daemon --with-systemd-daemon +%else + %define arg_systemd_daemon --without-systemd-daemon %endif -%if ! %{with_nss_plugin} - %define _without_nss_plugin --without-nss-plugin +%if %{with_pm_utils} + %define arg_pm_utils --with-pm-utils +%else + %define arg_pm_utils --without-pm-utils %endif %define when %(date +"%%F-%%T") %define where %(hostname) %define who %{?packager}%{!?packager:Unknown} -%define with_packager --with-packager="%{who}, %{when}, %{where}" -%define with_packager_version --with-packager-version="%{release}" +%define arg_packager --with-packager="%{who}, %{when}, %{where}" +%define arg_packager_version --with-packager-version="%{release}" %if %{with_systemd} - %define init_scripts --with-init_script=systemd + %define arg_init_script --with-init-script=systemd %else - %define init_scripts --with-init_script=redhat + %define arg_init_script --with-init-script=redhat %endif -%if %{with_selinux} - %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 - %define with_selinux_mount --with-selinux-mount="/sys/fs/selinux" - %else - %define with_selinux_mount --with-selinux-mount="/selinux" - %endif +%if 0%{?fedora} || 0%{?rhel} >= 7 + %define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux" +%else + %define arg_selinux_mount --with-selinux-mount="/selinux" +%endif + +%if 0%{?fedora} + # Nightly firmware repo x86/OVMF + LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd" + # Nightly firmware repo aarch64/AAVMF + LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw" + # Fedora official x86/OVMF + LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd" + # Fedora official aarch64/AAVMF + LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw" + %define arg_loader_nvram --with-loader-nvram="$LOADERS" %endif # place macros above and build commands below this comment @@ -1505,65 +1110,64 @@ rm -rf .git %endif rm -f po/stamp-po -%configure %{?_without_xen} \ - %{?_without_qemu} \ - %{?_without_openvz} \ - %{?_without_lxc} \ - %{?_without_vbox} \ - %{?_without_libxl} \ - %{?_without_xenapi} \ - %{?_without_sasl} \ - %{?_without_avahi} \ - %{?_without_polkit} \ - %{?_without_libvirtd} \ - %{?_without_uml} \ - %{?_without_phyp} \ - %{?_without_esx} \ - %{?_without_hyperv} \ - %{?_without_vmware} \ - %{?_without_vz} \ +%configure %{?arg_xen} \ + %{?arg_qemu} \ + %{?arg_openvz} \ + %{?arg_lxc} \ + %{?arg_vbox} \ + %{?arg_libxl} \ + --with-sasl \ + --with-avahi \ + --with-polkit \ + --with-libvirtd \ + %{?arg_uml} \ + %{?arg_phyp} \ + %{?arg_esx} \ + %{?arg_hyperv} \ + %{?arg_vmware} \ + --without-xenapi \ + --without-vz \ --without-bhyve \ - %{?_without_interface} \ - %{?_without_network} \ - %{?_with_rhel5_api} \ - %{?_without_storage_fs} \ - %{?_without_storage_lvm} \ - %{?_without_storage_iscsi} \ - %{?_without_storage_disk} \ - %{?_without_storage_mpath} \ - %{?_without_storage_rbd} \ - %{?_without_storage_sheepdog} \ - %{?_without_storage_gluster} \ - %{?_without_numactl} \ - %{?_without_numad} \ - %{?_without_capng} \ - %{?_without_fuse} \ - %{?_without_netcf} \ - %{?_without_selinux} \ - %{?_with_selinux_mount} \ - %{?_without_apparmor} \ - %{?_without_hal} \ - %{?_without_udev} \ - %{?_without_yajl} \ - %{?_without_sanlock} \ - %{?_without_libpcap} \ - %{?_without_macvtap} \ - %{?_without_audit} \ - %{?_without_dtrace} \ - %{?_without_driver_modules} \ - %{?_with_firewalld} \ - %{?_without_wireshark} \ - %{?_without_systemd_daemon} \ - %{?_without_pm_utils} \ - %{?_without_nss_plugin} \ - %{with_packager} \ - %{with_packager_version} \ + --with-interface \ + --with-network \ + --with-storage-fs \ + --with-storage-lvm \ + --with-storage-iscsi \ + --with-storage-disk \ + --with-storage-mpath \ + %{?arg_storage_rbd} \ + %{?arg_storage_sheepdog} \ + %{?arg_storage_gluster} \ + %{?arg_numactl} \ + %{?arg_numad} \ + --with-capng \ + %{?arg_fuse} \ + --with-netcf \ + --with-selinux \ + %{?arg_selinux_mount} \ + --without-apparmor \ + --without-hal \ + --with-udev \ + --with-yajl \ + %{?arg_sanlock} \ + --with-libpcap \ + --with-macvtap \ + --with-audit \ + --with-dtrace \ + --with-driver-modules \ + %{?arg_firewalld} \ + %{?arg_wireshark} \ + %{?arg_systemd_daemon} \ + %{?arg_pm_utils} \ + --with-nss-plugin \ + %{arg_packager} \ + %{arg_packager_version} \ --with-qemu-user=%{qemu_user} \ --with-qemu-group=%{qemu_group} \ - %{?with_loader_nvram} \ + %{?arg_loader_nvram} \ %{?enable_werror} \ --enable-expensive-tests \ - %{init_scripts} + %{arg_init_script} make %{?_smp_mflags} gzip -9 ChangeLog @@ -1581,10 +1185,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a -%if %{with_driver_modules} rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a -%endif %if %{with_wireshark} rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la mv $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.so \ @@ -1597,7 +1199,6 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/virt-admin rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-admin.1* rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libvirt-admin.conf -%if %{with_network} install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/ # We don't want to install /etc/libvirt/qemu/networks in the main %files list # because if the admin wants to delete the default network completely, we don't @@ -1609,10 +1210,6 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml # Strip auto-generated UUID - we need it generated per-install sed -i -e "//d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml -%else -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml -%endif %if ! %{with_qemu} rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug @@ -1650,17 +1247,11 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml # Copied into libvirt-docs subpackage eventually mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} libvirt-docs -%if %{with_dtrace} - %ifarch %{power64} s390x x86_64 ia64 alpha sparc64 +%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp - %endif -%endif - -%if 0%{?rhel} == 5 -rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/60-libvirtd.conf %endif %clean @@ -1683,44 +1274,20 @@ then exit 1 fi -%if %{with_libvirtd} %pre daemon - %if ! %{with_driver_modules} - %if %{with_qemu} - %if 0%{?fedora} || 0%{?rhel} >= 6 -# We want soft static allocation of well-known ids, as disk images -# are commonly shared across NFS mounts by id rather than name; see -# https://fedoraproject.org/wiki/Packaging:UsersAndGroups -getent group kvm >/dev/null || groupadd -f -g 36 -r kvm -getent group qemu >/dev/null || groupadd -f -g 107 -r qemu -if ! getent passwd qemu >/dev/null; then - if ! getent passwd 107 >/dev/null; then - useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu - else - useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu - fi -fi - %endif - %endif - %endif - - %if %{with_polkit} - %if 0%{?fedora} || 0%{?rhel} >= 6 # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation # described at the above link. getent group libvirt >/dev/null || groupadd -r libvirt - %endif - %endif exit 0 %post daemon - %if %{with_systemd} - %if %{with_systemd_macros} - %systemd_post virtlockd.socket virtlogd.socket libvirtd.service - %else +%if %{with_systemd} + %if %{with_systemd_macros} + %systemd_post virtlockd.socket virtlogd.socket libvirtd.service + %else if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl enable \ @@ -1728,28 +1295,28 @@ if [ $1 -eq 1 ] ; then virtlogd.socket \ libvirtd.service >/dev/null 2>&1 || : fi - %endif - %else - %if %{with_cgconfig} + %endif +%else + %if %{with_cgconfig} # Starting with Fedora 16/RHEL-7, systemd automounts all cgroups, # and cgconfig is no longer a necessary service. - %if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16) + %if 0%{?rhel} && 0%{?rhel} < 7 if [ "$1" -eq "1" ]; then /sbin/chkconfig cgconfig on fi - %endif %endif + %endif /sbin/chkconfig --add libvirtd /sbin/chkconfig --add virtlogd /sbin/chkconfig --add virtlockd - %endif +%endif %preun daemon - %if %{with_systemd} - %if %{with_systemd_macros} - %systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service - %else +%if %{with_systemd} + %if %{with_systemd_macros} + %systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service + %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable \ @@ -1765,8 +1332,8 @@ if [ $1 -eq 0 ] ; then virtlockd.socket \ virtlockd.service > /dev/null 2>&1 || : fi - %endif - %else + %endif +%else if [ $1 = 0 ]; then /sbin/service libvirtd stop 1>/dev/null 2>&1 /sbin/chkconfig --del libvirtd @@ -1775,33 +1342,33 @@ if [ $1 = 0 ]; then /sbin/service virtlockd stop 1>/dev/null 2>&1 /sbin/chkconfig --del virtlockd fi - %endif +%endif %postun daemon - %if %{with_systemd} +%if %{with_systemd} /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : fi - %else +%else if [ $1 -ge 1 ]; then /sbin/service virtlockd reload > /dev/null 2>&1 || : /sbin/service virtlogd reload > /dev/null 2>&1 || : /sbin/service libvirtd condrestart > /dev/null 2>&1 fi - %endif +%endif - %if %{with_systemd} - %else +%if %{with_systemd} +%else %triggerpostun daemon -- libvirt-daemon < 1.2.1 if [ "$1" -ge "1" ]; then /sbin/service virtlockd reload > /dev/null 2>&1 || : /sbin/service virtlogd reload > /dev/null 2>&1 || : /sbin/service libvirtd condrestart > /dev/null 2>&1 fi - %endif +%endif # In upgrade scenario we must explicitly enable virtlockd/virtlogd # sockets, if libvirtd is already enabled and start them if @@ -1809,20 +1376,19 @@ fi # guests %triggerpostun daemon -- libvirt-daemon < 1.3.0 if [ $1 -ge 1 ] ; then - %if %{with_systemd} +%if %{with_systemd} /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && /bin/systemctl enable virtlogd.socket || : /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && /bin/systemctl start virtlogd.socket || : - %else +%else /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && /sbin/chkconfig virtlogd on || : /sbin/service libvirtd status 1>/dev/null 2>&1 && /sbin/service virtlogd start || : - %endif +%endif fi - %if %{with_network} %post daemon-config-network if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then # see if the network used by default network creates a conflict, @@ -1861,16 +1427,15 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml # Make sure libvirt picks up the new network defininiton - %if %{with_systemd} +%if %{with_systemd} /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||: - %else +%else /sbin/service libvirtd condrestart > /dev/null 2>&1 || : - %endif +%endif fi - %endif - %if %{with_systemd} +%if %{with_systemd} %triggerun -- libvirt < 0.9.4 %{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||: @@ -1880,12 +1445,10 @@ fi # Run these because the SysV package being removed won't do them /sbin/chkconfig --del libvirtd >/dev/null 2>&1 || : /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : - %endif +%endif - %if %{with_driver_modules} - %if %{with_qemu} +%if %{with_qemu} %pre daemon-driver-qemu - %if 0%{?fedora} || 0%{?rhel} >= 6 # We want soft static allocation of well-known ids, as disk images # are commonly shared across NFS mounts by id rather than name; see # https://fedoraproject.org/wiki/Packaging:UsersAndGroups @@ -1899,10 +1462,7 @@ if ! getent passwd qemu >/dev/null; then fi fi exit 0 - %endif - %endif - %endif -%endif # %{with_libvirtd} +%endif %preun client @@ -1960,13 +1520,10 @@ exit 0 %endif %files -%defattr(-, root, root) %files docs -%defattr(-, root, root) %doc AUTHORS ChangeLog.gz NEWS README TODO %doc libvirt-docs/* -%doc docs/*.html docs/html docs/*.gif # API docs %dir %{_datadir}/gtk-doc/html/libvirt/ @@ -1985,23 +1542,21 @@ exit 0 %doc examples/systemtap -%if %{with_libvirtd} %files daemon -%defattr(-, root, root) %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ - %if %{with_systemd} +%if %{with_systemd} %{_unitdir}/libvirtd.service %{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.socket %{_unitdir}/virtlockd.service %{_unitdir}/virtlockd.socket - %else +%else %{_sysconfdir}/rc.d/init.d/libvirtd %{_sysconfdir}/rc.d/init.d/virtlogd %{_sysconfdir}/rc.d/init.d/virtlockd - %endif +%endif %doc daemon/libvirtd.upstart %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd @@ -2009,9 +1564,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf - %if 0%{?fedora} || 0%{?rhel} >= 6 %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf - %endif %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd %dir %{_datadir}/libvirt/ @@ -2034,28 +1587,18 @@ exit 0 %{_datadir}/augeas/lenses/virtlockd.aug %{_datadir}/augeas/lenses/tests/test_virtlockd.aug %{_datadir}/augeas/lenses/libvirt_lockd.aug - %if %{with_qemu} +%if %{with_qemu} %{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug - %endif +%endif - %if %{with_polkit} - %if 0%{?fedora} || 0%{?rhel} >= 6 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules - %else -%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy - %endif - %endif %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper - %if %{with_apparmor} -%attr(0755, root, root) %{_libexecdir}/virt-aa-helper - %endif - %attr(0755, root, root) %{_sbindir}/libvirtd %attr(0755, root, root) %{_sbindir}/virtlogd %attr(0755, root, root) %{_sbindir}/virtlockd @@ -2064,93 +1607,19 @@ exit 0 %{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtlockd.8* - %if ! %{with_driver_modules} - %if %{with_network} || %{with_qemu} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ - %endif - %if %{with_network} || %{with_nwfilter} -%ghost %dir %{_localstatedir}/run/libvirt/network/ - %endif - %if %{with_network} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ -%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/ -%attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper - %endif - %if %{with_nwfilter} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ - %endif - %if %{with_storage_disk} -%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper - %endif - %if %{with_qemu} -%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf -%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ -%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ -%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ -%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/ -%{_datadir}/augeas/lenses/libvirtd_qemu.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug - %endif - %if %{with_lxc} -%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ -%ghost %dir %{_localstatedir}/run/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ -%{_datadir}/augeas/lenses/libvirtd_lxc.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug -%attr(0755, root, root) %{_libexecdir}/libvirt_lxc - %endif - %if %{with_uml} -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ -%ghost %dir %{_localstatedir}/run/libvirt/uml/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ - %endif - %if %{with_libxl} -%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl -%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/ -%ghost %dir %{_localstatedir}/run/libvirt/libxl/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/ -%{_datadir}/augeas/lenses/libvirtd_libxl.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug - %endif - %if %{with_xen} -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/ - %endif - %endif # ! %{with_driver_modules} - %doc examples/polkit/*.rules - %if %{with_network} %files daemon-config-network -%defattr(-, root, root) %dir %{_datadir}/libvirt/networks/ %{_datadir}/libvirt/networks/default.xml - %endif - %if %{with_nwfilter} %files daemon-config-nwfilter -%defattr(-, root, root) %{_sysconfdir}/libvirt/nwfilter/*.xml - %endif - %if %{with_driver_modules} - %if %{with_interface} %files daemon-driver-interface -%defattr(-, root, root) %{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so - %endif - %if %{with_network} %files daemon-driver-network -%defattr(-, root, root) %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart @@ -2159,38 +1628,24 @@ exit 0 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/ %attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper %{_libdir}/%{name}/connection-driver/libvirt_driver_network.so - %endif - %if %{with_nodedev} %files daemon-driver-nodedev -%defattr(-, root, root) %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so - %endif - %if %{with_nwfilter} %files daemon-driver-nwfilter -%defattr(-, root, root) %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ %ghost %dir %{_localstatedir}/run/libvirt/network/ %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so - %endif %files daemon-driver-secret -%defattr(-, root, root) %{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so - %if %{with_storage} %files daemon-driver-storage -%defattr(-, root, root) - %if %{with_storage_disk} %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper - %endif %{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so - %endif - %if %{with_qemu} +%if %{with_qemu} %files daemon-driver-qemu -%defattr(-, root, root) %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf @@ -2202,11 +1657,10 @@ exit 0 %{_datadir}/augeas/lenses/libvirtd_qemu.aug %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug %{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so - %endif +%endif - %if %{with_lxc} +%if %{with_lxc} %files daemon-driver-lxc -%defattr(-, root, root) %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc @@ -2216,28 +1670,25 @@ exit 0 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug %attr(0755, root, root) %{_libexecdir}/libvirt_lxc %{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so - %endif +%endif - %if %{with_uml} +%if %{with_uml} %files daemon-driver-uml -%defattr(-, root, root) %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml %ghost %dir %{_localstatedir}/run/libvirt/uml/ %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ %{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so - %endif +%endif - %if %{with_xen} +%if %{with_xen} %files daemon-driver-xen -%defattr(-, root, root) %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/ %{_libdir}/%{name}/connection-driver/libvirt_driver_xen.so - %endif +%endif - %if %{with_libxl} +%if %{with_libxl} %files daemon-driver-libxl -%defattr(-, root, root) %config(noreplace) %{_sysconfdir}/libvirt/libxl.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl %config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf @@ -2247,49 +1698,39 @@ exit 0 %ghost %dir %{_localstatedir}/run/libvirt/libxl/ %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/ %{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so - %endif +%endif - %if %{with_vbox} +%if %{with_vbox} %files daemon-driver-vbox -%defattr(-, root, root) %{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so - %endif - %endif # %{with_driver_modules} +%endif - %if %{with_qemu_tcg} +%if %{with_qemu_tcg} %files daemon-qemu -%defattr(-, root, root) - %endif +%endif - %if %{with_qemu_kvm} +%if %{with_qemu_kvm} %files daemon-kvm -%defattr(-, root, root) - %endif +%endif - %if %{with_lxc} +%if %{with_lxc} %files daemon-lxc -%defattr(-, root, root) - %endif +%endif - %if %{with_uml} +%if %{with_uml} %files daemon-uml -%defattr(-, root, root) - %endif +%endif - %if %{with_xen} || %{with_libxl} +%if %{with_xen} || %{with_libxl} %files daemon-xen -%defattr(-, root, root) - %endif +%endif - %if %{with_vbox} +%if %{with_vbox} %files daemon-vbox -%defattr(-, root, root) - %endif -%endif # %{with_libvirtd} +%endif %if %{with_sanlock} %files lock-sanlock -%defattr(-, root, root) %if %{with_qemu} %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf %endif @@ -2306,7 +1747,6 @@ exit 0 %endif %files client -f %{name}.lang -%defattr(-, root, root) %doc COPYING COPYING.LESSER %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf @@ -2323,11 +1763,9 @@ exit 0 %{_libdir}/libvirt-lxc.so.* %{_libdir}/libvirt-admin.so.* -%if %{with_dtrace} %{_datadir}/systemtap/tapset/libvirt_probes*.stp %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp -%endif %dir %{_datadir}/libvirt/ %dir %{_datadir}/libvirt/schemas/ @@ -2360,19 +1798,15 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ -%if %{with_sasl} %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf -%endif %if %{with_wireshark} %files wireshark %{_libdir}/wireshark/plugins/libvirt.so %endif -%if %{with_nss_plugin} %files nss %{_libdir}/libnss_libvirt.so.2 -%endif %if %{with_lxc} %files login-shell @@ -2382,8 +1816,6 @@ exit 0 %endif %files devel -%defattr(-, root, root) - %{_libdir}/libvirt.so %{_libdir}/libvirt-qemu.so %{_libdir}/libvirt-lxc.so @@ -2417,6 +1849,10 @@ exit 0 %changelog +* Mon Jun 6 2016 Daniel P. Berrange - 1.3.5-1 +- Rebase to version 1.3.5 +- Pull in refactored, simplified spec file from upstream + * Fri May 20 2016 Cole Robinson - 1.3.4-2 - Fix libxl video config via virt-install (bz #1334557) - Advertise fedora edk2 firmware builds to apps (bz #1335395) diff --git a/sources b/sources index bd7a41a..869222f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f7c35c90c0a4fd215be2a27aab3580dc libvirt-1.3.4.tar.gz +f9dc1e63d559eca50ae0ee798a4c6c6d libvirt-1.3.5.tar.gz