From fbcf7082967822ac40617328f84d1670b418bf25922cd786bdf134fef6a23c78 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 8 Jul 2008 20:02:35 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=16 --- auth-callback.patch | 124 ---------------------------------------- libvirt-0.4.0.tar.bz2 | 3 - libvirt-0.4.4.tar.bz2 | 3 + libvirt.changes | 14 +++++ libvirt.spec | 79 +++++++++++++++++-------- suse-paths.patch | 12 ---- xen-3_2-hypercall.patch | 32 ----------- 7 files changed, 71 insertions(+), 196 deletions(-) delete mode 100644 auth-callback.patch delete mode 100644 libvirt-0.4.0.tar.bz2 create mode 100644 libvirt-0.4.4.tar.bz2 delete mode 100644 suse-paths.patch delete mode 100644 xen-3_2-hypercall.patch diff --git a/auth-callback.patch b/auth-callback.patch deleted file mode 100644 index 574d860..0000000 --- a/auth-callback.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff -ru a/src/remote_internal.c b/src/remote_internal.c ---- a/src/remote_internal.c 2007-12-17 14:51:09.000000000 -0700 -+++ b/src/remote_internal.c 2008-04-09 15:56:59.000000000 -0600 -@@ -3054,8 +3054,12 @@ - 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 @@ - 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 @@ - 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 @@ - if (remoteAddr) free(remoteAddr); - if (serverin) free(serverin); - -- free(saslcb); -+ if (saslcb) -+ free(saslcb); - remoteAuthFreeCredentials(cred, ncred); - if (ret != 0 && saslconn) - sasl_dispose(&saslconn); -@@ -3347,24 +3365,26 @@ - }; - 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.tar.bz2 b/libvirt-0.4.0.tar.bz2 deleted file mode 100644 index fdeb4ed..0000000 --- a/libvirt-0.4.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dba8a3e9481d368efff1e4964e6876221ebb569e41285b82b9fb30c27a888e05 -size 1857289 diff --git a/libvirt-0.4.4.tar.bz2 b/libvirt-0.4.4.tar.bz2 new file mode 100644 index 0000000..d791bfb --- /dev/null +++ b/libvirt-0.4.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f04d72f036b077c29f8af811e0e3ede9d44fe61a7e7ac4bdc35f14d297d6941 +size 2944387 diff --git a/libvirt.changes b/libvirt.changes index c716ea6..c910dfc 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Jul 6 11:16:25 MDT 2008 - jfehlig@novell.com + +- Updated to libvirt 0.4.4 + + Bug fixes: QEmu network serialization, internal memory allocation + fixes, virsh large file config problem, xen list APIs when max is + zero, string escape problems in the xm driver + + Improvements: add autogen to tarballs, improve iSCSI support + + Cleanups: const-ness fixed, string helpers for enumeations +- spec file adjustments + + Remove ExclusiveArch + + Common spec file for all products + + Support for building/running without Xen + ------------------------------------------------------------------- Fri May 9 09:34:56 MDT 2008 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 9ad51c0..dadeb25 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.4.0) +# spec file for package libvirt (Version 0.4.4) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -10,35 +10,50 @@ # norootforbuild +%define with_xen 1 +%define with_polkit 0 +# Xen is available only on i386 x86_64 ia64 +%ifnarch i386 i586 x86_64 ia64 +%define with_xen 0 +%endif Name: libvirt -BuildRequires: PolicyKit-devel avahi-devel bridge-utils cyrus-sasl-devel fdupes gettext gnutls-devel iptables libxml2-devel ncurses-devel pkg-config python-devel readline-devel xen-devel xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel fdupes gettext gnutls-devel iptables libxml2-devel lvm2 ncurses-devel parted parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd +%if %{with_xen} +BuildRequires: xen-devel +%endif +%if 0%{?suse_version} > 1030 +%define with_polkit 1 +BuildRequires: PolicyKit-devel dnsmasq libavahi-devel +%else +BuildRequires: avahi-devel +%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.4.0 -Release: 51 +Version: 0.4.4 +Release: 1 Summary: A C toolkit to interract with the virtualization capabilities of Linux -Requires: dnsmasq +Requires: libxml2 +Requires: readline +Requires: ncurses Requires: bridge-utils Requires: iptables Requires: cyrus-sasl -# Not technically required, but makes 'out-of-box' config -# work correctly & doesn't have onerous dependancies +Requires: lvm2 +Requires: parted Recommends: cyrus-sasl-digestmd5 +%if 0%{?suse_version} > 1030 +Requires: dnsmasq Requires: PolicyKit >= 0.6 +%endif Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init -Patch0: auth-callback.patch -Patch1: xen-3_2-hypercall.patch -Patch2: suse-paths.patch -Patch3: libvirtd-polkit.patch +Patch0: libvirtd-polkit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -ExclusiveArch: %ix86 x86_64 -%define _libexecdir %{_prefix}/lib/%{name} %description Libvirt is a C toolkit to interract with the virtualization @@ -60,7 +75,10 @@ Authors: License: LGPL v2.1 or later Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} libxml2-devel xen-devel +Requires: %{name} = %{version} libxml2-devel +%if %{with_xen} +Requires: xen-devel +%endif %description devel Libvirt is a C toolkit to interract with the virtualization @@ -126,17 +144,20 @@ Authors: %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 rm po/no.* %build +%if ! %{with_xen} +%define _without_xen --without-xen +%endif autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -%configure --with-init-script=none \ +%configure %{?_without_xen} \ + --libexecdir=%{_libdir}/%{name} \ + --with-init-script=none \ --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \ --with-remote-file=%{_localstatedir}/run/libvirtd.pid \ + --with-storage-iscsi=no \ --with-xen-proxy=no make DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} cd docs/examples ; make index.html ; cd ../.. @@ -144,9 +165,6 @@ cd docs/examples ; make index.html ; cd ../.. %install %makeinstall DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/ -cp -a docs/{*.html,*.gif,*.rng,libvirt*.xml} $RPM_BUILD_ROOT%{_docdir}/%{name} -mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/examples -install -m 0644 docs/examples/{*.c,*.html} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples # remove currently unsupported locale rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin # for now, do not install the default network definition @@ -154,7 +172,6 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/var/run/libvirtd rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*} -install -m 0644 docs/examples/python/{*.py,*.xml,README} $RPM_BUILD_ROOT%{_docdir}/%{name}-python/examples rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a ln_dupes() { @@ -200,9 +217,10 @@ rm -rf $RPM_BUILD_ROOT %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS -%doc %{_docdir}/%{name}/examples %doc %{_mandir}/man1/virsh.1* %{_libdir}/*.so.* +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libvirt_parthelper %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ @@ -213,7 +231,9 @@ rm -rf $RPM_BUILD_ROOT %config %{_sysconfdir}/libvirt/libvirtd.conf %config %{_sysconfdir}/libvirt/qemu.conf %config %{_sysconfdir}/sasl2/libvirt.conf +%if %{with_polkit} %{_datadir}/PolicyKit/policy/libvirtd.policy +%endif %files devel %defattr(-, root, root) @@ -226,8 +246,6 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-doc/html/libvirt %doc %{_docdir}/%{name}/*.gif %doc %{_docdir}/%{name}/*.html -%doc %{_docdir}/%{name}/*.rng -%doc %{_docdir}/%{name}/*.xml %doc %{_docdir}/%{name}/html %files python @@ -237,6 +255,17 @@ rm -rf $RPM_BUILD_ROOT %{py_sitedir}/libvirtmod* %changelog +* Sun Jul 06 2008 jfehlig@novell.com +- Updated to libvirt 0.4.4 + + Bug fixes: QEmu network serialization, internal memory allocation + fixes, virsh large file config problem, xen list APIs when max is + zero, string escape problems in the xm driver + + Improvements: add autogen to tarballs, improve iSCSI support + + Cleanups: const-ness fixed, string helpers for enumeations +- spec file adjustments + + Remove ExclusiveArch + + Common spec file for all products + + Support for building/running without Xen * Fri May 09 2008 jfehlig@novell.com - Adjust libvirtd PolicyKit configuration file to match standard suse procedures. bnc#388769 diff --git a/suse-paths.patch b/suse-paths.patch deleted file mode 100644 index 3ef1972..0000000 --- a/suse-paths.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru a/configure.in b/configure.in ---- a/configure.in 2007-12-17 16:07:47.000000000 -0700 -+++ b/configure.in 2008-05-05 10:30:03.000000000 -0600 -@@ -204,7 +204,7 @@ - AC_DEFINE_UNQUOTED(IPTABLES_DIR, "$IPTABLES_DIR", [directory used for saving iptables chains]) - fi - --AC_PATH_PROG(IPTABLES_PATH, iptables, /sbin/iptables) -+AC_PATH_PROG(IPTABLES_PATH, iptables, /sbin/iptables, [/usr/sbin:$PATH]) - AC_DEFINE_UNQUOTED(IPTABLES_PATH, "$IPTABLES_PATH", [path to iptables binary]) - - dnl diff --git a/xen-3_2-hypercall.patch b/xen-3_2-hypercall.patch deleted file mode 100644 index 2c7eb5d..0000000 --- a/xen-3_2-hypercall.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: libvirt-0.4.0/src/xen_internal.c -=================================================================== ---- libvirt-0.4.0.orig/src/xen_internal.c -+++ libvirt-0.4.0/src/xen_internal.c -@@ -2006,7 +2006,7 @@ xenHypervisorInit(void) - - sys_interface_version = 4; /* XEN_SYSCTL_INTERFACE_VERSION */ - if (virXen_getdomaininfo(fd, 0, &info) == 1) { -- /* xen-unstable */ -+ /* Fedora 8 */ - dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */ - if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ - #ifdef DEBUG -@@ -2016,6 +2016,18 @@ xenHypervisorInit(void) - } - } - -+ sys_interface_version = 6; /* XEN_SYSCTL_INTERFACE_VERSION */ -+ if (virXen_getdomaininfo(fd, 0, &info) == 1) { -+ /* Xen 3.2, Fedora 9 */ -+ dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */ -+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ -+#ifdef DEBUG -+ fprintf(stderr, "Using hypervisor call v2, sys ver6 dom ver5\n"); -+#endif -+ goto done; -+ } -+ } -+ - hypervisor_version = 1; - sys_interface_version = -1; - if (virXen_getdomaininfo(fd, 0, &info) == 1) {