From 01a52551ba205ce112e55bf3ff66516b77fac0ca Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 15:46:47 +0100 Subject: python3-gpiod: update to v2.2.4 Bugfix release containing a fix for tests failing with recent kernels. This allows us to remove the patch we're carrying. Signed-off-by: Bartosz Golaszewski Signed-off-by: Khem Raj --- ...thon-tests-disable-device-before-releasin.patch | 49 ---------------------- .../recipes-devtools/python/python3-gpiod_2.2.3.bb | 48 --------------------- .../recipes-devtools/python/python3-gpiod_2.2.4.bb | 45 ++++++++++++++++++++ 3 files changed, 45 insertions(+), 97 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch delete mode 100644 meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb create mode 100644 meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch b/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch deleted file mode 100644 index 9025e0d72d..0000000000 --- a/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ad91b034e7575074998b3e480b592e3ae6d00def Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski -Date: Tue, 4 Feb 2025 09:36:13 +0100 -Subject: [PATCH] bindings: python: tests: disable device before releasing the - bank - -Linux kernel commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an -instantiated device depends on") uncovered an issue in Python bindings -tests where the GPIO simulator device is not disabled before removing its -configfs entries. Reorder the operations in chip_finalize() in order to -disable the device first (if needed) before releasing any other -resources. - -Upstream-Status: Submitted [https://lore.kernel.org/all/20250203-fix-gpiosim-in-bindings-v1-2-d2c9e0f3a29d@linaro.org/] - -Signed-off-by: Bartosz Golaszewski ---- - tests/gpiosim/ext.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/tests/gpiosim/ext.c b/tests/gpiosim/ext.c -index 272e6f7..cb5611a 100644 ---- a/tests/gpiosim/ext.c -+++ b/tests/gpiosim/ext.c -@@ -96,15 +96,16 @@ static int chip_init(chip_object *self, - - static void chip_finalize(chip_object *self) - { -- if (self->bank) -- gpiosim_bank_unref(self->bank); -- - if (self->dev) { - if (gpiosim_dev_is_live(self->dev)) - gpiosim_dev_disable(self->dev); -- -- gpiosim_dev_unref(self->dev); - } -+ -+ if (self->bank) -+ gpiosim_bank_unref(self->bank); -+ -+ if (self->dev) -+ gpiosim_dev_unref(self->dev); - } - - static void chip_dealloc(PyObject *self) --- -2.45.2 - diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb deleted file mode 100644 index bdc7e52ca5..0000000000 --- a/meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Python bindings for libgpiod." - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" -# The actual license files live in the upstream libgpiod from which the pypi -# package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=241;endline=241;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" - -SRC_URI += " \ - file://run-ptest \ - file://0001-bindings-python-tests-disable-device-before-releasin.patch \ -" - -SRC_URI[sha256sum] = "b916c3741dfc4dbcf6224b39e50765f672b137896287715709d49e9f063304c5" - -inherit python_setuptools_build_meta python_pep517 ptest pypi - -DEPENDS += " \ - libgpiod \ - python3-setuptools-native \ -" -RDEPENDS:${PN} += " \ - libgpiod (>= 2.1) \ - python3-datetime \ - python3-profile \ -" -RDEPENDS:${PN}-ptest += " \ - libgpiod-gpiosim \ - python3-setuptools \ -" - -export LINK_SYSTEM_LIBGPIOD = "1" - -do_compile_ptest() { - setup_target_config - nativepython3 build_tests.py -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -d ${D}${PTEST_PATH}/gpiod-test/procname - install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname - install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname -} - -INSANE_SKIP:${PN}-ptest += "buildpaths" diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb new file mode 100644 index 0000000000..7efbc5b80a --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb @@ -0,0 +1,45 @@ +SUMMARY = "Python bindings for libgpiod." + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" +# The actual license files live in the upstream libgpiod from which the pypi +# package is spun out. +LIC_FILES_CHKSUM = "file://setup.py;beginline=241;endline=241;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" + +SRC_URI += "file://run-ptest" + +SRC_URI[sha256sum] = "4923c27262c70815054fe7a1962b98dd1d6822a541c103d0acd7f42fc9aabae9" + +inherit python_setuptools_build_meta python_pep517 ptest pypi + +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" +RDEPENDS:${PN} += " \ + libgpiod (>= 2.1) \ + python3-datetime \ + python3-profile \ +" +RDEPENDS:${PN}-ptest += " \ + libgpiod-gpiosim \ + python3-setuptools \ +" + +export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + setup_target_config + nativepython3 build_tests.py +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -d ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ + install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname +} + +INSANE_SKIP:${PN}-ptest += "buildpaths" -- cgit v1.2.3-54-g00ecf