Hello community, here is the log from the commit of package libvirt-python for openSUSE:Factory checked in at 2015-09-11 09:04:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-08-12 15:12:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libvirt-python.new/libvirt-python.changes 2015-09-11 09:04:21.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Sep 2 15:29:55 UTC 2015 - [email protected] + +- Update to 1.2.19 + - Add all new APIs and constants in libvirt 1.2.19 + +------------------------------------------------------------------- Old: ---- libvirt-python-1.2.18.tar.gz libvirt-python-1.2.18.tar.gz.asc New: ---- libvirt-python-1.2.19.tar.gz libvirt-python-1.2.19.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt-python.spec ++++++ --- /var/tmp/diff_new_pack.76DfAY/_old 2015-09-11 09:04:21.000000000 +0200 +++ /var/tmp/diff_new_pack.76DfAY/_new 2015-09-11 09:04:21.000000000 +0200 @@ -18,7 +18,7 @@ Name: libvirt-python Url: http://libvirt.org/ -Version: 1.2.18 +Version: 1.2.19 Release: 0 Summary: Library providing a simple virtualization API License: LGPL-2.1+ ++++++ libvirt-python-1.2.18.tar.gz -> libvirt-python-1.2.19.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.18/ChangeLog new/libvirt-python-1.2.19/ChangeLog --- old/libvirt-python-1.2.18/ChangeLog 2015-08-03 11:53:55.000000000 +0200 +++ new/libvirt-python-1.2.19/ChangeLog 2015-09-02 04:28:00.000000000 +0200 @@ -1,3 +1,33 @@ +2015-08-26 Luyao Huang <[email protected]> + + examples: small fix for nodestats.py example + Add nodestats.py in MANIFEST.in and add a + small description for nodestats.py in README + + + +2015-08-03 Jiri Denemark <[email protected]> + + Check return value of PyList_Append + libvirt_virDomainGetSecurityLabelList called PyList_Append without + checking its return value. While looking at it I noticed the function + did not properly check several other return values either so I fixed + them all. + + https://bugzilla.redhat.com/show_bug.cgi?id=1249511 + + + +2015-08-03 Jiri Denemark <[email protected]> + + Post-release version bump to 1.2.19 + + +2015-08-03 Daniel Veillard <[email protected]> + + Forgot to bump version to 1.2.18 + + 2015-07-30 Peter Krempa <[email protected]> iothread: Fix crash if virDomainGetIOThreadInfo returns error diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.18/PKG-INFO new/libvirt-python-1.2.19/PKG-INFO --- old/libvirt-python-1.2.18/PKG-INFO 2015-08-03 11:53:56.000000000 +0200 +++ new/libvirt-python-1.2.19/PKG-INFO 2015-09-02 04:28:01.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: libvirt-python -Version: 1.2.18 +Version: 1.2.19 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.2.18/examples/nodestats.py new/libvirt-python-1.2.19/examples/nodestats.py --- old/libvirt-python-1.2.18/examples/nodestats.py 1970-01-01 01:00:00.000000000 +0100 +++ new/libvirt-python-1.2.19/examples/nodestats.py 2015-08-03 11:18:57.000000000 +0200 @@ -0,0 +1,87 @@ +#!/usr/bin/env python +# Print some host NUMA node statistics +# +# Authors: +# Michal Privoznik <[email protected]> + +import libvirt +import sys +from xml.dom import minidom +import libxml2 + +def xpath_eval(ctxt, path): + res = ctxt.xpathEval(path) + if res is None or len(res) == 0: + value = None + else: + value = res[0].content + return value + +try: + conn = libvirt.openReadOnly(None) +except libvirt.libvirtError: + print("Failed to connect to the hypervisor") + sys.exit(1) + +try: + capsXML = conn.getCapabilities() +except libvirt.libvirtError: + print("Failed to request capabilities") + sys.exit(1) + +caps = minidom.parseString(capsXML) +cells = caps.getElementsByTagName("cells")[0] + +nodesIDs = [ int(proc.getAttribute("id")) + for proc in cells.getElementsByTagName("cell") ] + +nodesMem = [ conn.getMemoryStats(int(proc)) + for proc in nodesIDs] + +doms = conn.listAllDomains(libvirt.VIR_CONNECT_LIST_DOMAINS_ACTIVE) + +domsStrict = [ proc + for proc in doms + if proc.numaParameters()["numa_mode"] == libvirt.VIR_DOMAIN_NUMATUNE_MEM_STRICT ] + +domsStrictCfg = {} +for dom in domsStrict: + xmlStr = dom.XMLDesc() + doc = libxml2.parseDoc(xmlStr) + ctxt = doc.xpathNewContext() + + domsStrictCfg[dom] = {} + + pin = ctxt.xpathEval("string(/domain/numatune/memory/@nodeset)") + memsize = ctxt.xpathEval("string(/domain/memory)") + domsStrictCfg[dom]["memory"] = {"size": int(memsize), "pin": pin} + + for memnode in ctxt.xpathEval("/domain/numatune/memnode"): + ctxt.setContextNode(memnode) + cellid = xpath_eval(ctxt, "@cellid") + nodeset = xpath_eval(ctxt, "@nodeset") + + nodesize = xpath_eval(ctxt, "/domain/cpu/numa/cell[@id='%s']/@memory" % cellid) + domsStrictCfg[dom][cellid] = {"size": int(nodesize), "pin": nodeset} + + +print("NUMA stats") +print("NUMA nodes:\t" + "\t".join(str(node) for node in nodesIDs)) +print("MemTotal:\t" + "\t".join(str(i.get("total") // 1024) for i in nodesMem)) +print("MemFree:\t" + "\t".join(str(i.get("free") // 1024) for i in nodesMem)) + +for dom, v in domsStrictCfg.items(): + print("Domain '%s':\t" % dom.name()) + + toPrint = "\tOverall memory: %d MiB" % (v["memory"]["size"] // 1024) + if v["memory"]["pin"] is not None and v["memory"]["pin"] is not "": + toPrint = toPrint + " nodes %s" % v["memory"]["pin"] + print(toPrint) + + for k, node in sorted(v.items()): + if k is "memory": + continue + toPrint = "\tNode %s:\t%d MiB" % (k, node["size"] // 1024) + if node["pin"] is not None and node["pin"] is not "": + toPrint = toPrint + " nodes %s" % node["pin"] + print(toPrint) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.18/libvirt-override.c new/libvirt-python-1.2.19/libvirt-override.c --- old/libvirt-python-1.2.18/libvirt-override.c 2015-08-03 11:51:05.000000000 +0200 +++ new/libvirt-python-1.2.19/libvirt-override.c 2015-09-02 04:24:24.000000000 +0200 @@ -3144,32 +3144,62 @@ #if LIBVIR_CHECK_VERSION(0, 10, 0) static PyObject * -libvirt_virDomainGetSecurityLabelList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { +libvirt_virDomainGetSecurityLabelList(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ PyObject *py_retval; int c_retval; virDomainPtr dom; PyObject *pyobj_dom; - virSecurityLabel *labels; + virSecurityLabel *labels = NULL; size_t i; if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetSecurityLabel", &pyobj_dom)) return NULL; + dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom); LIBVIRT_BEGIN_ALLOW_THREADS; c_retval = virDomainGetSecurityLabelList(dom, &labels); LIBVIRT_END_ALLOW_THREADS; + if (c_retval < 0) return VIR_PY_NONE; - py_retval = PyList_New(0); + + if (!(py_retval = PyList_New(0))) + goto error; + for (i = 0 ; i < c_retval ; i++) { - PyObject *entry = PyList_New(2); - PyList_SetItem(entry, 0, libvirt_constcharPtrWrap(&labels[i].label[0])); - PyList_SetItem(entry, 1, libvirt_boolWrap(labels[i].enforcing)); - PyList_Append(py_retval, entry); + PyObject *entry; + PyObject *value; + + if (!(entry = PyList_New(2)) || + PyList_Append(py_retval, entry) < 0) { + Py_XDECREF(entry); + goto error; + } + + if (!(value = libvirt_constcharPtrWrap(&labels[i].label[0])) || + PyList_SetItem(entry, 0, value) < 0) { + Py_XDECREF(value); + goto error; + } + + if (!(value = libvirt_boolWrap(labels[i].enforcing)) || + PyList_SetItem(entry, 1, value) < 0) { + Py_XDECREF(value); + goto error; + } } - free(labels); + + cleanup: + VIR_FREE(labels); return py_retval; + + error: + Py_XDECREF(py_retval); + py_retval = NULL; + goto cleanup; } #endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.18/libvirt-python.spec new/libvirt-python-1.2.19/libvirt-python.spec --- old/libvirt-python-1.2.18/libvirt-python.spec 2015-08-03 11:53:55.000000000 +0200 +++ new/libvirt-python-1.2.19/libvirt-python.spec 2015-09-02 04:27:59.000000000 +0200 @@ -6,7 +6,7 @@ Summary: The libvirt virtualization API python2 binding Name: libvirt-python -Version: 1.2.18 +Version: 1.2.19 Release: 1%{?dist}%{?extra_release} Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz Url: http://libvirt.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.18/setup.py new/libvirt-python-1.2.19/setup.py --- old/libvirt-python-1.2.18/setup.py 2015-08-03 11:53:49.000000000 +0200 +++ new/libvirt-python-1.2.19/setup.py 2015-09-02 04:24:24.000000000 +0200 @@ -311,7 +311,7 @@ _c_modules, _py_modules = get_module_lists() setup(name = 'libvirt-python', - version = '1.2.18', + version = '1.2.19', url = 'http://www.libvirt.org', maintainer = 'Libvirt Maintainers', maintainer_email = '[email protected]',
