Accepting request 69990 from Virtualization
- Update to libvirt 0.9.1 - support various persistent domain updates - improvements on memory APIs - Add virDomainEventRebootNew - various improvements to libxl drive - Spice: support audio, images and stream compression - Move libvirt-iohelper from client to base package - fix baselibs.conf not to requires source 32bit - Install log dir for libxl f7e9b448-libxl-build.patch - Update to libvirt 0.9.0 final - Support cpu usage tuning - Add public APIs for storage volume upload/download - Add public API for setting migration speed on the fly - Add libxenlight driver - qemu: support migration to fd - add virDomain{Get,Set}BlkioParameters - introduce a new libvirt API (virDomainSetMemoryFlags) - Expose event loop implementation as a public API - Dump the debug buffer to libvirtd.log on fatal signal - Audit support - Numerous enhancements and bug fixes - Update to libvirt 0.9.0 RC3 OBS-URL: https://build.opensuse.org/request/show/69990 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=76
This commit is contained in:
commit
56dd42b0f9
@ -1,93 +0,0 @@
|
|||||||
commit 71753cb7f7a16ff800381c0b5ee4e99eea92fed3
|
|
||||||
Author: Guido Günther <agx@sigxcpu.org>
|
|
||||||
Date: Mon Mar 14 10:56:28 2011 +0800
|
|
||||||
|
|
||||||
Add missing checks for read only connections
|
|
||||||
|
|
||||||
As pointed on CVE-2011-1146, some API forgot to check the read-only
|
|
||||||
status of the connection for entry point which modify the state
|
|
||||||
of the system or may lead to a remote execution using user data.
|
|
||||||
The entry points concerned are:
|
|
||||||
- virConnectDomainXMLToNative
|
|
||||||
- virNodeDeviceDettach
|
|
||||||
- virNodeDeviceReAttach
|
|
||||||
- virNodeDeviceReset
|
|
||||||
- virDomainRevertToSnapshot
|
|
||||||
- virDomainSnapshotDelete
|
|
||||||
|
|
||||||
* src/libvirt.c: fix the above set of entry points to error on read-only
|
|
||||||
connections
|
|
||||||
|
|
||||||
Index: libvirt-0.8.8/src/libvirt.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-0.8.8.orig/src/libvirt.c
|
|
||||||
+++ libvirt-0.8.8/src/libvirt.c
|
|
||||||
@@ -3152,6 +3152,10 @@ char *virConnectDomainXMLToNative(virCon
|
|
||||||
virDispatchError(NULL);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (nativeFormat == NULL || domainXml == NULL) {
|
|
||||||
virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
|
||||||
@@ -9579,6 +9583,11 @@ virNodeDeviceDettach(virNodeDevicePtr de
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (dev->conn->driver->nodeDeviceDettach) {
|
|
||||||
int ret;
|
|
||||||
ret = dev->conn->driver->nodeDeviceDettach (dev);
|
|
||||||
@@ -9622,6 +9631,11 @@ virNodeDeviceReAttach(virNodeDevicePtr d
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (dev->conn->driver->nodeDeviceReAttach) {
|
|
||||||
int ret;
|
|
||||||
ret = dev->conn->driver->nodeDeviceReAttach (dev);
|
|
||||||
@@ -9667,6 +9681,11 @@ virNodeDeviceReset(virNodeDevicePtr dev)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (dev->conn->driver->nodeDeviceReset) {
|
|
||||||
int ret;
|
|
||||||
ret = dev->conn->driver->nodeDeviceReset (dev);
|
|
||||||
@@ -12962,6 +12981,10 @@ virDomainRevertToSnapshot(virDomainSnaps
|
|
||||||
}
|
|
||||||
|
|
||||||
conn = snapshot->domain->conn;
|
|
||||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (conn->driver->domainRevertToSnapshot) {
|
|
||||||
int ret = conn->driver->domainRevertToSnapshot(snapshot, flags);
|
|
||||||
@@ -13008,6 +13031,10 @@ virDomainSnapshotDelete(virDomainSnapsho
|
|
||||||
}
|
|
||||||
|
|
||||||
conn = snapshot->domain->conn;
|
|
||||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
|
||||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (conn->driver->domainSnapshotDelete) {
|
|
||||||
int ret = conn->driver->domainSnapshotDelete(snapshot, flags);
|
|
@ -1,2 +1,4 @@
|
|||||||
libvirt-client
|
libvirt-client
|
||||||
|
requires -libvirt-<targettype>
|
||||||
libvirt-devel
|
libvirt-devel
|
||||||
|
requires -libvirt-<targettype>
|
||||||
|
12
clone.patch
12
clone.patch
@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- src/lxc/lxc_container.c.orig
|
--- src/lxc/lxc_container.c.orig
|
||||||
+++ src/lxc/lxc_container.c
|
+++ src/lxc/lxc_container.c
|
||||||
@@ -845,6 +845,9 @@ int lxcContainerStart(virDomainDefPtr de
|
@@ -883,6 +883,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||||
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
||||||
|
|
||||||
/* allocate a stack for the container */
|
/* allocate a stack for the container */
|
||||||
@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
return -1;
|
return -1;
|
||||||
@@ -863,7 +866,11 @@ int lxcContainerStart(virDomainDefPtr de
|
@@ -901,7 +904,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||||
flags |= CLONE_NEWNET;
|
flags |= CLONE_NEWNET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,9 +22,9 @@ Index: src/lxc/lxc_container.c
|
|||||||
pid = clone(lxcContainerChild, stacktop, flags, &args);
|
pid = clone(lxcContainerChild, stacktop, flags, &args);
|
||||||
+#endif
|
+#endif
|
||||||
VIR_FREE(stack);
|
VIR_FREE(stack);
|
||||||
DEBUG("clone() completed, new container PID is %d", pid);
|
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
||||||
|
|
||||||
@@ -889,6 +896,7 @@ int lxcContainerAvailable(int features)
|
@@ -928,6 +935,7 @@ int lxcContainerAvailable(int features)
|
||||||
char *childStack;
|
char *childStack;
|
||||||
char *stack;
|
char *stack;
|
||||||
int childStatus;
|
int childStatus;
|
||||||
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
|
|
||||||
if (features & LXC_CONTAINER_FEATURE_USER)
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
||||||
flags |= CLONE_NEWUSER;
|
flags |= CLONE_NEWUSER;
|
||||||
@@ -896,14 +904,21 @@ int lxcContainerAvailable(int features)
|
@@ -935,14 +943,21 @@ int lxcContainerAvailable(int features)
|
||||||
if (features & LXC_CONTAINER_FEATURE_NET)
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
||||||
flags |= CLONE_NEWNET;
|
flags |= CLONE_NEWNET;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
+ stacksize *= 2;
|
+ stacksize *= 2;
|
||||||
+#endif
|
+#endif
|
||||||
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
||||||
DEBUG0("Unable to allocate stack");
|
VIR_DEBUG0("Unable to allocate stack");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
commit efc2594b4e0cbcdd6947fafeeed41accd5b611e0
|
|
||||||
Author: Jim Fehlig <jfehlig@novell.com>
|
|
||||||
Date: Thu Feb 17 14:22:55 2011 -0700
|
|
||||||
|
|
||||||
Do not add drive 'boot=on' param when a kernel is specified
|
|
||||||
|
|
||||||
libvirt-tck was failing several domain tests [1] with qemu 0.14, which
|
|
||||||
is now less tolerable of specifying 2 bootroms with the same boot index [2].
|
|
||||||
|
|
||||||
Drop the 'boot=on' param if kernel has been specfied.
|
|
||||||
|
|
||||||
[1] https://www.redhat.com/archives/libvir-list/2011-February/msg00559.html
|
|
||||||
[2] http://lists.nongnu.org/archive/html/qemu-devel/2011-02/msg01892.html
|
|
||||||
|
|
||||||
Index: libvirt-0.8.8/src/qemu/qemu_command.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-0.8.8.orig/src/qemu/qemu_command.c
|
|
||||||
+++ libvirt-0.8.8/src/qemu/qemu_command.c
|
|
||||||
@@ -3116,7 +3116,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|
||||||
int bootCD = 0, bootFloppy = 0, bootDisk = 0;
|
|
||||||
|
|
||||||
/* If QEMU supports boot=on for -drive param... */
|
|
||||||
- if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT) {
|
|
||||||
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT && !def->os.kernel) {
|
|
||||||
for (i = 0 ; i < def->os.nBootDevs ; i++) {
|
|
||||||
switch (def->os.bootDevs[i]) {
|
|
||||||
case VIR_DOMAIN_BOOT_CDROM:
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1b055afdea9df8d502b7572ea4c81a9aa5fa0f8688d3a58cf63abcef6e84b807
|
|
||||||
size 9569079
|
|
3
libvirt-0.9.1.tar.bz2
Normal file
3
libvirt-0.9.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2a2ff6a4e1855ca0d696c1c0d07674546ba893f8d74e3850e2d368e1f5dfba0d
|
||||||
|
size 10346535
|
@ -1,3 +1,50 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 5 19:01:54 MDT 2011 - jfehlig@suse.de
|
||||||
|
|
||||||
|
- Update to libvirt 0.9.1
|
||||||
|
- support various persistent domain updates
|
||||||
|
- improvements on memory APIs
|
||||||
|
- Add virDomainEventRebootNew
|
||||||
|
- various improvements to libxl drive
|
||||||
|
- Spice: support audio, images and stream compression
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 12 15:26:02 MDT 2011 - jfehlig@suse.de
|
||||||
|
|
||||||
|
- Move libvirt-iohelper from client to base package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 12 05:11:22 UTC 2011 - coolo@opensuse.org
|
||||||
|
|
||||||
|
- fix baselibs.conf not to requires source 32bit
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 11 16:48:48 MDT 2011 - jfehlig@suse.de
|
||||||
|
|
||||||
|
- Install log dir for libxl
|
||||||
|
f7e9b448-libxl-build.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 4 16:02:23 MDT 2011 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Update to libvirt 0.9.0 final
|
||||||
|
- Support cpu usage tuning
|
||||||
|
- Add public APIs for storage volume upload/download
|
||||||
|
- Add public API for setting migration speed on the fly
|
||||||
|
- Add libxenlight driver
|
||||||
|
- qemu: support migration to fd
|
||||||
|
- add virDomain{Get,Set}BlkioParameters
|
||||||
|
- introduce a new libvirt API (virDomainSetMemoryFlags)
|
||||||
|
- Expose event loop implementation as a public API
|
||||||
|
- Dump the debug buffer to libvirtd.log on fatal signal
|
||||||
|
- Audit support
|
||||||
|
- Numerous enhancements and bug fixes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 31 14:16:17 MST 2011 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Update to libvirt 0.9.0 RC3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 24 10:23:30 UTC 2011 - coolo@novell.com
|
Thu Mar 24 10:23:30 UTC 2011 - coolo@novell.com
|
||||||
|
|
||||||
|
498
libvirt.spec
498
libvirt.spec
@ -17,80 +17,172 @@
|
|||||||
|
|
||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
# hypervisor drivers that run on local host
|
# In the future, we may want a client only build, which will create a
|
||||||
%define with_xen 1
|
# libvirt.so only containing the generic RPC driver and the test driver,
|
||||||
%define with_qemu 1
|
# but no libvirtd
|
||||||
%define with_lxc 1
|
# For now, default to a full server + client build
|
||||||
%define with_vbox 1
|
%define client_only 0
|
||||||
%define with_openvz 0
|
|
||||||
%define with_uml 0
|
# Disable all server side drivers if client only build requested
|
||||||
%define with_one 0
|
%if %{client_only}
|
||||||
# hypervisor drivers that use a native remote protocol
|
%define server_drivers 0
|
||||||
%define with_phyp 0
|
|
||||||
%define with_esx 1
|
|
||||||
# host drivers
|
|
||||||
%define with_network 1
|
|
||||||
%define with_storage_fs 1
|
|
||||||
%define with_storage_lvm 1
|
|
||||||
%define with_storage_iscsi 1
|
|
||||||
%define with_storage_disk 1
|
|
||||||
%define with_storage_mpath 1
|
|
||||||
%define with_numactl 1
|
|
||||||
%define with_selinux 1
|
|
||||||
%define with_apparmor 0
|
|
||||||
# options
|
|
||||||
%if 0%{?suse_version} >= 1140
|
|
||||||
%define with_yajl 1
|
|
||||||
%define with_netcf 1
|
|
||||||
%define with_macvtap 1
|
|
||||||
%define with_virtualport 1
|
|
||||||
%else
|
%else
|
||||||
%define with_yajl 0
|
%define server_drivers 1
|
||||||
%define with_netcf 0
|
|
||||||
%define with_macvtap 0
|
|
||||||
%define with_virtualport 0
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1130
|
|
||||||
%define with_capng 1
|
|
||||||
%else
|
|
||||||
%define with_capng 0
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1110
|
|
||||||
%define with_udev 1
|
|
||||||
%define with_hal 0
|
|
||||||
%else
|
|
||||||
%define with_udev 0
|
|
||||||
%define with_hal 1
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# 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 on local host
|
||||||
|
%define with_xen 0%{!?_without_xen:%{server_drivers}}
|
||||||
|
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
|
||||||
|
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||||
|
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
|
||||||
|
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||||
|
%define with_uml 0%{!?_without_uml:%{server_drivers}}
|
||||||
|
%define with_xenapi 0%{!?_without_xenapi:%{server_drivers}}
|
||||||
|
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
|
||||||
|
|
||||||
|
# Then the hypervisor drivers that talk a native remote protocol
|
||||||
|
%define with_phyp 0%{!?_without_phyp:0}
|
||||||
|
%define with_esx 0%{!?_without_esx:1}
|
||||||
|
%define with_vmware 0%{!?_without_vmware:1}
|
||||||
|
|
||||||
|
# Then the secondary host 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}}
|
||||||
|
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||||
|
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||||
|
%define with_apparmor 0%{!?_without_apparmor:0}
|
||||||
|
|
||||||
|
# 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_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_audit 0%{!?_without_audit:0}
|
||||||
|
%define with_dtrace 0%{!?_without_dtrace:0}
|
||||||
|
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
||||||
|
|
||||||
|
# Non-server/HV driver defaults which are always enabled
|
||||||
|
%define with_python 0%{!?_without_python:1}
|
||||||
|
%define with_sasl 0%{!?_without_sasl:1}
|
||||||
|
|
||||||
|
# Set the OS / architecture specific special cases
|
||||||
|
|
||||||
# Xen is available only on i386 x86_64
|
# Xen is available only on i386 x86_64
|
||||||
%ifnarch %ix86 x86_64
|
%ifnarch %ix86 x86_64
|
||||||
%define with_xen 0
|
%define with_xen 0
|
||||||
|
%define with_libxl 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# libxenlight driver requires Xen >= 4.1, which is only
|
||||||
|
# available in openSUSE >= 12.1 or SLE >= 11sp2
|
||||||
|
%if 0%{?suse_version} < 1210
|
||||||
|
%define with_libxl 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# numactl only on x86_64 and ia64
|
||||||
|
%ifnarch x86_64 ia64
|
||||||
|
%define with_numactl 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# SLES doesn't contain OpenVZ, VBox, UML, ESX, VMWare, or Citrix XenAPI
|
||||||
|
%if 0%{?sles_version}
|
||||||
|
%define with_openvz 0
|
||||||
|
%define with_vbox 0
|
||||||
|
%define with_uml 0
|
||||||
|
%define with_esx 0
|
||||||
|
%define with_vmware 0
|
||||||
|
%define with_xenapi 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Enable phyp driver for IBM Power systems
|
||||||
|
%ifarch ppc64
|
||||||
|
%define with_phyp 1
|
||||||
|
%endif
|
||||||
|
|
||||||
# LXC and selinux are not available on anything < openSUSE 11.1
|
# LXC and selinux are not available on anything < openSUSE 11.1
|
||||||
%if 0%{?suse_version} < 1110
|
%if 0%{?suse_version} < 1110
|
||||||
%define with_lxc 0
|
%define with_lxc 0
|
||||||
%define with_selinux 0
|
%define with_selinux 0
|
||||||
%endif
|
%endif
|
||||||
# Enable phyp driver for IBM Power systems
|
|
||||||
%ifarch ppc64
|
# udev is used to manage host devices in 11.1 or newer
|
||||||
%define with_phyp 1
|
%if 0%{?suse_version} > 1110
|
||||||
%endif
|
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
||||||
# numactl only on x86_64 and ia64
|
%else
|
||||||
%ifnarch x86_64 ia64
|
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
||||||
%define with_numactl 0
|
|
||||||
%endif
|
|
||||||
# SLES doesn't contain OpenVZ, VBox, UML, OpenNebula, or ESX
|
|
||||||
%if 0%{?sles_version}
|
|
||||||
%define with_openvz 0
|
|
||||||
%define with_vbox 0
|
|
||||||
%define with_uml 0
|
|
||||||
%define with_one 0
|
|
||||||
%define with_esx 0
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: libvirt
|
# libcapng is used to manage capabilities in 11.3 or newer
|
||||||
BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd
|
%if 0%{?suse_version} >= 1130
|
||||||
|
%define with_capng 0%{!?_without_capng:1}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# netcf is used to manage network interfaces in 11.4 or newer
|
||||||
|
%if 0%{?suse_version} >= 1140
|
||||||
|
%define with_netcf 0%{!?_without_netcf:%{server_drivers}}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Enable yajl library for JSON mode with QEMU in 11.4 or newer
|
||||||
|
%if 0%{?suse_version} >= 1140
|
||||||
|
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Enable libpcap library
|
||||||
|
%if %{with_qemu}
|
||||||
|
%if 0%{?suse_version} >= 1140
|
||||||
|
%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
|
||||||
|
%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}}
|
||||||
|
%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with_macvtap}
|
||||||
|
%define with_libnl 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# there's no use compiling the network driver without
|
||||||
|
# the libvirt daemon
|
||||||
|
%if ! %{with_libvirtd}
|
||||||
|
%define with_network 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: xhtml-dtd
|
||||||
|
BuildRequires: libxslt
|
||||||
|
BuildRequires: readline-devel
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: gettext
|
||||||
|
BuildRequires: gnutls-devel
|
||||||
|
BuildRequires: bridge-utils
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: python-xml
|
||||||
|
# Only for directory ownership:
|
||||||
|
BuildRequires: gtk-doc
|
||||||
|
%if %{with_xen} || %{with_libxl}
|
||||||
|
BuildRequires: xen-devel
|
||||||
|
%endif
|
||||||
|
%if %{with_sasl}
|
||||||
|
BuildRequires: cyrus-sasl-devel
|
||||||
|
%endif
|
||||||
%if %{with_hal}
|
%if %{with_hal}
|
||||||
BuildRequires: hal-devel
|
BuildRequires: hal-devel
|
||||||
%endif
|
%endif
|
||||||
@ -98,14 +190,13 @@ BuildRequires: hal-devel
|
|||||||
BuildRequires: libudev-devel >= 145
|
BuildRequires: libudev-devel >= 145
|
||||||
BuildRequires: libpciaccess0-devel >= 0.10.9
|
BuildRequires: libpciaccess0-devel >= 0.10.9
|
||||||
%endif
|
%endif
|
||||||
%if %{with_xen}
|
%if %{with_avahi}
|
||||||
BuildRequires: xen-devel
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1030
|
%if 0%{?suse_version} > 1030
|
||||||
BuildRequires: libavahi-devel
|
BuildRequires: libavahi-devel
|
||||||
%else
|
%else
|
||||||
BuildRequires: avahi-devel
|
BuildRequires: avahi-devel
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{with_selinux}
|
%if %{with_selinux}
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
%endif
|
%endif
|
||||||
@ -115,11 +206,13 @@ BuildRequires: libapparmor-devel
|
|||||||
%if %{with_numactl}
|
%if %{with_numactl}
|
||||||
BuildRequires: libnuma-devel
|
BuildRequires: libnuma-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_polkit}
|
||||||
%if 0%{?suse_version} > 1110
|
%if 0%{?suse_version} > 1110
|
||||||
BuildRequires: polkit >= 0.9
|
BuildRequires: polkit >= 0.9
|
||||||
%else
|
%else
|
||||||
BuildRequires: PolicyKit-devel >= 0.6
|
BuildRequires: PolicyKit-devel >= 0.6
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{with_phyp}
|
%if %{with_phyp}
|
||||||
BuildRequires: libssh2-devel
|
BuildRequires: libssh2-devel
|
||||||
%endif
|
%endif
|
||||||
@ -133,53 +226,124 @@ BuildRequires: libnl-devel
|
|||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with_capng}
|
%if %{with_capng}
|
||||||
BuildRequires: libcap-ng-devel
|
BuildRequires: libcap-ng-devel >= 0.5.0
|
||||||
%endif
|
%endif
|
||||||
%if %{with_netcf}
|
%if %{with_netcf}
|
||||||
BuildRequires: netcf-devel
|
BuildRequires: netcf-devel >= 0.1.4
|
||||||
%endif
|
%endif
|
||||||
# Only for directory ownership:
|
%if %{with_network}
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: dnsmasq >= 2.41
|
||||||
|
BuildRequires: iptables-devel
|
||||||
|
BuildRequires: radvd
|
||||||
|
%endif
|
||||||
|
%if %{with_nwfilter}
|
||||||
|
BuildRequires: ebtables
|
||||||
|
%endif
|
||||||
|
%if %{with_libpcap}
|
||||||
|
BuildRequires: libpcap-devel
|
||||||
|
%endif
|
||||||
|
%if %{with_libnl}
|
||||||
|
BuildRequires: libnl-devel
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_fs}
|
||||||
|
# For mount/umount in FS driver
|
||||||
|
BuildRequires: util-linux
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_lvm}
|
||||||
|
# For LVM drivers
|
||||||
|
BuildRequires: lvm2
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_iscsi}
|
||||||
|
# For ISCSI driver
|
||||||
|
BuildRequires: open-iscsi
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_disk}
|
||||||
|
# For disk driver
|
||||||
|
BuildRequires: parted-devel
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_mpath}
|
||||||
|
# For Multipath support
|
||||||
|
BuildRequires: device-mapper-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: libvirt
|
||||||
Url: http://libvirt.org/
|
Url: http://libvirt.org/
|
||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
AutoReqProv: yes
|
AutoReqProv: yes
|
||||||
Version: 0.8.8
|
Version: 0.9.1
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
||||||
|
|
||||||
# The client side, i.e. shared libs and virsh are in a subpackage
|
# The client side, i.e. shared libs and virsh are in a subpackage
|
||||||
Requires: %{name}-client = %{version}-%{release}
|
Requires: %{name}-client = %{version}-%{release}
|
||||||
Requires: parted
|
|
||||||
Requires: virt-utils
|
Requires: virt-utils
|
||||||
|
# Used by many of the drivers, so turn it on whenever the
|
||||||
|
# daemon is present
|
||||||
|
%if %{with_libvirtd}
|
||||||
Recommends: bridge-utils
|
Recommends: bridge-utils
|
||||||
|
# for modprobe of pci devices
|
||||||
|
Requires: module-init-tools
|
||||||
|
# for /sbin/ip
|
||||||
|
Requires: iproute
|
||||||
|
%endif
|
||||||
|
%if %{with_network}
|
||||||
|
Recommends: dnsmasq >= 2.41
|
||||||
|
Recommends: radvd
|
||||||
|
%endif
|
||||||
|
%if %{with_network} || %{with_nwfilter}
|
||||||
Recommends: iptables
|
Recommends: iptables
|
||||||
Recommends: lvm2
|
%endif
|
||||||
|
%if %{with_nwfilter}
|
||||||
|
Recommends: ebtables
|
||||||
|
%endif
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
Recommends: dnsmasq
|
|
||||||
Recommends: open-iscsi
|
|
||||||
Recommends: nfs-client
|
Recommends: nfs-client
|
||||||
%if %{with_hal}
|
%if %{with_hal}
|
||||||
Requires: hal
|
Requires: hal
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_udev}
|
||||||
|
Requires: udev >= 145
|
||||||
|
%endif
|
||||||
|
%if %{with_polkit}
|
||||||
%if 0%{?suse_version} > 1110
|
%if 0%{?suse_version} > 1110
|
||||||
Recommends: polkit >= 0.9
|
Recommends: polkit >= 0.9
|
||||||
%else
|
%else
|
||||||
Recommends: PolicyKit >= 0.6
|
Recommends: PolicyKit >= 0.6
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_fs}
|
||||||
|
Recommends: nfs-utils
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_lvm}
|
||||||
|
# For LVM drivers
|
||||||
|
Recommends: lvm2
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_iscsi}
|
||||||
|
# For ISCSI driver
|
||||||
|
Recommends: open-iscsi
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_disk}
|
||||||
|
# For disk driver
|
||||||
|
Recommends: parted
|
||||||
|
Recommends: device-mapper
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_mpath}
|
||||||
|
# For multipath support
|
||||||
|
Recommends: device-mapper
|
||||||
|
%endif
|
||||||
|
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: libvirtd.init
|
Source1: libvirtd.init
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
Patch0: efc2594b-boot-param.patch
|
|
||||||
Patch1: 71753cb7-CVE-2011-1146.patch
|
|
||||||
# Need to go upstream
|
# Need to go upstream
|
||||||
Patch100: xen-name-for-devid.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch102: clone.patch
|
Patch101: clone.patch
|
||||||
Patch103: xen-pv-cdrom.patch
|
Patch102: xen-pv-cdrom.patch
|
||||||
Patch104: xen-domctl-ver7.patch
|
Patch103: xend-disk-order.patch
|
||||||
Patch105: xend-disk-order.patch
|
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch200: libvirtd-defaults.patch
|
Patch200: libvirtd-defaults.patch
|
||||||
Patch201: use-libvirt-guests-on-suse.patch
|
Patch201: use-init-script-redhat.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -205,11 +369,11 @@ Requires: readline
|
|||||||
Requires: ncurses
|
Requires: ncurses
|
||||||
# Needed by libvirt-guests init script.
|
# Needed by libvirt-guests init script.
|
||||||
Requires: gettext
|
Requires: gettext
|
||||||
|
Requires: cyrus-sasl
|
||||||
|
Recommends: cyrus-sasl-digestmd5
|
||||||
# So remote clients can access libvirt over SSH tunnel
|
# So remote clients can access libvirt over SSH tunnel
|
||||||
# (client invokes 'nc' against the UNIX socket on the server)
|
# (client invokes 'nc' against the UNIX socket on the server)
|
||||||
Recommends: netcat-openbsd
|
Recommends: netcat-openbsd
|
||||||
Requires: cyrus-sasl
|
|
||||||
Recommends: cyrus-sasl-digestmd5
|
|
||||||
|
|
||||||
%description client
|
%description client
|
||||||
Libvirt is a C toolkit to interract with the virtualization
|
Libvirt is a C toolkit to interract with the virtualization
|
||||||
@ -229,10 +393,10 @@ License: LGPLv2.1+
|
|||||||
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name}-client = %{version}-%{release} libxml2-devel
|
Requires: %{name}-client = %{version}-%{release} libxml2-devel
|
||||||
%if %{with_xen}
|
Requires: pkg-config
|
||||||
|
%if %{with_xen} || %{with_libxl}
|
||||||
Requires: xen-devel
|
Requires: xen-devel
|
||||||
%endif
|
%endif
|
||||||
Requires: pkg-config
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Libvirt is a C toolkit to interract with the virtualization
|
Libvirt is a C toolkit to interract with the virtualization
|
||||||
@ -264,6 +428,7 @@ Authors:
|
|||||||
Daniel Veillard <veillard@redhat.com>
|
Daniel Veillard <veillard@redhat.com>
|
||||||
Karel Zak <kzak@redhat.com>
|
Karel Zak <kzak@redhat.com>
|
||||||
|
|
||||||
|
%if %{with_python}
|
||||||
%package python
|
%package python
|
||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
||||||
@ -282,16 +447,14 @@ Authors:
|
|||||||
--------
|
--------
|
||||||
Daniel Veillard <veillard@redhat.com>
|
Daniel Veillard <veillard@redhat.com>
|
||||||
Karel Zak <kzak@redhat.com>
|
Karel Zak <kzak@redhat.com>
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch102
|
%patch101
|
||||||
|
%patch102 -p1
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
%patch104 -p1
|
|
||||||
%patch105 -p1
|
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
|
|
||||||
@ -302,27 +465,51 @@ Authors:
|
|||||||
%if ! %{with_qemu}
|
%if ! %{with_qemu}
|
||||||
%define _without_qemu --without-qemu
|
%define _without_qemu --without-qemu
|
||||||
%endif
|
%endif
|
||||||
%if ! %{with_lxc}
|
|
||||||
%define _without_lxc --without-lxc
|
|
||||||
%endif
|
|
||||||
%if ! %{with_openvz}
|
%if ! %{with_openvz}
|
||||||
%define _without_openvz --without-openvz
|
%define _without_openvz --without-openvz
|
||||||
%endif
|
%endif
|
||||||
|
%if ! %{with_lxc}
|
||||||
|
%define _without_lxc --without-lxc
|
||||||
|
%endif
|
||||||
%if ! %{with_vbox}
|
%if ! %{with_vbox}
|
||||||
%define _without_vbox --without-vbox
|
%define _without_vbox --without-vbox
|
||||||
%endif
|
%endif
|
||||||
|
%if ! %{with_xenapi}
|
||||||
|
%define _without_xenapi --without-xenapi
|
||||||
|
%endif
|
||||||
%if ! %{with_uml}
|
%if ! %{with_uml}
|
||||||
%define _without_uml --without-uml
|
%define _without_uml --without-uml
|
||||||
%endif
|
%endif
|
||||||
%if ! %{with_one}
|
|
||||||
%define _without_one --without-one
|
|
||||||
%endif
|
|
||||||
%if ! %{with_phyp}
|
%if ! %{with_phyp}
|
||||||
%define _without_phyp --without-phyp
|
%define _without_phyp --without-phyp
|
||||||
%endif
|
%endif
|
||||||
%if ! %{with_esx}
|
%if ! %{with_esx}
|
||||||
%define _without_esx --without-esx
|
%define _without_esx --without-esx
|
||||||
%endif
|
%endif
|
||||||
|
%if ! %{with_vmware}
|
||||||
|
%define _without_vmware --without-vmware
|
||||||
|
%endif
|
||||||
|
%if ! %{with_libxl}
|
||||||
|
%define _without_libxl --without-libxl
|
||||||
|
%endif
|
||||||
|
%if ! %{with_libvirtd}
|
||||||
|
%define _without_libvirtd --without-libvirtd
|
||||||
|
%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_numactl}
|
%if ! %{with_numactl}
|
||||||
%define _without_numactl --without-numactl
|
%define _without_numactl --without-numactl
|
||||||
%endif
|
%endif
|
||||||
@ -350,8 +537,20 @@ Authors:
|
|||||||
%if ! %{with_macvtap}
|
%if ! %{with_macvtap}
|
||||||
%define _without_macvtap --without-macvtap
|
%define _without_macvtap --without-macvtap
|
||||||
%endif
|
%endif
|
||||||
%if ! %{with_virtualport}
|
%if ! %{with_polkit}
|
||||||
%define _without_virtualport --without-virtualport
|
%define _without_polkit --without-polkit
|
||||||
|
%endif
|
||||||
|
%if ! %{with_network}
|
||||||
|
%define _without_network --without-network
|
||||||
|
%endif
|
||||||
|
%if ! %{with_sasl}
|
||||||
|
%define _without_sasl --without-sasl
|
||||||
|
%endif
|
||||||
|
%if ! %{with_python}
|
||||||
|
%define _without_python --without-python
|
||||||
|
%endif
|
||||||
|
%if ! %{with_libpcap}
|
||||||
|
%define _without_libpcap --without-libpcap
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
@ -359,30 +558,38 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
%configure --disable-static --with-pic \
|
%configure --disable-static --with-pic \
|
||||||
%{?_without_xen} \
|
%{?_without_xen} \
|
||||||
%{?_without_qemu} \
|
%{?_without_qemu} \
|
||||||
%{?_without_lxc} \
|
|
||||||
%{?_without_openvz} \
|
%{?_without_openvz} \
|
||||||
|
%{?_without_lxc} \
|
||||||
%{?_without_vbox} \
|
%{?_without_vbox} \
|
||||||
|
%{?_without_xenapi} \
|
||||||
%{?_without_uml} \
|
%{?_without_uml} \
|
||||||
%{?_without_one} \
|
|
||||||
%{?_without_phyp} \
|
%{?_without_phyp} \
|
||||||
%{?_without_esx} \
|
%{?_without_esx} \
|
||||||
|
%{?_without_vmware} \
|
||||||
|
%{?_without_libxl} \
|
||||||
|
%{?_without_libvirtd} \
|
||||||
|
%{?_without_storage_fs} \
|
||||||
|
%{?_without_storage_lvm} \
|
||||||
|
%{?_without_storage_iscsi} \
|
||||||
|
%{?_without_storage_disk} \
|
||||||
|
%{?_without_storage_mpath} \
|
||||||
%{?_without_numactl} \
|
%{?_without_numactl} \
|
||||||
%{?_with_selinux} \
|
|
||||||
%{?_without_capng} \
|
|
||||||
%{?_without_netcf} \
|
|
||||||
%{?_without_selinux} \
|
%{?_without_selinux} \
|
||||||
%{?_without_apparmor} \
|
%{?_without_apparmor} \
|
||||||
|
%{?_without_capng} \
|
||||||
|
%{?_without_netcf} \
|
||||||
%{?_without_hal} \
|
%{?_without_hal} \
|
||||||
%{?_without_udev} \
|
%{?_without_udev} \
|
||||||
%{?_without_yajl} \
|
%{?_without_yajl} \
|
||||||
%{?_without_macvtap} \
|
%{?_without_macvtap} \
|
||||||
%{?_without_virtualport} \
|
%{?_without_polkit} \
|
||||||
--without-xen-proxy \
|
%{?_without_network} \
|
||||||
|
%{?_without_sasl} \
|
||||||
|
%{?_without_python} \
|
||||||
|
%{?_without_libpcap} \
|
||||||
--libexecdir=%{_libdir}/%{name} \
|
--libexecdir=%{_libdir}/%{name} \
|
||||||
--with-init-script=none \
|
|
||||||
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
|
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
|
||||||
ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \
|
--with-init-script=redhat \
|
||||||
ac_cv_path_ISCSIADM=/sbin/iscsiadm \
|
|
||||||
ac_cv_path_MODPROBE=/sbin/modprobe \
|
ac_cv_path_MODPROBE=/sbin/modprobe \
|
||||||
ac_cv_path_UDEVADM=/sbin/udevadm \
|
ac_cv_path_UDEVADM=/sbin/udevadm \
|
||||||
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount
|
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount
|
||||||
@ -394,10 +601,22 @@ cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{nam
|
|||||||
cd docs ; cp -a *.html $RPM_BUILD_ROOT%{_docdir}/%{name} ; cp -a *.png $RPM_BUILD_ROOT%{_docdir}/%{name} ; cd ..
|
cd docs ; cp -a *.html $RPM_BUILD_ROOT%{_docdir}/%{name} ; cp -a *.png $RPM_BUILD_ROOT%{_docdir}/%{name} ; cd ..
|
||||||
# remove currently unsupported locale(s)
|
# remove currently unsupported locale(s)
|
||||||
rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin
|
rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin
|
||||||
# don't autostart the default network
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
|
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
|
||||||
|
%find_lang %{name}
|
||||||
|
%if %{with_network}
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/dnsmasq/
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
|
||||||
|
cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
|
||||||
|
$RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
|
||||||
|
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 "/<uuid>/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_lxc}
|
%if ! %{with_lxc}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
|
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
|
||||||
@ -411,7 +630,12 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
|
|||||||
%if ! %{with_uml}
|
%if ! %{with_uml}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||||
%endif
|
%endif
|
||||||
%find_lang %{name}
|
%if ! %{with_python}
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-python
|
||||||
|
%endif
|
||||||
|
%if ! %{with_libvirtd}
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
|
||||||
|
%endif
|
||||||
|
|
||||||
ln_dupes()
|
ln_dupes()
|
||||||
{
|
{
|
||||||
@ -431,57 +655,86 @@ ln_dupes()
|
|||||||
)
|
)
|
||||||
# init scripts
|
# init scripts
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
install %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/libvirtd
|
%if %{with_libvirtd}
|
||||||
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd
|
install %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirtd
|
||||||
ln -s /etc/init.d/libvirt-guests $RPM_BUILD_ROOT/usr/sbin/rclibvirt-guests
|
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd
|
||||||
|
%endif
|
||||||
|
ln -s /etc/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%if %{with_libvirtd}
|
||||||
|
%if %{with_network}
|
||||||
|
# Install the default network if one doesn't exist
|
||||||
|
if test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||||
|
then
|
||||||
|
UUID=`/usr/bin/uuidgen`
|
||||||
|
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
|
||||||
|
< %{_datadir}/libvirt/networks/default.xml \
|
||||||
|
> %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
%if 0%{?sles_version}
|
%if 0%{?sles_version}
|
||||||
%{fillup_and_insserv -f -y libvirtd}
|
%{fillup_and_insserv -y libvirtd}
|
||||||
|
%else
|
||||||
|
%{fillup_only -n libvirtd}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%{fillup_only -n libvirt-guests}
|
%{fillup_only -n libvirt-guests}
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if %{with_libvirtd}
|
||||||
%stop_on_removal libvirtd
|
%stop_on_removal libvirtd
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%if %{with_libvirtd}
|
||||||
%restart_on_update libvirtd
|
%restart_on_update libvirtd
|
||||||
|
%endif
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
|
||||||
%post client -p /sbin/ldconfig
|
%post client -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun client -p /sbin/ldconfig
|
%postun client -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if %{with_libvirtd}
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_sbindir}/libvirtd
|
%{_sbindir}/libvirtd
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
|
||||||
|
%if %{with_network}
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
%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/
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
%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/
|
||||||
|
%dir %{_datadir}/libvirt/networks/
|
||||||
|
%{_datadir}/libvirt/networks/default.xml
|
||||||
|
%endif
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
|
||||||
%{_sysconfdir}/libvirt/nwfilter/*.xml
|
%{_sysconfdir}/libvirt/nwfilter/*.xml
|
||||||
|
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
|
||||||
%config /etc/init.d/libvirtd
|
%config /etc/init.d/libvirtd
|
||||||
%{_sbindir}/rclibvirtd
|
%{_sbindir}/rclibvirtd
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||||
%config %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
|
|
||||||
%dir %{_localstatedir}/lib/libvirt/
|
%dir %{_localstatedir}/lib/libvirt/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
|
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||||
|
%if %{with_polkit}
|
||||||
%if 0%{?suse_version} > 1110
|
%if 0%{?suse_version} > 1110
|
||||||
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
||||||
%else
|
%else
|
||||||
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
|
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%{_datadir}/augeas
|
%{_datadir}/augeas
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||||
@ -502,10 +755,16 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||||
%endif
|
%endif
|
||||||
%if 0%{with_storage_disk}
|
%if %{with_libxl}
|
||||||
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
|
||||||
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
|
||||||
|
%endif
|
||||||
|
%if %{with_storage_disk}
|
||||||
%{_libdir}/%{name}/libvirt_parthelper
|
%{_libdir}/%{name}/libvirt_parthelper
|
||||||
%endif
|
%endif
|
||||||
|
%{_libdir}/%{name}/libvirt_iohelper
|
||||||
%doc %{_mandir}/man8/libvirtd.8*
|
%doc %{_mandir}/man8/libvirtd.8*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files client -f %{name}.lang
|
%files client -f %{name}.lang
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@ -518,6 +777,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_bindir}/virsh
|
%{_bindir}/virsh
|
||||||
%{_bindir}/virt-xml-validate
|
%{_bindir}/virt-xml-validate
|
||||||
%{_bindir}/virt-pki-validate
|
%{_bindir}/virt-pki-validate
|
||||||
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/lib*.so.*
|
%{_libdir}/lib*.so.*
|
||||||
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
||||||
%config /etc/init.d/libvirt-guests
|
%config /etc/init.d/libvirt-guests
|
||||||
@ -538,7 +798,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/libvirt/cpu_map.xml
|
%{_datadir}/libvirt/cpu_map.xml
|
||||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||||
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||||
|
%if %{with_sasl}
|
||||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@ -555,10 +817,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc %{_docdir}/%{name}/*.css
|
%doc %{_docdir}/%{name}/*.css
|
||||||
%doc %{_docdir}/%{name}/html
|
%doc %{_docdir}/%{name}/html
|
||||||
|
|
||||||
|
%if %{with_python}
|
||||||
%files python
|
%files python
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc %{_docdir}/%{name}-python
|
%doc %{_docdir}/%{name}-python
|
||||||
%{py_sitedir}/libvirt.py*
|
%{py_sitedir}/libvirt.py*
|
||||||
%{py_sitedir}/libvirtmod*
|
%{py_sitedir}/libvirtmod*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-0.8.6/daemon/libvirtd.conf
|
Index: libvirt-0.9.0/daemon/libvirtd.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.6.orig/daemon/libvirtd.conf
|
--- libvirt-0.9.0.orig/daemon/libvirtd.conf
|
||||||
+++ libvirt-0.8.6/daemon/libvirtd.conf
|
+++ libvirt-0.9.0/daemon/libvirtd.conf
|
||||||
@@ -18,8 +18,8 @@
|
@@ -18,8 +18,8 @@
|
||||||
# It is necessary to setup a CA and issue server certificates before
|
# It is necessary to setup a CA and issue server certificates before
|
||||||
# using this capability.
|
# using this capability.
|
||||||
@ -28,11 +28,11 @@ Index: libvirt-0.8.6/daemon/libvirtd.conf
|
|||||||
|
|
||||||
# Override the default mDNS advertizement name. This must be
|
# Override the default mDNS advertizement name. This must be
|
||||||
# unique on the immediate broadcast network.
|
# unique on the immediate broadcast network.
|
||||||
Index: libvirt-0.8.6/daemon/libvirtd.c
|
Index: libvirt-0.9.0/daemon/libvirtd.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.6.orig/daemon/libvirtd.c
|
--- libvirt-0.9.0.orig/daemon/libvirtd.c
|
||||||
+++ libvirt-0.8.6/daemon/libvirtd.c
|
+++ libvirt-0.9.0/daemon/libvirtd.c
|
||||||
@@ -147,7 +147,7 @@ static int sigwrite = -1; /* Signa
|
@@ -148,7 +148,7 @@ static int sigwrite = -1; /* Signa
|
||||||
static int ipsock = 0; /* -l Listen for TCP/IP */
|
static int ipsock = 0; /* -l Listen for TCP/IP */
|
||||||
|
|
||||||
/* Defaults for configuration file elements */
|
/* Defaults for configuration file elements */
|
||||||
@ -41,7 +41,7 @@ Index: libvirt-0.8.6/daemon/libvirtd.c
|
|||||||
static int listen_tcp = 0;
|
static int listen_tcp = 0;
|
||||||
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
|
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
|
||||||
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
|
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
|
||||||
@@ -169,7 +169,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
@@ -170,7 +170,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
||||||
#endif
|
#endif
|
||||||
static int auth_tls = REMOTE_AUTH_NONE;
|
static int auth_tls = REMOTE_AUTH_NONE;
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
Index: libvirt-0.8.8/tools/Makefile.am
|
Index: libvirt-0.9.1/tools/Makefile.am
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/tools/Makefile.am
|
--- libvirt-0.9.1.orig/tools/Makefile.am
|
||||||
+++ libvirt-0.8.8/tools/Makefile.am
|
+++ libvirt-0.9.1/tools/Makefile.am
|
||||||
@@ -129,18 +129,18 @@ install-data-local: install-init
|
@@ -131,16 +131,17 @@ uninstall-local: uninstall-init
|
||||||
|
|
||||||
uninstall-local: uninstall-init
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||||
|
|
||||||
-if LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
||||||
install-init: libvirt-guests.init
|
install-init: libvirt-guests.init
|
||||||
- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/init.d
|
+ mkdir -p $(DESTDIR)$(sysconfdir)/init.d
|
||||||
@ -14,37 +12,25 @@ Index: libvirt-0.8.8/tools/Makefile.am
|
|||||||
- $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
- $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
||||||
- mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
- mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
||||||
+ $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests
|
+ $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests
|
||||||
+ mkdir -p $(DESTDIR)/var/adm/fillup-templates
|
+ mkdir -p $(DESTDIR)$(localstatedir)/adm/fillup-templates
|
||||||
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
|
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
|
||||||
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
||||||
+ $(DESTDIR)/var/adm/fillup-templates/sysconfig.libvirt-guests
|
+ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirt-guests
|
||||||
|
|
||||||
uninstall-init:
|
uninstall-init:
|
||||||
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests \
|
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests \
|
||||||
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
||||||
+ rm -f $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests \
|
+ rm -f $(DESTDIR)$(sysconfdir)/init.d/libvirt-guests \
|
||||||
+ $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests \
|
+ $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests \
|
||||||
+ $(DESTDIR)/var/adm/fillup-templates/sysconfig.libvirt-guests
|
+ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirt-guests
|
||||||
|
|
||||||
BUILT_SOURCES += libvirt-guests.init
|
BUILT_SOURCES += libvirt-guests.init
|
||||||
|
|
||||||
@@ -155,11 +155,6 @@ libvirt-guests.init: libvirt-guests.init
|
Index: libvirt-0.9.1/tools/libvirt-guests.sysconf
|
||||||
< $< > $@-t && \
|
|
||||||
chmod a+x $@-t && \
|
|
||||||
mv $@-t $@
|
|
||||||
-else
|
|
||||||
-install-init:
|
|
||||||
-uninstall-init:
|
|
||||||
-libvirt-guests.init:
|
|
||||||
-endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
||||||
|
|
||||||
|
|
||||||
CLEANFILES = $(bin_SCRIPTS) $(man1_MANS)
|
|
||||||
Index: libvirt-0.8.8/tools/libvirt-guests.sysconf
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/tools/libvirt-guests.sysconf
|
--- libvirt-0.9.1.orig/tools/libvirt-guests.sysconf
|
||||||
+++ libvirt-0.8.8/tools/libvirt-guests.sysconf
|
+++ libvirt-0.9.1/tools/libvirt-guests.sysconf
|
||||||
@@ -1,15 +1,23 @@
|
@@ -1,18 +1,28 @@
|
||||||
+## Path: System/Virtualization/libvirt
|
+## Path: System/Virtualization/libvirt
|
||||||
+
|
+
|
||||||
+## Type: string
|
+## Type: string
|
||||||
@ -65,12 +51,18 @@ Index: libvirt-0.8.8/tools/libvirt-guests.sysconf
|
|||||||
-#ON_BOOT=start
|
-#ON_BOOT=start
|
||||||
+ON_BOOT=start
|
+ON_BOOT=start
|
||||||
|
|
||||||
|
+## Type: integer
|
||||||
|
+## Default: 0
|
||||||
|
# number of seconds to wait between each guest start
|
||||||
|
-#START_DELAY=0
|
||||||
|
+START_DELAY=0
|
||||||
|
|
||||||
+## Type: string
|
+## Type: string
|
||||||
+## Default: suspend
|
+## Default: suspend
|
||||||
# action taken on host shutdown
|
# action taken on host shutdown
|
||||||
# - suspend all running guests are suspended using virsh managedsave
|
# - suspend all running guests are suspended using virsh managedsave
|
||||||
# - shutdown all running guests are asked to shutdown. Please be careful with
|
# - shutdown all running guests are asked to shutdown. Please be careful with
|
||||||
@@ -18,7 +26,9 @@
|
@@ -21,7 +31,9 @@
|
||||||
# which just needs a long time to shutdown. When setting
|
# which just needs a long time to shutdown. When setting
|
||||||
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
|
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
|
||||||
# value suitable for your guests.
|
# value suitable for your guests.
|
||||||
@ -82,10 +74,10 @@ Index: libvirt-0.8.8/tools/libvirt-guests.sysconf
|
|||||||
# number of seconds we're willing to wait for a guest to shut down
|
# number of seconds we're willing to wait for a guest to shut down
|
||||||
-#SHUTDOWN_TIMEOUT=0
|
-#SHUTDOWN_TIMEOUT=0
|
||||||
+SHUTDOWN_TIMEOUT=120
|
+SHUTDOWN_TIMEOUT=120
|
||||||
Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
Index: libvirt-0.9.1/tools/libvirt-guests.init.sh
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/tools/libvirt-guests.init.sh
|
--- libvirt-0.9.1.orig/tools/libvirt-guests.init.sh
|
||||||
+++ libvirt-0.8.8/tools/libvirt-guests.init.sh
|
+++ libvirt-0.9.1/tools/libvirt-guests.init.sh
|
||||||
@@ -4,10 +4,10 @@
|
@@ -4,10 +4,10 @@
|
||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
@ -119,7 +111,7 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
# Source gettext library.
|
# Source gettext library.
|
||||||
# Make sure this file is recognized as having translations: _("dummy")
|
# Make sure this file is recognized as having translations: _("dummy")
|
||||||
. "@bindir@"/gettext.sh
|
. "@bindir@"/gettext.sh
|
||||||
@@ -49,12 +48,10 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
@@ -50,12 +49,10 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
||||||
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
||||||
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||||
|
|
||||||
@ -133,7 +125,7 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
@@ -78,12 +75,31 @@ run_virsh_c() {
|
@@ -77,12 +74,31 @@ run_virsh_c() {
|
||||||
( export LC_ALL=C; run_virsh "$@" )
|
( export LC_ALL=C; run_virsh "$@" )
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,32 +151,32 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
list_guests() {
|
list_guests() {
|
||||||
uri=$1
|
uri=$1
|
||||||
|
|
||||||
list=$(run_virsh_c $uri list)
|
list=$(run_virsh_c "$uri" list)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
- RETVAL=1
|
- RETVAL=1
|
||||||
+ rc_failed 1
|
+ rc_failed 1
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -91,7 +107,7 @@ list_guests() {
|
@@ -90,7 +106,7 @@ list_guests() {
|
||||||
for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do
|
for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do
|
||||||
uuid=$(run_virsh_c $uri dominfo $id | awk '/^UUID:/{print $2}')
|
uuid=$(run_virsh_c "$uri" dominfo "$id" | awk '/^UUID:/{print $2}')
|
||||||
if [ -z "$uuid" ]; then
|
if [ -z "$uuid" ]; then
|
||||||
- RETVAL=1
|
- RETVAL=1
|
||||||
+ rc_failed 1
|
+ rc_failed 1
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
uuids="$uuids $uuid"
|
uuids="$uuids $uuid"
|
||||||
@@ -118,7 +134,7 @@ guest_is_on() {
|
@@ -117,7 +133,7 @@ guest_is_on() {
|
||||||
guest_running=false
|
guest_running=false
|
||||||
info=$(run_virsh_c $uri dominfo $uuid)
|
info=$(run_virsh_c "$uri" dominfo "$uuid")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
- RETVAL=1
|
- RETVAL=1
|
||||||
+ rc_failed 1
|
+ rc_failed 1
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -156,6 +172,12 @@ start() {
|
@@ -159,6 +175,12 @@ start() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -196,8 +188,8 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
+
|
+
|
||||||
eval_gettext "Resuming guests on \$uri URI..."; echo
|
eval_gettext "Resuming guests on \$uri URI..."; echo
|
||||||
for guest in $list; do
|
for guest in $list; do
|
||||||
name=$(guest_name $uri $guest)
|
name=$(guest_name "$uri" "$guest")
|
||||||
@@ -237,7 +259,7 @@ stop() {
|
@@ -245,7 +267,7 @@ stop() {
|
||||||
if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
|
if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
|
||||||
gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
|
gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
|
||||||
echo
|
echo
|
||||||
@ -206,7 +198,7 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -301,14 +323,13 @@ gueststatus() {
|
@@ -315,14 +337,13 @@ gueststatus() {
|
||||||
rh_status() {
|
rh_status() {
|
||||||
if [ -f "$LISTFILE" ]; then
|
if [ -f "$LISTFILE" ]; then
|
||||||
gettext "stopped, with saved guests"; echo
|
gettext "stopped, with saved guests"; echo
|
||||||
@ -222,9 +214,33 @@ Index: libvirt-0.8.8/tools/libvirt-guests.init.sh
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,4 +373,4 @@ case "$1" in
|
@@ -366,4 +387,4 @@ case "$1" in
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
-exit $RETVAL
|
-exit $RETVAL
|
||||||
+rc_exit
|
+rc_exit
|
||||||
|
Index: libvirt-0.9.1/daemon/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- libvirt-0.9.1.orig/daemon/Makefile.am
|
||||||
|
+++ libvirt-0.9.1/daemon/Makefile.am
|
||||||
|
@@ -281,16 +281,12 @@ install-logrotate: $(LOGROTATE_CONFS)
|
||||||
|
|
||||||
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||||
|
install-init: libvirtd.init
|
||||||
|
- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.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
|
||||||
|
+ $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
|
||||||
|
|
||||||
|
uninstall-init:
|
||||||
|
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
|
||||||
|
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||||
|
+ rm -f $(DESTDIR)$(localstatedir)/adm/fillup-templates/sysconfig.libvirtd
|
||||||
|
|
||||||
|
BUILT_SOURCES += libvirtd.init
|
||||||
|
|
@ -1,272 +0,0 @@
|
|||||||
Index: libvirt-0.8.6/src/xen/xen_hypervisor.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-0.8.6.orig/src/xen/xen_hypervisor.c
|
|
||||||
+++ libvirt-0.8.6/src/xen/xen_hypervisor.c
|
|
||||||
@@ -223,11 +223,28 @@ struct xen_v2d6_getdomaininfo {
|
|
||||||
};
|
|
||||||
typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo;
|
|
||||||
|
|
||||||
+struct xen_v2d7_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 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_v2d7_getdomaininfo xen_v2d7_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;
|
|
||||||
};
|
|
||||||
typedef union xen_getdomaininfo xen_getdomaininfo;
|
|
||||||
|
|
||||||
@@ -236,6 +253,7 @@ union xen_getdomaininfolist {
|
|
||||||
struct xen_v2_getdomaininfo *v2;
|
|
||||||
struct xen_v2d5_getdomaininfo *v2d5;
|
|
||||||
struct xen_v2d6_getdomaininfo *v2d6;
|
|
||||||
+ struct xen_v2d7_getdomaininfo *v2d7;
|
|
||||||
};
|
|
||||||
typedef union xen_getdomaininfolist xen_getdomaininfolist;
|
|
||||||
|
|
||||||
@@ -273,147 +291,179 @@ typedef struct xen_v2s5_availheap xen_v
|
|
||||||
#define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
(VIR_ALLOC_N(domlist.v0, (size)) == 0) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ (VIR_ALLOC_N(domlist.v2d7, (size)) == 0) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
(VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \
|
|
||||||
(dom_interface_version == 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) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
VIR_FREE(domlist.v0) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ VIR_FREE(domlist.v2d7) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
VIR_FREE(domlist.v2d6) : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
VIR_FREE(domlist.v2d5) : \
|
|
||||||
- VIR_FREE(domlist.v2))))
|
|
||||||
+ VIR_FREE(domlist.v2)))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ memset(domlist.v2d7, 0, sizeof(*domlist.v2d7) * size) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \
|
|
||||||
(dom_interface_version == 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) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
domlist.v0[n].domain : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ domlist.v2d7[n].domain : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
domlist.v2d6[n].domain : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
domlist.v2d5[n].domain : \
|
|
||||||
- domlist.v2[n].domain)))
|
|
||||||
+ domlist.v2[n].domain))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFOLIST_UUID(domlist, n) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
domlist.v0[n].handle : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ domlist.v2d7[n].handle : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
domlist.v2d6[n].handle : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
domlist.v2d5[n].handle : \
|
|
||||||
- domlist.v2[n].handle)))
|
|
||||||
+ domlist.v2[n].handle))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFOLIST_DATA(domlist) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
(void*)(domlist->v0) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ (void*)(domlist->v2d7) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
(void*)(domlist->v2d6) : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
(void*)(domlist->v2d5) : \
|
|
||||||
- (void*)(domlist->v2))))
|
|
||||||
+ (void*)(domlist->v2)))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_SIZE \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
sizeof(xen_v0_getdomaininfo) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ sizeof(xen_v2d7_getdomaininfo) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
sizeof(xen_v2d6_getdomaininfo) : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
sizeof(xen_v2d5_getdomaininfo) : \
|
|
||||||
- sizeof(xen_v2_getdomaininfo))))
|
|
||||||
+ sizeof(xen_v2_getdomaininfo)))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_CLEAR(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ memset(&(dominfo.v2d7), 0, sizeof(xen_v2d7_getdomaininfo)) : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \
|
|
||||||
(dom_interface_version == 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) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.domain : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.domain : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.domain : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.domain : \
|
|
||||||
- dominfo.v2.domain)))
|
|
||||||
+ dominfo.v2.domain))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_CPUTIME(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.cpu_time : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.cpu_time : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.cpu_time : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.cpu_time : \
|
|
||||||
- dominfo.v2.cpu_time)))
|
|
||||||
+ dominfo.v2.cpu_time))))
|
|
||||||
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.nr_online_vcpus : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.nr_online_vcpus : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.nr_online_vcpus : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.nr_online_vcpus : \
|
|
||||||
- dominfo.v2.nr_online_vcpus)))
|
|
||||||
+ dominfo.v2.nr_online_vcpus))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_MAXCPUID(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.max_vcpu_id : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.max_vcpu_id : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.max_vcpu_id : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.max_vcpu_id : \
|
|
||||||
- dominfo.v2.max_vcpu_id)))
|
|
||||||
+ dominfo.v2.max_vcpu_id))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_FLAGS(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.flags : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.flags : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.flags : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.flags : \
|
|
||||||
- dominfo.v2.flags)))
|
|
||||||
+ dominfo.v2.flags))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.tot_pages : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.tot_pages : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.tot_pages : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.tot_pages : \
|
|
||||||
- dominfo.v2.tot_pages)))
|
|
||||||
+ dominfo.v2.tot_pages))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.max_pages : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.max_pages : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.max_pages : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.max_pages : \
|
|
||||||
- dominfo.v2.max_pages)))
|
|
||||||
+ dominfo.v2.max_pages))))
|
|
||||||
|
|
||||||
#define XEN_GETDOMAININFO_UUID(dominfo) \
|
|
||||||
(hypervisor_version < 2 ? \
|
|
||||||
dominfo.v0.handle : \
|
|
||||||
- (dom_interface_version >= 6 ? \
|
|
||||||
+ (dom_interface_version >= 7 ? \
|
|
||||||
+ dominfo.v2d7.handle : \
|
|
||||||
+ (dom_interface_version == 6 ? \
|
|
||||||
dominfo.v2d6.handle : \
|
|
||||||
(dom_interface_version == 5 ? \
|
|
||||||
dominfo.v2d5.handle : \
|
|
||||||
- dominfo.v2.handle)))
|
|
||||||
+ dominfo.v2.handle))))
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
@@ -2087,8 +2137,16 @@ xenHypervisorInit(void)
|
|
||||||
sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
|
|
||||||
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
|
|
||||||
dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */
|
|
||||||
- DEBUG0("Using hypervisor call v2, sys ver7 dom ver6");
|
|
||||||
- goto done;
|
|
||||||
+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
|
||||||
+ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n");
|
|
||||||
+ goto done;
|
|
||||||
+ }
|
|
||||||
+ /* CPU Pools addition to domctl interface */
|
|
||||||
+ dom_interface_version = 7; /* XEN_DOMCTL_INTERFACE_VERSION */
|
|
||||||
+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
|
||||||
+ DEBUG0("Using hypervisor call v2, sys ver6 dom ver7\n");
|
|
||||||
+ goto done;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
hypervisor_version = 1;
|
|
@ -13,11 +13,11 @@ Date: Wed Jan 27 16:11:41 2010 -0700
|
|||||||
This approach allows removing a disk when domain is inactive. We
|
This approach allows removing a disk when domain is inactive. We
|
||||||
obviously can't search xenstore when the domain is inactive.
|
obviously can't search xenstore when the domain is inactive.
|
||||||
|
|
||||||
Index: libvirt-0.8.8/src/xen/xend_internal.c
|
Index: libvirt-0.9.1/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/src/xen/xend_internal.c
|
--- libvirt-0.9.1.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.8.8/src/xen/xend_internal.c
|
+++ libvirt-0.9.1/src/xen/xend_internal.c
|
||||||
@@ -89,6 +89,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
|
@@ -62,6 +62,7 @@
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainXMLDevID(virDomainPtr domain,
|
virDomainXMLDevID(virDomainPtr domain,
|
||||||
@ -25,7 +25,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -4088,7 +4089,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
@@ -2731,7 +2732,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
sexpr = virBufferContentAndReset(&buf);
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
/* device doesn't exist, define it */
|
/* device doesn't exist, define it */
|
||||||
ret = xend_op(domain->conn, domain->name, "op", "device_create",
|
ret = xend_op(domain->conn, domain->name, "op", "device_create",
|
||||||
"config", sexpr, NULL);
|
"config", sexpr, NULL);
|
||||||
@@ -4211,7 +4212,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
@@ -2854,7 +2855,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
sexpr = virBufferContentAndReset(&buf);
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("requested device does not exist"));
|
_("requested device does not exist"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -4304,7 +4305,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
@@ -2947,7 +2948,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
||||||
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||||
@@ -6085,6 +6086,7 @@ error:
|
@@ -3900,6 +3901,7 @@ struct xenUnifiedDriver xenDaemonDriver
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
virDomainXMLDevID(virDomainPtr domain,
|
virDomainXMLDevID(virDomainPtr domain,
|
||||||
@ -60,7 +60,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -6093,8 +6095,12 @@ virDomainXMLDevID(virDomainPtr domain,
|
@@ -3908,8 +3910,12 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||||
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
||||||
char *xref;
|
char *xref;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@ -73,7 +73,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
if (dev->data.disk->driverName &&
|
if (dev->data.disk->driverName &&
|
||||||
STREQ(dev->data.disk->driverName, "tap"))
|
STREQ(dev->data.disk->driverName, "tap"))
|
||||||
strcpy(class, "tap");
|
strcpy(class, "tap");
|
||||||
@@ -6104,19 +6110,21 @@ virDomainXMLDevID(virDomainPtr domain,
|
@@ -3919,19 +3925,21 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||||
else
|
else
|
||||||
strcpy(class, "vbd");
|
strcpy(class, "vbd");
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
Index: libvirt-0.8.8/src/xen/xend_internal.c
|
Index: libvirt-0.9.1/src/xenxs/xen_sxpr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/src/xen/xend_internal.c
|
--- libvirt-0.9.1.orig/src/xenxs/xen_sxpr.c
|
||||||
+++ libvirt-0.8.8/src/xen/xend_internal.c
|
+++ libvirt-0.9.1/src/xenxs/xen_sxpr.c
|
||||||
@@ -1365,7 +1365,7 @@ error:
|
@@ -324,7 +324,7 @@ error:
|
||||||
static int
|
static int
|
||||||
xenDaemonParseSxprDisks(virDomainDefPtr def,
|
xenParseSxprDisks(virDomainDefPtr def,
|
||||||
const struct sexpr *root,
|
const struct sexpr *root,
|
||||||
- int hvm,
|
- int hvm,
|
||||||
+ int hvm ATTRIBUTE_UNUSED,
|
+ int hvm ATTRIBUTE_UNUSED,
|
||||||
int xendConfigVersion)
|
int xendConfigVersion)
|
||||||
{
|
{
|
||||||
const struct sexpr *cur, *node;
|
const struct sexpr *cur, *node;
|
||||||
@@ -1412,7 +1412,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
@@ -371,7 +371,6 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||||
/* There is a case without the uname to the CD-ROM device */
|
/* There is a case without the uname to the CD-ROM device */
|
||||||
offset = strchr(dst, ':');
|
offset = strchr(dst, ':');
|
||||||
if (!offset ||
|
if (!offset ||
|
||||||
- !hvm ||
|
- !hvm ||
|
||||||
STRNEQ(offset, ":cdrom")) {
|
STRNEQ(offset, ":cdrom")) {
|
||||||
virXendError(VIR_ERR_INTERNAL_ERROR,
|
XENXS_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("domain information incomplete, vbd has no src"));
|
"%s", _("domain information incomplete, vbd has no src"));
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.8.8/src/xen/xend_internal.c
|
Index: libvirt-0.9.1/src/xenxs/xen_sxpr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.8.orig/src/xen/xend_internal.c
|
--- libvirt-0.9.1.orig/src/xenxs/xen_sxpr.c
|
||||||
+++ libvirt-0.8.8/src/xen/xend_internal.c
|
+++ libvirt-0.9.1/src/xenxs/xen_sxpr.c
|
||||||
@@ -1383,20 +1383,24 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
@@ -342,20 +342,24 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||||
const char *src = NULL;
|
const char *src = NULL;
|
||||||
const char *dst = NULL;
|
const char *dst = NULL;
|
||||||
const char *mode = NULL;
|
const char *mode = NULL;
|
||||||
@ -27,7 +27,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(disk) < 0)
|
if (VIR_ALLOC(disk) < 0)
|
||||||
@@ -1521,7 +1525,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
@@ -480,7 +484,13 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||||
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ Index: libvirt-0.8.8/src/xen/xend_internal.c
|
|||||||
+ def->ndisks++;
|
+ def->ndisks++;
|
||||||
+ } else
|
+ } else
|
||||||
+ def->disks[def->ndisks++] = disk;
|
+ def->disks[def->ndisks++] = disk;
|
||||||
|
+
|
||||||
disk = NULL;
|
disk = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user