Hello community, here is the log from the commit of package libgpiod for openSUSE:Factory checked in at 2018-09-07 15:40:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgpiod (Old) and /work/SRC/openSUSE:Factory/.libgpiod.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgpiod" Fri Sep 7 15:40:01 2018 rev:3 rq:633486 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libgpiod/libgpiod.changes 2018-07-31 16:00:40.147675751 +0200 +++ /work/SRC/openSUSE:Factory/.libgpiod.new/libgpiod.changes 2018-09-07 15:40:02.878494693 +0200 @@ -1,0 +2,16 @@ +Wed Sep 5 13:51:23 UTC 2018 - Guillaume GARDET <[email protected]> + +- Add python binding + +------------------------------------------------------------------- +Wed Sep 5 10:05:03 UTC 2018 - Guillaume GARDET <[email protected]> + +- Update to 1.1.1: + * Bug fixes: + - fix memory leaks in python bindings + - fix a memory corruption bug in python bindings + - fix the default_vals argument in line request implementation in python + bindings + - fix a compilation warning in python bindings + +------------------------------------------------------------------- Old: ---- libgpiod-1.1.tar.gz New: ---- libgpiod-1.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgpiod.spec ++++++ --- /var/tmp/diff_new_pack.yeqhqZ/_old 2018-09-07 15:40:03.282494259 +0200 +++ /var/tmp/diff_new_pack.yeqhqZ/_new 2018-09-07 15:40:03.282494259 +0200 @@ -19,13 +19,13 @@ %define libname libgpiod1 Name: libgpiod -Version: 1.1 +Version: 1.1.1 Release: 0 Summary: Tools for interacting with the linux GPIO character device License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Url: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ -Source0: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.1.tar.gz +Source0: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-%{version}.tar.gz BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: automake @@ -35,6 +35,7 @@ BuildRequires: libkmod-devel BuildRequires: libtool BuildRequires: make +BuildRequires: python3-devel %description The libgpiod library encapsulates the ioctl calls and data structures @@ -64,6 +65,17 @@ Devel files part. +%package -n python-%{name} +Summary: Python binding for libgpiod +Group: Development/Languages/Python + +%description -n python-%{name} +The libgpiod library encapsulates the ioctl calls and data structures +of the GPIO character devices, the latter of which superseded the +GPIO sysfs interface in Linux 4.8. + +Python binding part. + %prep %setup -q @@ -71,12 +83,14 @@ ./autogen.sh %configure \ --enable-tools=yes \ + --enable-bindings-python \ --enable-bindings-cxx make %install %make_install rm -rf %{buildroot}%{_libdir}/*.{a,la} +rm -rf %{buildroot}%{python3_sitearch}/*.{a,la} %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig @@ -93,4 +107,7 @@ %{_libdir}/pkgconfig/libgpiod.pc %{_libdir}/pkgconfig/libgpiodcxx.pc +%files -n python-%{name} +%{python3_sitearch}/*.so + %changelog ++++++ libgpiod-1.1.tar.gz -> libgpiod-1.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.1/NEWS new/libgpiod-1.1.1/NEWS --- old/libgpiod-1.1/NEWS 2018-05-16 15:28:39.000000000 +0200 +++ new/libgpiod-1.1.1/NEWS 2018-07-24 14:29:08.000000000 +0200 @@ -1,3 +1,13 @@ +libgpiod v1.1.1 +=============== + +Bug fixes: +- fix memory leaks in python bindings +- fix a memory corruption bug in python bindings +- fix the default_vals argument in line request implementation in python + bindings +- fix a compilation warning in python bindings + libgpiod v1.1 ============= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.1/bindings/python/gpiodmodule.c new/libgpiod-1.1.1/bindings/python/gpiodmodule.c --- old/libgpiod-1.1/bindings/python/gpiodmodule.c 2018-05-16 15:28:39.000000000 +0200 +++ new/libgpiod-1.1.1/bindings/python/gpiodmodule.c 2018-07-24 14:29:08.000000000 +0200 @@ -99,6 +99,8 @@ { if (self->source) Py_DECREF(self->source); + + PyObject_Del(self); } PyDoc_STRVAR(gpiod_LineEvent_get_type_doc, @@ -212,6 +214,8 @@ { if (self->owner) Py_DECREF(self->owner); + + PyObject_Del(self); } PyDoc_STRVAR(gpiod_Line_owner_doc, @@ -403,6 +407,7 @@ return NULL; ret = PyList_GetItem(vals, 0); + Py_INCREF(ret); Py_DECREF(vals); return ret; @@ -763,6 +768,7 @@ Py_DECREF(self->lines[i]); PyMem_RawFree(self->lines); + PyObject_Del(self); } static PyObject *gpiod_LineBulk_iternext(gpiod_LineBulkObject *self) @@ -881,7 +887,7 @@ rv = PyArg_ParseTupleAndKeywords(args, kwds, "s|iiO", kwlist, &consumer, &type, - &flags, &default_vals); + &flags, &def_vals_obj); if (!rv) return NULL; @@ -1018,8 +1024,10 @@ val = PyLong_AsLong(next); Py_DECREF(next); - if (PyErr_Occurred()) + if (PyErr_Occurred()) { + Py_DECREF(iter); return NULL; + } vals[i] = (int)val; } @@ -1288,6 +1296,8 @@ { if (self->chip) gpiod_chip_close(self->chip); + + PyObject_Del(self); } static PyObject *gpiod_Chip_repr(gpiod_ChipObject *self) @@ -1562,7 +1572,7 @@ struct gpiod_line_bulk bulk; gpiod_LineObject *line_obj; struct gpiod_line *line; - Py_ssize_t offset; + unsigned int offset; PyObject *list; int rv; @@ -1775,6 +1785,8 @@ { if (self->iter) gpiod_chip_iter_free_noclose(self->iter); + + PyObject_Del(self); } static gpiod_ChipObject *gpiod_ChipIter_next(gpiod_ChipIterObject *self) @@ -1846,6 +1858,8 @@ { if (self->iter) gpiod_line_iter_free(self->iter); + + PyObject_Del(self); } static gpiod_LineObject *gpiod_LineIter_next(gpiod_LineIterObject *self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.1/configure.ac new/libgpiod-1.1.1/configure.ac --- old/libgpiod-1.1/configure.ac 2018-05-16 15:28:39.000000000 +0200 +++ new/libgpiod-1.1.1/configure.ac 2018-07-24 14:29:08.000000000 +0200 @@ -8,7 +8,7 @@ AC_PREREQ(2.61) -AC_INIT([libgpiod], 1.1) +AC_INIT([libgpiod], 1.1.1) AC_SUBST(EXTRA_VERSION, []) AC_DEFINE_UNQUOTED([GPIOD_VERSION_STR],
