libgpiod: add support for libgpiod v2
cover libgpiod: add support for libgpiod v2
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
The first patch contains an update of libgpiod v1.6.x to the most recent bug-fix release.
The second contains the recipe for libgpiod v2.0-rc1 while also moving the bitbake code around in order to factor out common elements.
The third contains a recipe for the python bindings that are now in their own project in meta-python.
The new recipes provide the same functionality - including ptest for the C library, tools and language bindings.
Bartosz Golaszewski (3):
libgpiod: update to v1.6.4
libgpiod: add a recipe for libgpiod v2.0-rc1
python3-gpiod: new package
...-don-t-expect-automake-to-set-PYTHON.patch | 37 ---------
.../{files => libgpiod-1.6.4}/run-ptest | 0
.../libgpiod/libgpiod-2.0-rc1/run-ptest | 24 ++++++
.../recipes-support/libgpiod/libgpiod-src.inc | 1 +
meta-oe/recipes-support/libgpiod/libgpiod.inc | 61 ++++++++++++++
.../libgpiod/libgpiod_1.6.3.bb | 82 -------------------
.../libgpiod/libgpiod_1.6.4.bb | 37 +++++++++
.../libgpiod/libgpiod_2.0-rc1.bb | 21 +++++
.../packagegroups/packagegroup-meta-python.bb | 1 +
.../python/python3-gpiod/run-ptest | 15 ++++
.../python/python3-gpiod_2.0-rc1.bb | 45 ++++++++++
11 files changed, 205 insertions(+), 119 deletions(-)
delete mode 100644 meta-oe/recipes-support/libgpiod/files/0001-build-don-t-expect-automake-to-set-PYTHON.patch
rename meta-oe/recipes-support/libgpiod/{files => libgpiod-1.6.4}/run-ptest (100%)
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-src.inc
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod.inc
delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bb
create mode 100644 meta-python/recipes-devtools/python/python3-gpiod/run-ptest
create mode 100644 meta-python/recipes-devtools/python/python3-gpiod_2.0-rc1.bbSignature · 1 line
2.37.2
PATCH 1/3 libgpiod: update to v1.6.4
From: Bartosz Golaszewski <[email protected]>
This is a bug-fix release bringing in several fixes for build and testing issues.
Remove the patch that's already present in this release.
---
...-don-t-expect-automake-to-set-PYTHON.patch | 37 -------------------
.../{libgpiod_1.6.3.bb => libgpiod_1.6.4.bb} | 5 +--
2 files changed, 2 insertions(+), 40 deletions(-)
delete mode 100644 meta-oe/recipes-support/libgpiod/files/0001-build-don-t-expect-automake-to-set-PYTHON.patch
rename meta-oe/recipes-support/libgpiod/{libgpiod_1.6.3.bb => libgpiod_1.6.4.bb} (93%)meta-oe/recipes-support/libgpiod/files/0001-build-don-t-expect-automake-to-set-PYTHON.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 3c461786feb1d5aa1ed2a911942a5f9fbc8b8086 Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski <[email protected]> -Date: Tue, 24 Jan 2023 17:38:43 +0100 -Subject: [libgpiod v1.6.x][PATCH] build: don't expect automake to set $PYTHON - -It seems that the implementation of AM_PATH_PYTHON() changed in automake -recently and no longer sets $PYTHON variable which breaks the build on -some systems. - -We know we use python3 so use python3-config explicitly. - -Signed-off-by: Bartosz Golaszewski <[email protected]> ---- -Upstream-Status: Accepted - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3149384..0460810 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -204,9 +204,9 @@ then - AC_MSG_ERROR([python3-config not found - needed for python bindings]) - fi - AS_IF([test -z "$PYTHON_CPPFLAGS"], -- [AC_SUBST(PYTHON_CPPFLAGS, [`$PYTHON-config --includes`])]) -+ [AC_SUBST(PYTHON_CPPFLAGS, [`python3-config --includes`])]) - AS_IF([test -z "$PYTHON_LIBS"], -- [AC_SUBST(PYTHON_LIBS, [`$PYTHON-config --libs`])]) -+ [AC_SUBST(PYTHON_LIBS, [`python3-config --libs`])]) - fi - - AC_CHECK_PROG([has_doxygen], [doxygen], [true], [false]) --- -2.37.2 -
meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb +2 -3
@@ -7,11 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" SRC_URI = " \ https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ file://run-ptest \ - file://0001-build-don-t-expect-automake-to-set-PYTHON.patch \ " -SRC_URI[md5sum] = "28e79f6f70fee1da9079558d8b7b3736" -SRC_URI[sha256sum] = "841be9d788f00bab08ef22c4be5c39866f0e46cb100a3ae49ed816ac9c5dddc7" +SRC_URI[md5sum] = "7a2cca6ead9296c27e877070dd8853bc" +SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" inherit autotools pkgconfig python3native ptest
Signature · 1 line
2.37.2
PATCH 2/3 libgpiod: add a recipe for libgpiod v2.0-rc1
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
This is a recipe for libgpiod v2 release candidate. Let's put common bits and pieces into an .inc file and the source fetching into a separate include that will be later reused by the python bindings that for v2 will be moved into a separate recipe in meta-python.
---
.../{files => libgpiod-1.6.4}/run-ptest | 0
.../libgpiod/libgpiod-2.0-rc1/run-ptest | 24 ++++++++
.../recipes-support/libgpiod/libgpiod-src.inc | 1 +
meta-oe/recipes-support/libgpiod/libgpiod.inc | 61 +++++++++++++++++++
.../libgpiod/libgpiod_1.6.4.bb | 56 ++---------------
.../libgpiod/libgpiod_2.0-rc1.bb | 21 +++++++
6 files changed, 113 insertions(+), 50 deletions(-)
rename meta-oe/recipes-support/libgpiod/{files => libgpiod-1.6.4}/run-ptest (100%)
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-src.inc
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod.inc
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bbmeta-oe/recipes-support/libgpiod/libgpiod-1.6.4/run-ptest renamed from meta-oe/recipes-support/libgpiod/files/run-ptest +0 -0
meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest new file +24 -0
@@ -0,0 +1,24 @@ +#!/bin/sh + +testbins="gpiod-test gpio-tools-test gpiod-cxx-test" + +ptestdir=$(dirname "$(readlink -f "$0")") +cd $ptestdir/tests + +# libgpiod v2 uses gpio-sim - a configfs-based testing module. We need to +# make sure configfs is mounted before running any tests. +modprobe configfs +mountpoint /sys/kernel/config > /dev/null || mount -t configfs configfs /sys/kernel/config + +for testbin in $testbins; do + if test -e ./$testbin; then + ./$testbin > ./$testbin.out 2>&1 + if [ $? -ne 0 ]; then + echo "FAIL: $testbin" + else + echo "PASS: $testbin" + fi + else + echo "SKIP: $testbin" + fi +done
meta-oe/recipes-support/libgpiod/libgpiod-src.inc new file +1 -0
@@ -0,0 +1 @@ +SRC_URI += "https://www.kernel.org/pub/software/libs/libgpiod/libgpiod-${PV}.tar.xz"
meta-oe/recipes-support/libgpiod/libgpiod.inc new file +61 -0
61 lines not on this page · raw message
meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb +6 -50
86 lines not on this page · raw message
meta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bb new file +21 -0
@@ -0,0 +1,21 @@ +require libgpiod.inc + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +LIC_FILES_CHKSUM = " \ + file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ +" + +SRC_URI[sha256sum] = "64a718e8f8e022afc1880bae0b6ddc874fca1ce1bf8a2ac88bab4ccca6b66a1e" + +S = "${WORKDIR}/libgpiod-2.0" + +# We must enable gpioset-interactive for all gpio-tools tests to pass +PACKAGECONFIG[tests] = "--enable-tests --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" +PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" + +FILES:${PN}-tools += "${bindir}/gpionotify" +FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" + +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim"
Signature · 1 line
2.37.2
Re: [meta-oe][PATCH 2/3] libgpiod: add a recipe for libgpiod v2.0-rc1
fails to build with clang
https://errors.yoctoproject.org/Errors/Details/689563/
Quoted 252 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This is a recipe for libgpiod v2 release candidate. Let's put common bits and pieces into an .inc file and the source fetching into a separate include that will be later reused by the python bindings that for v2 will be moved into a separate recipe in meta-python.
Signed-off-by Bartosz Golaszewski <[email protected]>--- .../{files => libgpiod-1.6.4}/run-ptest | 0 .../libgpiod/libgpiod-2.0-rc1/run-ptest | 24 ++++++++ .../recipes-support/libgpiod/libgpiod-src.inc | 1 + meta-oe/recipes-support/libgpiod/libgpiod.inc | 61 +++++++++++++++++++ .../libgpiod/libgpiod_1.6.4.bb | 56 ++--------------- .../libgpiod/libgpiod_2.0-rc1.bb | 21 +++++++ 6 files changed, 113 insertions(+), 50 deletions(-) rename meta-oe/recipes-support/libgpiod/{files => libgpiod-1.6.4}/run-ptest (100%) create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-src.inc create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod.inc create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bbmeta-oe/recipes-support/libgpiod/libgpiod-1.6.4/run-ptest renamed from meta-oe/recipes-support/libgpiod/files/run-ptest +0
-0meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest new file +24
-0@@ -0,0 +1,24 @@ +#!/bin/sh + +testbins="gpiod-test gpio-tools-test gpiod-cxx-test" + +ptestdir=$(dirname "$(readlink -f "$0")") +cd $ptestdir/tests + +# libgpiod v2 uses gpio-sim - a configfs-based testing module. We need to +# make sure configfs is mounted before running any tests. +modprobe configfs +mountpoint /sys/kernel/config > /dev/null || mount -t configfs configfs /sys/kernel/config + +for testbin in $testbins; do + if test -e ./$testbin; then + ./$testbin > ./$testbin.out 2>&1 + if [ $? -ne 0 ]; then + echo "FAIL: $testbin" + else + echo "PASS: $testbin" + fi + else + echo "SKIP: $testbin" + fi +donemeta-oe/recipes-support/libgpiod/libgpiod-src.inc new file +1
-0@@ -0,0 +1 @@ +SRC_URI += "https://www.kernel.org/pub/software/libs/libgpiod/libgpiod-${PV}.tar.xz"meta-oe/recipes-support/libgpiod/libgpiod.inc new file +61
-0@@ -0,0 +1,61 @@ +SUMMARY = "C library and tools for interacting with the linux GPIO character device" +AUTHOR = "Bartosz Golaszewski <[email protected]>" + +require libgpiod-src.inc + +inherit autotools pkgconfig ptest + +SRC_URI += "file://run-ptest" + +PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" + +# Enable cxx bindings by default. +PACKAGECONFIG ?= " \ + cxx \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ +" + +# Always build tools - they don't have any additional +# requirements over the library. +EXTRA_OECONF = "--enable-tools" + +DEPENDS += "autoconf-archive-native" + +PACKAGES =+ "${PN}-tools libgpiodcxx" +FILES:${PN}-tools += " \ + ${bindir}/gpiodetect \ + ${bindir}/gpioinfo \ + ${bindir}/gpioget \ + ${bindir}/gpioset \ + ${bindir}/gpiomon \ +" +FILES:${PN}-ptest += " \ + ${bindir}/gpiod-test \ + ${bindir}/gpio-tools-test \ + ${bindir}/gpio-tools-test.bats \ + ${bindir}/gpiod-cxx-test \ +" +FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*" + +RRECOMMENDS:${PN}-ptest += "coreutils" +RDEPENDS:${PN}-ptest += "bats" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests/ + + # These are the core C library tests + install -m 0755 ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ + + # Tools are always built so let's always install them for ptest even if + # we're not selecting libgpiod-tools. + install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ + install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ + for tool in ${FILES:${PN}-tools}; do + install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/ + done + + if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then + install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ + fi +} +meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb +6
-50@@ -1,80 +1,36 @@ -SUMMARY = "C library and tools for interacting with the linux GPIO character device" -AUTHOR = "Bartosz Golaszewski <[email protected]>" +require libgpiod.inc LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" -SRC_URI = " \ - https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "7a2cca6ead9296c27e877070dd8853bc" SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" -inherit autotools pkgconfig python3native ptest +inherit python3native PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" -PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" -# Enable cxx bindings by default. -PACKAGECONFIG ?= "cxx \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" - # Always build tools - they don't have any additional # requirements over the library. EXTRA_OECONF = "--enable-tools" -DEPENDS += "autoconf-archive-native" - -PACKAGES =+ "${PN}-tools libgpiodcxx ${PN}-python" -FILES:${PN}-tools = " \ - ${bindir}/gpiodetect \ - ${bindir}/gpioinfo \ - ${bindir}/gpioget \ - ${bindir}/gpioset \ - ${bindir}/gpiofind \ - ${bindir}/gpiomon \ -" +PACKAGES =+ "${PN}-python" +FILES:${PN}-tools += "${bindir}/gpiofind" FILES:${PN}-ptest += " \ - ${bindir}/gpiod-test \ - ${bindir}/gpio-tools-test \ - ${bindir}/gpio-tools-test.bats \ - ${bindir}/gpiod-cxx-test \ ${bindir}/gpiod_py_test.py \ ${libdir}/libgpiomockup.so.* \ " -FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*" FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so" FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" RRECOMMENDS:${PN}-ptest += " \ kernel-module-gpio-mockup \ - coreutils \ ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ " -RDEPENDS:${PN}-ptest += "bats python3-packaging" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - - # These are the core C library tests - install -m 0755 ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ - - # Tools are always built so let's always install them for ptest even if - # we're not selecting libgpiod-tools. - install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ - install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ - for tool in ${FILES:${PN}-tools}; do - install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/ - done - - if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then - install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ - fi +RDEPENDS:${PN}-ptest += "python3-packaging" +do_install_ptest:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ fimeta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bb new file +21
-1@@ -0,0 +1,21 @@ +require libgpiod.inc + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +LIC_FILES_CHKSUM = " \ + file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ +" + +SRC_URI[sha256sum] = "64a718e8f8e022afc1880bae0b6ddc874fca1ce1bf8a2ac88bab4ccca6b66a1e" + +S = "${WORKDIR}/libgpiod-2.0" + +# We must enable gpioset-interactive for all gpio-tools tests to pass +PACKAGECONFIG[tests] = "--enable-tests --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit" +PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit" + +FILES:${PN}-tools += "${bindir}/gpionotify" +FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*" + +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim" --2.37.2
Re: [meta-oe][PATCH 2/3] libgpiod: add a recipe for libgpiod v2.0-rc1
Quoted 5 lines · Khem Raj
fails to build with clang
Thanks for the report. I fixed this one but it seems like there are more issues with clang and musl. For instance musl doesn't have twalk_r() which libgpiod uses in tests. I need to spend some time on it.
Bart
PATCH 3/3 python3-gpiod: new package
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
Add a recipe for libgpiod v2 python bindings. This is a release candidate but once the proper v2.0 is released, it will be made public on pypi and the recipe modified accordingly.
As libgpiod python bindings now use setuptools and not make, we can separate the recipe from the rest of the library.
--- .../packagegroups/packagegroup-meta-python.bb | 1 + .../python/python3-gpiod/run-ptest | 15 +++++++ .../python/python3-gpiod_2.0-rc1.bb | 45 +++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-gpiod/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-gpiod_2.0-rc1.bb
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +1 -0
@@ -157,6 +157,7 @@ RDEPENDS:packagegroup-meta-python3 = "\ python3-gmqtt \ python3-gnupg \ python3-google-api-python-client \ + python3-gpiod \ python3-gpsd-py3 \ python3-graphviz \ python3-greenlet \
meta-python/recipes-devtools/python/python3-gpiod/run-ptest new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/sh + +cd $(dirname "$(readlink -f "$0")") + +# python3-gpiod uses gpio-sim - a configfs-based testing module. We need to +# make sure configfs is mounted before running any tests. +modprobe configfs +mountpoint /sys/kernel/config > /dev/null || mount -t configfs configfs /sys/kernel/config + +python3 -m gpiod-test -v > ./python3-gpiod.out 2>&1 +if [ $? -ne 0 ]; then + echo "FAIL: python3-gpiod" +else + echo "PASS: python3-gpiod" +fi
meta-python/recipes-devtools/python/python3-gpiod_2.0-rc1.bb new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.37.2
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Quoted 44 lines
The first patch contains an update of libgpiod v1.6.x to the most recent bug-fix release.
The second contains the recipe for libgpiod v2.0-rc1 while also moving the bitbake code around in order to factor out common elements.
The third contains a recipe for the python bindings that are now in their own project in meta-python.
The new recipes provide the same functionality - including ptest for the C library, tools and language bindings.
Bartosz Golaszewski (3):
libgpiod: update to v1.6.4
libgpiod: add a recipe for libgpiod v2.0-rc1
python3-gpiod: new package...-don-t-expect-automake-to-set-PYTHON.patch | 37 --------- .../{files => libgpiod-1.6.4}/run-ptest | 0 .../libgpiod/libgpiod-2.0-rc1/run-ptest | 24 ++++++ .../recipes-support/libgpiod/libgpiod-src.inc | 1 + meta-oe/recipes-support/libgpiod/libgpiod.inc | 61 ++++++++++++++ .../libgpiod/libgpiod_1.6.3.bb | 82 ------------------- .../libgpiod/libgpiod_1.6.4.bb | 37 +++++++++ .../libgpiod/libgpiod_2.0-rc1.bb | 21 +++++ .../packagegroups/packagegroup-meta-python.bb | 1 + .../python/python3-gpiod/run-ptest | 15 ++++ .../python/python3-gpiod_2.0-rc1.bb | 45 ++++++++++ 11 files changed, 205 insertions(+), 119 deletions(-)delete mode 100644
meta-oe/recipes-support/libgpiod/files/0001-build-don-t-expect-automake-to-set-PYTHON.patchrename meta-oe/recipes-support/libgpiod/{files => libgpiod-1.6.4}/run-ptest (100%)
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.0-rc1/run-ptest
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-src.inc
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod.inc
delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.0-rc1.bb
create mode 100644 meta-python/recipes-devtools/python/python3-gpiod/run-ptest
create mode 100644 meta-python/recipes-devtools/python/python3-gpiod_2.0-rc1.bb
Quoted 23 lines · Ferry Toth
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Quoted 4 lines
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Can those layers just set the PREFERRED_VERSION?
Bart
Op 09-02-2023 om 20:57 schreef Bartosz Golaszewski:
Quoted 24 lines · Ferry Toth
Quoted 23 lines
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Quoted 6 lines
Quoted 4 lines
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Can those layers just set the
PREFERRED_VERSION?
Yes, but it doesn't the problem when one app needs v1 and the other needs v2.
Quoted 6 lines
Bart
Quoted 31 lines · Ferry Toth
Op 09-02-2023 om 20:57 schreef Bartosz Golaszewski:
Quoted 29 lines · Ferry Toth
Quoted 27 lines
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Quoted 5 lines
Quoted 1 line
Can those layers just set the
PREFERRED_VERSION?Yes, but it doesn't the problem when one app needs v1 and the other needs v2.
Yeah, this is what I'm trying to explain. How likely is it that the same system will use two versions of libgpiod at the same time? IMO highly unlikely because this is not gstreamer or some other huge project, it's a small-to-middle-sized library that's most likely ever only used by a single program or script on a given system.
I'd prefer to not provide libgpiod and libgpiod2 packages but instead allow to alternate between them using PREFERRED_VERSION. If anyone complains, then we can rethink it.
It's not like we're changing the default version in any of the stable branches anyway.
Bart
Op 14-02-2023 om 15:05 schreef Bartosz Golaszewski:
Quoted 44 lines · Ferry Toth
Quoted 31 lines
Op 09-02-2023 om 20:57 schreef Bartosz Golaszewski:
Quoted 29 lines · Ferry Toth
Quoted 27 lines
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Quoted 5 lines
Quoted 1 line
Can those layers just set the
PREFERRED_VERSION?Yes, but it doesn't the problem when one app needs v1 and the other needs v2.
Yeah, this is what I'm trying to explain. How likely is it that the same system will use two versions of libgpiod at the same time? IMO highly unlikely because this is not gstreamer or some other huge project, it's a small-to-middle-sized library that's most likely ever only used by a single program or script on a given system.
Quoted 3 lines
I'd prefer to not provide libgpiod and libgpiod2 packages but instea allow to alternate between them using
PREFERRED_VERSION. If anyone complains, then we can rethink it.
libgpiod2 is in Ubuntu Kinetic and is a dependency of openocd (> 1,1) and eg25-amanager.
Those packages will block libgpiod v2 from going in (that would be a pity) until they are ported, or until they are dropped (a pity to have your dependents dropped too).
On a smaller scale, Intel Edison Arduino uses libgpiod in 2 apps. To port them I need to figure what changed and how to fix them. Try some example etc. because at this point in time there is not much example code. But installing libgpiod v2 breaks some systemd services because v1 gets uninstalled. Luckily in my case it does not break boot.
Quoted 2 lines
It's not like we're changing the default version in any of the stable branches anyway.
True. I just like libs to change version when they have compatibility breaks. But maybe that's just me.
Quoted 6 lines
Bart
A message that is not in the archive (sent off-list or not yet received): CACMJSevdEqhyyV1mDjA2xt5nm28T996aPjyOa69uy8Z-GsuckA@mail.gmail.com
Hi
Op 14-02-2023 om 19:10 schreef Bartosz Golaszewski:
Quoted 39 lines · Ferry Toth
Quoted 38 lines
Op 14-02-2023 om 15:05 schreef Bartosz Golaszewski:
Quoted 37 lines · Ferry Toth
Quoted 22 lines
Op 09-02-2023 om 20:57 schreef Bartosz Golaszewski:
Quoted 21 lines · Ferry Toth
Quoted 20 lines
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Can those layers just set the
PREFERRED_VERSION?Yes, but it doesn't the problem when one app needs v1 and the other needs v2.
Yeah, this is what I'm trying to explain. How likely is it that the same system will use two versions of libgpiod at the same time? IMO highly unlikely because this is not gstreamer or some other huge project, it's a small-to-middle-sized library that's most likely ever only used by a single program or script on a given system.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
I'd prefer to not provide libgpiod and libgpiod2 packages but instea allow to alternate between them using
PREFERRED_VERSION. If anyone complains, then we can rethink it.libgpiod2 is in Ubuntu Kinetic and is a dependency of openocd (> 1,1) and eg25-amanager.
Wait what? libgpiod v2 is not out yet, what's up with ubuntu?
libgpiod2 (the package) is based on libgpiod 1.6.3 (the source)
Quoted 11 lines
Quoted 9 lines
Those packages will block libgpiod v2 from going in (that would be a pity) until they are ported, or until they are dropped (a pity to have your dependents dropped too).
On a smaller scale, Intel Edison Arduino uses libgpiod in 2 apps. To port them I need to figure what changed and how to fix them. Try some example etc. because at this point in time there is not much example code. But installing libgpiod v2 breaks some systemd services because v1 gets uninstalled. Luckily in my case it does not break boot.
I will be more than happy to assist with porting! In fact I will look at porting openocd myself.
Thanks, I start a new thread if I get stuck
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It's not like we're changing the default version in any of the stable branches anyway.
True. I just like libs to change version when they have compatibility breaks. But maybe that's just me.
I don't really care what distros do. I maintain the meta-openembedded recipe and only have interest in its versioning. Ubuntu can call it libgpiod2137 for what I care.
Of course. That was just an example, I didn't mean to hijack the discussion.
I just seems libgpiod 1.6.3 and 2.0-rc1 can not currently coexist (i.e. the packages can not be installed simultaneously). Or I tried (to modify the recipe) and did something wrong.
Quoted 8 lines
Bart
Quoted 6 lines
Quoted 6 lines
Bart
Quoted 56 lines · Ferry Toth
Hi
Op 14-02-2023 om 19:10 schreef Bartosz Golaszewski:
Quoted 39 lines · Ferry Toth
Quoted 38 lines
Op 14-02-2023 om 15:05 schreef Bartosz Golaszewski:
Quoted 37 lines · Ferry Toth
Quoted 22 lines
Op 09-02-2023 om 20:57 schreef Bartosz Golaszewski:
Quoted 21 lines · Ferry Toth
Quoted 20 lines
Hi,
Op 08-02-2023 om 16:25 schreef Bartosz Golaszewski:
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
We've just tagged the release candidate for libgpiod v2. This is a major release entirely overhauling the API in a backward incompatible way.
Thanks for creating this!
Quoted 11 lines
While this is not the final release yet, it's not likely to change much so I'd like to make it available in meta-openembedded to give it exposure to some testing. When we do release v2.0, it'll be just a matter of bumping the version.
Currently no other package depends on libgpiod in meta-openembedded, so I'd like to avoid having two packages (libgpiod and libgpiod2). Instead let's provide recipes for both versions but keep them under the common libgpiod name as it's unlikely anyone would need both versions in a single system. This is after all a medium-sized project that shouldn't require too much work in order to port a user to the new major release.
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Nevertheless there may be packages in other layers using it (meta-acpi, meta-intel-edison). I think there will be a period where both may need to coexist.
Can those layers just set the
PREFERRED_VERSION?Yes, but it doesn't the problem when one app needs v1 and the other needs v2.
Yeah, this is what I'm trying to explain. How likely is it that the same system will use two versions of libgpiod at the same time? IMO highly unlikely because this is not gstreamer or some other huge project, it's a small-to-middle-sized library that's most likely ever only used by a single program or script on a given system.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
I'd prefer to not provide libgpiod and libgpiod2 packages but instea allow to alternate between them using
PREFERRED_VERSION. If anyone complains, then we can rethink it.libgpiod2 is in Ubuntu Kinetic and is a dependency of openocd (> 1,1) and eg25-amanager.
Wait what? libgpiod v2 is not out yet, what's up with ubuntu?
libgpiod2 (the package) is based on libgpiod 1.6.3 (the source)
Quoted 4 lines
Quoted 4 lines
Those packages will block libgpiod v2 from going in (that would be a pity) until they are ported, or until they are dropped (a pity to have your dependents dropped too).
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
On a smaller scale, Intel Edison Arduino uses libgpiod in 2 apps. To port them I need to figure what changed and how to fix them. Try some example etc. because at this point in time there is not much example code. But installing libgpiod v2 breaks some systemd services because v1 gets uninstalled. Luckily in my case it does not break boot.
I will be more than happy to assist with porting! In fact I will look at porting openocd myself.
Thanks, I start a new thread if I get stuck
Feel free to post on the linux-gpio mailing list.
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It's not like we're changing the default version in any of the stable branches anyway.
True. I just like libs to change version when they have compatibility breaks. But maybe that's just me.
I don't really care what distros do. I maintain the meta-openembedded recipe and only have interest in its versioning. Ubuntu can call it libgpiod2137 for what I care.
Quoted 6 lines
Of course. That was just an example, I didn't mean to hijack the discussion.
I just seems libgpiod 1.6.3 and 2.0-rc1 can not currently coexist (i.e. the packages can not be installed simultaneously). Or I tried (to modify the recipe) and did something wrong.
No, you're right. Shared objects have different ABI versions but other than that many files share names: the header, pkgconfig manpages etc.
I have no intention of changing this honestly - better just port the apps.
Bart