Hello community, here is the log from the commit of package libgpiod for openSUSE:Factory checked in at 2020-03-11 18:49:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgpiod (Old) and /work/SRC/openSUSE:Factory/.libgpiod.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgpiod" Wed Mar 11 18:49:35 2020 rev:10 rq:783433 version:1.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/libgpiod/libgpiod.changes 2020-02-05 19:41:22.399258302 +0100 +++ /work/SRC/openSUSE:Factory/.libgpiod.new.3160/libgpiod.changes 2020-03-11 18:51:34.379573650 +0100 @@ -1,0 +2,8 @@ +Tue Mar 10 13:48:19 UTC 2020 - Guillaume GARDET <guillaume.gar...@opensuse.org> + +- Update to version 1.4.2 (Bug fixes release): + * fix the major:minor number comparison between the device and sysfs + * drop noexcept from direction() and active_state() in C++ bindings + * fix a segfault when calling Line.request() in Python bindings + +------------------------------------------------------------------- Old: ---- libgpiod-1.4.1.tar.gz New: ---- libgpiod-1.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgpiod.spec ++++++ --- /var/tmp/diff_new_pack.Uzx5v3/_old 2020-03-11 18:51:34.863573867 +0100 +++ /var/tmp/diff_new_pack.Uzx5v3/_new 2020-03-11 18:51:34.863573867 +0100 @@ -19,16 +19,14 @@ %define libgpiod_soversion 2 %define libgpiodcxx_soversion 1 %define libgpiomockup_soversion 0 - # Tests are only available for kernel 5.1+ (so TW only) %if 0%{?suse_version} > 1500 %bcond_without libgpiod_tests %else %bcond_with libgpiod_tests %endif - Name: libgpiod -Version: 1.4.1 +Version: 1.4.2 Release: 0 Summary: Tools for interacting with the linux GPIO character device License: LGPL-2.1-or-later @@ -40,16 +38,16 @@ BuildRequires: automake BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: libkmod-devel +BuildRequires: libtool +BuildRequires: make +BuildRequires: python3-devel %if %{with libgpiod_tests} BuildRequires: kernel-devel >= 5.1 BuildRequires: pkgconfig(libudev) %else BuildRequires: kernel-devel >= 4.8 %endif -BuildRequires: libkmod-devel -BuildRequires: libtool -BuildRequires: make -BuildRequires: python3-devel %description The libgpiod library encapsulates the ioctl calls and data structures @@ -95,9 +93,12 @@ %package devel Summary: Devel files for libgpiod Group: Development/Languages/C and C++ -Requires: %{name} +Requires: %{name} = %{version} Requires: libgpiod%{libgpiod_soversion} = %{version} Requires: libgpiodcxx%{libgpiodcxx_soversion} = %{version} +%if %{with libgpiod_tests} +Requires: libgpiomockup%{libgpiomockup_soversion} = %{version} +%endif %description devel The libgpiod library encapsulates the ioctl calls and data structures @@ -143,6 +144,11 @@ %post -n libgpiodcxx%{libgpiodcxx_soversion} -p /sbin/ldconfig %postun -n libgpiodcxx%{libgpiodcxx_soversion} -p /sbin/ldconfig +%if %{with libgpiod_tests} +%post -n libgpiomockup%{libgpiomockup_soversion} -p /sbin/ldconfig +%postun -n libgpiomockup%{libgpiomockup_soversion} -p /sbin/ldconfig +%endif + %files %{_bindir}/gpio* ++++++ libgpiod-1.4.1.tar.gz -> libgpiod-1.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/NEWS new/libgpiod-1.4.2/NEWS --- old/libgpiod-1.4.1/NEWS 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/NEWS 2020-01-27 17:35:09.000000000 +0100 @@ -1,3 +1,11 @@ +libgpiod v1.4.2 +=============== + +Bug fixes: +- fix the major:minor number comparison between the device and sysfs +- drop noexcept from direction() and active_state() in C++ bindings +- fix a segfault when calling Line.request() in Python bindings + libgpiod v1.4.1 =============== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/bindings/cxx/gpiod.hpp new/libgpiod-1.4.2/bindings/cxx/gpiod.hpp --- old/libgpiod-1.4.1/bindings/cxx/gpiod.hpp 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/bindings/cxx/gpiod.hpp 2020-01-27 17:35:09.000000000 +0100 @@ -312,13 +312,13 @@ * @brief Get current direction of this line. * @return Current direction setting. */ - GPIOD_API int direction(void) const noexcept; + GPIOD_API int direction(void) const; /** * @brief Get current active state of this line. * @return Current active state setting. */ - GPIOD_API int active_state(void) const noexcept; + GPIOD_API int active_state(void) const; /** * @brief Check if this line is used by the kernel or other user space diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/bindings/cxx/line.cpp new/libgpiod-1.4.2/bindings/cxx/line.cpp --- old/libgpiod-1.4.1/bindings/cxx/line.cpp 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/bindings/cxx/line.cpp 2020-01-27 17:35:09.000000000 +0100 @@ -49,7 +49,7 @@ return consumer ? ::std::string(consumer) : ::std::string(); } -int line::direction(void) const noexcept +int line::direction(void) const { this->throw_if_null(); @@ -58,7 +58,7 @@ return dir == GPIOD_LINE_DIRECTION_INPUT ? DIRECTION_INPUT : DIRECTION_OUTPUT; } -int line::active_state(void) const noexcept +int line::active_state(void) const { this->throw_if_null(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/bindings/python/gpiodmodule.c new/libgpiod-1.4.2/bindings/python/gpiodmodule.c --- old/libgpiod-1.4.1/bindings/python/gpiodmodule.c 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/bindings/python/gpiodmodule.c 2020-01-27 17:35:09.000000000 +0100 @@ -434,8 +434,12 @@ gpiod_LineBulkObject *bulk_obj; int rv; - def_val = PyDict_GetItemString(kwds, "default_val"); - def_vals = PyDict_GetItemString(kwds, "default_vals"); + if (PyDict_Size(kwds) > 0) { + def_val = PyDict_GetItemString(kwds, "default_val"); + def_vals = PyDict_GetItemString(kwds, "default_vals"); + } else { + def_val = def_vals = NULL; + } if (def_val && def_vals) { PyErr_SetString(PyExc_TypeError, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/configure.ac new/libgpiod-1.4.2/configure.ac --- old/libgpiod-1.4.1/configure.ac 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/configure.ac 2020-01-27 17:35:09.000000000 +0100 @@ -8,7 +8,7 @@ AC_PREREQ(2.61) -AC_INIT([libgpiod], 1.4.1) +AC_INIT([libgpiod], 1.4.2) AC_SUBST(EXTRA_VERSION, []) AC_DEFINE_UNQUOTED([GPIOD_VERSION_STR], @@ -30,9 +30,9 @@ # # Define the libtool version as (C.R.A): # NOTE: this version only applies to the core C library. -AC_SUBST(ABI_VERSION, [3.1.1]) +AC_SUBST(ABI_VERSION, [3.2.1]) # Have a separate ABI version for C++ bindings: -AC_SUBST(ABI_CXX_VERSION, [1.3.0]) +AC_SUBST(ABI_CXX_VERSION, [1.4.0]) AC_CONFIG_AUX_DIR([autostuff]) AC_CONFIG_MACRO_DIRS([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgpiod-1.4.1/lib/core.c new/libgpiod-1.4.2/lib/core.c --- old/libgpiod-1.4.1/lib/core.c 2019-08-07 12:08:52.000000000 +0200 +++ new/libgpiod-1.4.2/lib/core.c 2020-01-27 17:35:09.000000000 +0100 @@ -120,12 +120,14 @@ goto out_free_sysfsp; memset(sysfsdev, 0, sizeof(sysfsdev)); - rd = read(fd, sysfsdev, strlen(devstr)); + rd = read(fd, sysfsdev, sizeof(sysfsdev) - 1); close(fd); if (rd < 0) goto out_free_sysfsp; - if (strcmp(sysfsdev, devstr) != 0) { + rd--; /* Ignore trailing newline. */ + if ((size_t)rd != strlen(devstr) || + strncmp(sysfsdev, devstr, rd) != 0) { errno = ENODEV; goto out_free_sysfsp; }