diff --git a/0e0c1a74-domid-fix.patch b/0e0c1a74-domid-fix.patch new file mode 100644 index 0000000..c083892 --- /dev/null +++ b/0e0c1a74-domid-fix.patch @@ -0,0 +1,272 @@ +commit 0e0c1a7489a6a04c5060d0fe7fad6337ed98ec01 +Author: Stefan Bader +Date: Thu Mar 27 17:55:02 2014 +0100 + + libxl: Use id from virDomainObj inside the driver + + There is a domain id in the virDomain structure as well as in the + virDomainObj structure. While the former can become stale the latter + is kept up to date. So it is safer to always (virDomainObjPtr)->def->id + internally. + + This will fix issues seen when managing Xen guests through libvirt from + virt-manager (not being able to get domain info after define or reboot). + This was caused both though libxlDomainGetInfo() only but there were + a lot of places that might potentially cause issues, too. + + Signed-off-by: Stefan Bader + +Index: libvirt-1.2.3/src/libxl/libxl_driver.c +=================================================================== +--- libvirt-1.2.3.orig/src/libxl/libxl_driver.c ++++ libvirt-1.2.3/src/libxl/libxl_driver.c +@@ -770,10 +770,10 @@ libxlDomainSuspend(virDomainPtr dom) + priv = vm->privateData; + + if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) { +- if (libxl_domain_pause(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_pause(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to suspend domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + goto endjob; + } + +@@ -829,10 +829,10 @@ libxlDomainResume(virDomainPtr dom) + priv = vm->privateData; + + if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) { +- if (libxl_domain_unpause(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_unpause(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to resume domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + goto endjob; + } + +@@ -883,10 +883,10 @@ libxlDomainShutdownFlags(virDomainPtr do + } + + priv = vm->privateData; +- if (libxl_domain_shutdown(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_shutdown(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to shutdown domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + goto cleanup; + } + +@@ -930,10 +930,10 @@ libxlDomainReboot(virDomainPtr dom, unsi + } + + priv = vm->privateData; +- if (libxl_domain_reboot(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_reboot(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to reboot domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + goto cleanup; + } + ret = 0; +@@ -974,7 +974,7 @@ libxlDomainDestroyFlags(virDomainPtr dom + priv = vm->privateData; + if (libxl_domain_destroy(priv->ctx, vm->def->id, NULL) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, +- _("Failed to destroy domain '%d'"), dom->id); ++ _("Failed to destroy domain '%d'"), vm->def->id); + goto cleanup; + } + +@@ -1105,10 +1105,10 @@ libxlDomainSetMemoryFlags(virDomainPtr d + + if (flags & VIR_DOMAIN_MEM_LIVE) { + priv = vm->privateData; +- if (libxl_domain_setmaxmem(priv->ctx, dom->id, newmem) < 0) { ++ if (libxl_domain_setmaxmem(priv->ctx, vm->def->id, newmem) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to set maximum memory for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + } +@@ -1138,13 +1138,13 @@ libxlDomainSetMemoryFlags(virDomainPtr d + priv = vm->privateData; + /* Unlock virDomainObj while ballooning memory */ + virObjectUnlock(vm); +- res = libxl_set_memory_target(priv->ctx, dom->id, newmem, 0, ++ res = libxl_set_memory_target(priv->ctx, vm->def->id, newmem, 0, + /* force */ 1); + virObjectLock(vm); + if (res < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to set memory for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + } +@@ -1202,9 +1202,10 @@ libxlDomainGetInfo(virDomainPtr dom, vir + info->memory = vm->def->mem.cur_balloon; + info->maxMem = vm->def->mem.max_balloon; + } else { +- if (libxl_domain_info(priv->ctx, &d_info, dom->id) != 0) { ++ if (libxl_domain_info(priv->ctx, &d_info, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, +- _("libxl_domain_info failed for domain '%d'"), dom->id); ++ _("libxl_domain_info failed for domain '%d'"), ++ vm->def->id); + goto cleanup; + } + info->cpuTime = d_info.cpu_time; +@@ -1483,11 +1484,11 @@ libxlDomainCoreDump(virDomainPtr dom, co + + if (!(flags & VIR_DUMP_LIVE) && + virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) { +- if (libxl_domain_pause(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_pause(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Before dumping core, failed to suspend domain '%d'" + " with libxenlight"), +- dom->id); ++ vm->def->id); + goto endjob; + } + virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_DUMP); +@@ -1496,20 +1497,20 @@ libxlDomainCoreDump(virDomainPtr dom, co + + /* Unlock virDomainObj while dumping core */ + virObjectUnlock(vm); +- ret = libxl_domain_core_dump(priv->ctx, dom->id, to, NULL); ++ ret = libxl_domain_core_dump(priv->ctx, vm->def->id, to, NULL); + virObjectLock(vm); + if (ret != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to dump core of domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + ret = -1; + goto unpause; + } + + if (flags & VIR_DUMP_CRASH) { +- if (libxl_domain_destroy(priv->ctx, dom->id, NULL) < 0) { ++ if (libxl_domain_destroy(priv->ctx, vm->def->id, NULL) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, +- _("Failed to destroy domain '%d'"), dom->id); ++ _("Failed to destroy domain '%d'"), vm->def->id); + goto unpause; + } + +@@ -1524,10 +1525,10 @@ libxlDomainCoreDump(virDomainPtr dom, co + + unpause: + if (virDomainObjIsActive(vm) && paused) { +- if (libxl_domain_unpause(priv->ctx, dom->id) != 0) { ++ if (libxl_domain_unpause(priv->ctx, vm->def->id) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("After dumping core, failed to resume domain '%d' with" +- " libxenlight"), dom->id); ++ " libxenlight"), vm->def->id); + } else { + virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, + VIR_DOMAIN_RUNNING_UNPAUSED); +@@ -1786,19 +1787,19 @@ libxlDomainSetVcpusFlags(virDomainPtr do + break; + + case VIR_DOMAIN_VCPU_LIVE: +- if (libxl_set_vcpuonline(priv->ctx, dom->id, &map) != 0) { ++ if (libxl_set_vcpuonline(priv->ctx, vm->def->id, &map) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to set vcpus for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + break; + + case VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG: +- if (libxl_set_vcpuonline(priv->ctx, dom->id, &map) != 0) { ++ if (libxl_set_vcpuonline(priv->ctx, vm->def->id, &map) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to set vcpus for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + def->vcpus = nvcpus; +@@ -1934,7 +1935,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom + libxlDomainObjPrivatePtr priv; + + priv = vm->privateData; +- if (libxl_set_vcpuaffinity(priv->ctx, dom->id, vcpu, &map) != 0) { ++ if (libxl_set_vcpuaffinity(priv->ctx, vm->def->id, vcpu, &map) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to pin vcpu '%d' with libxenlight"), + vcpu); +@@ -2099,11 +2100,11 @@ libxlDomainGetVcpus(virDomainPtr dom, vi + } + + priv = vm->privateData; +- if ((vcpuinfo = libxl_list_vcpu(priv->ctx, dom->id, &maxcpu, ++ if ((vcpuinfo = libxl_list_vcpu(priv->ctx, vm->def->id, &maxcpu, + &hostcpus)) == NULL) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to list vcpus for domain '%d' with libxenlight"), +- dom->id); ++ vm->def->id); + goto cleanup; + } + +@@ -3608,7 +3609,7 @@ libxlDomainGetSchedulerType(virDomainPtr + default: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to get scheduler id for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto cleanup; + } + +@@ -3659,10 +3660,10 @@ libxlDomainGetSchedulerParametersFlags(v + goto cleanup; + } + +- if (libxl_domain_sched_params_get(priv->ctx, dom->id, &sc_info) != 0) { ++ if (libxl_domain_sched_params_get(priv->ctx, vm->def->id, &sc_info) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to get scheduler parameters for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto cleanup; + } + +@@ -3740,10 +3741,10 @@ libxlDomainSetSchedulerParametersFlags(v + goto endjob; + } + +- if (libxl_domain_sched_params_get(priv->ctx, dom->id, &sc_info) != 0) { ++ if (libxl_domain_sched_params_get(priv->ctx, vm->def->id, &sc_info) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to get scheduler parameters for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + +@@ -3756,10 +3757,10 @@ libxlDomainSetSchedulerParametersFlags(v + sc_info.cap = params[i].value.ui; + } + +- if (libxl_domain_sched_params_set(priv->ctx, dom->id, &sc_info) != 0) { ++ if (libxl_domain_sched_params_set(priv->ctx, vm->def->id, &sc_info) != 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to set scheduler parameters for domain '%d'" +- " with libxenlight"), dom->id); ++ " with libxenlight"), vm->def->id); + goto endjob; + } + diff --git a/7a1452f5-libxl-empty-cdrom.patch b/7a1452f5-libxl-empty-cdrom.patch new file mode 100644 index 0000000..1aa2638 --- /dev/null +++ b/7a1452f5-libxl-empty-cdrom.patch @@ -0,0 +1,31 @@ +commit 7a1452f5334f98680187ae6d11fe2a49c1b38548 +Author: Stefan Bader +Date: Thu Mar 27 17:55:03 2014 +0100 + + libxl: Set disk format for empty cdrom device + + The XML config for a CDROM device can be without a source path, + indicating that there is no media present. Without this change + the libxl driver fails to start a guest in that case because + the libxl library checks for the LIBXL_DISK_FORMAT_EMPTY format + type and tries to stat the NULL pointer that gets passed on. + + > libxl: error: libxl_device.c:265:libxl__device_disk_set_backend: + > Disk vdev=hdc failed to stat: (null): Bad address + + Signed-off-by: Stefan Bader + +Index: libvirt-1.2.3/src/libxl/libxl_conf.c +=================================================================== +--- libvirt-1.2.3.orig/src/libxl/libxl_conf.c ++++ libvirt-1.2.3/src/libxl/libxl_conf.c +@@ -827,6 +827,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk + x_disk->removable = 1; + x_disk->readwrite = !l_disk->readonly; + x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0; ++ /* An empty CDROM must have the empty format, otherwise libxl fails. */ ++ if (x_disk->is_cdrom && !x_disk->pdev_path) ++ x_disk->format = LIBXL_DISK_FORMAT_EMPTY; + if (l_disk->transient) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("libxenlight does not support transient disks")); diff --git a/fix-pci-attach-xen-driver.patch b/fix-pci-attach-xen-driver.patch index 114997f..1ec062e 100644 --- a/fix-pci-attach-xen-driver.patch +++ b/fix-pci-attach-xen-driver.patch @@ -8,11 +8,11 @@ uses the 'device_configure' RPC. This patch changes the xend driver to always call 'device_configure' for PCI devices to be consistent with the usage in the xen tools. -Index: libvirt-1.2.2/src/xen/xend_internal.c +Index: libvirt-1.2.3/src/xen/xend_internal.c =================================================================== ---- libvirt-1.2.2.orig/src/xen/xend_internal.c -+++ libvirt-1.2.2/src/xen/xend_internal.c -@@ -2217,6 +2217,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr +--- libvirt-1.2.3.orig/src/xen/xend_internal.c ++++ libvirt-1.2.3/src/xen/xend_internal.c +@@ -2219,6 +2219,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr virBuffer buf = VIR_BUFFER_INITIALIZER; char class[8], ref[80]; char *target = NULL; @@ -20,7 +20,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1); -@@ -2315,8 +2316,18 @@ xenDaemonAttachDeviceFlags(virConnectPtr +@@ -2317,8 +2318,18 @@ xenDaemonAttachDeviceFlags(virConnectPtr } sexpr = virBufferContentAndReset(&buf); diff --git a/ia64-clone.patch b/ia64-clone.patch index cdb6695..aaaaeba 100644 --- a/ia64-clone.patch +++ b/ia64-clone.patch @@ -1,8 +1,8 @@ -Index: libvirt-1.2.2/src/lxc/lxc_container.c +Index: libvirt-1.2.3/src/lxc/lxc_container.c =================================================================== ---- libvirt-1.2.2.orig/src/lxc/lxc_container.c -+++ libvirt-1.2.2/src/lxc/lxc_container.c -@@ -162,12 +162,19 @@ int lxcContainerHasReboot(void) +--- libvirt-1.2.3.orig/src/lxc/lxc_container.c ++++ libvirt-1.2.3/src/lxc/lxc_container.c +@@ -164,12 +164,19 @@ int lxcContainerHasReboot(void) VIR_FREE(buf); cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF; @@ -22,7 +22,7 @@ Index: libvirt-1.2.2/src/lxc/lxc_container.c VIR_FREE(stack); if (cpid < 0) { virReportSystemError(errno, "%s", -@@ -2004,6 +2011,9 @@ int lxcContainerStart(virDomainDefPtr de +@@ -2007,6 +2014,9 @@ int lxcContainerStart(virDomainDefPtr de .handshakefd = handshakefd }; @@ -32,7 +32,7 @@ Index: libvirt-1.2.2/src/lxc/lxc_container.c /* allocate a stack for the container */ if (VIR_ALLOC_N(stack, stacksize) < 0) return -1; -@@ -2029,7 +2039,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -2032,7 +2042,11 @@ int lxcContainerStart(virDomainDefPtr de cflags |= CLONE_NEWNET; } @@ -44,7 +44,7 @@ Index: libvirt-1.2.2/src/lxc/lxc_container.c VIR_FREE(stack); VIR_DEBUG("clone() completed, new container PID is %d", pid); -@@ -2063,12 +2077,19 @@ int lxcContainerAvailable(int features) +@@ -2066,12 +2080,19 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; diff --git a/libvirt-guests-init-script.patch b/libvirt-guests-init-script.patch index 7096fbb..8f7c143 100644 --- a/libvirt-guests-init-script.patch +++ b/libvirt-guests-init-script.patch @@ -1,9 +1,9 @@ Adjust libvirt-guests init files to conform to SUSE standards -Index: libvirt-1.2.2/tools/libvirt-guests.init.in +Index: libvirt-1.2.3/tools/libvirt-guests.init.in =================================================================== ---- libvirt-1.2.2.orig/tools/libvirt-guests.init.in -+++ libvirt-1.2.2/tools/libvirt-guests.init.in +--- libvirt-1.2.3.orig/tools/libvirt-guests.init.in ++++ libvirt-1.2.3/tools/libvirt-guests.init.in @@ -3,15 +3,15 @@ # the following is the LSB init header # @@ -28,10 +28,10 @@ Index: libvirt-1.2.2/tools/libvirt-guests.init.in ### END INIT INFO # the following is chkconfig init header -Index: libvirt-1.2.2/tools/libvirt-guests.sh.in +Index: libvirt-1.2.3/tools/libvirt-guests.sh.in =================================================================== ---- libvirt-1.2.2.orig/tools/libvirt-guests.sh.in -+++ libvirt-1.2.2/tools/libvirt-guests.sh.in +--- libvirt-1.2.3.orig/tools/libvirt-guests.sh.in ++++ libvirt-1.2.3/tools/libvirt-guests.sh.in @@ -16,14 +16,13 @@ # License along with this library. If not, see # . @@ -189,10 +189,10 @@ Index: libvirt-1.2.2/tools/libvirt-guests.sh.in esac -exit $RETVAL +rc_exit -Index: libvirt-1.2.2/tools/libvirt-guests.sysconf +Index: libvirt-1.2.3/tools/libvirt-guests.sysconf =================================================================== ---- libvirt-1.2.2.orig/tools/libvirt-guests.sysconf -+++ libvirt-1.2.2/tools/libvirt-guests.sysconf +--- libvirt-1.2.3.orig/tools/libvirt-guests.sysconf ++++ libvirt-1.2.3/tools/libvirt-guests.sysconf @@ -1,19 +1,29 @@ +## Path: System/Virtualization/libvirt-guests + diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index c4a6a34..3d5500a 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-1.2.2/configure.ac +Index: libvirt-1.2.3/configure.ac =================================================================== ---- libvirt-1.2.2.orig/configure.ac -+++ libvirt-1.2.2/configure.ac +--- libvirt-1.2.3.orig/configure.ac ++++ libvirt-1.2.3/configure.ac @@ -231,6 +231,7 @@ LIBVIRT_CHECK_FUSE LIBVIRT_CHECK_GLUSTER LIBVIRT_CHECK_HAL @@ -10,7 +10,7 @@ Index: libvirt-1.2.2/configure.ac LIBVIRT_CHECK_NUMACTL LIBVIRT_CHECK_OPENWSMAN LIBVIRT_CHECK_PCIACCESS -@@ -2368,11 +2369,12 @@ if test "$with_libvirtd" = "no" ; then +@@ -2374,11 +2375,12 @@ if test "$with_libvirtd" = "no" ; then with_interface=no fi @@ -26,7 +26,7 @@ Index: libvirt-1.2.2/configure.ac esac if test "$with_interface" = "yes" ; then -@@ -2766,6 +2768,7 @@ LIBVIRT_RESULT_FUSE +@@ -2772,6 +2774,7 @@ LIBVIRT_RESULT_FUSE LIBVIRT_RESULT_GLUSTER LIBVIRT_RESULT_HAL LIBVIRT_RESULT_NETCF @@ -34,11 +34,11 @@ Index: libvirt-1.2.2/configure.ac LIBVIRT_RESULT_NUMACTL LIBVIRT_RESULT_OPENWSMAN LIBVIRT_RESULT_PCIACCESS -Index: libvirt-1.2.2/src/Makefile.am +Index: libvirt-1.2.3/src/Makefile.am =================================================================== ---- libvirt-1.2.2.orig/src/Makefile.am -+++ libvirt-1.2.2/src/Makefile.am -@@ -801,6 +801,10 @@ if WITH_NETCF +--- libvirt-1.2.3.orig/src/Makefile.am ++++ libvirt-1.2.3/src/Makefile.am +@@ -807,6 +807,10 @@ if WITH_NETCF INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_netcf.c endif WITH_NETCF @@ -49,7 +49,7 @@ Index: libvirt-1.2.2/src/Makefile.am if WITH_UDEV INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_udev.c -@@ -1386,10 +1390,15 @@ if WITH_NETCF +@@ -1396,10 +1400,15 @@ if WITH_NETCF libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS) libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS) else ! WITH_NETCF @@ -65,11 +65,11 @@ Index: libvirt-1.2.2/src/Makefile.am endif ! WITH_NETCF if WITH_DRIVER_MODULES libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la -Index: libvirt-1.2.2/tools/virsh.c +Index: libvirt-1.2.3/tools/virsh.c =================================================================== ---- libvirt-1.2.2.orig/tools/virsh.c -+++ libvirt-1.2.2/tools/virsh.c -@@ -3209,6 +3209,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE +--- libvirt-1.2.3.orig/tools/virsh.c ++++ libvirt-1.2.3/tools/virsh.c +@@ -3251,6 +3251,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) vshPrint(ctl, " netcf"); @@ -78,10 +78,10 @@ Index: libvirt-1.2.2/tools/virsh.c # elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif -Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c +Index: libvirt-1.2.3/src/interface/interface_backend_netcf.c =================================================================== ---- libvirt-1.2.2.orig/src/interface/interface_backend_netcf.c -+++ libvirt-1.2.2/src/interface/interface_backend_netcf.c +--- libvirt-1.2.3.orig/src/interface/interface_backend_netcf.c ++++ libvirt-1.2.3/src/interface/interface_backend_netcf.c @@ -23,7 +23,12 @@ #include @@ -96,7 +96,7 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c #include "virerror.h" #include "datatypes.h" -@@ -63,6 +68,37 @@ VIR_ONCE_GLOBAL_INIT(virNetcfDriverState +@@ -65,6 +70,37 @@ VIR_ONCE_GLOBAL_INIT(virNetcfDriverState static virNetcfDriverStatePtr driverState = NULL; @@ -134,7 +134,7 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c static void virNetcfDriverStateDispose(void *obj) -@@ -85,7 +121,22 @@ netcfStateInitialize(bool privileged ATT +@@ -87,7 +123,22 @@ netcfStateInitialize(bool privileged ATT if (!(driverState = virObjectLockableNew(virNetcfDriverStateClass))) return -1; @@ -157,7 +157,7 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c if (ncf_init(&driverState->netcf, NULL) != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("failed to initialize netcf")); -@@ -93,6 +144,7 @@ netcfStateInitialize(bool privileged ATT +@@ -95,6 +146,7 @@ netcfStateInitialize(bool privileged ATT driverState = NULL; return -1; } @@ -165,11 +165,11 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c return 0; } -Index: libvirt-1.2.2/src/interface/interface_driver.c +Index: libvirt-1.2.3/src/interface/interface_driver.c =================================================================== ---- libvirt-1.2.2.orig/src/interface/interface_driver.c -+++ libvirt-1.2.2/src/interface/interface_driver.c -@@ -28,8 +28,15 @@ interfaceRegister(void) { +--- libvirt-1.2.3.orig/src/interface/interface_driver.c ++++ libvirt-1.2.3/src/interface/interface_driver.c +@@ -30,8 +30,15 @@ interfaceRegister(void) if (netcfIfaceRegister() == 0) return 0; #endif /* WITH_NETCF */ @@ -186,10 +186,10 @@ Index: libvirt-1.2.2/src/interface/interface_driver.c if (udevIfaceRegister() == 0) return 0; #endif /* WITH_UDEV */ -Index: libvirt-1.2.2/m4/virt-netcontrol.m4 +Index: libvirt-1.2.3/m4/virt-netcontrol.m4 =================================================================== --- /dev/null -+++ libvirt-1.2.2/m4/virt-netcontrol.m4 ++++ libvirt-1.2.3/m4/virt-netcontrol.m4 @@ -0,0 +1,35 @@ +dnl The libnetcontrol library +dnl diff --git a/libvirt.changes b/libvirt.changes index db80cf9..260acb3 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 8 09:44:50 MDT 2014 - jfehlig@suse.com + +- libxl: Set disk format for empty cdrom device + 0e0c1a74-domid-fix.patch, 7a1452f5-libxl-empty-cdrom.patch + bnc#872517 + ------------------------------------------------------------------- Wed Apr 2 13:38:50 UTC 2014 - cbosdonnat@suse.com diff --git a/libvirt.spec b/libvirt.spec index 7665f5d..2a9f861 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -428,6 +428,8 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches +Patch0: 0e0c1a74-domid-fix.patch +Patch1: 7a1452f5-libxl-empty-cdrom.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: ia64-clone.patch @@ -943,6 +945,8 @@ namespaces. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index 8c6fc8f..d32a04a 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-1.2.2/daemon/libvirtd.conf +Index: libvirt-1.2.3/daemon/libvirtd.conf =================================================================== ---- libvirt-1.2.2.orig/daemon/libvirtd.conf -+++ libvirt-1.2.2/daemon/libvirtd.conf +--- libvirt-1.2.3.orig/daemon/libvirtd.conf ++++ libvirt-1.2.3/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -13,11 +13,11 @@ Index: libvirt-1.2.2/daemon/libvirtd.conf # Listen for unencrypted TCP connections on the public TCP/IP port. # NB, must pass the --listen flag to the libvirtd process for this to -Index: libvirt-1.2.2/daemon/libvirtd-config.c +Index: libvirt-1.2.3/daemon/libvirtd-config.c =================================================================== ---- libvirt-1.2.2.orig/daemon/libvirtd-config.c -+++ libvirt-1.2.2/daemon/libvirtd-config.c -@@ -222,7 +222,7 @@ daemonConfigNew(bool privileged ATTRIBUT +--- libvirt-1.2.3.orig/daemon/libvirtd-config.c ++++ libvirt-1.2.3/daemon/libvirtd-config.c +@@ -229,7 +229,7 @@ daemonConfigNew(bool privileged ATTRIBUT if (VIR_ALLOC(data) < 0) return NULL; diff --git a/support-managed-pci-xen-driver.patch b/support-managed-pci-xen-driver.patch index 62b81e4..5909ccb 100644 --- a/support-managed-pci-xen-driver.patch +++ b/support-managed-pci-xen-driver.patch @@ -8,11 +8,11 @@ Subject: [PATCH] support managed pci devices in xen driver src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 15 deletions(-) -Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c +Index: libvirt-1.2.3/src/xenxs/xen_sxpr.c =================================================================== ---- libvirt-1.2.2.orig/src/xenxs/xen_sxpr.c -+++ libvirt-1.2.2/src/xenxs/xen_sxpr.c -@@ -998,6 +998,7 @@ xenParseSxprPCI(virDomainDefPtr def, +--- libvirt-1.2.3.orig/src/xenxs/xen_sxpr.c ++++ libvirt-1.2.3/src/xenxs/xen_sxpr.c +@@ -997,6 +997,7 @@ xenParseSxprPCI(virDomainDefPtr def, int busID; int slotID; int funcID; @@ -20,7 +20,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c node = cur->u.s.car; if (!sexpr_lookup(node, "dev")) -@@ -1045,11 +1046,13 @@ xenParseSxprPCI(virDomainDefPtr def, +@@ -1044,11 +1045,13 @@ xenParseSxprPCI(virDomainDefPtr def, goto error; } @@ -35,7 +35,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI; dev->source.subsys.u.pci.addr.domain = domainID; dev->source.subsys.u.pci.addr.bus = busID; -@@ -1993,11 +1996,15 @@ static void +@@ -1991,11 +1994,15 @@ static void xenFormatSxprPCI(virDomainHostdevDefPtr def, virBufferPtr buf) { @@ -52,7 +52,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c } -@@ -2016,12 +2023,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP +@@ -2014,12 +2021,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP virBufferPtr buf, int detach) { @@ -65,7 +65,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c virBufferAddLit(buf, "(pci "); xenFormatSxprPCI(def, buf); if (detach) -@@ -2076,12 +2077,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def, +@@ -2074,12 +2075,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def, for (i = 0; i < def->nhostdevs; i++) { if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { @@ -78,11 +78,11 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c xenFormatSxprPCI(def->hostdevs[i], buf); } } -Index: libvirt-1.2.2/src/xenxs/xen_xm.c +Index: libvirt-1.2.3/src/xenxs/xen_xm.c =================================================================== ---- libvirt-1.2.2.orig/src/xenxs/xen_xm.c -+++ libvirt-1.2.2/src/xenxs/xen_xm.c -@@ -802,6 +802,8 @@ xenParseXM(virConfPtr conf, int xendConf +--- libvirt-1.2.3.orig/src/xenxs/xen_xm.c ++++ libvirt-1.2.3/src/xenxs/xen_xm.c +@@ -807,6 +807,8 @@ xenParseXM(virConfPtr conf, int xendConf int busID; int slotID; int funcID; @@ -91,7 +91,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_xm.c domain[0] = bus[0] = slot[0] = func[0] = '\0'; -@@ -811,6 +813,11 @@ xenParseXM(virConfPtr conf, int xendConf +@@ -816,6 +818,11 @@ xenParseXM(virConfPtr conf, int xendConf /* pci=['0000:00:1b.0','0000:00:13.0'] */ if (!(key = list->str)) goto skippci; @@ -103,7 +103,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_xm.c if (!(nextkey = strchr(key, ':'))) goto skippci; -@@ -859,10 +866,30 @@ xenParseXM(virConfPtr conf, int xendConf +@@ -864,10 +871,30 @@ xenParseXM(virConfPtr conf, int xendConf if (virStrToLong_i(func, NULL, 16, &funcID) < 0) goto skippci; diff --git a/virtlockd-init-script.patch b/virtlockd-init-script.patch index 4031d69..81b3921 100644 --- a/virtlockd-init-script.patch +++ b/virtlockd-init-script.patch @@ -1,9 +1,9 @@ Adjust virtlockd init files to conform to SUSE standards -Index: libvirt-1.2.2/src/locking/virtlockd.sysconf +Index: libvirt-1.2.3/src/locking/virtlockd.sysconf =================================================================== ---- libvirt-1.2.2.orig/src/locking/virtlockd.sysconf -+++ libvirt-1.2.2/src/locking/virtlockd.sysconf +--- libvirt-1.2.3.orig/src/locking/virtlockd.sysconf ++++ libvirt-1.2.3/src/locking/virtlockd.sysconf @@ -1,3 +1,7 @@ +## Path: System/Virtualization/virtlockd + @@ -12,10 +12,10 @@ Index: libvirt-1.2.2/src/locking/virtlockd.sysconf # # Pass extra arguments to virtlockd #VIRTLOCKD_ARGS= -Index: libvirt-1.2.2/src/locking/virtlockd.init.in +Index: libvirt-1.2.3/src/locking/virtlockd.init.in =================================================================== ---- libvirt-1.2.2.orig/src/locking/virtlockd.init.in -+++ libvirt-1.2.2/src/locking/virtlockd.init.in +--- libvirt-1.2.3.orig/src/locking/virtlockd.init.in ++++ libvirt-1.2.3/src/locking/virtlockd.init.in @@ -4,12 +4,14 @@ # http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV # diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index ffb9843..e7b3d54 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c +Index: libvirt-1.2.3/src/xenxs/xen_sxpr.c =================================================================== ---- libvirt-1.2.2.orig/src/xenxs/xen_sxpr.c -+++ libvirt-1.2.2/src/xenxs/xen_sxpr.c -@@ -330,7 +330,7 @@ error: +--- libvirt-1.2.3.orig/src/xenxs/xen_sxpr.c ++++ libvirt-1.2.3/src/xenxs/xen_sxpr.c +@@ -332,7 +332,7 @@ xenParseSxprChar(const char *value, static int xenParseSxprDisks(virDomainDefPtr def, const struct sexpr *root, @@ -11,7 +11,7 @@ Index: libvirt-1.2.2/src/xenxs/xen_sxpr.c int xendConfigVersion) { const struct sexpr *cur, *node; -@@ -381,7 +381,6 @@ xenParseSxprDisks(virDomainDefPtr def, +@@ -383,7 +383,6 @@ xenParseSxprDisks(virDomainDefPtr def, /* There is a case without the uname to the CD-ROM device */ offset = strchr(dst, ':'); if (!offset ||