Release of libvirt-0.9.2 upstream

This commit is contained in:
Daniel Veillard 2011-06-06 13:17:58 +08:00
parent db03f03fd9
commit e79d304c79
5 changed files with 48 additions and 106 deletions

View File

@ -1,40 +0,0 @@
From 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Wed, 25 May 2011 17:52:26 +0100
Subject: [PATCH] json: Avoid passing large positive 64 bit integers to QMP.
http://lists.gnu.org/archive/html/qemu-devel/2011-05/threads.html#02162
Currently, qemu silently clips any JSON integer in the range
0x8000000000000000 - 0xffffffffffffffff (all numbers in this range
will be clipped to 0x7fffffffffffffff == LLONG_MAX).
To avoid this, pass these as signed 64 bit integers in the QMP
request.
---
src/qemu/qemu_monitor_json.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 2d8a390..bdd0dcb 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -413,8 +413,13 @@ qemuMonitorJSONMakeCommand(const char *cmdname,
ret = virJSONValueObjectAppendNumberLong(jargs, key, val);
} break;
case 'U': {
- unsigned long long val = va_arg(args, unsigned long long);
- ret = virJSONValueObjectAppendNumberUlong(jargs, key, val);
+ /* qemu silently truncates numbers larger than LLONG_MAX,
+ * so passing the full range of unsigned 64 bit integers
+ * is not safe here. Pass them as signed 64 bit integers
+ * instead.
+ */
+ long long val = va_arg(args, long long);
+ ret = virJSONValueObjectAppendNumberLong(jargs, key, val);
} break;
case 'd': {
double val = va_arg(args, double);
--
1.7.5.1

View File

@ -1,29 +0,0 @@
From bb12a63909a85c7bf7dac20fb593b6786c78d455 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Fri, 20 May 2011 13:56:46 +0100
Subject: [PATCH 1/2] qemudDomainMemoryPeek: change ownership/selinux label on
temporary file.
Otherwise qemu is unable to write to it, with the error:
libvir: QEMU error : internal error unable to execute QEMU command 'memsave': Could not open '/var/cache/libvirt/qemu/qemu.mem.RRNvLv'
---
src/qemu/qemu_driver.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 44acc6a..691965d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5536,6 +5536,8 @@ qemudDomainMemoryPeek (virDomainPtr dom,
goto endjob;
}
+ virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm, tmp);
+
priv = vm->privateData;
qemuDomainObjEnterMonitor(vm);
if (flags == VIR_MEMORY_VIRTUAL) {
--
1.7.5.1

View File

@ -1,25 +0,0 @@
From aa6e7fb40861c6583534179822db1f32800cdfd5 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Fri, 20 May 2011 15:55:40 +0100
Subject: [PATCH 2/2] remote: remove bogus virDomainFree.
---
daemon/remote.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 42e1cb9..941e92f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -916,8 +916,6 @@ remoteDispatchDomainMemoryPeek(struct qemud_server *server ATTRIBUTE_UNUSED,
if (virDomainMemoryPeek(dom, offset, size,
ret->buffer.buffer_val, flags) < 0)
goto cleanup;
- if (dom)
- virDomainFree(dom);
rv = 0;
--
1.7.5.1

View File

@ -76,6 +76,7 @@
%define with_audit 0%{!?_without_audit:0}
%define with_dtrace 0%{!?_without_dtrace:0}
%define with_cgconfig 0%{!?_without_cgconfig:0}
%define with_sanlock 0%{!?_without_sanlock:0}
# Non-server/HV driver defaults which are always enabled
%define with_python 0%{!?_without_python:1}
@ -162,6 +163,11 @@
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
%endif
# Enable sanlock library for lock management with QEMU
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
%endif
# Enable libpcap library
%if %{with_qemu}
%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
@ -215,8 +221,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 0.9.1
Release: 3%{?dist}%{?extra_release}
Version: 0.9.2
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
@ -336,6 +342,9 @@ BuildRequires: libpciaccess-devel >= 0.10.9
%if %{with_yajl}
BuildRequires: yajl-devel
%endif
%if %{with_sanlock}
BuildRequires: sanlock-devel
%endif
%if %{with_libpcap}
BuildRequires: libpcap-devel
%endif
@ -446,11 +455,6 @@ BuildRequires: nfs-utils
# Fedora build root suckage
BuildRequires: gawk
# RWMJ - so that people can try out virt-dmesg.
Patch1: 0001-json-Avoid-passing-large-positive-64-bit-integers-to.patch
Patch2: 0001-qemudDomainMemoryPeek-change-ownership-selinux-label.patch
Patch3: 0002-remote-remove-bogus-virDomainFree.patch
%description
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes
@ -492,6 +496,18 @@ Requires: xen-devel
Includes and documentations for the C library providing an API to use
the virtualization capabilities of recent versions of Linux (and other OSes).
%if %{with_sanlock}
%package lock-sanlock
Summary: Sanlock lock manager plugin for QEMU driver
Group: Development/Libraries
Requires: sanlock
Requires: %{name} = %{version}-%{release}
%description lock-sanlock
Includes the Sanlock lock manager plugin for the QEMU
driver
%endif
%if %{with_python}
%package python
Summary: Python bindings for the libvirt library
@ -508,10 +524,6 @@ of recent versions of Linux (and other OSes).
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%if ! %{with_xen}
%define _without_xen --without-xen
@ -633,6 +645,10 @@ of recent versions of Linux (and other OSes).
%define _without_yajl --without-yajl
%endif
%if ! %{with_sanlock}
%define _without_sanlock --without-sanlock
%endif
%if ! %{with_libpcap}
%define _without_libpcap --without-libpcap
%endif
@ -686,6 +702,7 @@ of recent versions of Linux (and other OSes).
%{?_without_hal} \
%{?_without_udev} \
%{?_without_yajl} \
%{?_without_sanlock} \
%{?_without_libpcap} \
%{?_without_macvtap} \
%{?_without_audit} \
@ -711,6 +728,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
%if %{with_network}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
@ -1006,6 +1025,12 @@ fi
%doc docs/*.xml
%endif
%if %{with_sanlock}
%files lock-sanlock
%defattr(-, root, root)
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
%endif
%files client -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
@ -1080,6 +1105,17 @@ fi
%endif
%changelog
* Mon Jun 6 2011 Daniel Veillard <veillard@redhat.com> - 0.9.2-1
- Framework for lock manager plugins
- API for network config change transactions
- flags for setting memory parameters
- virDomainGetState public API
- qemu: allow blkstat/blkinfo calls during migration
- Introduce migration v3 API
- Defining the Screenshot public API
- public API for NMI injection
- Various improvements and bug fixes
* Wed May 25 2011 Richard W.M. Jones <rjones@redhat.com> - 0.9.1-3
- Add upstream patches:
0001-json-Avoid-passing-large-positive-64-bit-integers-to.patch

View File

@ -1 +1 @@
4182dbe290cca4344a5387950dc06433 libvirt-0.9.1.tar.gz
a9f974e173471a9c9b381ad1e93642b0 libvirt-0.9.2.tar.gz