Hello community, here is the log from the commit of package libvirt for openSUSE:12.3 checked in at 2013-02-09 10:13:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.3/libvirt (Old) and /work/SRC/openSUSE:12.3/.libvirt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvirt", Maintainer is "jfeh...@suse.com" Changes: -------- --- /work/SRC/openSUSE:12.3/libvirt/libvirt.changes 2013-02-04 18:00:25.000000000 +0100 +++ /work/SRC/openSUSE:12.3/.libvirt.new/libvirt.changes 2013-02-09 10:13:07.000000000 +0100 @@ -1,0 +2,13 @@ +Thu Feb 7 10:23:10 MST 2013 - jfeh...@suse.com + +- Fix error handling in python bindings + a6b8bae5-python-generator-fix1.patch + 25ea8e47-python-generator-fix2.patch + bnc#802619 + +------------------------------------------------------------------- +Sun Feb 3 14:42:19 UTC 2013 - crrodrig...@opensuse.org + +- Require modutils instead of module-init-tools. + +------------------------------------------------------------------- New: ---- 25ea8e47-python-generator-fix2.patch a6b8bae5-python-generator-fix1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt.spec ++++++ --- /var/tmp/diff_new_pack.onAD6h/_old 2013-02-09 10:13:09.000000000 +0100 +++ /var/tmp/diff_new_pack.onAD6h/_new 2013-02-09 10:13:09.000000000 +0100 @@ -352,7 +352,7 @@ %if %{with_libvirtd} Recommends: bridge-utils # for modprobe of pci devices -Requires: module-init-tools +Requires: modutils # for /sbin/ip & /sbin/tc Requires: iproute %endif @@ -417,6 +417,8 @@ Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches +Patch0: a6b8bae5-python-generator-fix1.patch +Patch1: 25ea8e47-python-generator-fix2.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch @@ -556,6 +558,8 @@ %prep %setup -q +%patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 %patch102 -p1 ++++++ 25ea8e47-python-generator-fix2.patch ++++++ commit 25ea8e47e74def560bf89cd94dd54b75ca5ff4d6 Author: Daniel P. Berrange <berra...@redhat.com> Date: Tue Feb 5 12:55:09 2013 +0000 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 <berra...@redhat.com> Index: libvirt-1.0.2/python/Makefile.am =================================================================== --- libvirt-1.0.2.orig/python/Makefile.am +++ libvirt-1.0.2/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) Index: libvirt-1.0.2/python/generator.py =================================================================== --- libvirt-1.0.2.orig/python/generator.py +++ libvirt-1.0.2/python/generator.py @@ -122,8 +122,9 @@ class docParser(xml.sax.handler.ContentH 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.ContentH 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 Index: libvirt-1.0.2/python/sanitytest.py =================================================================== --- /dev/null +++ libvirt-1.0.2/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) ++++++ a6b8bae5-python-generator-fix1.patch ++++++ commit a6b8bae5a6a4752926eba409202ec061d81c6c8a Author: Serge Hallyn <serge.hal...@canonical.com> Date: Wed Jan 30 21:05:45 2013 -0600 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.hal...@ubuntu.com> Index: libvirt-1.0.2/python/generator.py =================================================================== --- libvirt-1.0.2.orig/python/generator.py +++ libvirt-1.0.2/python/generator.py @@ -123,7 +123,7 @@ class docParser(xml.sax.handler.ContentH 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.ContentH 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, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org