Update to 0.4.1, Daniel
parent
5238691972
commit
d8ce9b00e6
|
@ -1,83 +0,0 @@
|
||||||
diff -rupN libvirt-0.4.0.orig/src/remote_internal.c libvirt-0.4.0.new/src/remote_internal.c
|
|
||||||
--- libvirt-0.4.0.orig/src/remote_internal.c 2008-01-11 10:39:34.000000000 -0500
|
|
||||||
+++ libvirt-0.4.0.new/src/remote_internal.c 2008-01-11 10:43:12.000000000 -0500
|
|
||||||
@@ -3054,8 +3054,12 @@ remoteAuthSASL (virConnectPtr conn, stru
|
|
||||||
if ((remoteAddr = addrToString(&sa, salen)) == NULL)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
- if ((saslcb = remoteAuthMakeCallbacks(auth->credtype, auth->ncredtype)) == NULL)
|
|
||||||
- goto cleanup;
|
|
||||||
+ if (auth) {
|
|
||||||
+ if ((saslcb = remoteAuthMakeCallbacks(auth->credtype, auth->ncredtype)) == NULL)
|
|
||||||
+ goto cleanup;
|
|
||||||
+ } else {
|
|
||||||
+ saslcb = NULL;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* Setup a handle for being a client */
|
|
||||||
err = sasl_client_new("libvirt",
|
|
||||||
@@ -3168,15 +3172,21 @@ remoteAuthSASL (virConnectPtr conn, stru
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
/* Run the authentication callback */
|
|
||||||
- if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
|
||||||
+ if (auth && auth->cb) {
|
|
||||||
+ if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
|
||||||
+ __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
+ VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
+ "Failed to collect auth credentials");
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+ remoteAuthFillInteract(cred, interact);
|
|
||||||
+ goto restart;
|
|
||||||
+ } else {
|
|
||||||
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
- "Failed to collect auth credentials");
|
|
||||||
+ "No authentication callback available");
|
|
||||||
goto cleanup;
|
|
||||||
- return -1;
|
|
||||||
}
|
|
||||||
- remoteAuthFillInteract(cred, interact);
|
|
||||||
- goto restart;
|
|
||||||
}
|
|
||||||
free(iret.mechlist);
|
|
||||||
|
|
||||||
@@ -3240,15 +3250,22 @@ remoteAuthSASL (virConnectPtr conn, stru
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
/* Run the authentication callback */
|
|
||||||
- if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
|
||||||
+ if (auth && auth->cb) {
|
|
||||||
+ if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
|
||||||
+ __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
+ VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
+ "Failed to collect auth credentials");
|
|
||||||
+ goto cleanup;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ remoteAuthFillInteract(cred, interact);
|
|
||||||
+ goto restep;
|
|
||||||
+ } else {
|
|
||||||
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
- "Failed to collect auth credentials");
|
|
||||||
+ "No authentication callback available");
|
|
||||||
goto cleanup;
|
|
||||||
- return -1;
|
|
||||||
}
|
|
||||||
- remoteAuthFillInteract(cred, interact);
|
|
||||||
- goto restep;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serverin) {
|
|
||||||
@@ -3319,7 +3336,8 @@ remoteAuthSASL (virConnectPtr conn, stru
|
|
||||||
if (remoteAddr) free(remoteAddr);
|
|
||||||
if (serverin) free(serverin);
|
|
||||||
|
|
||||||
- free(saslcb);
|
|
||||||
+ if (saslcb)
|
|
||||||
+ free(saslcb);
|
|
||||||
remoteAuthFreeCredentials(cred, ncred);
|
|
||||||
if (ret != 0 && saslconn)
|
|
||||||
sasl_dispose(&saslconn);
|
|
|
@ -1,44 +0,0 @@
|
||||||
diff -rup libvirt-0.4.0.orig/src/remote_internal.c libvirt-0.4.0.new/src/remote_internal.c
|
|
||||||
--- libvirt-0.4.0.orig/src/remote_internal.c 2007-12-17 16:51:09.000000000 -0500
|
|
||||||
+++ libvirt-0.4.0.new/src/remote_internal.c 2008-01-02 16:28:44.000000000 -0500
|
|
||||||
@@ -3347,24 +3347,26 @@ remoteAuthPolkit (virConnectPtr conn, st
|
|
||||||
};
|
|
||||||
remoteDebug(priv, "Client initialize PolicyKit authentication");
|
|
||||||
|
|
||||||
- for (i = 0 ; i < auth->ncredtype ; i++) {
|
|
||||||
- if (auth->credtype[i] == VIR_CRED_EXTERNAL)
|
|
||||||
- allowcb = 1;
|
|
||||||
- }
|
|
||||||
+ if (auth && auth->cb) {
|
|
||||||
+ /* Check if the neccessary credential type for PolicyKit is supported */
|
|
||||||
+ for (i = 0 ; i < auth->ncredtype ; i++) {
|
|
||||||
+ if (auth->credtype[i] == VIR_CRED_EXTERNAL)
|
|
||||||
+ allowcb = 1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- /* Run the authentication callback */
|
|
||||||
- if (allowcb) {
|
|
||||||
- if (auth && auth->cb &&
|
|
||||||
- (*(auth->cb))(&cred, 1, auth->cbdata) < 0) {
|
|
||||||
- __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
- VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
- "Failed to collect auth credentials");
|
|
||||||
- return -1;
|
|
||||||
+ if (allowcb) {
|
|
||||||
+ /* Run the authentication callback */
|
|
||||||
+ if ((*(auth->cb))(&cred, 1, auth->cbdata) < 0) {
|
|
||||||
+ __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
|
||||||
+ VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
|
||||||
+ "Failed to collect auth credentials");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
} else {
|
|
||||||
- remoteDebug(priv, "No auth callback provided for PolicyKit");
|
|
||||||
+ remoteDebug(priv, "Client auth callback does not support PolicyKit");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- remoteDebug(priv, "Client auth callback does not support PolicyKit");
|
|
||||||
+ remoteDebug(priv, "No auth callback provided");
|
|
||||||
}
|
|
||||||
|
|
||||||
memset (&ret, 0, sizeof ret);
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -rup libvirt-0.4.0.orig/src/conf.c libvirt-0.4.0.new/src/conf.c
|
|
||||||
--- libvirt-0.4.0.orig/src/conf.c 2007-12-12 08:30:49.000000000 -0500
|
|
||||||
+++ libvirt-0.4.0.new/src/conf.c 2008-01-02 16:30:12.000000000 -0500
|
|
||||||
@@ -705,7 +705,7 @@ error:
|
|
||||||
virConfPtr
|
|
||||||
__virConfReadFile(const char *filename)
|
|
||||||
{
|
|
||||||
- char content[4096];
|
|
||||||
+ char content[8192];
|
|
||||||
int fd;
|
|
||||||
int len;
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
diff -rup libvirt-0.4.0.orig/src/remote_internal.c libvirt-0.4.0.new/src/remote_internal.c
|
|
||||||
--- libvirt-0.4.0.orig/src/remote_internal.c 2008-01-14 19:32:25.000000000 -0500
|
|
||||||
+++ libvirt-0.4.0.new/src/remote_internal.c 2008-01-14 19:32:42.000000000 -0500
|
|
||||||
@@ -677,11 +677,12 @@ doRemoteOpen (virConnectPtr conn,
|
|
||||||
cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
|
|
||||||
cmd_argv[j++] = 0;
|
|
||||||
assert (j == nr_args);
|
|
||||||
- for (j = 0; j < nr_args; j++)
|
|
||||||
+ for (j = 0; j < (nr_args-1); j++) {
|
|
||||||
if (cmd_argv[j] == NULL) {
|
|
||||||
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/*FALLTHROUGH*/
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
Avoid segfault upon early libvirtd failure.
|
||||||
|
* qemud/qemud.c (main): Don't call qemudCleanup on an
|
||||||
|
uninitialized pointer.
|
||||||
|
|
||||||
|
By the way, even though this evoked a warning from gcc,
|
||||||
|
"make distcheck" passes. Obviously, that means the distcheck
|
||||||
|
rule is inadequate. I'll fix it so that it turns on -Werror
|
||||||
|
for the final build.
|
||||||
|
|
||||||
|
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
||||||
|
---
|
||||||
|
qemud/qemud.c | 5 +++--
|
||||||
|
1 files changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/qemud/qemud.c b/qemud/qemud.c
|
||||||
|
index 96fdf32..b6b82ed 100644
|
||||||
|
--- a/qemud/qemud.c
|
||||||
|
+++ b/qemud/qemud.c
|
||||||
|
@@ -2025,7 +2025,7 @@ libvirt management daemon:\n\
|
||||||
|
|
||||||
|
#define MAX_LISTEN 5
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
- struct qemud_server *server;
|
||||||
|
+ struct qemud_server *server = NULL;
|
||||||
|
struct sigaction sig_action;
|
||||||
|
int sigpipe[2];
|
||||||
|
const char *pid_file = NULL;
|
||||||
|
@@ -2180,7 +2180,8 @@ int main(int argc, char **argv) {
|
||||||
|
unlink (pid_file);
|
||||||
|
|
||||||
|
error1:
|
||||||
|
- qemudCleanup(server);
|
||||||
|
+ if (server)
|
||||||
|
+ qemudCleanup(server);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
Don't use first byte of string as a pointer.
|
||||||
|
* src/qemu_conf.c (qemudReportError): Use the pointer, errorMessage,
|
||||||
|
not its first byte, errorMessage[0].
|
||||||
|
|
||||||
|
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu_conf.c | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
|
||||||
|
index eead0bc..e54da5b 100644
|
||||||
|
--- a/src/qemu_conf.c
|
||||||
|
+++ b/src/qemu_conf.c
|
||||||
|
@@ -68,7 +68,7 @@ void qemudReportError(virConnectPtr conn,
|
||||||
|
errorMessage[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
- virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage[0] : NULL));
|
||||||
|
+ virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage : NULL));
|
||||||
|
__virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR,
|
||||||
|
virerr, errorMessage, NULL, -1, -1, virerr, errorMessage);
|
||||||
|
}
|
99
libvirt.spec
99
libvirt.spec
|
@ -8,17 +8,25 @@
|
||||||
%define with_proxy yes
|
%define with_proxy yes
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if "%{fedora}"
|
||||||
|
%ifarch ppc64
|
||||||
|
%define with_qemu 0
|
||||||
|
%else
|
||||||
|
%define with_qemu 1
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
|
%define with_qemu 0
|
||||||
|
%endif
|
||||||
|
|
||||||
Summary: Library providing a simple API virtualization
|
Summary: Library providing a simple API virtualization
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 0.4.0
|
Version: 0.4.1
|
||||||
Release: 4%{?dist}%{?extra_release}
|
Release: 2%{?dist}%{?extra_release}
|
||||||
License: LGPL
|
License: LGPL
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Source: libvirt-%{version}.tar.gz
|
Source: libvirt-%{version}.tar.gz
|
||||||
Patch1: libvirt-%{version}-auth-null-cb.patch
|
Patch0: libvirt-0.4.1-qemud1.patch
|
||||||
Patch2: libvirt-%{version}-conffile-size.patch
|
Patch1: libvirt-0.4.1-qemud2.patch
|
||||||
Patch3: libvirt-%{version}-auth-null-cb-2.patch
|
|
||||||
Patch4: libvirt-%{version}-remote-ssh.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
URL: http://libvirt.org/
|
URL: http://libvirt.org/
|
||||||
BuildRequires: python python-devel
|
BuildRequires: python python-devel
|
||||||
|
@ -33,12 +41,29 @@ Requires: iptables
|
||||||
Requires: nc
|
Requires: nc
|
||||||
Requires: cyrus-sasl
|
Requires: cyrus-sasl
|
||||||
# Not technically required, but makes 'out-of-box' config
|
# Not technically required, but makes 'out-of-box' config
|
||||||
# work correctly & doesn't have onerous dependancies
|
# work correctly & doesn't have onerous dependencies
|
||||||
Requires: cyrus-sasl-md5
|
Requires: cyrus-sasl-md5
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
Requires: PolicyKit >= 0.6
|
Requires: PolicyKit >= 0.6
|
||||||
%endif
|
%endif
|
||||||
|
# For mount/umount in FS driver
|
||||||
|
BuildRequires: util-linux
|
||||||
|
# PPC64 has no Xen nor QEmu, try to build anyway
|
||||||
|
%ifnarch ppc64
|
||||||
|
%if %{with_qemu}
|
||||||
|
# From QEMU RPMs
|
||||||
|
Requires: /usr/bin/qemu-img
|
||||||
|
%else
|
||||||
|
# From Xen RPMs
|
||||||
|
Requires: /usr/sbin/qcow-create
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
# For LVM drivers
|
||||||
|
Requires: lvm2
|
||||||
|
# For ISCSI driver
|
||||||
|
Requires: iscsi-initiator-utils
|
||||||
|
# For disk driver
|
||||||
|
Requires: parted
|
||||||
%ifarch i386 x86_64 ia64
|
%ifarch i386 x86_64 ia64
|
||||||
BuildRequires: xen-devel
|
BuildRequires: xen-devel
|
||||||
%endif
|
%endif
|
||||||
|
@ -48,19 +73,41 @@ BuildRequires: ncurses-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: gnutls-devel
|
BuildRequires: gnutls-devel
|
||||||
BuildRequires: avahi-devel
|
BuildRequires: avahi-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: dnsmasq
|
BuildRequires: dnsmasq
|
||||||
BuildRequires: bridge-utils
|
BuildRequires: bridge-utils
|
||||||
|
%if %{with_qemu}
|
||||||
|
BuildRequires: qemu
|
||||||
|
%endif
|
||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
BuildRequires: PolicyKit-devel >= 0.6
|
BuildRequires: PolicyKit-devel >= 0.6
|
||||||
%endif
|
%endif
|
||||||
|
# For mount/umount in FS driver
|
||||||
|
BuildRequires: util-linux
|
||||||
|
# PPC64 has no Xen nor QEmu, try to build anyway
|
||||||
|
%ifnarch ppc64
|
||||||
|
%if %{with_qemu}
|
||||||
|
# From QEMU RPMs
|
||||||
|
BuildRequires: /usr/bin/qemu-img
|
||||||
|
%else
|
||||||
|
# From Xen RPMs
|
||||||
|
BuildRequires: /usr/sbin/qcow-create
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
# For LVM drivers
|
||||||
|
BuildRequires: lvm2
|
||||||
|
# For ISCSI driver
|
||||||
|
BuildRequires: iscsi-initiator-utils
|
||||||
|
# For disk driver
|
||||||
|
BuildRequires: parted-devel
|
||||||
Obsoletes: libvir
|
Obsoletes: libvir
|
||||||
|
|
||||||
# Fedora build root suckage
|
# Fedora build root suckage
|
||||||
BuildRequires: gawk
|
BuildRequires: gawk
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Libvirt is a C toolkit to interract with the virtualization capabilities
|
Libvirt is a C toolkit to interact with the virtualization capabilities
|
||||||
of recent versions of Linux (and other OSes).
|
of recent versions of Linux (and other OSes).
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
|
@ -86,22 +133,34 @@ Obsoletes: libvir-python
|
||||||
%description python
|
%description python
|
||||||
The libvirt-python package contains a module that permits applications
|
The libvirt-python package contains a module that permits applications
|
||||||
written in the Python programming language to use the interface
|
written in the Python programming language to use the interface
|
||||||
supplied by the libvirt library to use the the virtualization capabilities
|
supplied by the libvirt library to use the virtualization capabilities
|
||||||
of recent versions of Linux (and other OSes).
|
of recent versions of Linux (and other OSes).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Xen is availble only on i386 x86_64 ia64
|
# Xen is available only on i386 x86_64 ia64
|
||||||
%ifarch i386 i686 x86_64 ia64
|
%ifarch i386 i686 x86_64 ia64
|
||||||
%configure --with-init-script=redhat --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid --with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
%configure --with-init-script=redhat \
|
||||||
|
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
||||||
|
--with-remote-file=%{_localstatedir}/run/libvirtd.pid \
|
||||||
|
--with-xen-proxy=%{with_proxy}
|
||||||
%else
|
%else
|
||||||
%configure --without-xen --with-init-script=redhat --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid --with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
%ifnarch ppc64
|
||||||
|
%configure --without-xen \
|
||||||
|
--with-init-script=redhat \
|
||||||
|
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
||||||
|
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
||||||
|
%else
|
||||||
|
%configure --without-xen \
|
||||||
|
--without-qemu \
|
||||||
|
--with-init-script=redhat \
|
||||||
|
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
||||||
|
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
make
|
make
|
||||||
|
@ -188,6 +247,7 @@ fi
|
||||||
%if %{with_proxy} == "yes"
|
%if %{with_proxy} == "yes"
|
||||||
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
||||||
%endif
|
%endif
|
||||||
|
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
|
||||||
%attr(0755, root, root) %{_sbindir}/libvirtd
|
%attr(0755, root, root) %{_sbindir}/libvirtd
|
||||||
%doc docs/*.rng
|
%doc docs/*.rng
|
||||||
%doc docs/*.xml
|
%doc docs/*.xml
|
||||||
|
@ -220,6 +280,13 @@ fi
|
||||||
%doc docs/examples/python
|
%doc docs/examples/python
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 6 2008 Daniel Veillard <veillard@redhat.com> - 0.4.1-1.fc8
|
||||||
|
- Update to 0.4.1
|
||||||
|
- Storage APIs
|
||||||
|
- xenner support
|
||||||
|
- lots of assorted improvements, bugfixes and cleanups
|
||||||
|
- documentation and localization improvements
|
||||||
|
|
||||||
* Thu Jan 17 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-4.fc8
|
* Thu Jan 17 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-4.fc8
|
||||||
- Fix SSH tunnelling (rhbz #428743)
|
- Fix SSH tunnelling (rhbz #428743)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue