Compare commits
6 Commits
libvirt-0_
...
libvirt-0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cba2d7c9e | ||
|
|
824ac1932d | ||
|
|
2457ff7037 | ||
|
|
d8ce9b00e6 | ||
|
|
5238691972 | ||
|
|
49bd0fe0f6 |
@@ -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;
|
||||
|
||||
48
libvirt-0.4.1-daemon-startup.patch
Normal file
48
libvirt-0.4.1-daemon-startup.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
diff -rup libvirt-0.4.1.orig/qemud/qemud.c libvirt-0.4.1.new/qemud/qemud.c
|
||||
--- libvirt-0.4.1.orig/qemud/qemud.c 2008-03-10 17:31:09.000000000 -0400
|
||||
+++ libvirt-0.4.1.new/qemud/qemud.c 2008-03-10 17:31:36.000000000 -0400
|
||||
@@ -393,7 +393,7 @@ static int qemudGoDaemon(void) {
|
||||
case -1:
|
||||
return -1;
|
||||
default:
|
||||
- return nextpid;
|
||||
+ _exit(0);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@@ -418,8 +418,7 @@ static int qemudGoDaemon(void) {
|
||||
status != 0) {
|
||||
return -1;
|
||||
}
|
||||
-
|
||||
- return pid;
|
||||
+ _exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2116,16 +2115,12 @@ int main(int argc, char **argv) {
|
||||
goto error1;
|
||||
|
||||
if (godaemon) {
|
||||
- int pid;
|
||||
openlog("libvirtd", 0, 0);
|
||||
- pid = qemudGoDaemon();
|
||||
- if (pid < 0) {
|
||||
+ if (qemudGoDaemon() < 0) {
|
||||
qemudLog(QEMUD_ERR, _("Failed to fork as daemon: %s"),
|
||||
strerror(errno));
|
||||
goto error1;
|
||||
}
|
||||
- if (pid > 0)
|
||||
- goto out;
|
||||
|
||||
/* Choose the name of the PID file. */
|
||||
if (!pid_file) {
|
||||
@@ -2172,7 +2167,6 @@ int main(int argc, char **argv) {
|
||||
if (godaemon)
|
||||
closelog();
|
||||
|
||||
- out:
|
||||
ret = 0;
|
||||
|
||||
error2:
|
||||
38
libvirt-0.4.1-qemud1.patch
Normal file
38
libvirt-0.4.1-qemud1.patch
Normal file
@@ -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;
|
||||
}
|
||||
|
||||
23
libvirt-0.4.1-qemud2.patch
Normal file
23
libvirt-0.4.1-qemud2.patch
Normal file
@@ -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);
|
||||
}
|
||||
102
libvirt.spec
102
libvirt.spec
@@ -8,15 +8,26 @@
|
||||
%define with_proxy yes
|
||||
%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
|
||||
Name: libvirt
|
||||
Version: 0.4.0
|
||||
Version: 0.4.1
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
License: LGPL
|
||||
Group: Development/Libraries
|
||||
Source: libvirt-%{version}.tar.gz
|
||||
Patch1: libvirt-%{version}-auth-null-cb.patch
|
||||
Patch2: libvirt-%{version}-conffile-size.patch
|
||||
Patch0: libvirt-0.4.1-qemud1.patch
|
||||
Patch1: libvirt-0.4.1-qemud2.patch
|
||||
Patch2: libvirt-0.4.1-daemon-startup.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
URL: http://libvirt.org/
|
||||
BuildRequires: python python-devel
|
||||
@@ -31,12 +42,29 @@ Requires: iptables
|
||||
Requires: nc
|
||||
Requires: cyrus-sasl
|
||||
# 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
|
||||
%if %{with_polkit}
|
||||
Requires: PolicyKit >= 0.6
|
||||
%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
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
@@ -46,19 +74,41 @@ BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gnutls-devel
|
||||
BuildRequires: avahi-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: dnsmasq
|
||||
BuildRequires: bridge-utils
|
||||
%if %{with_qemu}
|
||||
BuildRequires: qemu
|
||||
%endif
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%if %{with_polkit}
|
||||
BuildRequires: PolicyKit-devel >= 0.6
|
||||
%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
|
||||
|
||||
# Fedora build root suckage
|
||||
BuildRequires: gawk
|
||||
|
||||
%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).
|
||||
|
||||
%package devel
|
||||
@@ -84,20 +134,35 @@ Obsoletes: libvir-python
|
||||
%description python
|
||||
The libvirt-python package contains a module that permits applications
|
||||
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).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%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
|
||||
%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
|
||||
%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
|
||||
|
||||
make
|
||||
@@ -184,6 +249,7 @@ fi
|
||||
%if %{with_proxy} == "yes"
|
||||
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
||||
%endif
|
||||
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
|
||||
%attr(0755, root, root) %{_sbindir}/libvirtd
|
||||
%doc docs/*.rng
|
||||
%doc docs/*.xml
|
||||
@@ -216,6 +282,22 @@ fi
|
||||
%doc docs/examples/python
|
||||
|
||||
%changelog
|
||||
* Tue Mar 11 2008 Daniel Veillard <veillard@redhat.com> - 0.4.1-2.fc8
|
||||
- Fixed daemon startup when run with --daemon flag
|
||||
|
||||
* 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
|
||||
- Fix SSH tunnelling (rhbz #428743)
|
||||
|
||||
* Sun Jan 13 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-3.fc8
|
||||
- Fix crash when no auth callback
|
||||
|
||||
* Wed Jan 2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-2.fc8
|
||||
- Fix reading large config files (rhbz #426425)
|
||||
- Fix crash when connecting to a PolicyKit enabled server with not auth callback (rhbz #427107)
|
||||
|
||||
Reference in New Issue
Block a user