Accepting request 21133 from Virtualization

Copy from Virtualization/libvirt based on submit request 21133 from user jfehlig

OBS-URL: https://build.opensuse.org/request/show/21133
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=41
This commit is contained in:
OBS User autobuild 2009-09-26 22:09:58 +00:00 committed by Git OBS Bridge
commit 0e2dfc930b
16 changed files with 281 additions and 236 deletions

View File

@ -2,7 +2,7 @@ Index: src/lxc_container.c
===================================================================
--- src/lxc_container.c.orig
+++ src/lxc_container.c
@@ -791,6 +791,9 @@ int lxcContainerStart(virDomainDefPtr de
@@ -796,6 +796,9 @@ int lxcContainerStart(virDomainDefPtr de
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
/* allocate a stack for the container */
@ -12,7 +12,7 @@ Index: src/lxc_container.c
if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError(NULL);
return -1;
@@ -805,7 +808,11 @@ int lxcContainerStart(virDomainDefPtr de
@@ -810,7 +813,11 @@ int lxcContainerStart(virDomainDefPtr de
if (def->nets != NULL)
flags |= CLONE_NEWNET;
@ -24,7 +24,7 @@ Index: src/lxc_container.c
VIR_FREE(stack);
DEBUG("clone() returned, %d", pid);
@@ -831,6 +838,7 @@ int lxcContainerAvailable(int features)
@@ -836,6 +843,7 @@ int lxcContainerAvailable(int features)
char *childStack;
char *stack;
int childStatus;
@ -32,7 +32,7 @@ Index: src/lxc_container.c
if (features & LXC_CONTAINER_FEATURE_USER)
flags |= CLONE_NEWUSER;
@@ -838,14 +846,21 @@ int lxcContainerAvailable(int features)
@@ -843,14 +851,21 @@ int lxcContainerAvailable(int features)
if (features & LXC_CONTAINER_FEATURE_NET)
flags |= CLONE_NEWNET;

View File

@ -1,8 +1,8 @@
Index: libvirt-0.6.5/src/xend_internal.c
Index: libvirt-0.7.1/src/xend_internal.c
===================================================================
--- libvirt-0.6.5.orig/src/xend_internal.c
+++ libvirt-0.6.5/src/xend_internal.c
@@ -5857,7 +5857,7 @@ virDomainXMLDevID(virDomainPtr domain,
--- libvirt-0.7.1.orig/src/xend_internal.c
+++ libvirt-0.7.1/src/xend_internal.c
@@ -5877,7 +5877,7 @@ virDomainXMLDevID(virDomainPtr domain,
return -1;
xenUnifiedLock(priv);
xref = xenStoreDomainGetDiskID(domain->conn, domain->id,
@ -11,10 +11,10 @@ Index: libvirt-0.6.5/src/xend_internal.c
xenUnifiedUnlock(priv);
if (xref == NULL)
return -1;
Index: libvirt-0.6.5/src/xs_internal.c
Index: libvirt-0.7.1/src/xs_internal.c
===================================================================
--- libvirt-0.6.5.orig/src/xs_internal.c
+++ libvirt-0.6.5/src/xs_internal.c
--- libvirt-0.7.1.orig/src/xs_internal.c
+++ libvirt-0.7.1/src/xs_internal.c
@@ -966,7 +966,8 @@ xenStoreDomainGetNetworkID(virConnectPtr
* freed by the caller.
*/
@ -34,10 +34,10 @@ Index: libvirt-0.6.5/src/xs_internal.c
list = xs_directory(priv->xshandle, 0, dir, &num);
if (list != NULL) {
for (i = 0; i < num; i++) {
Index: libvirt-0.6.5/src/xs_internal.h
Index: libvirt-0.7.1/src/xs_internal.h
===================================================================
--- libvirt-0.6.5.orig/src/xs_internal.h
+++ libvirt-0.6.5/src/xs_internal.h
--- libvirt-0.7.1.orig/src/xs_internal.h
+++ libvirt-0.7.1/src/xs_internal.h
@@ -49,7 +49,8 @@ char * xenStoreDomainGetNetworkID(virCo
const char *mac);
char * xenStoreDomainGetDiskID(virConnectPtr conn,

32
devmap-no-pkgconfig.patch Normal file
View File

@ -0,0 +1,32 @@
diff --git a/configure.in b/configure.in
index cb5ce55..d1711fd 100644
--- a/configure.in
+++ b/configure.in
@@ -1227,11 +1227,22 @@ if test "$with_storage_mpath" = "yes"; then
DEVMAPPER_REQUIRED=0.0
DEVMAPPER_CFLAGS=
DEVMAPPER_LIBS=
- PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED,
- [], [
- AC_MSG_ERROR(
- [You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt])
- ])
+ PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no])
+ if test "$DEVMAPPER_FOUND" = "no"; then
+ # devmapper is missing pkg-config files in ubuntu, suse, etc
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ DEVMAPPER_FOUND=yes
+ AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no])
+ AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no])
+ DEVMAPPER_LIBS="-ldevmapper"
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+ fi
+ if test "$DEVMAPPER_FOUND" = "no" ; then
+ AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt])
+ fi
+
fi
AC_SUBST([DEVMAPPER_CFLAGS])
AC_SUBST([DEVMAPPER_LIBS])

View File

@ -1,58 +0,0 @@
Index: libvirt-0.5.1/src/storage_backend_fs.c
===================================================================
--- libvirt-0.5.1.orig/src/storage_backend_fs.c
+++ libvirt-0.5.1/src/storage_backend_fs.c
@@ -381,6 +381,8 @@ virStorageBackendFileSystemIsMounted(vir
virStoragePoolObjPtr pool) {
FILE *mtab;
struct mntent *ent;
+ char *mpoint;
+ size_t len;
if ((mtab = fopen(_PATH_MOUNTED, "r")) == NULL) {
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
@@ -389,14 +391,26 @@ virStorageBackendFileSystemIsMounted(vir
return -1;
}
+ if ((mpoint = strdup(pool->def->target.path)) == NULL) {
+ virStorageReportError(conn, VIR_ERR_NO_MEMORY,
+ "%s", strerror(errno));
+ return -1;
+ }
+
+ len = strlen(mpoint);
+ if (mpoint[len-1] == '/')
+ mpoint[len-1] = NULL;
+
while ((ent = getmntent(mtab)) != NULL) {
- if (STREQ(ent->mnt_dir, pool->def->target.path)) {
+ if (STREQ(ent->mnt_dir, mpoint)) {
fclose(mtab);
+ free(mpoint);
return 1;
}
}
fclose(mtab);
+ free(mpoint);
return 0;
}
@@ -735,12 +749,16 @@ virStorageBackendFileSystemDelete(virCon
{
/* XXX delete all vols first ? */
+ /* target.path is never created AFAIKT, so dont delete it. */
+#if 0
+
if (unlink(pool->def->target.path) < 0) {
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
_("cannot unlink path '%s': %s"),
pool->def->target.path, strerror(errno));
return -1;
}
+#endif
return 0;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b25bbddc4613f000a23bd72a6a9814c4da406c16888f6cf4ff711a87e90bd18c
size 5066192

3
libvirt-0.7.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8edde9577fbf0e90d0b33d4b328a79c51cc821c78a4c04b101007c1d6eed1909
size 5440029

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Fri Sep 25 11:41:23 MDT 2009 - jfehlig@novell.com
- Fix abort in virsh when specifying a connection URI
vshdeinit-recurse.patch
-------------------------------------------------------------------
Wed Sep 23 11:10:37 MDT 2009 - jfehlig@novell.com
- Workaround for missing pkgconfig file in device-mapper-devel
devmap-no-pkgconfig.patch
bnc#540942
-------------------------------------------------------------------
Mon Sep 21 10:30:02 MDT 2009 - jfehlig@novell.com
- Updated to version 0.7.1
- Add support for encrypted (qcow) volume creation
- Secret manipulation public API
- Multipath storage support module
- VBox add Storage Volume support
- Support configuration of huge pages in guests
- Support new PolicyKit 1.0 API
- Compressed save image format for Qemu
- Qemu add host PCI device hotplug support
-------------------------------------------------------------------
Wed Aug 26 15:52:37 MDT 2009 - jfehlig@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package libvirt (Version 0.7.0)
# spec file for package libvirt (Version 0.7.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -30,7 +30,7 @@
%endif
Name: libvirt
BuildRequires: PolicyKit-devel bridge-utils cyrus-sasl-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd
BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd
%if %{with_xen}
BuildRequires: xen-devel
%endif
@ -45,13 +45,18 @@ BuildRequires: libselinux-devel
%ifarch x86_64 ia64
BuildRequires: libnuma-devel
%endif
%if 0%{?suse_version} > 1110
BuildRequires: polkit >= 0.9
%else
BuildRequires: PolicyKit-devel >= 0.6
%endif
# Only for directory ownership:
BuildRequires: gtk-doc
Url: http://libvirt.org/
License: LGPL v2.1 or later
Group: Development/Libraries/C and C++
AutoReqProv: yes
Version: 0.7.0
Version: 0.7.1
Release: 1
Summary: A C toolkit to interract with the virtualization capabilities of Linux
Requires: readline
@ -70,19 +75,27 @@ Requires: socat
Requires: open-iscsi
Requires: nfs-client
Requires: hal
%if 0%{?suse_version} > 1100
Requires: polkit >= 0.9
%else
Requires: PolicyKit >= 0.6
%endif
Source0: %{name}-%{version}.tar.bz2
Source1: libvirtd.init
Patch0: socat.patch
Patch1: libvirtd-defaults.patch
Patch2: fs-storage-driver.patch
Patch3: clone.patch
Patch4: vnc-port.patch
Patch5: xen-pv-cdrom.patch
Patch6: detach-disk.patch
Patch7: migrate-params.patch
Patch8: suse-network.patch
Patch9: snapshots.patch
Patch10: sexpr2string.patch
# Upstream patches
Patch0: devmap-no-pkgconfig.patch
# Need to go upstream
Patch100: socat.patch
Patch101: clone.patch
Patch102: migrate-params.patch
Patch103: xen-pv-cdrom.patch
Patch104: detach-disk.patch
Patch105: vshdeinit-recurse.patch
Patch106: xen-refcnt.patch
# Our patches
Patch200: libvirtd-defaults.patch
Patch201: suse-network.patch
Patch202: snapshots.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -175,16 +188,16 @@ Authors:
%prep
%setup -q
%patch0 -p1
%patch1 -p1
#%patch2 -p1
%patch3
#%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch100 -p1
%patch101
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
%build
%if ! %{with_xen}
@ -292,7 +305,9 @@ rm -rf $RPM_BUILD_ROOT
%config %{_sysconfdir}/libvirt/libvirtd.conf
%config %{_sysconfdir}/libvirt/qemu.conf
%config %{_sysconfdir}/sasl2/libvirt.conf
%if 0%{?suse_version} > 1030
%if 0%{?suse_version} > 1110
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
%else
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
%endif
%{_datadir}/libvirt

View File

@ -1,7 +1,7 @@
Index: libvirt-0.7.0/qemud/libvirtd.conf
Index: libvirt-0.7.1/qemud/libvirtd.conf
===================================================================
--- libvirt-0.7.0.orig/qemud/libvirtd.conf
+++ libvirt-0.7.0/qemud/libvirtd.conf
--- libvirt-0.7.1.orig/qemud/libvirtd.conf
+++ libvirt-0.7.1/qemud/libvirtd.conf
@@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -28,12 +28,12 @@ Index: libvirt-0.7.0/qemud/libvirtd.conf
# Override the default mDNS advertizement name. This must be
# unique on the immediate broadcast network.
Index: libvirt-0.7.0/qemud/qemud.c
Index: libvirt-0.7.1/qemud/qemud.c
===================================================================
--- libvirt-0.7.0.orig/qemud/qemud.c
+++ libvirt-0.7.0/qemud/qemud.c
@@ -138,7 +138,7 @@ static char *log_filters = NULL;
static char *log_outputs = NULL;
--- libvirt-0.7.1.orig/qemud/qemud.c
+++ libvirt-0.7.1/qemud/qemud.c
@@ -134,7 +134,7 @@ static int sigwrite = -1; /* Signa
static int ipsock = 0; /* -l Listen for TCP/IP */
/* Defaults for configuration file elements */
-static int listen_tls = 1;
@ -41,7 +41,7 @@ Index: libvirt-0.7.0/qemud/qemud.c
static int listen_tcp = 0;
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
@@ -160,7 +160,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
@@ -156,7 +156,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
#endif
static int auth_tls = REMOTE_AUTH_NONE;

View File

@ -1,7 +1,7 @@
Index: libvirt-0.7.0/include/libvirt/libvirt.h.in
Index: libvirt-0.7.1/include/libvirt/libvirt.h.in
===================================================================
--- libvirt-0.7.0.orig/include/libvirt/libvirt.h.in
+++ libvirt-0.7.0/include/libvirt/libvirt.h.in
--- libvirt-0.7.1.orig/include/libvirt/libvirt.h.in
+++ libvirt-0.7.1/include/libvirt/libvirt.h.in
@@ -537,6 +537,21 @@ int virDomainRestore
const char *from);
@ -24,11 +24,11 @@ Index: libvirt-0.7.0/include/libvirt/libvirt.h.in
* Domain core dump
*/
int virDomainCoreDump (virDomainPtr domain,
Index: libvirt-0.7.0/src/libvirt.c
Index: libvirt-0.7.1/src/libvirt.c
===================================================================
--- libvirt-0.7.0.orig/src/libvirt.c
+++ libvirt-0.7.0/src/libvirt.c
@@ -2198,6 +2198,168 @@ error:
--- libvirt-0.7.1.orig/src/libvirt.c
+++ libvirt-0.7.1/src/libvirt.c
@@ -2245,6 +2245,168 @@ error:
return -1;
}
@ -197,11 +197,11 @@ Index: libvirt-0.7.0/src/libvirt.c
/**
* virDomainCoreDump:
* @domain: a domain object
Index: libvirt-0.7.0/src/driver.h
Index: libvirt-0.7.1/src/driver.h
===================================================================
--- libvirt-0.7.0.orig/src/driver.h
+++ libvirt-0.7.0/src/driver.h
@@ -149,6 +149,21 @@ typedef int
--- libvirt-0.7.1.orig/src/driver.h
+++ libvirt-0.7.1/src/driver.h
@@ -152,6 +152,21 @@ typedef int
(*virDrvDomainRestore) (virConnectPtr conn,
const char *from);
typedef int
@ -223,7 +223,7 @@ Index: libvirt-0.7.0/src/driver.h
(*virDrvDomainCoreDump) (virDomainPtr domain,
const char *to,
int flags);
@@ -424,6 +439,11 @@ struct _virDriver {
@@ -427,6 +442,11 @@ struct _virDriver {
virDrvNodeDeviceDettach nodeDeviceDettach;
virDrvNodeDeviceReAttach nodeDeviceReAttach;
virDrvNodeDeviceReset nodeDeviceReset;
@ -235,10 +235,10 @@ Index: libvirt-0.7.0/src/driver.h
};
typedef int
Index: libvirt-0.7.0/src/xen_unified.c
Index: libvirt-0.7.1/src/xen_unified.c
===================================================================
--- libvirt-0.7.0.orig/src/xen_unified.c
+++ libvirt-0.7.0/src/xen_unified.c
--- libvirt-0.7.1.orig/src/xen_unified.c
+++ libvirt-0.7.1/src/xen_unified.c
@@ -952,6 +952,81 @@ xenUnifiedDomainRestore (virConnectPtr c
}
@ -333,10 +333,10 @@ Index: libvirt-0.7.0/src/xen_unified.c
};
/**
Index: libvirt-0.7.0/src/xen_unified.h
Index: libvirt-0.7.1/src/xen_unified.h
===================================================================
--- libvirt-0.7.0.orig/src/xen_unified.h
+++ libvirt-0.7.0/src/xen_unified.h
--- libvirt-0.7.1.orig/src/xen_unified.h
+++ libvirt-0.7.1/src/xen_unified.h
@@ -98,6 +98,11 @@ struct xenUnifiedDriver {
virDrvDomainGetSchedulerType domainGetSchedulerType;
virDrvDomainGetSchedulerParameters domainGetSchedulerParameters;
@ -349,10 +349,10 @@ Index: libvirt-0.7.0/src/xen_unified.h
};
typedef struct xenXMConfCache *xenXMConfCachePtr;
Index: libvirt-0.7.0/src/xend_internal.c
Index: libvirt-0.7.1/src/xend_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/xend_internal.c
+++ libvirt-0.7.0/src/xend_internal.c
--- libvirt-0.7.1.orig/src/xend_internal.c
+++ libvirt-0.7.1/src/xend_internal.c
@@ -53,6 +53,12 @@
#ifndef PROXY
@ -366,7 +366,7 @@ Index: libvirt-0.7.0/src/xend_internal.c
/*
* The number of Xen scheduler parameters
*/
@@ -3250,6 +3256,87 @@ xenDaemonDomainRestore(virConnectPtr con
@@ -3248,6 +3254,87 @@ xenDaemonDomainRestore(virConnectPtr con
}
return xend_op(conn, "", "op", "restore", "file", filename, NULL);
}
@ -454,7 +454,7 @@ Index: libvirt-0.7.0/src/xend_internal.c
#endif /* !PROXY */
/**
@@ -5052,6 +5139,11 @@ struct xenUnifiedDriver xenDaemonDriver
@@ -5064,6 +5151,11 @@ struct xenUnifiedDriver xenDaemonDriver
xenDaemonGetSchedulerType, /* domainGetSchedulerType */
xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */
xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */
@ -466,10 +466,10 @@ Index: libvirt-0.7.0/src/xend_internal.c
};
/************************************************************************
Index: libvirt-0.7.0/src/proxy_internal.c
Index: libvirt-0.7.1/src/proxy_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/proxy_internal.c
+++ libvirt-0.7.0/src/proxy_internal.c
--- libvirt-0.7.1.orig/src/proxy_internal.c
+++ libvirt-0.7.1/src/proxy_internal.c
@@ -84,6 +84,11 @@ struct xenUnifiedDriver xenProxyDriver =
NULL, /* domainGetSchedulerType */
NULL, /* domainGetSchedulerParameters */
@ -482,10 +482,10 @@ Index: libvirt-0.7.0/src/proxy_internal.c
};
Index: libvirt-0.7.0/src/xen_internal.c
Index: libvirt-0.7.1/src/xen_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/xen_internal.c
+++ libvirt-0.7.0/src/xen_internal.c
--- libvirt-0.7.1.orig/src/xen_internal.c
+++ libvirt-0.7.1/src/xen_internal.c
@@ -741,6 +741,11 @@ struct xenUnifiedDriver xenHypervisorDri
xenHypervisorGetSchedulerType, /* domainGetSchedulerType */
xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */
@ -498,10 +498,10 @@ Index: libvirt-0.7.0/src/xen_internal.c
};
#endif /* !PROXY */
Index: libvirt-0.7.0/src/xm_internal.c
Index: libvirt-0.7.1/src/xm_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/xm_internal.c
+++ libvirt-0.7.0/src/xm_internal.c
--- libvirt-0.7.1.orig/src/xm_internal.c
+++ libvirt-0.7.1/src/xm_internal.c
@@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = {
NULL, /* domainGetSchedulerType */
NULL, /* domainGetSchedulerParameters */
@ -514,10 +514,10 @@ Index: libvirt-0.7.0/src/xm_internal.c
};
#define xenXMError(conn, code, fmt...) \
Index: libvirt-0.7.0/src/xs_internal.c
Index: libvirt-0.7.1/src/xs_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/xs_internal.c
+++ libvirt-0.7.0/src/xs_internal.c
--- libvirt-0.7.1.orig/src/xs_internal.c
+++ libvirt-0.7.1/src/xs_internal.c
@@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver =
NULL, /* domainGetSchedulerType */
NULL, /* domainGetSchedulerParameters */
@ -530,11 +530,11 @@ Index: libvirt-0.7.0/src/xs_internal.c
};
#endif /* ! PROXY */
Index: libvirt-0.7.0/src/virsh.c
Index: libvirt-0.7.1/src/virsh.c
===================================================================
--- libvirt-0.7.0.orig/src/virsh.c
+++ libvirt-0.7.0/src/virsh.c
@@ -1167,6 +1167,189 @@ cmdSave(vshControl *ctl, const vshCmd *c
--- libvirt-0.7.1.orig/src/virsh.c
+++ libvirt-0.7.1/src/virsh.c
@@ -1171,6 +1171,189 @@ cmdSave(vshControl *ctl, const vshCmd *c
return ret;
}
@ -724,7 +724,7 @@ Index: libvirt-0.7.0/src/virsh.c
/*
* "schedinfo" command
*/
@@ -6940,6 +7123,12 @@ static const vshCmdDef commands[] = {
@@ -7265,6 +7448,12 @@ static const vshCmdDef commands[] = {
{"undefine", cmdUndefine, opts_undefine, info_undefine},
{"uri", cmdURI, NULL, info_uri},
@ -737,11 +737,11 @@ Index: libvirt-0.7.0/src/virsh.c
{"vol-create", cmdVolCreate, opts_vol_create, info_vol_create},
{"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from},
{"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as},
Index: libvirt-0.7.0/src/lxc_driver.c
Index: libvirt-0.7.1/src/lxc_driver.c
===================================================================
--- libvirt-0.7.0.orig/src/lxc_driver.c
+++ libvirt-0.7.0/src/lxc_driver.c
@@ -1929,6 +1929,11 @@ static virDriver lxcDriver = {
--- libvirt-0.7.1.orig/src/lxc_driver.c
+++ libvirt-0.7.1/src/lxc_driver.c
@@ -1931,6 +1931,11 @@ static virDriver lxcDriver = {
NULL, /* nodeDeviceDettach */
NULL, /* nodeDeviceReAttach */
NULL, /* nodeDeviceReset */
@ -753,10 +753,10 @@ Index: libvirt-0.7.0/src/lxc_driver.c
};
static virStateDriver lxcStateDriver = {
Index: libvirt-0.7.0/src/openvz_driver.c
Index: libvirt-0.7.1/src/openvz_driver.c
===================================================================
--- libvirt-0.7.0.orig/src/openvz_driver.c
+++ libvirt-0.7.0/src/openvz_driver.c
--- libvirt-0.7.1.orig/src/openvz_driver.c
+++ libvirt-0.7.1/src/openvz_driver.c
@@ -1392,6 +1392,11 @@ static virDriver openvzDriver = {
NULL, /* nodeDeviceDettach */
NULL, /* nodeDeviceReAttach */
@ -769,11 +769,11 @@ Index: libvirt-0.7.0/src/openvz_driver.c
};
int openvzRegister(void) {
Index: libvirt-0.7.0/src/qemu_driver.c
Index: libvirt-0.7.1/src/qemu_driver.c
===================================================================
--- libvirt-0.7.0.orig/src/qemu_driver.c
+++ libvirt-0.7.0/src/qemu_driver.c
@@ -6806,6 +6806,11 @@ static virDriver qemuDriver = {
--- libvirt-0.7.1.orig/src/qemu_driver.c
+++ libvirt-0.7.1/src/qemu_driver.c
@@ -7576,6 +7576,11 @@ static virDriver qemuDriver = {
qemudNodeDeviceDettach, /* nodeDeviceDettach */
qemudNodeDeviceReAttach, /* nodeDeviceReAttach */
qemudNodeDeviceReset, /* nodeDeviceReset */
@ -785,11 +785,11 @@ Index: libvirt-0.7.0/src/qemu_driver.c
};
Index: libvirt-0.7.0/src/test.c
Index: libvirt-0.7.1/src/test.c
===================================================================
--- libvirt-0.7.0.orig/src/test.c
+++ libvirt-0.7.0/src/test.c
@@ -4242,6 +4242,11 @@ static virDriver testDriver = {
--- libvirt-0.7.1.orig/src/test.c
+++ libvirt-0.7.1/src/test.c
@@ -4257,6 +4257,11 @@ static virDriver testDriver = {
NULL, /* nodeDeviceDettach */
NULL, /* nodeDeviceReAttach */
NULL, /* nodeDeviceReset */
@ -801,11 +801,11 @@ Index: libvirt-0.7.0/src/test.c
};
static virNetworkDriver testNetworkDriver = {
Index: libvirt-0.7.0/docs/libvirt-api.xml
Index: libvirt-0.7.1/docs/libvirt-api.xml
===================================================================
--- libvirt-0.7.0.orig/docs/libvirt-api.xml
+++ libvirt-0.7.0/docs/libvirt-api.xml
@@ -200,6 +200,11 @@
--- libvirt-0.7.1.orig/docs/libvirt-api.xml
+++ libvirt-0.7.1/docs/libvirt-api.xml
@@ -208,6 +208,11 @@
<exports symbol='virInterfaceDefineXML' type='function'/>
<exports symbol='virDomainMigrate' type='function'/>
<exports symbol='virDomainSuspend' type='function'/>
@ -817,7 +817,7 @@ Index: libvirt-0.7.0/docs/libvirt-api.xml
<exports symbol='virDomainCreateLinux' type='function'/>
<exports symbol='virNodeDeviceGetXMLDesc' type='function'/>
<exports symbol='virEventUpdateHandleFunc' type='function'/>
@@ -1385,6 +1390,36 @@ see note above'/>
@@ -1432,6 +1437,36 @@ see note above'/>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
@ -854,10 +854,10 @@ Index: libvirt-0.7.0/docs/libvirt-api.xml
<function name='virDomainUndefine' file='libvirt' module='libvirt'>
<info>Undefine a domain but does not stop it if it is running</info>
<return type='int' info='0 in case of success, -1 in case of error'/>
Index: libvirt-0.7.0/python/libvirt-py.c
Index: libvirt-0.7.1/python/libvirt-py.c
===================================================================
--- libvirt-0.7.0.orig/python/libvirt-py.c
+++ libvirt-0.7.0/python/libvirt-py.c
--- libvirt-0.7.1.orig/python/libvirt-py.c
+++ libvirt-0.7.1/python/libvirt-py.c
@@ -25,6 +25,25 @@ LIBVIRT_END_ALLOW_THREADS;
}
@ -884,7 +884,7 @@ Index: libvirt-0.7.0/python/libvirt-py.c
libvirt_virStorageVolGetKey(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
const char * c_retval;
@@ -1058,6 +1077,25 @@ LIBVIRT_END_ALLOW_THREADS;
@@ -1151,6 +1170,25 @@ LIBVIRT_END_ALLOW_THREADS;
}
PyObject *
@ -910,7 +910,7 @@ Index: libvirt-0.7.0/python/libvirt-py.c
libvirt_virNetworkDefineXML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
virNetworkPtr c_retval;
@@ -1093,6 +1131,24 @@ LIBVIRT_END_ALLOW_THREADS;
@@ -1186,6 +1224,24 @@ LIBVIRT_END_ALLOW_THREADS;
}
PyObject *
@ -935,7 +935,7 @@ Index: libvirt-0.7.0/python/libvirt-py.c
libvirt_virDomainResume(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
int c_retval;
@@ -1108,6 +1164,25 @@ LIBVIRT_BEGIN_ALLOW_THREADS;
@@ -1201,6 +1257,25 @@ LIBVIRT_BEGIN_ALLOW_THREADS;
LIBVIRT_END_ALLOW_THREADS;
py_retval = libvirt_intWrap((int) c_retval);
return(py_retval);
@ -961,22 +961,22 @@ Index: libvirt-0.7.0/python/libvirt-py.c
}
PyObject *
Index: libvirt-0.7.0/python/libvirt-py.h
Index: libvirt-0.7.1/python/libvirt-py.h
===================================================================
--- libvirt-0.7.0.orig/python/libvirt-py.h
+++ libvirt-0.7.0/python/libvirt-py.h
--- libvirt-0.7.1.orig/python/libvirt-py.h
+++ libvirt-0.7.1/python/libvirt-py.h
@@ -1,6 +1,7 @@
/* Generated */
PyObject * libvirt_virStoragePoolGetXMLDesc(PyObject *self, PyObject *args);
+PyObject * libvirt_virDomainSnapshotDelete(PyObject *self, PyObject *args);
PyObject * libvirt_virStorageVolGetKey(PyObject *self, PyObject *args);
PyObject * libvirt_virConnectClose(PyObject *self, PyObject *args);
PyObject * libvirt_virDomainUndefine(PyObject *self, PyObject *args);
PyObject * libvirt_virDomainDefineXML(PyObject *self, PyObject *args);
Index: libvirt-0.7.0/python/libvirt.py
Index: libvirt-0.7.1/python/libvirt.py
===================================================================
--- libvirt-0.7.0.orig/python/libvirt.py
+++ libvirt-0.7.0/python/libvirt.py
--- libvirt-0.7.1.orig/python/libvirt.py
+++ libvirt-0.7.1/python/libvirt.py
@@ -390,6 +390,12 @@ class virDomain:
ret = libvirtmod.virDomainGetName(self._o)
return ret
@ -1028,10 +1028,10 @@ Index: libvirt-0.7.0/python/libvirt.py
def pinVcpu(self, vcpu, cpumap):
"""Dynamically change the real CPUs which can be allocated to
a virtual CPU. This function requires privileged access to
Index: libvirt-0.7.0/python/libvir.c
Index: libvirt-0.7.1/python/libvir.c
===================================================================
--- libvirt-0.7.0.orig/python/libvir.c
+++ libvirt-0.7.0/python/libvir.c
--- libvirt-0.7.1.orig/python/libvir.c
+++ libvirt-0.7.1/python/libvir.c
@@ -1375,6 +1375,35 @@ libvirt_virStoragePoolGetInfo(PyObject *
return(py_retval);
}
@ -1068,7 +1068,7 @@ Index: libvirt-0.7.0/python/libvir.c
static PyObject *
libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
@@ -2247,6 +2276,7 @@ static PyMethodDef libvirtMethods[] = {
@@ -2420,6 +2449,7 @@ static PyMethodDef libvirtMethods[] = {
{(char *) "virDomainSetSchedulerParameters", libvirt_virDomainSetSchedulerParameters, METH_VARARGS, NULL},
{(char *) "virDomainGetVcpus", libvirt_virDomainGetVcpus, METH_VARARGS, NULL},
{(char *) "virDomainPinVcpu", libvirt_virDomainPinVcpu, METH_VARARGS, NULL},
@ -1076,10 +1076,10 @@ Index: libvirt-0.7.0/python/libvir.c
{(char *) "virConnectListStoragePools", libvirt_virConnectListStoragePools, METH_VARARGS, NULL},
{(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListDefinedStoragePools, METH_VARARGS, NULL},
{(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL},
Index: libvirt-0.7.0/python/libvirt-python-api.xml
Index: libvirt-0.7.1/python/libvirt-python-api.xml
===================================================================
--- libvirt-0.7.0.orig/python/libvirt-python-api.xml
+++ libvirt-0.7.0/python/libvirt-python-api.xml
--- libvirt-0.7.1.orig/python/libvirt-python-api.xml
+++ libvirt-0.7.1/python/libvirt-python-api.xml
@@ -135,6 +135,11 @@
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='params' type='virSchedParameterPtr' info='pointer to scheduler parameter objects'/>
@ -1092,22 +1092,22 @@ Index: libvirt-0.7.0/python/libvirt-python-api.xml
<function name='virConnectListStoragePools' file='python'>
<info>list the storage pools, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
Index: libvirt-0.7.0/python/generator.py
Index: libvirt-0.7.1/python/generator.py
===================================================================
--- libvirt-0.7.0.orig/python/generator.py
+++ libvirt-0.7.0/python/generator.py
@@ -320,6 +320,7 @@ skip_impl = (
--- libvirt-0.7.1.orig/python/generator.py
+++ libvirt-0.7.1/python/generator.py
@@ -326,6 +326,7 @@ skip_impl = (
'virDomainSetSchedulerParameters',
'virDomainGetVcpus',
'virDomainPinVcpu',
+ 'virDomainListSnapshots',
'virStoragePoolGetUUID',
'virStoragePoolGetUUIDString',
'virStoragePoolLookupByUUID',
Index: libvirt-0.7.0/src/libvirt_public.syms
'virSecretGetValue',
'virSecretSetValue',
'virSecretGetUUID',
Index: libvirt-0.7.1/src/libvirt_public.syms
===================================================================
--- libvirt-0.7.0.orig/src/libvirt_public.syms
+++ libvirt-0.7.0/src/libvirt_public.syms
--- libvirt-0.7.1.orig/src/libvirt_public.syms
+++ libvirt-0.7.1/src/libvirt_public.syms
@@ -215,6 +215,11 @@ LIBVIRT_0.4.2 {
LIBVIRT_0.4.5 {
global:

View File

@ -1,8 +1,8 @@
Index: libvirt-0.7.0/src/remote_internal.c
Index: libvirt-0.7.1/src/remote_internal.c
===================================================================
--- libvirt-0.7.0.orig/src/remote_internal.c
+++ libvirt-0.7.0/src/remote_internal.c
@@ -726,12 +726,29 @@ doRemoteOpen (virConnectPtr conn,
--- libvirt-0.7.1.orig/src/remote_internal.c
+++ libvirt-0.7.1/src/remote_internal.c
@@ -728,12 +728,29 @@ doRemoteOpen (virConnectPtr conn,
cmd_argv[j++] = strdup ("none");
}
cmd_argv[j++] = strdup (priv->hostname);

View File

@ -1,8 +1,8 @@
Index: libvirt-0.7.0/src/network_conf.c
Index: libvirt-0.7.1/src/network_conf.c
===================================================================
--- libvirt-0.7.0.orig/src/network_conf.c
+++ libvirt-0.7.0/src/network_conf.c
@@ -771,6 +771,137 @@ error:
--- libvirt-0.7.1.orig/src/network_conf.c
+++ libvirt-0.7.1/src/network_conf.c
@@ -770,6 +770,137 @@ error:
return NULL;
}
@ -140,7 +140,7 @@ Index: libvirt-0.7.0/src/network_conf.c
int virNetworkLoadAllConfigs(virConnectPtr conn,
virNetworkObjListPtr nets,
const char *configDir,
@@ -810,6 +941,7 @@ int virNetworkLoadAllConfigs(virConnectP
@@ -809,6 +940,7 @@ int virNetworkLoadAllConfigs(virConnectP
closedir(dir);
@ -148,10 +148,10 @@ Index: libvirt-0.7.0/src/network_conf.c
return 0;
}
Index: libvirt-0.7.0/src/network_conf.h
Index: libvirt-0.7.1/src/network_conf.h
===================================================================
--- libvirt-0.7.0.orig/src/network_conf.h
+++ libvirt-0.7.0/src/network_conf.h
--- libvirt-0.7.1.orig/src/network_conf.h
+++ libvirt-0.7.1/src/network_conf.h
@@ -89,6 +89,7 @@ struct _virNetworkObj {
unsigned int active : 1;
unsigned int autostart : 1;
@ -160,11 +160,11 @@ Index: libvirt-0.7.0/src/network_conf.h
virNetworkDefPtr def; /* The current definition */
virNetworkDefPtr newDef; /* New definition to activate at shutdown */
Index: libvirt-0.7.0/src/network_driver.c
Index: libvirt-0.7.1/src/network_driver.c
===================================================================
--- libvirt-0.7.0.orig/src/network_driver.c
+++ libvirt-0.7.0/src/network_driver.c
@@ -957,6 +957,11 @@ static int networkShutdownNetworkDaemon(
--- libvirt-0.7.1.orig/src/network_driver.c
+++ libvirt-0.7.1/src/network_driver.c
@@ -963,6 +963,11 @@ static int networkShutdownNetworkDaemon(
unlink(stateFile);
VIR_FREE(stateFile);
@ -176,7 +176,7 @@ Index: libvirt-0.7.0/src/network_driver.c
if (network->dnsmasqPid > 0)
kill(network->dnsmasqPid, SIGTERM);
@@ -1413,6 +1418,12 @@ static int networkSetAutostart(virNetwor
@@ -1419,6 +1424,12 @@ static int networkSetAutostart(virNetwor
goto cleanup;
}

View File

@ -1,16 +0,0 @@
Index: libvirt-0.5.1/src/xend_internal.c
===================================================================
--- libvirt-0.5.1.orig/src/xend_internal.c
+++ libvirt-0.5.1/src/xend_internal.c
@@ -2079,10 +2079,8 @@ xenDaemonParseSxprGraphicsNew(virConnect
const char *keymap = sexpr_node(node, "device/vfb/keymap");
const char *unused = sexpr_node(node, "device/vfb/vncunused");
- if ((unused && STREQ(unused, "1")) || port == -1) {
+ if ((unused && STREQ(unused, "1")) || port == -1)
graphics->data.vnc.autoport = 1;
- port = -1;
- }
if (port >= 0 && port < 5900)
port += 5900;

13
vshdeinit-recurse.patch Normal file
View File

@ -0,0 +1,13 @@
Index: libvirt-0.7.1/src/virsh.c
===================================================================
--- libvirt-0.7.1.orig/src/virsh.c
+++ libvirt-0.7.1/src/virsh.c
@@ -8201,7 +8201,7 @@ vshError(vshControl *ctl, int doexit, co
fputc('\n', stderr);
if (doexit) {
- if (ctl)
+ if (ctl->conn)
vshDeinit(ctl);
exit(EXIT_FAILURE);
}

View File

@ -1,8 +1,8 @@
Index: libvirt-0.6.5/src/xend_internal.c
Index: libvirt-0.7.1/src/xend_internal.c
===================================================================
--- libvirt-0.6.5.orig/src/xend_internal.c
+++ libvirt-0.6.5/src/xend_internal.c
@@ -5289,7 +5289,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
--- libvirt-0.7.1.orig/src/xend_internal.c
+++ libvirt-0.7.1/src/xend_internal.c
@@ -5306,7 +5306,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
} else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
} else {

33
xen-refcnt.patch Normal file
View File

@ -0,0 +1,33 @@
Index: libvirt-0.7.1/src/xen_inotify.c
===================================================================
--- libvirt-0.7.1.orig/src/xen_inotify.c
+++ libvirt-0.7.1/src/xen_inotify.c
@@ -463,7 +463,6 @@ xenInotifyOpen(virConnectPtr conn ATTRIB
DEBUG0("Failed to add inotify handle, disabling events");
}
- virConnectRef(conn);
return 0;
}
@@ -486,7 +485,6 @@ xenInotifyClose(virConnectPtr conn)
if (priv->inotifyWatch != -1)
virEventRemoveHandle(priv->inotifyWatch);
close(priv->inotifyFD);
- virUnrefConnect(conn);
return 0;
}
Index: libvirt-0.7.1/src/xs_internal.c
===================================================================
--- libvirt-0.7.1.orig/src/xs_internal.c
+++ libvirt-0.7.1/src/xs_internal.c
@@ -1140,8 +1140,6 @@ int xenStoreAddWatch(virConnectPtr conn,
list->watches[n] = watch;
list->count++;
- conn->refs++;
-
return xs_watch(priv->xshandle, watch->path, watch->token);
}