Accepting request 78144 from Virtualization
New libvirt 0.9.4 package for Factory/12.1 - Update to libvirt 0.9.4 - bandwidth QoS control - Add new API virDomainBlockPull* - save: new API to manipulate save file images - CPU bandwidth limits support - allow to send NMI and key event to guests - new API virDomainUndefineFlags - Implement code to attach to external QEMU instances - various missing python binding - bios: Add support for SGA - Numerous improvements and documentation / bug fixes - Add some upstream patches to fix memory leaks and some bugs in new rpc code c2ddd536-cert-key-order.patch 3e5d48ef-rpc-1.patch 927dfcf6-rpc-2.patch 2c85644b-rpc-3.patch afe8839f-rpc-4.patch 3cfdc57b-rpc-5.patch 7518ad75-remote-mem-leak.patch a34e193f-statstest.patch 41828514-skip-xen-tests.patch eb314315-pv-kernel-cmdline.patch 00d3c5a6-remove-dead-code.patch b8adfcc6-fix-polkit0-build.patch b2534529-unused-param.patch - Update to libvirt 0.9.3 - vcpupin: introduce the new libvirt API (virDomainGetVcpupinInfo) - Add TXT record support for virtual DNS service - Support reboots with the QEMU driver - Introduce virDomainGetControlInfo API - virNodeGetMemoryStats: Expose new API - virNodeGetCPUTime: Implement public API - send-key: Defining the public API - vcpupin: introduce a new libvirt API (virDomainPinVcpuFlags) OBS-URL: https://build.opensuse.org/request/show/78144 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=82
This commit is contained in:
commit
2160fb6d83
@ -1,83 +0,0 @@
|
||||
commit 774b21c163845170c9ffa873f5720d318812eaf6
|
||||
Author: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri Jun 24 12:16:05 2011 -0600
|
||||
|
||||
remote: protect against integer overflow
|
||||
|
||||
Integer overflow and remote code are never a nice mix.
|
||||
|
||||
This has existed since commit 56cd414.
|
||||
|
||||
* src/libvirt.c (virDomainGetVcpus): Reject overflow up front.
|
||||
* src/remote/remote_driver.c (remoteDomainGetVcpus): Avoid overflow
|
||||
on sending rpc.
|
||||
* daemon/remote.c (remoteDispatchDomainGetVcpus): Avoid overflow on
|
||||
receiving rpc.
|
||||
|
||||
Index: libvirt-0.9.2/daemon/remote.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/daemon/remote.c
|
||||
+++ libvirt-0.9.2/daemon/remote.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "network.h"
|
||||
#include "libvirt/libvirt-qemu.h"
|
||||
#include "command.h"
|
||||
+#include "intprops.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_REMOTE
|
||||
|
||||
@@ -1074,7 +1075,8 @@ remoteDispatchDomainGetVcpus(struct qemu
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if (args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
|
||||
+ if (INT_MULTIPLY_OVERFLOW(args->maxinfo, args->maplen) ||
|
||||
+ args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
|
||||
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
|
||||
goto cleanup;
|
||||
}
|
||||
Index: libvirt-0.9.2/src/libvirt.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/src/libvirt.c
|
||||
+++ libvirt-0.9.2/src/libvirt.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "util.h"
|
||||
#include "memory.h"
|
||||
#include "configmake.h"
|
||||
+#include "intprops.h"
|
||||
|
||||
#ifndef WITH_DRIVER_MODULES
|
||||
# ifdef WITH_TEST
|
||||
@@ -6805,8 +6806,8 @@ virDomainGetVcpus(virDomainPtr domain, v
|
||||
|
||||
/* Ensure that domainGetVcpus (aka remoteDomainGetVcpus) does not
|
||||
try to memcpy anything into a NULL pointer. */
|
||||
- if ((cpumaps == NULL && maplen != 0)
|
||||
- || (cpumaps && maplen <= 0)) {
|
||||
+ if (!cpumaps ? maplen != 0
|
||||
+ : (maplen <= 0 || INT_MULTIPLY_OVERFLOW(maxinfo, maplen))) {
|
||||
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
goto error;
|
||||
}
|
||||
Index: libvirt-0.9.2/src/remote/remote_driver.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/src/remote/remote_driver.c
|
||||
+++ libvirt-0.9.2/src/remote/remote_driver.c
|
||||
@@ -84,6 +84,7 @@
|
||||
#include "ignore-value.h"
|
||||
#include "files.h"
|
||||
#include "command.h"
|
||||
+#include "intprops.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_REMOTE
|
||||
|
||||
@@ -2032,7 +2033,8 @@ remoteDomainGetVcpus (virDomainPtr domai
|
||||
maxinfo, REMOTE_VCPUINFO_MAX);
|
||||
goto done;
|
||||
}
|
||||
- if (maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
|
||||
+ if (INT_MULTIPLY_OVERFLOW(maxinfo, maplen) ||
|
||||
+ maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
|
||||
remoteError(VIR_ERR_RPC,
|
||||
_("vCPU map buffer length exceeds maximum: %d > %d"),
|
||||
maxinfo * maplen, REMOTE_CPUMAPS_MAX);
|
16
clone.patch
16
clone.patch
@ -2,8 +2,8 @@ Index: src/lxc/lxc_container.c
|
||||
===================================================================
|
||||
--- src/lxc/lxc_container.c.orig
|
||||
+++ src/lxc/lxc_container.c
|
||||
@@ -879,6 +879,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
||||
@@ -991,6 +991,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
handshakefd};
|
||||
|
||||
/* allocate a stack for the container */
|
||||
+#ifdef __ia64__
|
||||
@ -12,19 +12,19 @@ Index: src/lxc/lxc_container.c
|
||||
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
@@ -897,7 +900,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
flags |= CLONE_NEWNET;
|
||||
@@ -1009,7 +1012,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||
cflags |= CLONE_NEWNET;
|
||||
}
|
||||
|
||||
+#ifdef __ia64__
|
||||
+ pid = __clone2(lxcContainerChild, stack, stacksize, flags, &args);
|
||||
+ pid = __clone2(lxcContainerChild, stack, stacksize, cflags, &args);
|
||||
+#else
|
||||
pid = clone(lxcContainerChild, stacktop, flags, &args);
|
||||
pid = clone(lxcContainerChild, stacktop, cflags, &args);
|
||||
+#endif
|
||||
VIR_FREE(stack);
|
||||
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
||||
|
||||
@@ -924,6 +931,7 @@ int lxcContainerAvailable(int features)
|
||||
@@ -1036,6 +1043,7 @@ int lxcContainerAvailable(int features)
|
||||
char *childStack;
|
||||
char *stack;
|
||||
int childStatus;
|
||||
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
|
||||
|
||||
if (features & LXC_CONTAINER_FEATURE_USER)
|
||||
flags |= CLONE_NEWUSER;
|
||||
@@ -931,14 +939,21 @@ int lxcContainerAvailable(int features)
|
||||
@@ -1043,14 +1051,21 @@ int lxcContainerAvailable(int features)
|
||||
if (features & LXC_CONTAINER_FEATURE_NET)
|
||||
flags |= CLONE_NEWNET;
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6125b2151c99df356b35a41c19744bcf90aad343d3ecf170a51fc1a24b0701ab
|
||||
size 10791970
|
3
libvirt-0.9.4.tar.bz2
Normal file
3
libvirt-0.9.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d0da7dedb7d36ddb452ec33ed24203fcdb3ca6b7284524190ac0b70c96a505ad
|
||||
size 11518513
|
@ -1,3 +1,45 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 4 11:07:32 MDT 2011 - jfehlig@suse.com
|
||||
|
||||
- Update to libvirt 0.9.4
|
||||
- bandwidth QoS control
|
||||
- Add new API virDomainBlockPull*
|
||||
- save: new API to manipulate save file images
|
||||
- CPU bandwidth limits support
|
||||
- allow to send NMI and key event to guests
|
||||
- new API virDomainUndefineFlags
|
||||
- Implement code to attach to external QEMU instances
|
||||
- various missing python binding
|
||||
- bios: Add support for SGA
|
||||
- Numerous improvements and documentation / bug fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 13 14:37:42 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
- Add some upstream patches to fix memory leaks and some bugs
|
||||
in new rpc code
|
||||
c2ddd536-cert-key-order.patch 3e5d48ef-rpc-1.patch
|
||||
927dfcf6-rpc-2.patch 2c85644b-rpc-3.patch afe8839f-rpc-4.patch
|
||||
3cfdc57b-rpc-5.patch 7518ad75-remote-mem-leak.patch
|
||||
a34e193f-statstest.patch 41828514-skip-xen-tests.patch
|
||||
eb314315-pv-kernel-cmdline.patch 00d3c5a6-remove-dead-code.patch
|
||||
b8adfcc6-fix-polkit0-build.patch b2534529-unused-param.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 5 14:15:22 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
- Update to libvirt 0.9.3
|
||||
- vcpupin: introduce the new libvirt API (virDomainGetVcpupinInfo)
|
||||
- Add TXT record support for virtual DNS service
|
||||
- Support reboots with the QEMU driver
|
||||
- Introduce virDomainGetControlInfo API
|
||||
- virNodeGetMemoryStats: Expose new API
|
||||
- virNodeGetCPUTime: Implement public API
|
||||
- send-key: Defining the public API
|
||||
- vcpupin: introduce a new libvirt API (virDomainPinVcpuFlags)
|
||||
- support multifunction PCI device
|
||||
- lxc: various improvements
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 1 10:10:23 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
|
46
libvirt.spec
46
libvirt.spec
@ -17,6 +17,9 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
# In the future, we may want a client only build, which will create a
|
||||
# libvirt.so only containing the generic RPC driver and the test driver,
|
||||
# but no libvirtd
|
||||
# For now, default to a full server + client build
|
||||
%define client_only 0
|
||||
|
||||
@ -41,13 +44,13 @@
|
||||
%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}}
|
||||
%define with_vmware 0%{!?_without_vmware:%{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}
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
|
||||
# Then the secondary host drivers
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
@ -145,6 +148,22 @@
|
||||
# All supported version of openSUSE/SLE contain audit
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
|
||||
# Disable some drivers when building without libvirt daemon.
|
||||
# The logic is the same as in configure.ac
|
||||
%if ! %{with_libvirtd}
|
||||
%define with_network 0
|
||||
%define with_qemu 0
|
||||
%define with_lxc 0
|
||||
%define with_uml 0
|
||||
%define with_hal 0
|
||||
%define with_udev 0
|
||||
%define with_storage_fs 0
|
||||
%define with_storage_lvm 0
|
||||
%define with_storage_iscsi 0
|
||||
%define with_storage_mpath 0
|
||||
%define with_storage_disk 0
|
||||
%endif
|
||||
|
||||
# Enable libpcap library
|
||||
%if %{with_qemu}
|
||||
%if 0%{?suse_version} >= 1140
|
||||
@ -164,12 +183,6 @@
|
||||
%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
|
||||
|
||||
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||
|
||||
BuildRequires: python-devel
|
||||
@ -179,6 +192,7 @@ BuildRequires: libxslt
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: libtasn1-devel
|
||||
BuildRequires: gnutls-devel
|
||||
BuildRequires: bridge-utils
|
||||
BuildRequires: fdupes
|
||||
@ -283,8 +297,8 @@ Url: http://libvirt.org/
|
||||
License: LGPLv2.1+
|
||||
Group: Development/Libraries/C and C++
|
||||
AutoReqProv: yes
|
||||
Version: 0.9.2
|
||||
Release: 3
|
||||
Version: 0.9.4
|
||||
Release: 1
|
||||
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
|
||||
@ -296,7 +310,7 @@ Requires: virt-utils
|
||||
Recommends: bridge-utils
|
||||
# for modprobe of pci devices
|
||||
Requires: module-init-tools
|
||||
# for /sbin/ip
|
||||
# for /sbin/ip & /sbin/tc
|
||||
Requires: iproute
|
||||
%endif
|
||||
%if %{with_network}
|
||||
@ -349,7 +363,6 @@ Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: libvirtd.init
|
||||
Source2: libvirtd-relocation-server.fw
|
||||
# Upstream patches
|
||||
Patch0: 774b21c1-CVE-2011-2511.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch101: clone.patch
|
||||
@ -443,7 +456,6 @@ Authors:
|
||||
Karel Zak <kzak@redhat.com>
|
||||
|
||||
%if %{with_python}
|
||||
|
||||
%package python
|
||||
License: LGPLv2.1+
|
||||
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
||||
@ -466,7 +478,6 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch100 -p1
|
||||
%patch101
|
||||
%patch102 -p1
|
||||
@ -608,7 +619,6 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%{?_without_python} \
|
||||
%{?_without_libpcap} \
|
||||
--libexecdir=%{_libdir}/%{name} \
|
||||
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
|
||||
--with-qemu-user=%{qemu_user} \
|
||||
--with-qemu-group=%{qemu_group} \
|
||||
--with-init-script=redhat \
|
||||
@ -740,7 +750,6 @@ fi
|
||||
%postun client -p /sbin/ldconfig
|
||||
|
||||
%if %{with_libvirtd}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%{_sbindir}/libvirtd
|
||||
@ -835,9 +844,11 @@ fi
|
||||
%{_datadir}/libvirt/schemas/interface.rng
|
||||
%{_datadir}/libvirt/schemas/secret.rng
|
||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||
%{_datadir}/libvirt/schemas/basictypes.rng
|
||||
%{_datadir}/libvirt/schemas/networkcommon.rng
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
%if %{with_sasl}
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
%endif
|
||||
@ -858,7 +869,6 @@ fi
|
||||
%doc %{_docdir}/%{name}/html
|
||||
|
||||
%if %{with_python}
|
||||
|
||||
%files python
|
||||
%defattr(-, root, root)
|
||||
%doc %{_docdir}/%{name}-python
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-0.9.0/daemon/libvirtd.conf
|
||||
Index: libvirt-0.9.4/daemon/libvirtd.conf
|
||||
===================================================================
|
||||
--- libvirt-0.9.0.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-0.9.0/daemon/libvirtd.conf
|
||||
--- libvirt-0.9.4.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-0.9.4/daemon/libvirtd.conf
|
||||
@@ -18,8 +18,8 @@
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
@ -28,25 +28,25 @@ Index: libvirt-0.9.0/daemon/libvirtd.conf
|
||||
|
||||
# Override the default mDNS advertizement name. This must be
|
||||
# unique on the immediate broadcast network.
|
||||
Index: libvirt-0.9.0/daemon/libvirtd.c
|
||||
Index: libvirt-0.9.4/daemon/libvirtd.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.0.orig/daemon/libvirtd.c
|
||||
+++ libvirt-0.9.0/daemon/libvirtd.c
|
||||
@@ -148,7 +148,7 @@ static int sigwrite = -1; /* Signa
|
||||
static int ipsock = 0; /* -l Listen for TCP/IP */
|
||||
--- libvirt-0.9.4.orig/daemon/libvirtd.c
|
||||
+++ libvirt-0.9.4/daemon/libvirtd.c
|
||||
@@ -880,7 +880,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Defaults for configuration file elements */
|
||||
-static int listen_tls = 1;
|
||||
+static int listen_tls = 0;
|
||||
static int listen_tcp = 0;
|
||||
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
|
||||
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
|
||||
@@ -170,7 +170,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
||||
- data->listen_tls = 1;
|
||||
+ data->listen_tls = 0;
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (!(data->tls_port = strdup(LIBVIRTD_TLS_PORT)))
|
||||
@@ -917,7 +917,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
#endif
|
||||
static int auth_tls = REMOTE_AUTH_NONE;
|
||||
data->auth_tls = REMOTE_AUTH_NONE;
|
||||
|
||||
-static int mdns_adv = 1;
|
||||
+static int mdns_adv = 0;
|
||||
static char *mdns_name = NULL;
|
||||
- data->mdns_adv = 1;
|
||||
+ data->mdns_adv = 0;
|
||||
|
||||
static int tls_no_verify_certificate = 0;
|
||||
data->min_workers = 5;
|
||||
data->max_workers = 20;
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: libvirt-0.9.2/tools/Makefile.am
|
||||
Index: libvirt-0.9.4/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/tools/Makefile.am
|
||||
+++ libvirt-0.9.2/tools/Makefile.am
|
||||
@@ -131,16 +131,17 @@ uninstall-local: uninstall-init
|
||||
--- libvirt-0.9.4.orig/tools/Makefile.am
|
||||
+++ libvirt-0.9.4/tools/Makefile.am
|
||||
@@ -152,16 +152,17 @@ uninstall-local: uninstall-init
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
install-init: libvirt-guests.init
|
||||
@ -26,10 +26,10 @@ Index: libvirt-0.9.2/tools/Makefile.am
|
||||
|
||||
BUILT_SOURCES += libvirt-guests.init
|
||||
|
||||
Index: libvirt-0.9.2/tools/libvirt-guests.sysconf
|
||||
Index: libvirt-0.9.4/tools/libvirt-guests.sysconf
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-0.9.2/tools/libvirt-guests.sysconf
|
||||
--- libvirt-0.9.4.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-0.9.4/tools/libvirt-guests.sysconf
|
||||
@@ -1,18 +1,28 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
@ -62,7 +62,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.sysconf
|
||||
# action taken on host shutdown
|
||||
# - suspend all running guests are suspended using virsh managedsave
|
||||
# - shutdown all running guests are asked to shutdown. Please be careful with
|
||||
@@ -21,7 +31,9 @@
|
||||
@@ -21,11 +31,15 @@
|
||||
# which just needs a long time to shutdown. When setting
|
||||
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
|
||||
# value suitable for your guests.
|
||||
@ -74,10 +74,16 @@ Index: libvirt-0.9.2/tools/libvirt-guests.sysconf
|
||||
# number of seconds we're willing to wait for a guest to shut down
|
||||
-#SHUTDOWN_TIMEOUT=0
|
||||
+SHUTDOWN_TIMEOUT=120
|
||||
Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
|
||||
+## Type: integer
|
||||
+## Default: 0
|
||||
# If non-zero, try to bypass the file system cache when saving and
|
||||
# restoring guests, even though this may give slower operation for
|
||||
# some file systems.
|
||||
Index: libvirt-0.9.4/tools/libvirt-guests.init.sh
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/tools/libvirt-guests.init.sh
|
||||
+++ libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
--- libvirt-0.9.4.orig/tools/libvirt-guests.init.sh
|
||||
+++ libvirt-0.9.4/tools/libvirt-guests.init.sh
|
||||
@@ -4,10 +4,10 @@
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
@ -111,7 +117,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
# Source gettext library.
|
||||
# Make sure this file is recognized as having translations: _("dummy")
|
||||
. "@bindir@"/gettext.sh
|
||||
@@ -50,12 +49,10 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
||||
@@ -51,12 +50,10 @@ test -f "$sysconfdir"/sysconfig/libvirt-
|
||||
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
||||
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||
|
||||
@ -125,7 +131,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -77,12 +74,31 @@ run_virsh_c() {
|
||||
@@ -78,12 +75,31 @@ run_virsh_c() {
|
||||
( export LC_ALL=C; run_virsh "$@" )
|
||||
}
|
||||
|
||||
@ -158,7 +164,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -90,7 +106,7 @@ list_guests() {
|
||||
@@ -91,7 +107,7 @@ list_guests() {
|
||||
for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do
|
||||
uuid=$(run_virsh_c "$uri" dominfo "$id" | awk '/^UUID:/{print $2}')
|
||||
if [ -z "$uuid" ]; then
|
||||
@ -167,7 +173,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
return 1
|
||||
fi
|
||||
uuids="$uuids $uuid"
|
||||
@@ -117,7 +133,7 @@ guest_is_on() {
|
||||
@@ -118,7 +134,7 @@ guest_is_on() {
|
||||
guest_running=false
|
||||
info=$(run_virsh_c "$uri" dominfo "$uuid")
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -176,7 +182,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -159,6 +175,12 @@ start() {
|
||||
@@ -162,6 +178,12 @@ start() {
|
||||
continue
|
||||
fi
|
||||
|
||||
@ -189,7 +195,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
eval_gettext "Resuming guests on \$uri URI..."; echo
|
||||
for guest in $list; do
|
||||
name=$(guest_name "$uri" "$guest")
|
||||
@@ -245,7 +267,7 @@ stop() {
|
||||
@@ -251,7 +273,7 @@ stop() {
|
||||
if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
|
||||
gettext "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
|
||||
echo
|
||||
@ -198,7 +204,7 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@@ -315,14 +337,13 @@ gueststatus() {
|
||||
@@ -321,14 +343,13 @@ gueststatus() {
|
||||
rh_status() {
|
||||
if [ -f "$LISTFILE" ]; then
|
||||
gettext "stopped, with saved guests"; echo
|
||||
@ -214,17 +220,17 @@ Index: libvirt-0.9.2/tools/libvirt-guests.init.sh
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -366,4 +387,4 @@ case "$1" in
|
||||
@@ -372,4 +393,4 @@ case "$1" in
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-0.9.2/daemon/Makefile.am
|
||||
Index: libvirt-0.9.4/daemon/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/daemon/Makefile.am
|
||||
+++ libvirt-0.9.2/daemon/Makefile.am
|
||||
@@ -302,16 +302,12 @@ install-logrotate: $(LOGROTATE_CONFS)
|
||||
--- libvirt-0.9.4.orig/daemon/Makefile.am
|
||||
+++ libvirt-0.9.4/daemon/Makefile.am
|
||||
@@ -252,16 +252,12 @@ install-logrotate: $(LOGROTATE_CONFS)
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
install-init: libvirtd.init
|
||||
|
@ -13,10 +13,10 @@ Date: Wed Jan 27 16:11:41 2010 -0700
|
||||
This approach allows removing a disk when domain is inactive. We
|
||||
obviously can't search xenstore when the domain is inactive.
|
||||
|
||||
Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
Index: libvirt-0.9.4/src/xen/xend_internal.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.2.orig/src/xen/xend_internal.c
|
||||
+++ libvirt-0.9.2/src/xen/xend_internal.c
|
||||
--- libvirt-0.9.4.orig/src/xen/xend_internal.c
|
||||
+++ libvirt-0.9.4/src/xen/xend_internal.c
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
static int
|
||||
@ -25,7 +25,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
virDomainDeviceDefPtr dev,
|
||||
char *class,
|
||||
char *ref,
|
||||
@@ -2780,7 +2781,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
||||
@@ -2807,7 +2808,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
||||
|
||||
sexpr = virBufferContentAndReset(&buf);
|
||||
|
||||
@ -34,7 +34,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
/* device doesn't exist, define it */
|
||||
ret = xend_op(domain->conn, domain->name, "op", "device_create",
|
||||
"config", sexpr, NULL);
|
||||
@@ -2903,7 +2904,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
||||
@@ -2928,7 +2929,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
||||
|
||||
sexpr = virBufferContentAndReset(&buf);
|
||||
|
||||
@ -43,7 +43,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("requested device does not exist"));
|
||||
goto cleanup;
|
||||
@@ -2996,7 +2997,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
||||
@@ -3023,7 +3024,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
||||
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
||||
goto cleanup;
|
||||
|
||||
@ -52,7 +52,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
goto cleanup;
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||
@@ -3961,6 +3962,7 @@ struct xenUnifiedDriver xenDaemonDriver
|
||||
@@ -3979,6 +3980,7 @@ struct xenUnifiedDriver xenDaemonDriver
|
||||
*/
|
||||
static int
|
||||
virDomainXMLDevID(virDomainPtr domain,
|
||||
@ -60,7 +60,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
virDomainDeviceDefPtr dev,
|
||||
char *class,
|
||||
char *ref,
|
||||
@@ -3969,8 +3971,12 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||
@@ -3987,8 +3989,12 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
||||
char *xref;
|
||||
char *tmp;
|
||||
@ -73,7 +73,7 @@ Index: libvirt-0.9.2/src/xen/xend_internal.c
|
||||
if (dev->data.disk->driverName &&
|
||||
STREQ(dev->data.disk->driverName, "tap"))
|
||||
strcpy(class, "tap");
|
||||
@@ -3980,19 +3986,21 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||
@@ -3998,19 +4004,21 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||
else
|
||||
strcpy(class, "vbd");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user