Update to 1.0.2 release

This commit is contained in:
Daniel P. Berrange 2013-02-01 10:48:53 +00:00
parent 1b71b68bb9
commit 350081d1a9
7 changed files with 494 additions and 640 deletions

View File

@ -0,0 +1,40 @@
From a6b8bae5a6a4752926eba409202ec061d81c6c8a Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge.hallyn@canonical.com>
Date: Wed, 30 Jan 2013 21:05:45 -0600
Subject: [PATCH] complete virterror->virerror name change
Without these two string changes in generator.py, the
virGetLastError wrapper does not get created in
/usr/share/pyshared/libvirt.py. Noticed when running
tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
---
python/generator.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/generator.py b/python/generator.py
index 5d27f66..71ca883 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -123,7 +123,7 @@ class docParser(xml.sax.handler.ContentHandler):
self.function_return_field = attrs['field']
elif tag == 'enum':
if (attrs['file'] == "libvirt" or
- attrs['file'] == "virterror"):
+ attrs['file'] == "virerror"):
enum(attrs['type'],attrs['name'],attrs['value'])
elif attrs['file'] == "libvirt-lxc":
lxc_enum(attrs['type'],attrs['name'],attrs['value'])
@@ -137,7 +137,7 @@ class docParser(xml.sax.handler.ContentHandler):
if self.function != None:
if (self.function_module == "libvirt" or
self.function_module == "virevent" or
- self.function_module == "virterror"):
+ self.function_module == "virerror"):
function(self.function, self.function_descr,
self.function_return, self.function_args,
self.function_file, self.function_module,
--
1.8.1

View File

@ -1,31 +0,0 @@
From bb19491cf5e3b78f2d72bbcbcc06e985d29b7f4b Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 11 Jan 2013 11:10:34 +0100
Subject: [PATCH] network: bridge: Fix regression when defining persistent
networks
Commit 0211fd6e04cdc402da20818df54299c6ded3d3cb introduced regression
where newly defined networks were not made persistent.
This patch makes the network persistent on each successful definition.
---
src/network/bridge_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 660c38d..975b7f6 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3124,6 +3124,9 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
goto cleanup;
}
+ /* define makes the network persistent - always */
+ network->persistent = 1;
+
/* def was asigned */
freeDef = false;
--
1.8.1

View File

@ -1,55 +0,0 @@
From 46532e3e8ed5f5a736a02f67d6c805492f9ca720 Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 4 Jan 2013 16:15:04 +0100
Subject: [PATCH] rpc: Fix crash on error paths of message dispatching
This patch resolves CVE-2013-0170:
https://bugzilla.redhat.com/show_bug.cgi?id=893450
When reading and dispatching of a message failed the message was freed
but wasn't removed from the message queue.
After that when the connection was about to be closed the pointer for
the message was still present in the queue and it was passed to
virNetMessageFree which tried to call the callback function from an
uninitialized pointer.
This patch removes the message from the queue before it's freed.
* rpc/virnetserverclient.c: virNetServerClientDispatchRead:
- avoid use after free of RPC messages
---
src/rpc/virnetserverclient.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index af0560e..446e1e9 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -987,6 +987,7 @@ readmore:
/* Decode the header so we can use it for routing decisions */
if (virNetMessageDecodeHeader(msg) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return;
@@ -996,6 +997,7 @@ readmore:
* file descriptors */
if (msg->header.type == VIR_NET_CALL_WITH_FDS &&
virNetMessageDecodeNumFDs(msg) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return; /* Error */
@@ -1005,6 +1007,7 @@ readmore:
for (i = msg->donefds ; i < msg->nfds ; i++) {
int rv;
if ((rv = virNetSocketRecvFD(client->sock, &(msg->fds[i]))) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return;
--
1.8.1

View File

@ -1,51 +0,0 @@
From 1bf661caf4e926efcad6e85151a587cea5fd29f4 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Mon, 14 Jan 2013 10:47:41 -0700
Subject: [PATCH] build: further fixes for broken if_bridge.h
Commit c308a9ae was incomplete; it resolved the configure failure,
but not a later build failure.
* src/util/virnetdevbridge.c: Include pre-req header.
* configure.ac (AC_CHECK_HEADERS): Prefer standard in.h over
non-standard ip6.h.
---
configure.ac | 2 +-
src/util/virnetdevbridge.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3ab3c4e..712918f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -979,7 +979,7 @@ if test "$with_linux" = "yes"; then
if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then
AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],,
[AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])],
- [[#include <netinet/ip6.h>
+ [[#include <netinet/in.h>
]])
fi
fi
diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index b87c601..3c00be9 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2012 Red Hat, Inc.
+ * Copyright (C) 2007-2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -32,6 +32,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
+#include <netinet/in.h>
#ifdef __linux__
# include <linux/sockios.h>
--
1.8.0.2

View File

@ -1,43 +0,0 @@
From c308a9ae153db619fc0366bad9fd8f6c49cfac58 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Mon, 14 Jan 2013 09:54:25 -0700
Subject: [PATCH] build: work around broken kernel header
I got this scary warning during ./configure on rawhide:
checking linux/if_bridge.h usability... no
checking linux/if_bridge.h presence... yes
configure: WARNING: linux/if_bridge.h: present but cannot be compiled
configure: WARNING: linux/if_bridge.h: check for missing prerequisite headers?
configure: WARNING: linux/if_bridge.h: see the Autoconf documentation
configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be Compiled"
configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to libvir-list@redhat.com ##
configure: WARNING: ## ------------------------------------- ##
checking for linux/if_bridge.h... no
* configure.ac (AC_CHECK_HEADERS): Provide struct in6_addr, since
linux/if_bridge.h uses it without declaring it.
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 8a424e7..1d0add5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -978,7 +978,9 @@ dnl
if test "$with_linux" = "yes"; then
if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then
AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],,
- AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support]))
+ [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])],
+ [[#include <netinet/ip6.h>
+ ]])
fi
fi
--
1.8.0.2

View File

@ -11,7 +11,7 @@
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%define enable_autotools 1}
%{!?enable_autotools:%define enable_autotools 0}
# A client only build will create a libvirt.so only containing
# the generic RPC driver, and test driver and no libvirtd
@ -115,7 +115,7 @@
%define with_systemd 0%{!?_without_systemd:0}
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_libssh2_transport 0%{!?_without_libssh2_transport:0}
%define with_libssh2 0%{!?_without_libssh2:0}
# Non-server/HV driver defaults which are always enabled
%define with_python 0%{!?_without_python:1}
@ -244,7 +244,7 @@
# Enable libssh2 transport for new enough distros
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
%define with_libssh2_transport 0%{!?_without_libssh2_transport:1}
%define with_libssh2 0%{!?_without_libssh2:1}
%endif
# Disable some drivers when building without libvirt daemon.
@ -340,8 +340,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 1.0.1
Release: 6%{?dist}%{?extra_release}
Version: 1.0.2
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -351,13 +351,7 @@ URL: http://libvirt.org/
%define mainturl stable_updates/
%endif
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
Patch1: %{name}-%{version}-build-work-around-broken-kernel-header.patch
Patch2: %{name}-%{version}-build-further-fixes-for-broken-if_bridge.h.patch
# CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz
# 893450, bz 905173)
Patch3: 0001-rpc-Fix-crash-on-error-paths-of-message-dispatching.patch
# Fix network persistence after define (bz 890492)
Patch4: 0001-network-bridge-Fix-regression-when-defining-persiste.patch
Patch1: 0001-complete-virterror-virerror-name-change.patch
%if %{with_libvirtd}
Requires: libvirt-daemon = %{version}-%{release}
@ -417,6 +411,7 @@ BuildRequires: ncurses-devel
BuildRequires: gettext
BuildRequires: libtasn1-devel
BuildRequires: gnutls-devel
BuildRequires: libattr-devel
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
# for augparse, optionally used in testing
BuildRequires: augeas
@ -532,12 +527,8 @@ BuildRequires: libcap-ng-devel >= 0.5.0
%if %{with_fuse}
BuildRequires: fuse-devel >= 2.8.6
%endif
%if %{with_phyp} || %{with_libssh2_transport}
%if %{with_libssh2_transport}
%if %{with_phyp} || %{with_libssh2}
BuildRequires: libssh2-devel >= 1.3.0
%else
BuildRequires: libssh2-devel
%endif
%endif
%if %{with_netcf}
@ -622,8 +613,12 @@ Requires: module-init-tools
# for /sbin/ip & /sbin/tc
Requires: iproute
%if %{with_avahi}
%if 0%{?rhel} == 5
Requires: avahi
%else
Requires: avahi-libs
%endif
%endif
%if %{with_network}
Requires: dnsmasq >= 2.41
Requires: radvd
@ -831,9 +826,7 @@ Summary: Qemu driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
# There really is a hard cross-driver dependency here
%if %{with_driver_modules}
Requires: libvirt-daemon-driver-network = %{version}-%{release}
%endif
%description daemon-driver-qemu
The qemu driver plugin for the libvirtd daemon, providing
@ -848,9 +841,7 @@ Summary: LXC driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
# There really is a hard cross-driver dependency here
%if %{with_driver_modules}
Requires: libvirt-daemon-driver-network = %{version}-%{release}
%endif
%description daemon-driver-lxc
The LXC driver plugin for the libvirtd daemon, providing
@ -896,7 +887,7 @@ The Libxl driver plugin for the libvirtd daemon, providing
an implementation of the hypervisor driver APIs using
Libxl
%endif
%endif
%endif # %{with_driver_modules}
@ -1017,7 +1008,7 @@ Requires: xen
Server side daemon and driver required to manage the virtualization
capabilities of XEN
%endif
%endif
%endif # %{with_libvirtd}
%package client
Summary: Client side library and utilities of the libvirt library
@ -1039,9 +1030,6 @@ Requires: cyrus-sasl
# work correctly & doesn't have onerous dependencies
Requires: cyrus-sasl-md5
%endif
%if %{with_libssh2_transport}
Requires: libssh2 >= 1.3.0
%endif
%description client
Shared libraries and client binaries needed to access to the
@ -1092,9 +1080,6 @@ of recent versions of Linux (and other OSes).
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%if ! %{with_xen}
@ -1353,7 +1338,11 @@ gzip -9 ChangeLog
%install
rm -fr %{buildroot}
%makeinstall SYSTEMD_UNIT_DIR=%{buildroot}%{_unitdir}
# Avoid using makeinstall macro as it changes prefixes rather than setting
# DESTDIR. Newer make_install macro would be better but it's not available
# on RHEL 5, thus we need to expand it here.
make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
do
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
@ -1403,6 +1392,8 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
%if ! %{with_python}
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}
%else
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}/examples
%endif
%if ! %{with_qemu}
@ -1429,6 +1420,10 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
%endif
%endif
%if 0%{?fedora} < 14 && 0%{?rhel} < 6
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
%endif
%clean
rm -fr %{buildroot}
@ -1576,9 +1571,7 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
fi
%endif
%endif
%if %{with_libvirtd}
%if %{with_systemd}
%triggerun -- libvirt < 0.9.4
%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
@ -1590,7 +1583,7 @@ fi
/sbin/chkconfig --del libvirtd >/dev/null 2>&1 || :
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
%endif
%endif
%endif # %{with_libvirtd}
%preun client
@ -1674,15 +1667,12 @@ fi
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
%if %{with_systemd}
%{_unitdir}/libvirtd.service
%{_unitdir}/libvirt-guests.service
%{_unitdir}/virtlockd.service
%{_unitdir}/virtlockd.socket
%else
%{_sysconfdir}/rc.d/init.d/libvirtd
%{_sysconfdir}/rc.d/init.d/libvirt-guests
%{_sysconfdir}/rc.d/init.d/virtlockd
%endif
%doc daemon/libvirtd.upstart
@ -1690,9 +1680,7 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
%config(noreplace) %{_sysconfdir}/sysctl.d/libvirtd
%else
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
%endif
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
@ -1755,10 +1743,8 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
%endif
%if %{with_libvirtd}
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
%endif
%if %{with_qemu}
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
@ -1874,7 +1860,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%defattr(-, root, root)
%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so
%endif
%endif
%endif # %{with_driver_modules}
%if %{with_qemu_tcg}
%files daemon-qemu
@ -1900,7 +1886,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%files daemon-xen
%defattr(-, root, root)
%endif
%endif
%endif # %{with_libvirtd}
%if %{with_sanlock}
%files lock-sanlock
@ -1960,8 +1946,11 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%if %{with_systemd}
%{_unitdir}/libvirt-guests.service
%else
%{_sysconfdir}/rc.d/init.d/libvirt-guests
%endif
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
%if %{with_sasl}
@ -1979,6 +1968,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%dir %{_datadir}/libvirt/api/
%{_datadir}/libvirt/api/libvirt-api.xml
%{_datadir}/libvirt/api/libvirt-qemu-api.xml
%{_datadir}/libvirt/api/libvirt-lxc-api.xml
%doc docs/*.html docs/html docs/*.gif
%doc docs/libvirt-api.xml
@ -1997,6 +1987,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%doc AUTHORS NEWS README COPYING.LIB
%{_libdir}/python*/site-packages/libvirt.py*
%{_libdir}/python*/site-packages/libvirt_qemu.py*
%{_libdir}/python*/site-packages/libvirt_lxc.py*
%{_libdir}/python*/site-packages/libvirtmod*
%doc python/tests/*.py
%doc python/TODO
@ -2005,6 +1996,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%endif
%changelog
* Fri Feb 1 2013 Daniel P. Berrange <berrange@redhat.com> - 1.0.2-1
- Update to 1.0.2 release
* Tue Jan 29 2013 Cole Robinson <crobinso@redhat.com> - 1.0.1-6
- Fix network persistence after define (bz #890492)

View File

@ -1 +1 @@
86a8c0acabb01e11ac84fe00624dc54e libvirt-1.0.1.tar.gz
7e268ed702c4331d393e5b43449cae13 libvirt-1.0.2.tar.gz