diff --git a/a495365d-sexpr-empty-str.patch b/a495365d-sexpr-empty-str.patch new file mode 100644 index 0000000..962a420 --- /dev/null +++ b/a495365d-sexpr-empty-str.patch @@ -0,0 +1,46 @@ +commit a495365d09138bf0f07504cfe9b6ea2de858e18e +Author: Jim Fehlig +Date: Fri Nov 18 14:54:38 2011 -0700 + + Don't copy sexpr node value that is an empty string + + Xen4.1 initializes some unspecified sexpr config items to an empty + string, unlike previous Xen versions that would leave the item unset. + E.g. the kernel item for an HVM guest (non-direct kernel boot): + + Xen4.0 and earlier + ... + (image + (hvm + (kernel ) + ... + + Xen4.1 + ... + (image + (hvm + (kernel '') + ... + + The empty string for kernel causes some grief in subsequent parsing + where existence of specified kernel is checked, e.g. + + if (!def->os.kernel) + ... + + This patch solves the problem in sexpr_node_copy() by not copying + a node containing an empty string. + +Index: libvirt-0.9.7/src/util/sexpr.c +=================================================================== +--- libvirt-0.9.7.orig/src/util/sexpr.c ++++ libvirt-0.9.7/src/util/sexpr.c +@@ -519,7 +519,7 @@ int sexpr_node_copy(const struct sexpr * + { + const char *val = sexpr_node(sexpr, node); + +- if (val) { ++ if (val && *val) { + *dst = strdup(val); + if (!(*dst)) + return -1; diff --git a/c1bc3d89-qemu-add-ahci.patch b/c1bc3d89-qemu-add-ahci.patch deleted file mode 100644 index 574f7c8..0000000 --- a/c1bc3d89-qemu-add-ahci.patch +++ /dev/null @@ -1,244 +0,0 @@ -commit c1bc3d892c7388ad5c7c70a298107236717a009a -Author: Jim Fehlig -Date: Tue Sep 27 21:46:08 2011 -0600 - - Add AHCI support to qemu driver - - Tested with multiple AHCI controllers and multiple disks attached - to a controller. E.g., - - - - - -
- - - - - -
- - - - - -
- - -
- - -
- - -Index: libvirt-0.9.6/docs/formatdomain.html.in -=================================================================== ---- libvirt-0.9.6.orig/docs/formatdomain.html.in -+++ libvirt-0.9.6/docs/formatdomain.html.in -@@ -972,11 +972,12 @@ - as a device ordering hint. The optional bus - attribute specifies the type of disk device to emulate; - possible values are driver specific, with typical values being -- "ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is -- inferred from the style of the device name. eg, a device named 'sda' -- will typically be exported using a SCSI bus. -+ "ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus -+ type is inferred from the style of the device name. eg, a device named -+ 'sda' will typically be exported using a SCSI bus. - Since 0.0.3; bus attribute since 0.4.3; -- "usb" attribute value since after 0.4.4 -+ "usb" attribute value since after 0.4.4; "sata" attribute value since -+ 0.9.7 -
driver
-
- The optional driver element allows specifying further details -Index: libvirt-0.9.6/docs/schemas/domaincommon.rng -=================================================================== ---- libvirt-0.9.6.orig/docs/schemas/domaincommon.rng -+++ libvirt-0.9.6/docs/schemas/domaincommon.rng -@@ -790,6 +790,7 @@ - xen - usb - uml -+ sata - - - -Index: libvirt-0.9.6/src/conf/domain_conf.c -=================================================================== ---- libvirt-0.9.6.orig/src/conf/domain_conf.c -+++ libvirt-0.9.6/src/conf/domain_conf.c -@@ -2156,6 +2156,15 @@ virDomainDiskDefAssignAddress(virCapsPtr - def->info.addr.drive.unit = (idx % 2); - break; - -+ case VIR_DOMAIN_DISK_BUS_SATA: -+ /* For SATA we define the default mapping to be 6 units -+ * per bus, 1 bus per controller, many controllers */ -+ def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE; -+ def->info.addr.drive.controller = idx / 6; -+ def->info.addr.drive.bus = 0; -+ def->info.addr.drive.unit = idx % 6; -+ break; -+ - case VIR_DOMAIN_DISK_BUS_FDC: - /* For FDC we define the default mapping to be 2 units - * per bus, 1 bus per controller, many controllers */ -@@ -8674,6 +8683,11 @@ int virDomainDefAddImplicitControllers(v - VIR_DOMAIN_DISK_BUS_IDE) < 0) - return -1; - -+ if (virDomainDefAddDiskControllersForType(def, -+ VIR_DOMAIN_CONTROLLER_TYPE_SATA, -+ VIR_DOMAIN_DISK_BUS_SATA) < 0) -+ return -1; -+ - if (virDomainDefMaybeAddVirtioSerialController(def) < 0) - return -1; - -Index: libvirt-0.9.6/src/qemu/qemu_capabilities.c -=================================================================== ---- libvirt-0.9.6.orig/src/qemu/qemu_capabilities.c -+++ libvirt-0.9.6/src/qemu/qemu_capabilities.c -@@ -136,6 +136,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, - "pci-ohci", - "usb-redir", - "usb-hub", -+ "ich9-ahci", - ); - - struct qemu_feature_flags { -@@ -1227,6 +1228,8 @@ qemuCapsParseDeviceStr(const char *str, - qemuCapsSet(flags, QEMU_CAPS_USB_REDIR); - if (strstr(str, "name \"usb-hub\"")) - qemuCapsSet(flags, QEMU_CAPS_USB_HUB); -+ if (strstr(str, "name \"ich9-ahci\"")) -+ qemuCapsSet(flags, QEMU_CAPS_ICH9_AHCI); - - /* Prefer -chardev spicevmc (detected earlier) over -device spicevmc */ - if (!qemuCapsGet(flags, QEMU_CAPS_CHARDEV_SPICEVMC) && -Index: libvirt-0.9.6/src/qemu/qemu_capabilities.h -=================================================================== ---- libvirt-0.9.6.orig/src/qemu/qemu_capabilities.h -+++ libvirt-0.9.6/src/qemu/qemu_capabilities.h -@@ -110,6 +110,7 @@ enum qemuCapsFlags { - QEMU_CAPS_PCI_OHCI = 71, /* -device pci-ohci */ - QEMU_CAPS_USB_REDIR = 72, /* -device usb-redir */ - QEMU_CAPS_USB_HUB = 73, /* -device usb-hub */ -+ QEMU_CAPS_ICH9_AHCI = 74, /* -device ich9-ahci */ - - QEMU_CAPS_LAST, /* this must always be the last item */ - }; -Index: libvirt-0.9.6/src/qemu/qemu_command.c -=================================================================== ---- libvirt-0.9.6.orig/src/qemu/qemu_command.c -+++ libvirt-0.9.6/src/qemu/qemu_command.c -@@ -1694,6 +1694,12 @@ qemuBuildDriveDevStr(virDomainDiskDefPtr - disk->info.addr.drive.bus, - disk->info.addr.drive.unit); - break; -+ case VIR_DOMAIN_DISK_BUS_SATA: -+ virBufferAddLit(&opt, "ide-drive"); -+ virBufferAsprintf(&opt, ",bus=ahci%d.%d", -+ disk->info.addr.drive.controller, -+ disk->info.addr.drive.unit); -+ break; - case VIR_DOMAIN_DISK_BUS_VIRTIO: - virBufferAddLit(&opt, "virtio-blk-pci"); - qemuBuildIoEventFdStr(&opt, disk->ioeventfd, qemuCaps); -@@ -1894,6 +1900,10 @@ qemuBuildControllerDevStr(virDomainContr - virBufferAsprintf(&buf, "usb-ccid,id=ccid%d", def->idx); - break; - -+ case VIR_DOMAIN_CONTROLLER_TYPE_SATA: -+ virBufferAsprintf(&buf, "ahci,id=ahci%d", def->idx); -+ break; -+ - case VIR_DOMAIN_CONTROLLER_TYPE_USB: - if (qemuBuildUSBControllerDevStr(def, qemuCaps, &buf) == -1) - goto error; -@@ -3675,14 +3685,22 @@ qemuBuildCommandLine(virConnectPtr conn, - cont->type == VIR_DOMAIN_CONTROLLER_TYPE_FDC) - continue; - -- /* QEMU doesn't implement a SATA driver */ -+ /* Only recent QEMU implements a SATA (AHCI) controller */ - if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_SATA) { -- qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- "%s", _("SATA is not supported with this QEMU binary")); -- goto error; -- } -+ if (!qemuCapsGet(qemuCaps, QEMU_CAPS_ICH9_AHCI)) { -+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ "%s", _("SATA is not supported with this QEMU binary")); -+ goto error; -+ } else { -+ char *devstr; -+ -+ virCommandAddArg(cmd, "-device"); -+ if (!(devstr = qemuBuildControllerDevStr(cont, qemuCaps, NULL))) -+ goto error; - -- if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB && -+ virCommandAddArg(cmd, devstr); -+ } -+ } else if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB && - def->controllers[i]->model == -1 && - !qemuCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) { - if (usblegacy) { -Index: libvirt-0.9.6/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.args -=================================================================== ---- /dev/null -+++ libvirt-0.9.6/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.args -@@ -0,0 +1,6 @@ -+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ -+pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \ -+unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device ahci,id=ahci0,\ -+bus=pci.0,addr=0x3 -drive file=/dev/HostVG/QEMUGuest1,if=none,\ -+id=drive-sata0-0-0 -device ide-drive,bus=ahci0.0,drive=drive-sata0-0-0,\ -+id=sata0-0-0 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -Index: libvirt-0.9.6/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml -=================================================================== ---- /dev/null -+++ libvirt-0.9.6/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml -@@ -0,0 +1,25 @@ -+ -+ QEMUGuest1 -+ c7a5fdbd-edaf-9455-926a-d65c16db1809 -+ 219136 -+ 219136 -+ 1 -+ -+ hvm -+ -+ -+ -+ destroy -+ restart -+ destroy -+ -+ /usr/bin/qemu -+ -+ -+ -+
-+ -+ -+ -+ -+ -Index: libvirt-0.9.6/tests/qemuxml2argvtest.c -=================================================================== ---- libvirt-0.9.6.orig/tests/qemuxml2argvtest.c -+++ libvirt-0.9.6/tests/qemuxml2argvtest.c -@@ -356,6 +356,9 @@ mymain(void) - QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); - DO_TEST("disk-scsi-device-auto", false, - QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); -+ DO_TEST("disk-sata-device", false, -+ QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, -+ QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_ICH9_AHCI); - DO_TEST("disk-aio", false, - QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_AIO, - QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT); diff --git a/clone.patch b/clone.patch index 5529a0f..cc4e2f2 100644 --- a/clone.patch +++ b/clone.patch @@ -2,8 +2,8 @@ Index: src/lxc/lxc_container.c =================================================================== --- src/lxc/lxc_container.c.orig +++ src/lxc/lxc_container.c -@@ -1183,6 +1183,9 @@ int lxcContainerStart(virDomainDefPtr de - handshakefd}; +@@ -1345,6 +1345,9 @@ int lxcContainerStart(virDomainDefPtr de + ttyPaths, nttyPaths, handshakefd}; /* allocate a stack for the container */ +#ifdef __ia64__ @@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(); return -1; -@@ -1201,7 +1204,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -1363,7 +1366,11 @@ int lxcContainerStart(virDomainDefPtr de cflags |= CLONE_NEWNET; } @@ -24,15 +24,15 @@ Index: src/lxc/lxc_container.c VIR_FREE(stack); VIR_DEBUG("clone() completed, new container PID is %d", pid); -@@ -1228,6 +1235,7 @@ int lxcContainerAvailable(int features) +@@ -1389,6 +1396,7 @@ int lxcContainerAvailable(int features) + int cpid; char *childStack; char *stack; - int childStatus; + int stacksize = getpagesize() * 4; if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; -@@ -1235,14 +1243,21 @@ int lxcContainerAvailable(int features) +@@ -1396,14 +1404,21 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; @@ -55,4 +55,4 @@ Index: src/lxc/lxc_container.c +#endif VIR_FREE(stack); if (cpid < 0) { - char ebuf[1024]; + char ebuf[1024] ATTRIBUTE_UNUSED; diff --git a/d47ab3fe-polkit0.patch b/d47ab3fe-polkit0.patch new file mode 100644 index 0000000..f01a66d --- /dev/null +++ b/d47ab3fe-polkit0.patch @@ -0,0 +1,25 @@ +commit d47ab3fe6115de6c54f999ba598fe58418840653 +Author: Jim Fehlig +Date: Wed Nov 16 11:35:08 2011 -0700 + + Fix build with polkit0 + + I missed adding virNetServerGetDBusConn() to libvirtd_private.syms + in commit b8adfcc6, which didn't cause a problem in 0.9.6 but + results in this build error in 0.9.7 + + libvirtd-remote.o: In function `remoteDispatchAuthPolkit': + remote.c:(.text+0x188dd): undefined reference to `virNetServerGetDBusConn' + +Index: libvirt-0.9.7/src/libvirt_private.syms +=================================================================== +--- libvirt-0.9.7.orig/src/libvirt_private.syms ++++ libvirt-0.9.7/src/libvirt_private.syms +@@ -1217,6 +1217,7 @@ virNetServerAddSignalHandler; + virNetServerAutoShutdown; + virNetServerClose; + virNetServerFree; ++virNetServerGetDBusConn; + virNetServerIsPrivileged; + virNetServerNew; + virNetServerQuit; diff --git a/f84aedad-revert.patch b/f84aedad-revert.patch deleted file mode 100644 index 07e292b..0000000 --- a/f84aedad-revert.patch +++ /dev/null @@ -1,277 +0,0 @@ -commit f887b0c4913b81c33a7d0a8cce3da09caf88ecbb -Author: Jim Fehlig -Date: Thu Sep 22 20:48:07 2011 -0600 - - Revert "qemu: Fix shutdown regression with buggy qemu" - - This reverts commit f84aedad090da1e05ccc5651815febba013eb3ad. - - The commit is not needed since the affected SUSE kvm packages - have the necessary qemu patch - - http://lists.nongnu.org/archive/html/qemu-devel/2011-09/msg01757.html - -diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c -index 850d46e..36f47a9 100644 ---- a/src/qemu/qemu_capabilities.c -+++ b/src/qemu/qemu_capabilities.c -@@ -136,7 +136,6 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, - "pci-ohci", - "usb-redir", - "usb-hub", -- "no-shutdown", - ); - - struct qemu_feature_flags { -@@ -1009,13 +1008,6 @@ qemuCapsComputeCmdFlags(const char *help, - qemuCapsSet(flags, QEMU_CAPS_VHOST_NET); - } - -- /* Do not use -no-shutdown if qemu doesn't support it or SIGTERM handling -- * is most likely buggy when used with -no-shutdown (which applies for qemu -- * 0.14.* and 0.15.*) -- */ -- if (strstr(help, "-no-shutdown") && (version < 14000 || version > 15999)) -- qemuCapsSet(flags, QEMU_CAPS_NO_SHUTDOWN); -- - /* - * Handling of -incoming arg with varying features - * -incoming tcp (kvm >= 79, qemu >= 0.10.0) -diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h -index 74d3ab2..96b7a3b 100644 ---- a/src/qemu/qemu_capabilities.h -+++ b/src/qemu/qemu_capabilities.h -@@ -110,7 +110,6 @@ enum qemuCapsFlags { - QEMU_CAPS_PCI_OHCI = 71, /* -device pci-ohci */ - QEMU_CAPS_USB_REDIR = 72, /* -device usb-redir */ - QEMU_CAPS_USB_HUB = 73, /* -device usb-hub */ -- QEMU_CAPS_NO_SHUTDOWN = 74, /* usable -no-shutdown */ - - QEMU_CAPS_LAST, /* this must always be the last item */ - }; -diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index 0adc56a..ee4b52b 100644 ---- a/src/qemu/qemu_command.c -+++ b/src/qemu/qemu_command.c -@@ -3574,7 +3574,7 @@ qemuBuildCommandLine(virConnectPtr conn, - * when QEMU stops. If we use no-shutdown, then we can - * watch for this event and do a soft/warm reboot. - */ -- if (monitor_json && qemuCapsGet(qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) -+ if (monitor_json) - virCommandAddArg(cmd, "-no-shutdown"); - - if (!(def->features & (1 << VIR_DOMAIN_FEATURE_ACPI))) -diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c -index 0d0bea2..f87af06 100644 ---- a/src/qemu/qemu_driver.c -+++ b/src/qemu/qemu_driver.c -@@ -1556,12 +1556,6 @@ static int qemuDomainReboot(virDomainPtr dom, unsigned int flags) { - priv = vm->privateData; - - if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) { -- if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) { -- qemuReportError(VIR_ERR_OPERATION_INVALID, "%s", -- _("Reboot is not supported with this QEMU binary")); -- goto cleanup; -- } -- - if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) - goto cleanup; - -diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c -index 933d556..f0b0879 100644 ---- a/tests/qemuhelptest.c -+++ b/tests/qemuhelptest.c -@@ -152,8 +152,7 @@ mymain(void) - QEMU_CAPS_KVM, - QEMU_CAPS_DRIVE_FORMAT, - QEMU_CAPS_MEM_PATH, -- QEMU_CAPS_TDF, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_TDF); - DO_TEST("kvm-83-rhel56", 9001, 1, 83, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -178,8 +177,7 @@ mymain(void) - QEMU_CAPS_TDF, - QEMU_CAPS_DRIVE_READONLY, - QEMU_CAPS_SMBIOS_TYPE, -- QEMU_CAPS_SPICE, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_SPICE); - DO_TEST("qemu-0.10.5", 10005, 0, 0, - QEMU_CAPS_KQEMU, - QEMU_CAPS_VNC_COLON, -@@ -198,8 +196,7 @@ mymain(void) - QEMU_CAPS_SDL, - QEMU_CAPS_RTC_TD_HACK, - QEMU_CAPS_NO_HPET, -- QEMU_CAPS_VGA_NONE, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_VGA_NONE); - DO_TEST("qemu-kvm-0.10.5", 10005, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -224,8 +221,7 @@ mymain(void) - QEMU_CAPS_NO_KVM_PIT, - QEMU_CAPS_TDF, - QEMU_CAPS_NESTING, -- QEMU_CAPS_VGA_NONE, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_VGA_NONE); - DO_TEST("kvm-86", 10050, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -250,8 +246,7 @@ mymain(void) - QEMU_CAPS_TDF, - QEMU_CAPS_NESTING, - QEMU_CAPS_SMBIOS_TYPE, -- QEMU_CAPS_VGA_NONE, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_VGA_NONE); - DO_TEST("qemu-kvm-0.11.0-rc2", 10092, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -281,8 +276,7 @@ mymain(void) - QEMU_CAPS_NESTING, - QEMU_CAPS_NAME_PROCESS, - QEMU_CAPS_SMBIOS_TYPE, -- QEMU_CAPS_VGA_NONE, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_VGA_NONE); - DO_TEST("qemu-0.12.1", 12001, 0, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -312,8 +306,7 @@ mymain(void) - QEMU_CAPS_SMBIOS_TYPE, - QEMU_CAPS_VGA_NONE, - QEMU_CAPS_MIGRATE_QEMU_FD, -- QEMU_CAPS_DRIVE_AIO, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_DRIVE_AIO); - DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -357,8 +350,7 @@ mymain(void) - QEMU_CAPS_DEVICE_SPICEVMC, - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_PIIX4_USB_UHCI, -- QEMU_CAPS_USB_HUB, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_USB_HUB); - DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -395,8 +387,7 @@ mymain(void) - QEMU_CAPS_SMBIOS_TYPE, - QEMU_CAPS_VGA_NONE, - QEMU_CAPS_MIGRATE_QEMU_FD, -- QEMU_CAPS_DRIVE_AIO, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_DRIVE_AIO); - DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -448,8 +439,7 @@ mymain(void) - QEMU_CAPS_PIIX4_USB_UHCI, - QEMU_CAPS_VT82C686B_USB_UHCI, - QEMU_CAPS_PCI_OHCI, -- QEMU_CAPS_USB_HUB, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_USB_HUB); - DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0, - QEMU_CAPS_VNC_COLON, - QEMU_CAPS_NO_REBOOT, -@@ -497,8 +487,7 @@ mymain(void) - QEMU_CAPS_VIRTIO_IOEVENTFD, - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_PIIX4_USB_UHCI, -- QEMU_CAPS_USB_HUB, -- QEMU_CAPS_NO_SHUTDOWN); -+ QEMU_CAPS_USB_HUB); - - return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; - } -diff --git a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args -index e04cdec..8d8e43e 100644 ---- a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args -+++ b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args -@@ -1,5 +1,5 @@ - LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ - pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,\ - id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,\ --id=monitor,mode=control -no-acpi -boot c -hda /dev/hda1 -usb -device \ -+id=monitor,mode=control -no-shutdown -no-acpi -boot c -hda /dev/hda1 -usb -device \ - virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -diff --git a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args b/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args -deleted file mode 100644 -index 1464d09..0000000 ---- a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args -+++ /dev/null -@@ -1,21 +0,0 @@ --LC_ALL=C \ --PATH=/bin \ --HOME=/home/test \ --USER=test \ --LOGNAME=test \ --/usr/bin/qemu \ ---S \ ---M pc \ ---m 214 \ ---smp 1 \ ---nographic \ ---nodefconfig \ ---nodefaults \ ---chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ ---mon chardev=charmonitor,id=monitor,mode=control \ ---no-shutdown \ ---no-acpi \ ---boot c \ ---hda /dev/hda1 \ ---usb \ ---device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -diff --git a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml b/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml -deleted file mode 100644 -index 1901715..0000000 ---- a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml -+++ /dev/null -@@ -1,24 +0,0 @@ -- -- encryptdisk -- 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 -- 219100 -- 219100 -- 1 -- -- hvm -- -- -- -- destroy -- restart -- destroy -- -- /usr/bin/qemu -- -- -- -- -- -- -- -- -diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c -index 1dc6a01..fcb20bb 100644 ---- a/tests/qemuxml2argvtest.c -+++ b/tests/qemuxml2argvtest.c -@@ -578,9 +578,6 @@ mymain(void) - json = true; - DO_TEST("monitor-json", false, QEMU_CAPS_DEVICE, - QEMU_CAPS_CHARDEV, QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_NODEFCONFIG); -- DO_TEST("no-shutdown", false, QEMU_CAPS_DEVICE, -- QEMU_CAPS_CHARDEV, QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_NODEFCONFIG, -- QEMU_CAPS_NO_SHUTDOWN); - json = false; - - free(driver.stateDir); diff --git a/install-apparmor-profiles.patch b/install-apparmor-profiles.patch index 54dfd22..6b2946e 100644 --- a/install-apparmor-profiles.patch +++ b/install-apparmor-profiles.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.9.4/examples/apparmor/Makefile.am +Index: libvirt-0.9.7/examples/apparmor/Makefile.am =================================================================== ---- libvirt-0.9.4.orig/examples/apparmor/Makefile.am -+++ libvirt-0.9.4/examples/apparmor/Makefile.am +--- libvirt-0.9.7.orig/examples/apparmor/Makefile.am ++++ libvirt-0.9.7/examples/apparmor/Makefile.am @@ -1,8 +1,39 @@ ## Copyright (C) 2005-2011 Red Hat, Inc. ## See COPYING.LIB for the License of this software @@ -47,10 +47,10 @@ Index: libvirt-0.9.4/examples/apparmor/Makefile.am + rm -f $(DESTDIR)$(sysconfdir)/apparmor.d/libvirt/TEMPLATE + +endif -Index: libvirt-0.9.4/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in +Index: libvirt-0.9.7/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in =================================================================== --- /dev/null -+++ libvirt-0.9.4/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in ++++ libvirt-0.9.7/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in @@ -0,0 +1,40 @@ +# Last Modified: Fri Aug 19 11:21:48 2011 +#include @@ -92,9 +92,9 @@ Index: libvirt-0.9.4/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in + /var/lib/kvm/images/ r, + /var/lib/kvm/images/** r, +} -Index: libvirt-0.9.4/examples/apparmor/usr.lib.libvirt.virt-aa-helper +Index: libvirt-0.9.7/examples/apparmor/usr.lib.libvirt.virt-aa-helper =================================================================== ---- libvirt-0.9.4.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper +--- libvirt-0.9.7.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper +++ /dev/null @@ -1,38 +0,0 @@ -# Last Modified: Mon Apr 5 15:10:27 2010 @@ -135,9 +135,9 @@ Index: libvirt-0.9.4/examples/apparmor/usr.lib.libvirt.virt-aa-helper - /var/lib/libvirt/images/ r, - /var/lib/libvirt/images/** r, -} -Index: libvirt-0.9.4/examples/apparmor/usr.sbin.libvirtd +Index: libvirt-0.9.7/examples/apparmor/usr.sbin.libvirtd =================================================================== ---- libvirt-0.9.4.orig/examples/apparmor/usr.sbin.libvirtd +--- libvirt-0.9.7.orig/examples/apparmor/usr.sbin.libvirtd +++ /dev/null @@ -1,52 +0,0 @@ -# Last Modified: Mon Apr 5 15:03:58 2010 @@ -192,11 +192,11 @@ Index: libvirt-0.9.4/examples/apparmor/usr.sbin.libvirtd - change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*, - -} -Index: libvirt-0.9.4/examples/apparmor/usr.sbin.libvirtd.in +Index: libvirt-0.9.7/examples/apparmor/usr.sbin.libvirtd.in =================================================================== --- /dev/null -+++ libvirt-0.9.4/examples/apparmor/usr.sbin.libvirtd.in -@@ -0,0 +1,52 @@ ++++ libvirt-0.9.7/examples/apparmor/usr.sbin.libvirtd.in +@@ -0,0 +1,54 @@ +# Last Modified: Fri Aug 19 11:20:36 2011 +#include +@{LIBVIRT}="libvirt" @@ -244,15 +244,17 @@ Index: libvirt-0.9.4/examples/apparmor/usr.sbin.libvirtd.in + audit deny /sys/kernel/security/apparmor/.* rwxl, + /sys/kernel/security/apparmor/profiles r, + @libdir@/libvirt/* Pxr, ++ @libdir@/libvirt/libvirt_parthelper Ux, ++ @libdir@/libvirt/libvirt_iohelper Ux, + + # allow changing to our UUID-based named profiles + change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*, + +} -Index: libvirt-0.9.4/examples/apparmor/libvirt-qemu +Index: libvirt-0.9.7/examples/apparmor/libvirt-qemu =================================================================== ---- libvirt-0.9.4.orig/examples/apparmor/libvirt-qemu -+++ libvirt-0.9.4/examples/apparmor/libvirt-qemu +--- libvirt-0.9.7.orig/examples/apparmor/libvirt-qemu ++++ libvirt-0.9.7/examples/apparmor/libvirt-qemu @@ -52,6 +52,7 @@ # access to firmware's etc /usr/share/kvm/** r, diff --git a/libvirt-0.9.6.tar.bz2 b/libvirt-0.9.6.tar.bz2 deleted file mode 100644 index 5df1b94..0000000 --- a/libvirt-0.9.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44196cc4445f141b5f7f5f45b16ac476e7a2e0c994248714da6818e277f90495 -size 12058512 diff --git a/libvirt-0.9.7.tar.bz2 b/libvirt-0.9.7.tar.bz2 new file mode 100644 index 0000000..0588b2b --- /dev/null +++ b/libvirt-0.9.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc541b104a7378ecf00d140a1eb3b582e34eed28faed07ca5936caa98ecb82dd +size 12461024 diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 4c9ff85..613f7fb 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.9.6/configure.ac +Index: libvirt-0.9.7/configure.ac =================================================================== ---- libvirt-0.9.6.orig/configure.ac -+++ libvirt-0.9.6/configure.ac +--- libvirt-0.9.7.orig/configure.ac ++++ libvirt-0.9.7/configure.ac @@ -63,6 +63,7 @@ AVAHI_REQUIRED="0.6.0" POLKIT_REQUIRED="0.6" PARTED_REQUIRED="1.8.0" @@ -10,7 +10,7 @@ Index: libvirt-0.9.6/configure.ac UDEV_REQUIRED=145 PCIACCESS_REQUIRED=0.10.0 XMLRPC_REQUIRED=1.14.0 -@@ -1593,6 +1594,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit +@@ -1591,6 +1592,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit AC_SUBST([NETCF_CFLAGS]) AC_SUBST([NETCF_LIBS]) @@ -49,7 +49,7 @@ Index: libvirt-0.9.6/configure.ac AC_ARG_WITH([secrets], AC_HELP_STRING([--with-secrets], [with local secrets management driver @<:@default=yes@:>@]),[],[with_secrets=yes]) -@@ -2517,6 +2550,7 @@ AC_MSG_NOTICE([ Remote: $with_remote]) +@@ -2515,6 +2548,7 @@ AC_MSG_NOTICE([ Remote: $with_remote]) AC_MSG_NOTICE([ Network: $with_network]) AC_MSG_NOTICE([Libvirtd: $with_libvirtd]) AC_MSG_NOTICE([ netcf: $with_netcf]) @@ -57,7 +57,7 @@ Index: libvirt-0.9.6/configure.ac AC_MSG_NOTICE([ macvtap: $with_macvtap]) AC_MSG_NOTICE([virtport: $with_virtualport]) AC_MSG_NOTICE([]) -@@ -2648,6 +2682,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $ +@@ -2646,6 +2680,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $ else AC_MSG_NOTICE([ netcf: no]) fi @@ -69,11 +69,11 @@ Index: libvirt-0.9.6/configure.ac if test "$with_qemu" = "yes" && test "$LIBPCAP_FOUND" != "no"; then AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS]) else -Index: libvirt-0.9.6/daemon/Makefile.am +Index: libvirt-0.9.7/daemon/Makefile.am =================================================================== ---- libvirt-0.9.6.orig/daemon/Makefile.am -+++ libvirt-0.9.6/daemon/Makefile.am -@@ -141,6 +141,10 @@ endif +--- libvirt-0.9.7.orig/daemon/Makefile.am ++++ libvirt-0.9.7/daemon/Makefile.am +@@ -143,6 +143,10 @@ endif if WITH_NETCF libvirtd_LDADD += ../src/libvirt_driver_interface.la @@ -84,10 +84,10 @@ Index: libvirt-0.9.6/daemon/Makefile.am endif if WITH_NODE_DEVICES -Index: libvirt-0.9.6/daemon/libvirtd.c +Index: libvirt-0.9.7/daemon/libvirtd.c =================================================================== ---- libvirt-0.9.6.orig/daemon/libvirtd.c -+++ libvirt-0.9.6/daemon/libvirtd.c +--- libvirt-0.9.7.orig/daemon/libvirtd.c ++++ libvirt-0.9.7/daemon/libvirtd.c @@ -75,6 +75,10 @@ # endif # ifdef WITH_NETCF @@ -99,7 +99,7 @@ Index: libvirt-0.9.6/daemon/libvirtd.c # endif # ifdef WITH_STORAGE_DIR # include "storage/storage_driver.h" -@@ -393,6 +397,10 @@ static void daemonInitialize(void) +@@ -389,6 +393,10 @@ static void daemonInitialize(void) # endif # ifdef WITH_NETCF interfaceRegister(); @@ -110,11 +110,11 @@ Index: libvirt-0.9.6/daemon/libvirtd.c # endif # ifdef WITH_STORAGE_DIR storageRegister(); -Index: libvirt-0.9.6/src/Makefile.am +Index: libvirt-0.9.7/src/Makefile.am =================================================================== ---- libvirt-0.9.6.orig/src/Makefile.am -+++ libvirt-0.9.6/src/Makefile.am -@@ -923,6 +923,24 @@ libvirt_driver_interface_la_LIBADD += .. +--- libvirt-0.9.7.orig/src/Makefile.am ++++ libvirt-0.9.7/src/Makefile.am +@@ -941,6 +941,24 @@ libvirt_driver_interface_la_LIBADD += .. libvirt_driver_interface_la_LDFLAGS += -module -avoid-version endif libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES) @@ -139,10 +139,10 @@ Index: libvirt-0.9.6/src/Makefile.am endif if WITH_SECRETS -Index: libvirt-0.9.6/src/interface/netcf_driver.c +Index: libvirt-0.9.7/src/interface/netcf_driver.c =================================================================== ---- libvirt-0.9.6.orig/src/interface/netcf_driver.c -+++ libvirt-0.9.6/src/interface/netcf_driver.c +--- libvirt-0.9.7.orig/src/interface/netcf_driver.c ++++ libvirt-0.9.7/src/interface/netcf_driver.c @@ -23,7 +23,13 @@ #include @@ -208,11 +208,11 @@ Index: libvirt-0.9.6/src/interface/netcf_driver.c /* open netcf */ if (ncf_init(&driverState->netcf, NULL) != 0) { -Index: libvirt-0.9.6/tools/virsh.c +Index: libvirt-0.9.7/tools/virsh.c =================================================================== ---- libvirt-0.9.6.orig/tools/virsh.c -+++ libvirt-0.9.6/tools/virsh.c -@@ -16011,6 +16011,10 @@ vshShowVersion(vshControl *ctl ATTRIBUTE +--- libvirt-0.9.7.orig/tools/virsh.c ++++ libvirt-0.9.7/tools/virsh.c +@@ -16506,6 +16506,10 @@ vshShowVersion(vshControl *ctl ATTRIBUTE #endif #ifdef WITH_NETCF vshPrint(ctl, " Netcf"); diff --git a/libvirt.changes b/libvirt.changes index 46ce41f..f6f52ac 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Mon Nov 28 14:57:04 MST 2011 - jfehlig@suse.com + +- Handle empty strings in s-expression returned by xend + a495365d-sexpr-empty-str.patch + bnc#731344 +- Allow libvirtd to access libvirt_{io,part}helper when confined + by apparmor + Update install-apparmor-profiles.patch + bnc#730435 + +------------------------------------------------------------------- +Mon Nov 21 12:34:55 MST 2011 - jfehlig@suse.com + +- Accommodate Xen domctl version 8 + xen-domctl-ver8.patch + +------------------------------------------------------------------- +Sun Nov 20 06:25:30 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Tue Nov 15 15:05:36 MST 2011 - jfehlig@suse.com + +- Fix build when using older PolicyKit + d47ab3fe-polkit0.patch + +------------------------------------------------------------------- +Wed Nov 9 18:52:18 MST 2011 - jfehlig@suse.com + +- Update to libvirt 0.9.7 + - esx: support vSphere 5.x + - vbox: support for VirtualBox 4.1 + - Introduce the virDomainOpenGraphics API + - Add AHCI support to qemu driver + - snapshot: many improvements and 2 new APIs + - api: Add public api for 'reset' + ------------------------------------------------------------------- Tue Oct 18 15:20:11 MDT 2011 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index b1fe853..a810254 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -44,7 +44,7 @@ %define with_libxl 0%{!?_without_libxl:%{server_drivers}} %define with_vmware 0%{!?_without_vmware:%{server_drivers}} -# Then the hypervisor drivers that talk a native remote protocol +# Then the hypervisor drivers that talk via a native remote protocol %define with_phyp 0%{!?_without_phyp:0} %define with_esx 0%{!?_without_esx:1} %define with_xenapi 0%{!?_without_xenapi:1} @@ -102,7 +102,8 @@ %define with_numactl 0 %endif -# SLES doesn't contain OpenVZ, VBox, UML, ESX, VMWare, or Citrix XenAPI +# SLES doesn't contain OpenVZ, VBox, UML, ESX, VMWare, Citrix XenAPI, +# or hyper-v %if 0%{?sles_version} %define with_openvz 0 %define with_vbox 0 @@ -110,6 +111,7 @@ %define with_esx 0 %define with_vmware 0 %define with_xenapi 0 +%define with_hyperv 0 %endif # Enable phyp driver for IBM Power systems @@ -198,7 +200,7 @@ BuildRequires: libgnutls-devel BuildRequires: libgcrypt-devel BuildRequires: bridge-utils BuildRequires: fdupes -BuildRequires: pkg-config +BuildRequires: libtool pkg-config BuildRequires: python-xml # Only for directory ownership: BuildRequires: gtk-doc @@ -300,13 +302,17 @@ BuildRequires: device-mapper-devel %if %{with_audit} BuildRequires: audit-devel %endif +%if %{with_dtrace} +# we need /usr/sbin/dtrace +BuildRequires: systemtap-sdt-devel +%endif Name: libvirt Url: http://libvirt.org/ License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.9.6 +Version: 0.9.7 Release: 1 Summary: A C toolkit to interact with the virtualization capabilities of Linux Conflicts: kvm < 0.14.1 @@ -374,15 +380,13 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches -# This patch reverts commit f84aedad, which is not needed since -# the openSUSE kvm package is patched with qemu 'no-shutdown' fix -Patch0: f84aedad-revert.patch -Patch1: c1bc3d89-qemu-add-ahci.patch +Patch0: d47ab3fe-polkit0.patch +Patch1: a495365d-sexpr-empty-str.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch Patch102: xen-pv-cdrom.patch -Patch103: xend-disk-order.patch +Patch103: xen-domctl-ver8.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: use-init-script-redhat.patch @@ -608,6 +612,9 @@ Authors: %if ! %{with_audit} %define _without_audit --without-audit %endif +%if ! %{with_dtrace} +%define _without_dtrace --without-dtrace +%endif %if ! %{with_network} %define _without_network --without-network %endif @@ -654,6 +661,7 @@ export CFLAGS="$RPM_OPT_FLAGS" %{?_without_macvtap} \ %{?_without_polkit} \ %{?_without_audit} \ + %{?_without_dtrace} \ %{?_without_network} \ %{?_without_sasl} \ %{?_without_python} \ @@ -807,6 +815,10 @@ fi %{_sbindir}/rclibvirtd %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%if %{with_dtrace} +%{_datadir}/systemtap/tapset/libvirt_probes.stp +%{_datadir}/systemtap/tapset/libvirt_functions.stp +%endif %dir %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ @@ -869,6 +881,7 @@ fi %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* %doc %{_mandir}/man1/virt-pki-validate.1* +%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf %{_bindir}/virsh %{_bindir}/virt-xml-validate %{_bindir}/virt-pki-validate diff --git a/use-init-script-redhat.patch b/use-init-script-redhat.patch index 07fdcbd..04ae33c 100644 --- a/use-init-script-redhat.patch +++ b/use-init-script-redhat.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.9.4/tools/Makefile.am +Index: libvirt-0.9.7/tools/Makefile.am =================================================================== ---- libvirt-0.9.4.orig/tools/Makefile.am -+++ libvirt-0.9.4/tools/Makefile.am -@@ -152,16 +152,17 @@ uninstall-local: uninstall-init +--- libvirt-0.9.7.orig/tools/Makefile.am ++++ libvirt-0.9.7/tools/Makefile.am +@@ -155,16 +155,17 @@ uninstall-local: uninstall-init if LIBVIRT_INIT_SCRIPT_RED_HAT install-init: libvirt-guests.init @@ -26,10 +26,10 @@ Index: libvirt-0.9.4/tools/Makefile.am BUILT_SOURCES += libvirt-guests.init -Index: libvirt-0.9.4/tools/libvirt-guests.sysconf +Index: libvirt-0.9.7/tools/libvirt-guests.sysconf =================================================================== ---- libvirt-0.9.4.orig/tools/libvirt-guests.sysconf -+++ libvirt-0.9.4/tools/libvirt-guests.sysconf +--- libvirt-0.9.7.orig/tools/libvirt-guests.sysconf ++++ libvirt-0.9.7/tools/libvirt-guests.sysconf @@ -1,18 +1,28 @@ +## Path: System/Virtualization/libvirt + @@ -80,10 +80,10 @@ Index: libvirt-0.9.4/tools/libvirt-guests.sysconf # If non-zero, try to bypass the file system cache when saving and # restoring guests, even though this may give slower operation for # some file systems. -Index: libvirt-0.9.4/tools/libvirt-guests.init.sh +Index: libvirt-0.9.7/tools/libvirt-guests.init.sh =================================================================== ---- libvirt-0.9.4.orig/tools/libvirt-guests.init.sh -+++ libvirt-0.9.4/tools/libvirt-guests.init.sh +--- libvirt-0.9.7.orig/tools/libvirt-guests.init.sh ++++ libvirt-0.9.7/tools/libvirt-guests.init.sh @@ -4,10 +4,10 @@ # ### BEGIN INIT INFO @@ -226,26 +226,30 @@ Index: libvirt-0.9.4/tools/libvirt-guests.init.sh esac -exit $RETVAL +rc_exit -Index: libvirt-0.9.4/daemon/Makefile.am +Index: libvirt-0.9.7/daemon/Makefile.am =================================================================== ---- libvirt-0.9.4.orig/daemon/Makefile.am -+++ libvirt-0.9.4/daemon/Makefile.am -@@ -252,16 +252,12 @@ install-logrotate: $(LOGROTATE_CONFS) +--- libvirt-0.9.7.orig/daemon/Makefile.am ++++ libvirt-0.9.7/daemon/Makefile.am +@@ -236,20 +236,12 @@ install-logrotate: $(LOGROTATE_CONFS) if LIBVIRT_INIT_SCRIPT_RED_HAT install-init: libvirtd.init -- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d +- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d \ +- $(DESTDIR)$(sysconfdir)/sysconfig \ +- $(DESTDIR)$(sysconfdir)/sysctl.d - $(INSTALL_SCRIPT) libvirtd.init \ - $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd -- mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig + mkdir -p $(DESTDIR)$(localstatedir)/adm/fillup-templates $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \ - $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd +- $(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \ +- $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd + $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd uninstall-init: - rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \ -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd \ +- $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd + rm -f $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd BUILT_SOURCES += libvirtd.init diff --git a/xen-domctl-ver8.patch b/xen-domctl-ver8.patch new file mode 100644 index 0000000..e98a2ab --- /dev/null +++ b/xen-domctl-ver8.patch @@ -0,0 +1,294 @@ +Index: libvirt-0.9.7/src/xen/xen_hypervisor.c +=================================================================== +--- libvirt-0.9.7.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.9.7/src/xen/xen_hypervisor.c +@@ -242,12 +242,30 @@ struct xen_v2d7_getdomaininfo { + }; + typedef struct xen_v2d7_getdomaininfo xen_v2d7_getdomaininfo; + ++struct xen_v2d8_getdomaininfo { ++ domid_t domain; /* the domain number */ ++ uint32_t flags; /* flags, see before */ ++ uint64_t tot_pages ALIGN_64; /* total number of pages used */ ++ uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ ++ uint64_t shr_pages ALIGN_64; /* number of shared pages */ ++ uint64_t paged_pages ALIGN_64; /* number of paged pages */ ++ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ ++ uint64_t cpu_time ALIGN_64; /* CPU time used */ ++ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ ++ uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ ++ uint32_t ssidref; ++ xen_domain_handle_t handle; ++ uint32_t cpupool; ++}; ++typedef struct xen_v2d8_getdomaininfo xen_v2d8_getdomaininfo; ++ + union xen_getdomaininfo { + struct xen_v0_getdomaininfo v0; + struct xen_v2_getdomaininfo v2; + struct xen_v2d5_getdomaininfo v2d5; + struct xen_v2d6_getdomaininfo v2d6; + struct xen_v2d7_getdomaininfo v2d7; ++ struct xen_v2d8_getdomaininfo v2d8; + }; + typedef union xen_getdomaininfo xen_getdomaininfo; + +@@ -257,6 +275,7 @@ union xen_getdomaininfolist { + struct xen_v2d5_getdomaininfo *v2d5; + struct xen_v2d6_getdomaininfo *v2d6; + struct xen_v2d7_getdomaininfo *v2d7; ++ struct xen_v2d8_getdomaininfo *v2d8; + }; + typedef union xen_getdomaininfolist xen_getdomaininfolist; + +@@ -294,179 +313,211 @@ typedef struct xen_v2s5_availheap xen_v + #define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \ + (hv_versions.hypervisor < 2 ? \ + (VIR_ALLOC_N(domlist.v0, (size)) == 0) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ (VIR_ALLOC_N(domlist.v2d8, (size)) == 0) : \ + (hv_versions.dom_interface >= 7 ? \ + (VIR_ALLOC_N(domlist.v2d7, (size)) == 0) : \ + (hv_versions.dom_interface == 6 ? \ + (VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \ + (hv_versions.dom_interface == 5 ? \ + (VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \ +- (VIR_ALLOC_N(domlist.v2, (size)) == 0))))) ++ (VIR_ALLOC_N(domlist.v2, (size)) == 0)))))) + + #define XEN_GETDOMAININFOLIST_FREE(domlist) \ + (hv_versions.hypervisor < 2 ? \ + VIR_FREE(domlist.v0) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ VIR_FREE(domlist.v2d8) : \ + (hv_versions.dom_interface >= 7 ? \ + VIR_FREE(domlist.v2d7) : \ + (hv_versions.dom_interface == 6 ? \ + VIR_FREE(domlist.v2d6) : \ + (hv_versions.dom_interface == 5 ? \ + VIR_FREE(domlist.v2d5) : \ +- VIR_FREE(domlist.v2))))) ++ VIR_FREE(domlist.v2)))))) + + #define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \ + (hv_versions.hypervisor < 2 ? \ + memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ memset(domlist.v2d8, 0, sizeof(*domlist.v2d8) * size) : \ + (hv_versions.dom_interface >= 7 ? \ + memset(domlist.v2d7, 0, sizeof(*domlist.v2d7) * size) : \ + (hv_versions.dom_interface == 6 ? \ + memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \ + (hv_versions.dom_interface == 5 ? \ + memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \ +- memset(domlist.v2, 0, sizeof(*domlist.v2) * size))))) ++ memset(domlist.v2, 0, sizeof(*domlist.v2) * size)))))) + + #define XEN_GETDOMAININFOLIST_DOMAIN(domlist, n) \ + (hv_versions.hypervisor < 2 ? \ + domlist.v0[n].domain : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ domlist.v2d8[n].domain : \ + (hv_versions.dom_interface >= 7 ? \ + domlist.v2d7[n].domain : \ + (hv_versions.dom_interface == 6 ? \ + domlist.v2d6[n].domain : \ + (hv_versions.dom_interface == 5 ? \ + domlist.v2d5[n].domain : \ +- domlist.v2[n].domain)))) ++ domlist.v2[n].domain))))) + + #define XEN_GETDOMAININFOLIST_UUID(domlist, n) \ + (hv_versions.hypervisor < 2 ? \ + domlist.v0[n].handle : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ domlist.v2d8[n].handle : \ + (hv_versions.dom_interface >= 7 ? \ + domlist.v2d7[n].handle : \ + (hv_versions.dom_interface == 6 ? \ + domlist.v2d6[n].handle : \ + (hv_versions.dom_interface == 5 ? \ + domlist.v2d5[n].handle : \ +- domlist.v2[n].handle)))) ++ domlist.v2[n].handle))))) + + #define XEN_GETDOMAININFOLIST_DATA(domlist) \ + (hv_versions.hypervisor < 2 ? \ + (void*)(domlist->v0) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ (void*)(domlist->v2d8) : \ + (hv_versions.dom_interface >= 7 ? \ + (void*)(domlist->v2d7) : \ + (hv_versions.dom_interface == 6 ? \ + (void*)(domlist->v2d6) : \ + (hv_versions.dom_interface == 5 ? \ + (void*)(domlist->v2d5) : \ +- (void*)(domlist->v2))))) ++ (void*)(domlist->v2)))))) + + #define XEN_GETDOMAININFO_SIZE \ + (hv_versions.hypervisor < 2 ? \ + sizeof(xen_v0_getdomaininfo) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ sizeof(xen_v2d8_getdomaininfo) : \ + (hv_versions.dom_interface >= 7 ? \ + sizeof(xen_v2d7_getdomaininfo) : \ + (hv_versions.dom_interface == 6 ? \ + sizeof(xen_v2d6_getdomaininfo) : \ + (hv_versions.dom_interface == 5 ? \ + sizeof(xen_v2d5_getdomaininfo) : \ +- sizeof(xen_v2_getdomaininfo))))) ++ sizeof(xen_v2_getdomaininfo)))))) + + #define XEN_GETDOMAININFO_CLEAR(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ memset(&(dominfo.v2d8), 0, sizeof(xen_v2d8_getdomaininfo)) : \ + (hv_versions.dom_interface >= 7 ? \ + memset(&(dominfo.v2d7), 0, sizeof(xen_v2d7_getdomaininfo)) : \ + (hv_versions.dom_interface == 6 ? \ + memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \ + (hv_versions.dom_interface == 5 ? \ + memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \ +- memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)))))) ++ memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo))))))) + + #define XEN_GETDOMAININFO_DOMAIN(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.domain : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.domain : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.domain : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.domain : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.domain : \ +- dominfo.v2.domain)))) ++ dominfo.v2.domain))))) + + #define XEN_GETDOMAININFO_CPUTIME(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.cpu_time : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.cpu_time : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.cpu_time : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.cpu_time : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.cpu_time : \ +- dominfo.v2.cpu_time)))) ++ dominfo.v2.cpu_time))))) + + + #define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.nr_online_vcpus : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.nr_online_vcpus : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.nr_online_vcpus : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.nr_online_vcpus : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.nr_online_vcpus : \ +- dominfo.v2.nr_online_vcpus)))) ++ dominfo.v2.nr_online_vcpus))))) + + #define XEN_GETDOMAININFO_MAXCPUID(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.max_vcpu_id : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.max_vcpu_id : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.max_vcpu_id : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.max_vcpu_id : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.max_vcpu_id : \ +- dominfo.v2.max_vcpu_id)))) ++ dominfo.v2.max_vcpu_id))))) + + #define XEN_GETDOMAININFO_FLAGS(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.flags : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.flags : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.flags : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.flags : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.flags : \ +- dominfo.v2.flags)))) ++ dominfo.v2.flags))))) + + #define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.tot_pages : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.tot_pages : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.tot_pages : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.tot_pages : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.tot_pages : \ +- dominfo.v2.tot_pages)))) ++ dominfo.v2.tot_pages))))) + + #define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.max_pages : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.max_pages : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.max_pages : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.max_pages : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.max_pages : \ +- dominfo.v2.max_pages)))) ++ dominfo.v2.max_pages))))) + + #define XEN_GETDOMAININFO_UUID(dominfo) \ + (hv_versions.hypervisor < 2 ? \ + dominfo.v0.handle : \ ++ (hv_versions.dom_interface >= 8 ? \ ++ dominfo.v2d8.handle : \ + (hv_versions.dom_interface >= 7 ? \ + dominfo.v2d7.handle : \ + (hv_versions.dom_interface == 6 ? \ + dominfo.v2d6.handle : \ + (hv_versions.dom_interface == 5 ? \ + dominfo.v2d5.handle : \ +- dominfo.v2.handle)))) ++ dominfo.v2.handle))))) + + + static int +@@ -2141,12 +2192,20 @@ xenHypervisorInit(struct xenHypervisorVe + /* Xen 4.1 + * sysctl version 8 -> xen-unstable c/s 21118:28e5409e3fb3 + * domctl version 7 -> xen-unstable c/s 21212:de94884a669c ++ * domctl version 8 -> xen-unstable c/s 23874:651aed73b39c + */ + hv_versions.sys_interface = 8; /* XEN_SYSCTL_INTERFACE_VERSION */ + if (virXen_getdomaininfo(fd, 0, &info) == 1) { + hv_versions.dom_interface = 7; /* XEN_DOMCTL_INTERFACE_VERSION */ +- VIR_DEBUG("Using hypervisor call v2, sys ver8 dom ver7\n"); +- goto done; ++ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ ++ VIR_DEBUG("Using hypervisor call v2, sys ver8 dom ver7"); ++ goto done; ++ } ++ hv_versions.dom_interface = 8; /* XEN_DOMCTL_INTERFACE_VERSION */ ++ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ ++ VIR_DEBUG("Using hypervisor call v2, sys ver8 dom ver8"); ++ goto done; ++ } + } + + hv_versions.hypervisor = 1; diff --git a/xen-name-for-devid.patch b/xen-name-for-devid.patch index 4453a30..d38aebb 100644 --- a/xen-name-for-devid.patch +++ b/xen-name-for-devid.patch @@ -13,10 +13,10 @@ Date: Wed Jan 27 16:11:41 2010 -0700 This approach allows removing a disk when domain is inactive. We obviously can't search xenstore when the domain is inactive. -Index: libvirt-0.9.6/src/xen/xend_internal.c +Index: libvirt-0.9.7/src/xen/xend_internal.c =================================================================== ---- libvirt-0.9.6.orig/src/xen/xend_internal.c -+++ libvirt-0.9.6/src/xen/xend_internal.c +--- libvirt-0.9.7.orig/src/xen/xend_internal.c ++++ libvirt-0.9.7/src/xen/xend_internal.c @@ -60,6 +60,7 @@ static int @@ -52,7 +52,7 @@ Index: libvirt-0.9.6/src/xen/xend_internal.c goto cleanup; if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) { -@@ -3915,6 +3916,7 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -3913,6 +3914,7 @@ struct xenUnifiedDriver xenDaemonDriver */ static int virDomainXMLDevID(virDomainPtr domain, @@ -60,7 +60,7 @@ Index: libvirt-0.9.6/src/xen/xend_internal.c virDomainDeviceDefPtr dev, char *class, char *ref, -@@ -3923,8 +3925,12 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -3921,8 +3923,12 @@ virDomainXMLDevID(virDomainPtr domain, xenUnifiedPrivatePtr priv = domain->conn->privateData; char *xref; char *tmp; @@ -73,7 +73,7 @@ Index: libvirt-0.9.6/src/xen/xend_internal.c if (dev->data.disk->driverName && STREQ(dev->data.disk->driverName, "tap")) strcpy(class, "tap"); -@@ -3934,19 +3940,21 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -3932,19 +3938,21 @@ virDomainXMLDevID(virDomainPtr domain, else strcpy(class, "vbd"); diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 14cd7cb..572b781 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.9.1/src/xenxs/xen_sxpr.c +Index: libvirt-0.9.7/src/xenxs/xen_sxpr.c =================================================================== ---- libvirt-0.9.1.orig/src/xenxs/xen_sxpr.c -+++ libvirt-0.9.1/src/xenxs/xen_sxpr.c -@@ -324,7 +324,7 @@ error: +--- libvirt-0.9.7.orig/src/xenxs/xen_sxpr.c ++++ libvirt-0.9.7/src/xenxs/xen_sxpr.c +@@ -329,7 +329,7 @@ error: static int xenParseSxprDisks(virDomainDefPtr def, const struct sexpr *root, @@ -11,7 +11,7 @@ Index: libvirt-0.9.1/src/xenxs/xen_sxpr.c int xendConfigVersion) { const struct sexpr *cur, *node; -@@ -371,7 +371,6 @@ xenParseSxprDisks(virDomainDefPtr def, +@@ -380,7 +380,6 @@ xenParseSxprDisks(virDomainDefPtr def, /* There is a case without the uname to the CD-ROM device */ offset = strchr(dst, ':'); if (!offset || diff --git a/xend-disk-order.patch b/xend-disk-order.patch deleted file mode 100644 index 9e59697..0000000 --- a/xend-disk-order.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: libvirt-0.9.1/src/xenxs/xen_sxpr.c -=================================================================== ---- libvirt-0.9.1.orig/src/xenxs/xen_sxpr.c -+++ libvirt-0.9.1/src/xenxs/xen_sxpr.c -@@ -342,20 +342,24 @@ xenParseSxprDisks(virDomainDefPtr def, - const char *src = NULL; - const char *dst = NULL; - const char *mode = NULL; -+ int bootable; - - /* Again dealing with (vbd...) vs (tap ...) differences */ - if (sexpr_lookup(node, "device/vbd")) { - src = sexpr_node(node, "device/vbd/uname"); - dst = sexpr_node(node, "device/vbd/dev"); - mode = sexpr_node(node, "device/vbd/mode"); -+ bootable = sexpr_int(node, "device/vbd/bootable"); - } else if (sexpr_lookup(node, "device/tap2")) { - src = sexpr_node(node, "device/tap2/uname"); - dst = sexpr_node(node, "device/tap2/dev"); - mode = sexpr_node(node, "device/tap2/mode"); -+ bootable = sexpr_int(node, "device/tap2/bootable"); - } else { - src = sexpr_node(node, "device/tap/uname"); - dst = sexpr_node(node, "device/tap/dev"); - mode = sexpr_node(node, "device/tap/mode"); -+ bootable = sexpr_int(node, "device/tap/bootable"); - } - - if (VIR_ALLOC(disk) < 0) -@@ -480,7 +484,13 @@ xenParseSxprDisks(virDomainDefPtr def, - if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0) - goto no_memory; - -- def->disks[def->ndisks++] = disk; -+ if (bootable == 1 && def->ndisks > 0) { -+ memmove(def->disks + 1, def->disks, sizeof(def->disks) * def->ndisks); -+ def->disks[0] = disk; -+ def->ndisks++; -+ } else -+ def->disks[def->ndisks++] = disk; -+ - disk = NULL; - } - }