diff --git a/.cvsignore b/.cvsignore index b91818f..37eeee8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -23,3 +23,4 @@ libvirt-0.3.1.tar.gz libvirt-0.3.2.tar.gz libvirt-0.3.3.tar.gz libvirt-0.4.0.tar.gz +libvirt-0.4.1.tar.gz diff --git a/libvirt-0.4.0-auth-null-cb-2.patch b/libvirt-0.4.0-auth-null-cb-2.patch deleted file mode 100644 index 9fd6508..0000000 --- a/libvirt-0.4.0-auth-null-cb-2.patch +++ /dev/null @@ -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); diff --git a/libvirt-0.4.0-auth-null-cb.patch b/libvirt-0.4.0-auth-null-cb.patch deleted file mode 100644 index e5e50b5..0000000 --- a/libvirt-0.4.0-auth-null-cb.patch +++ /dev/null @@ -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); diff --git a/libvirt-0.4.0-conffile-size.patch b/libvirt-0.4.0-conffile-size.patch deleted file mode 100644 index 5e8fae6..0000000 --- a/libvirt-0.4.0-conffile-size.patch +++ /dev/null @@ -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; - diff --git a/libvirt-0.4.0-nodeinfo-compat.patch b/libvirt-0.4.0-nodeinfo-compat.patch deleted file mode 100644 index b0ccca3..0000000 --- a/libvirt-0.4.0-nodeinfo-compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rup libvirt-0.4.0.orig/src/xend_internal.c libvirt-0.4.0.new/src/xend_internal.c ---- libvirt-0.4.0.orig/src/xend_internal.c 2007-12-17 18:05:27.000000000 -0500 -+++ libvirt-0.4.0.new/src/xend_internal.c 2008-01-18 21:13:30.000000000 -0500 -@@ -1907,6 +1907,9 @@ sexpr_to_xend_node_info(struct sexpr *ro - info->mhz = sexpr_int(root, "node/cpu_mhz"); - info->nodes = sexpr_int(root, "node/nr_nodes"); - info->sockets = sexpr_int(root, "node/sockets_per_node"); -+ info->cores = sexpr_int(root, "node/cores_per_socket"); -+ info->threads = sexpr_int(root, "node/threads_per_core"); -+ - /* Xen 3.2.0 replaces sockets_per_node with 'nr_cpus'. - * Old Xen calculated sockets_per_node using its internal - * nr_cpus / (nodes*cores*threads), so fake it ourselves -@@ -1921,8 +1924,6 @@ sexpr_to_xend_node_info(struct sexpr *ro - if (info->sockets == 0) - info->sockets = 1; - } -- info->cores = sexpr_int(root, "node/cores_per_socket"); -- info->threads = sexpr_int(root, "node/threads_per_core"); - return (0); - } - diff --git a/libvirt-0.4.0-remote-ssh.patch b/libvirt-0.4.0-remote-ssh.patch deleted file mode 100644 index f3cecca..0000000 --- a/libvirt-0.4.0-remote-ssh.patch +++ /dev/null @@ -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*/ diff --git a/libvirt.spec b/libvirt.spec index 0ba9ecc..ed40007 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -8,18 +8,19 @@ %define with_proxy yes %endif +%if "%{fedora}" +%define with_qemu 1 +%else +%define with_qemu 0 +%endif + Summary: Library providing a simple API virtualization Name: libvirt -Version: 0.4.0 -Release: 5%{?dist}%{?extra_release} +Version: 0.4.1 +Release: 1%{?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 -Patch3: libvirt-%{version}-auth-null-cb-2.patch -Patch4: libvirt-%{version}-remote-ssh.patch -Patch5: libvirt-%{version}-nodeinfo-compat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://libvirt.org/ BuildRequires: python python-devel @@ -34,12 +35,26 @@ 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 +%if %{with_qemu} +# From QEMU RPMs +Requires: /usr/bin/qemu-img +%else +# From Xen RPMs +Requires: /usr/sbin/qcow-create +%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 @@ -49,19 +64,36 @@ BuildRequires: ncurses-devel BuildRequires: gettext BuildRequires: gnutls-devel BuildRequires: avahi-devel +BuildRequires: libselinux-devel BuildRequires: dnsmasq BuildRequires: bridge-utils +BuildRequires: qemu BuildRequires: cyrus-sasl-devel %if %{with_polkit} BuildRequires: PolicyKit-devel >= 0.6 %endif +# For mount/umount in FS driver +BuildRequires: util-linux +%if %{with_qemu} +# From QEMU RPMs +BuildRequires: /usr/bin/qemu-img +%else +# From Xen RPMs +BuildRequires: /usr/sbin/qcow-create +%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 @@ -87,23 +119,24 @@ 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 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -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 +%configure --without-xen \ + --with-init-script=redhat \ + --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \ + --with-remote-file=%{_localstatedir}/run/libvirtd.pid %endif make @@ -190,6 +223,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 @@ -222,6 +256,13 @@ fi %doc docs/examples/python %changelog +* Mon Mar 3 2008 Daniel Veillard - 0.4.1-1.fc9 +- Release of 0.4.1 +- Storage APIs +- xenner support +- lots of assorted improvements, bugfixes and cleanups +- documentation and localization improvements + * Wed Feb 20 2008 Fedora Release Engineering - 0.4.0-5 - Autorebuild for GCC 4.3 diff --git a/sources b/sources index a5b9c28..36771e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2f6c6adb62145988f0e5021e5cbd71d3 libvirt-0.4.0.tar.gz +4dfe45869f082393cfd09f4690454c12 libvirt-0.4.1.tar.gz