Hello community, here is the log from the commit of package libvirt-python for openSUSE:Factory checked in at 2016-05-16 12:03:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvirt-python (Old) and /work/SRC/openSUSE:Factory/.libvirt-python.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvirt-python" Changes: -------- --- /work/SRC/openSUSE:Factory/libvirt-python/libvirt-python.changes 2016-04-28 16:58:07.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libvirt-python.new/libvirt-python.changes 2016-05-16 12:03:54.000000000 +0200 @@ -1,0 +2,6 @@ +Tue May 3 20:22:03 UTC 2016 - jfeh...@suse.com + +- Update to 1.3.4 + - Add all new APIs and constants in libvirt 1.3.4 + +------------------------------------------------------------------- Old: ---- libvirt-python-1.3.3.tar.gz libvirt-python-1.3.3.tar.gz.asc New: ---- libvirt-python-1.3.4.tar.gz libvirt-python-1.3.4.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt-python.spec ++++++ --- /var/tmp/diff_new_pack.O0GTZD/_old 2016-05-16 12:03:55.000000000 +0200 +++ /var/tmp/diff_new_pack.O0GTZD/_new 2016-05-16 12:03:55.000000000 +0200 @@ -18,7 +18,7 @@ Name: libvirt-python Url: http://libvirt.org/ -Version: 1.3.3 +Version: 1.3.4 Release: 0 Summary: Library providing a simple virtualization API License: LGPL-2.1+ ++++++ libvirt-python-1.3.3.tar.gz -> libvirt-python-1.3.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/ChangeLog new/libvirt-python-1.3.4/ChangeLog --- old/libvirt-python-1.3.3/ChangeLog 2016-04-06 09:29:58.000000000 +0200 +++ new/libvirt-python-1.3.4/ChangeLog 2016-05-01 03:53:55.000000000 +0200 @@ -1,3 +1,44 @@ +2016-04-21 Peter Krempa <pkre...@redhat.com> + + generator.py: Consider symbols from libvirt-common + Some of the libvirt public API was moved into the libvirt-common.h file. + We should consider it while building python too. + + +2016-04-20 Cole Robinson <crobi...@redhat.com> + + spec: Don't pull in dependencies for example scripts + If the scripts are marked as executable, RPM magic will scan them + for dependencies, which can pull in python2 for the python3 package + + +2016-04-18 Pavel Hrdina <phrd...@redhat.com> + + fix crash in getAllDomainStats + Commits 1d39dbaf and 827ed9b4 broke the libvirt-python API by removing + virDomainRef() and virDomainFree(). virDomainStatsRecordListFree() will + free that domain pointer and later when virDomain (python object) call + its destructor and tries to free that same pointer again. + + Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1326839 + + + +2016-04-18 Peter Krempa <pkre...@redhat.com> + + event: Add support VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED + + +2016-04-18 Peter Krempa <pkre...@redhat.com> + + Post-release version bump to 1.3.4 + + +2016-04-06 Daniel Veillard <veill...@redhat.com> + + Release of libvirt-python-1.3.3 + + 2016-03-31 Qiaowei Ren <qiaowei....@intel.com> python: add python binding for Perf API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/PKG-INFO new/libvirt-python-1.3.4/PKG-INFO --- old/libvirt-python-1.3.3/PKG-INFO 2016-04-06 09:29:59.000000000 +0200 +++ new/libvirt-python-1.3.4/PKG-INFO 2016-05-01 03:53:59.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: libvirt-python -Version: 1.3.3 +Version: 1.3.4 Summary: The libvirt virtualization API Home-page: http://www.libvirt.org Author: Libvirt Maintainers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/examples/event-test.py new/libvirt-python-1.3.4/examples/event-test.py --- old/libvirt-python-1.3.3/examples/event-test.py 2016-04-06 09:28:09.000000000 +0200 +++ new/libvirt-python-1.3.4/examples/event-test.py 2016-05-01 03:53:10.000000000 +0200 @@ -535,6 +535,9 @@ dom.name(), dom.ID(), iteration)) def myDomainEventJobCompletedCallback(conn, dom, params, opaque): print("myDomainEventJobCompletedCallback: Domain %s(%s) %s" % (dom.name(), dom.ID(), params)) +def myDomainEventDeviceRemovalFailedCallback(conn, dom, dev, opaque): + print("myDomainEventDeviceRemovalFailedCallback: Domain %s(%s) failed to remove device: %s" % ( + dom.name(), dom.ID(), dev)) ########################################################################## # Network events @@ -649,6 +652,7 @@ vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, myDomainEventDeviceAddedCallback, None) vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION, myDomainEventMigrationIteration, None) vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_JOB_COMPLETED, myDomainEventJobCompletedCallback, None) + vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED, myDomainEventDeviceRemovalFailedCallback, None) vc.networkEventRegisterAny(None, libvirt.VIR_NETWORK_EVENT_ID_LIFECYCLE, myNetworkEventLifecycleCallback, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/generator.py new/libvirt-python-1.3.4/generator.py --- old/libvirt-python-1.3.3/generator.py 2016-04-06 09:28:09.000000000 +0200 +++ new/libvirt-python-1.3.4/generator.py 2016-05-01 03:53:10.000000000 +0200 @@ -33,6 +33,7 @@ libvirt_headers = [ "libvirt", + "libvirt-common", "libvirt-domain", "libvirt-domain-snapshot", "libvirt-event", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/libvirt-override-virConnect.py new/libvirt-python-1.3.4/libvirt-override-virConnect.py --- old/libvirt-python-1.3.3/libvirt-override-virConnect.py 2016-04-06 09:28:09.000000000 +0200 +++ new/libvirt-python-1.3.4/libvirt-override-virConnect.py 2016-05-01 03:53:10.000000000 +0200 @@ -234,6 +234,15 @@ cb(self, virDomain(self, _obj=dom), params, opaque) return 0 + def _dispatchDomainEventDeviceRemovalFailedCallback(self, dom, devAlias, cbData): + """Dispatches event to python user domain device removal failed event callbacks + """ + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), devAlias, opaque) + return 0 + def domainEventDeregisterAny(self, callbackID): """Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/libvirt-override.c new/libvirt-python-1.3.4/libvirt-override.c --- old/libvirt-python-1.3.3/libvirt-override.c 2016-04-06 09:28:09.000000000 +0200 +++ new/libvirt-python-1.3.4/libvirt-override.c 2016-05-01 03:53:10.000000000 +0200 @@ -6894,6 +6894,61 @@ } #endif /* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */ + +#ifdef VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED +static int +libvirt_virConnectDomainEventDeviceRemovalFailedCallback(virConnectPtr conn ATTRIBUTE_UNUSED, + virDomainPtr dom, + const char *devAlias, + void *opaque) +{ + PyObject *pyobj_cbData = (PyObject*)opaque; + PyObject *pyobj_dom; + PyObject *pyobj_ret = NULL; + PyObject *pyobj_conn; + PyObject *dictKey; + int ret = -1; + + LIBVIRT_ENSURE_THREAD_STATE; + + if (!(dictKey = libvirt_constcharPtrWrap("conn"))) + goto cleanup; + pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey); + Py_DECREF(dictKey); + + /* Create a python instance of this virDomainPtr */ + virDomainRef(dom); + if (!(pyobj_dom = libvirt_virDomainPtrWrap(dom))) { + virDomainFree(dom); + goto cleanup; + } + Py_INCREF(pyobj_cbData); + + /* Call the Callback Dispatcher */ + pyobj_ret = PyObject_CallMethod(pyobj_conn, + (char*)"_dispatchDomainEventDeviceRemovalFailedCallback", + (char*)"OsO", + pyobj_dom, devAlias, pyobj_cbData); + + Py_DECREF(pyobj_cbData); + Py_DECREF(pyobj_dom); + + cleanup: + if (!pyobj_ret) { + DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret); + PyErr_Print(); + } else { + Py_DECREF(pyobj_ret); + ret = 0; + } + + LIBVIRT_RELEASE_THREAD_STATE; + return ret; + +} +#endif /* VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED */ + + static PyObject * libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) @@ -7004,6 +7059,11 @@ cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventJobCompletedCallback); break; #endif /* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */ +#ifdef VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED + case VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED: + cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventDeviceRemovalFailedCallback); + break; +#endif /* VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED */ case VIR_DOMAIN_EVENT_ID_LAST: break; } @@ -8321,6 +8381,7 @@ PyObject *py_retval; PyObject *py_record; PyObject *py_record_stats = NULL; + virDomainPtr dom = NULL; size_t i; if (!(py_retval = PyList_New(nrecords))) @@ -8332,9 +8393,12 @@ VIR_PY_LIST_SET_GOTO(py_retval, i, py_record, error); + dom = records[i]->dom; + virDomainRef(dom); VIR_PY_TUPLE_SET_GOTO(py_record, 0, - libvirt_virDomainPtrWrap(records[i]->dom), + libvirt_virDomainPtrWrap(dom), error); + dom = NULL; if (!(py_record_stats = getPyVirTypedParameter(records[i]->params, records[i]->nparams))) @@ -8346,6 +8410,8 @@ return py_retval; error: + if (dom) + virDomainFree(dom); Py_XDECREF(py_retval); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/libvirt-python.spec new/libvirt-python-1.3.4/libvirt-python.spec --- old/libvirt-python-1.3.3/libvirt-python.spec 2016-04-06 09:29:58.000000000 +0200 +++ new/libvirt-python-1.3.4/libvirt-python.spec 2016-05-01 03:53:55.000000000 +0200 @@ -6,7 +6,7 @@ Summary: The libvirt virtualization API python2 binding Name: libvirt-python -Version: 1.3.3 +Version: 1.3.4 Release: 1%{?dist}%{?extra_release} Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz Url: http://libvirt.org @@ -49,6 +49,11 @@ %prep %setup -q +# Unset execute bit for example scripts; it can introduce spurious +# RPM dependencies, like /usr/bin/python which can pull in python2 +# for the -python3 package +find examples -type f -exec chmod 0644 \{\} \; + %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %if %{with_python3} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.3/setup.py new/libvirt-python-1.3.4/setup.py --- old/libvirt-python-1.3.3/setup.py 2016-04-06 09:29:53.000000000 +0200 +++ new/libvirt-python-1.3.4/setup.py 2016-05-01 03:53:10.000000000 +0200 @@ -305,7 +305,7 @@ _c_modules, _py_modules = get_module_lists() setup(name = 'libvirt-python', - version = '1.3.3', + version = '1.3.4', url = 'http://www.libvirt.org', maintainer = 'Libvirt Maintainers', maintainer_email = 'libvir-l...@redhat.com',