Update to 1.0.3 release
This commit is contained in:
parent
ce09ec66c7
commit
40b00623a4
@ -1,25 +0,0 @@
|
||||
From 1047121c46e34749a92bf7e7f5193d4fcbe65e52 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 28 Feb 2013 12:52:12 +0000
|
||||
Subject: [PATCH] Disable virnettlscontexttest.
|
||||
|
||||
---
|
||||
tests/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index d3a7868..1226a41 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -106,7 +106,7 @@ test_programs = virshtest sockettest \
|
||||
$(NULL)
|
||||
|
||||
if WITH_GNUTLS
|
||||
-test_programs += virnettlscontexttest
|
||||
+#test_programs += virnettlscontexttest
|
||||
endif
|
||||
|
||||
if WITH_SECDRIVER_SELINUX
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,98 +0,0 @@
|
||||
From 25ea8e47e74def560bf89cd94dd54b75ca5ff4d6 Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Tue, 5 Feb 2013 12:55:09 +0000
|
||||
Subject: [PATCH] Fix missing error constants in libvirt python module
|
||||
|
||||
The previous change to the generator, changed too much - only
|
||||
the functions are in 'virerror.c', the constants remained in
|
||||
'virerror.h' which could not be renamed for API compat reasons.
|
||||
|
||||
Add a test case to sanity check the generated python bindings
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
---
|
||||
python/Makefile.am | 5 +++++
|
||||
python/generator.py | 4 +++-
|
||||
python/sanitytest.py | 31 +++++++++++++++++++++++++++++++
|
||||
3 files changed, 39 insertions(+), 1 deletion(-)
|
||||
create mode 100644 python/sanitytest.py
|
||||
|
||||
diff --git a/python/Makefile.am b/python/Makefile.am
|
||||
index dd69600..ef3c3eb 100644
|
||||
--- a/python/Makefile.am
|
||||
+++ b/python/Makefile.am
|
||||
@@ -119,6 +119,11 @@ $(libvirtmod_la_OBJECTS): $(GENERATED)
|
||||
$(libvirtmod_qemu_la_OBJECTS): $(QEMU_GENERATED)
|
||||
$(libvirtmod_lxc_la_OBJECTS): $(LXC_GENERATED)
|
||||
|
||||
+EXTRA_DIST += sanitytest.py
|
||||
+
|
||||
+check-local:
|
||||
+ $(AM_V_GEN)PYTHONPATH=$(abs_topbuilddir):$(abs_topbuilddir)/.libs $(PYTHON) $(srcdir)/sanitytest.py
|
||||
+
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
|
||||
$(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
|
||||
diff --git a/python/generator.py b/python/generator.py
|
||||
index 71ca883..ceade6b 100755
|
||||
--- a/python/generator.py
|
||||
+++ b/python/generator.py
|
||||
@@ -122,8 +122,9 @@ class docParser(xml.sax.handler.ContentHandler):
|
||||
if attrs.has_key('field'):
|
||||
self.function_return_field = attrs['field']
|
||||
elif tag == 'enum':
|
||||
+ # enums come from header files, hence virterror.h
|
||||
if (attrs['file'] == "libvirt" or
|
||||
- attrs['file'] == "virerror"):
|
||||
+ attrs['file'] == "virterror"):
|
||||
enum(attrs['type'],attrs['name'],attrs['value'])
|
||||
elif attrs['file'] == "libvirt-lxc":
|
||||
lxc_enum(attrs['type'],attrs['name'],attrs['value'])
|
||||
@@ -134,6 +135,7 @@ class docParser(xml.sax.handler.ContentHandler):
|
||||
if debug:
|
||||
print "end %s" % tag
|
||||
if tag == 'function':
|
||||
+ # fuctions come from source files, hence 'virerror.c'
|
||||
if self.function != None:
|
||||
if (self.function_module == "libvirt" or
|
||||
self.function_module == "virevent" or
|
||||
diff --git a/python/sanitytest.py b/python/sanitytest.py
|
||||
new file mode 100644
|
||||
index 0000000..047450b
|
||||
--- /dev/null
|
||||
+++ b/python/sanitytest.py
|
||||
@@ -0,0 +1,31 @@
|
||||
+#!/usr/bin/python
|
||||
+
|
||||
+import libvirt
|
||||
+
|
||||
+globals = dir(libvirt)
|
||||
+
|
||||
+# Sanity test that the generator hasn't gone wrong
|
||||
+
|
||||
+# Look for core classes
|
||||
+assert("virConnect" in globals)
|
||||
+assert("virDomain" in globals)
|
||||
+assert("virDomainSnapshot" in globals)
|
||||
+assert("virInterface" in globals)
|
||||
+assert("virNWFilter" in globals)
|
||||
+assert("virNodeDevice" in globals)
|
||||
+assert("virNetwork" in globals)
|
||||
+assert("virSecret" in globals)
|
||||
+assert("virStoragePool" in globals)
|
||||
+assert("virStorageVol" in globals)
|
||||
+assert("virStream" in globals)
|
||||
+assert("VIR_CONNECT_RO" in globals)
|
||||
+
|
||||
+# Error related bits
|
||||
+assert("libvirtError" in globals)
|
||||
+assert("VIR_ERR_AUTH_FAILED" in globals)
|
||||
+assert("virGetLastError" in globals)
|
||||
+
|
||||
+# Some misc methods
|
||||
+assert("virInitialize" in globals)
|
||||
+assert("virEventAddHandle" in globals)
|
||||
+assert("virEventRegisterDefaultImpl" in globals)
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,40 +0,0 @@
|
||||
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
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 82d5fe543720da6d83c1d6bfa1c347d7d9fda278 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Wed, 20 Feb 2013 15:34:48 -0700
|
||||
Subject: [PATCH] qemu: check backing chains even when cgroup is omitted
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=896685 points out
|
||||
a regression caused by commit 38c4a9c - libvirt only labels
|
||||
the backing chain if the backing chain cache is populated, but
|
||||
the code to populate the cache was only conditionally performed
|
||||
if cgroup labeling was necessary.
|
||||
|
||||
* src/qemu/qemu_cgroup.c (qemuSetupCgroup): Hoist cache setup...
|
||||
* src/qemu/qemu_process.c (qemuProcessStart): ...earlier into
|
||||
caller, where it is now unconditional.
|
||||
---
|
||||
src/qemu/qemu_cgroup.c | 4 +---
|
||||
src/qemu/qemu_process.c | 5 +++++
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
|
||||
index 4fde1af..e65b486 100644
|
||||
--- a/src/qemu/qemu_cgroup.c
|
||||
+++ b/src/qemu/qemu_cgroup.c
|
||||
@@ -234,9 +234,7 @@ int qemuSetupCgroup(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
for (i = 0; i < vm->def->ndisks ; i++) {
|
||||
- if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
|
||||
- false) < 0 ||
|
||||
- qemuSetupDiskCgroup(vm, cgroup, vm->def->disks[i]) < 0)
|
||||
+ if (qemuSetupDiskCgroup(vm, cgroup, vm->def->disks[i]) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index aade682..b560d2e 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -3706,6 +3706,11 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
|
||||
VIR_DEBUG("Checking for CDROM and floppy presence");
|
||||
+ for (i = 0; i < vm->def->ndisks ; i++) {
|
||||
+ if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
|
||||
+ false) < 0)
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
if (qemuDomainCheckDiskPresence(driver, vm,
|
||||
flags & VIR_QEMU_PROCESS_START_COLD) < 0)
|
||||
goto cleanup;
|
||||
--
|
||||
1.8.1.2
|
||||
|
18
libvirt.spec
18
libvirt.spec
@ -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
|
||||
@ -340,8 +340,8 @@
|
||||
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 1.0.2
|
||||
Release: 4%{?dist}%{?extra_release}
|
||||
Version: 1.0.3
|
||||
Release: 1%{?dist}%{?extra_release}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
@ -351,11 +351,6 @@ URL: http://libvirt.org/
|
||||
%define mainturl stable_updates/
|
||||
%endif
|
||||
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
|
||||
Patch1: 0001-complete-virterror-virerror-name-change.patch
|
||||
Patch2: 0001-Fix-missing-error-constants-in-libvirt-python-module.patch
|
||||
Patch3: 0001-qemu-check-backing-chains-even-when-cgroup-is-omitte.patch
|
||||
# See https://www.redhat.com/archives/libvir-list/2013-February/thread.html#01673
|
||||
Patch4: 0001-Disable-virnettlscontexttest.patch
|
||||
|
||||
%if %{with_libvirtd}
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
@ -1083,10 +1078,6 @@ of recent versions of Linux (and other OSes).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%if ! %{with_xen}
|
||||
@ -2003,6 +1994,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Mar 5 2013 Daniel P. Berrange <berrange@redhat.com> - 1.0.3-1
|
||||
- Update to 1.0.3 release
|
||||
|
||||
* Thu Feb 28 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.2-4
|
||||
- Backport "qemu: check backing chains even when cgroup is omitted"
|
||||
(RHBZ#896685).
|
||||
|
Loading…
Reference in New Issue
Block a user