Skip to content
Snippets Groups Projects
Commit 7414d07b authored by Guido Günther's avatar Guido Günther
Browse files

Refresh patches

Drop
    Fix-missing-error-constants-in-libvirt-python-module.patch
    complete-virterror-virerror-name-change.patch
fixed upstream.
parent e0bccfce
No related branches found
No related tags found
No related merge requests found
Showing with 16 additions and 145 deletions
......@@ -19,7 +19,7 @@ Closes: #685749
12 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng
index 53fb04a..cb0bab2 100644
index 8f3fbd9..cc58db8 100644
--- a/docs/schemas/capability.rng
+++ b/docs/schemas/capability.rng
@@ -253,13 +253,13 @@
......@@ -39,10 +39,10 @@ index 53fb04a..cb0bab2 100644
</define>
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 979cf3d..0966cb1 100644
index 4d43b7b..5b5f180 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2359,11 +2359,9 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
@@ -2336,11 +2336,9 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
if ((guest = virCapabilitiesAddGuest(caps,
guest_archs[i].hvm ? "hvm" : "xen",
guest_archs[i].arch,
......
......@@ -7,7 +7,7 @@ Subject: Don't fail if we can't setup avahi
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 95333d0..6809567 100644
index e536cc3..d40e52d 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -1066,8 +1066,7 @@ void virNetServerRun(virNetServerPtr srv)
......
......@@ -10,10 +10,10 @@ Closes: #663931
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 24ba954..4a42bad 100644
index 4af2599..70474f4 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -3039,7 +3039,7 @@ virFileFindMountPoint(const char *type ATTRIBUTE_UNUSED)
@@ -3150,7 +3150,7 @@ virFileFindMountPoint(const char *type ATTRIBUTE_UNUSED)
void virFileWaitForDevices(void)
{
# ifdef UDEVADM
......
......@@ -10,10 +10,10 @@ to not interfere with existing network configurations
2 files changed, 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 070a089..0fa184b 100644
index c1659a4..d511bdb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2037,9 +2037,6 @@ if WITH_NETWORK
@@ -2055,9 +2055,6 @@ if WITH_NETWORK
cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \
$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \
rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; }
......@@ -24,10 +24,10 @@ index 070a089..0fa184b 100644
uninstall-local:: uninstall-init uninstall-systemd
diff --git a/src/Makefile.in b/src/Makefile.in
index 93a1069..9cc91e8 100644
index 1c86c6b..dda3782 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -7444,9 +7444,6 @@ install-data-local: install-init install-systemd
@@ -7455,9 +7455,6 @@ install-data-local: install-init install-systemd
@WITH_NETWORK_TRUE@ cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \
@WITH_NETWORK_TRUE@ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \
@WITH_NETWORK_TRUE@ rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; }
......
......@@ -13,10 +13,10 @@ Closes: #517059
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index bfee56d..979cf3d 100644
index d803972..4d43b7b 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2363,7 +2363,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
@@ -2340,7 +2340,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
"/usr/lib64/xen/bin/qemu-dm" :
"/usr/lib/xen/bin/qemu-dm"),
(guest_archs[i].hvm ?
......
......@@ -7,7 +7,7 @@ Subject: remove-RHism.diff
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index fd0f762..93e422f 100644
index a5d8fe6..1daa427 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -107,7 +107,7 @@ alphabetic character, @, [, ], \, ^, _.
......
......@@ -42,12 +42,12 @@ to savely detect that the command 'info migrate' is not implemented.
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index bc0a11d..fdf2d5d 100644
index 58f6323..ff67d09 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1593,7 +1593,15 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
@@ -1588,7 +1588,15 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
}
*total += disk_total * 1024;
status->disk_total *= 1024;
}
- }
+ } else if (strstr(reply, "info migration") != NULL) {
......
......@@ -10,5 +10,3 @@ Don-t-fail-if-we-can-t-setup-avahi.patch
Reduce-udevadm-settle-timeout-to-10-seconds.patch
debian/Debianize-systemd-service-files.patch
Allow-xen-toolstack-to-find-it-s-binaries.patch
upstream/Fix-missing-error-constants-in-libvirt-python-module.patch
upstream/complete-virterror-virerror-name-change.patch
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Tue, 5 Feb 2013 12:55:09 +0000
Subject: 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
Closes: #700077
---
python/Makefile.am | 5 +++++
python/generator.py | 2 ++
python/sanitytest.py | 31 +++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+)
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 5d27f66..9297a15 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -122,6 +122,7 @@ 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'] == "virterror"):
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)
From: Serge Hallyn <serge.hallyn@canonical.com>
Date: Wed, 30 Jan 2013 21:05:45 -0600
Subject: 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 9297a15..4e4642f 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -124,7 +124,7 @@ class docParser(xml.sax.handler.ContentHandler):
elif tag == 'enum':
# enums come from header files, hence virterror.h
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'])
@@ -139,7 +139,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,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment