Message ID | 20240610182058.2286377-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | [meta-oe] libgpiod-1.x: Disable ptests and fix build on musl | expand |
On Mon, 10 Jun 2024 at 20:21, Khem Raj <raj.khem@gmail.com> wrote: > > libgpiod-1.x is still in use by some BSPs e.g. > variscite SOMs, so we can not get rid of completely > so give some time to move away from 1.x and disable > ptests as they need older version of catch2 which is > being removed > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- TBH I still support v1.6.x as this is what Debian stable still ships with (and will continue to for some time) so how about dropping only C++ tests? Bart
On Mon, Jun 10, 2024 at 11:34 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > On Mon, 10 Jun 2024 at 20:21, Khem Raj <raj.khem@gmail.com> wrote: > > > > libgpiod-1.x is still in use by some BSPs e.g. > > variscite SOMs, so we can not get rid of completely > > so give some time to move away from 1.x and disable > > ptests as they need older version of catch2 which is > > being removed > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > TBH I still support v1.6.x as this is what Debian stable still ships > with (and will continue to for some time) so how about dropping only > C++ tests? Should be ok I guess, would you mind sending a hint on top of this patch how to do it ? > > Bart
On Mon, Jun 10, 2024 at 9:31 PM Khem Raj <raj.khem@gmail.com> wrote: > > On Mon, Jun 10, 2024 at 11:34 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > On Mon, 10 Jun 2024 at 20:21, Khem Raj <raj.khem@gmail.com> wrote: > > > > > > libgpiod-1.x is still in use by some BSPs e.g. > > > variscite SOMs, so we can not get rid of completely > > > so give some time to move away from 1.x and disable > > > ptests as they need older version of catch2 which is > > > being removed > > > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > > Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > --- > > > > TBH I still support v1.6.x as this is what Debian stable still ships > > with (and will continue to for some time) so how about dropping only > > C++ tests? > > Should be ok I guess, would you mind sending a hint on top of this patch > how to do it ? > On top? This patch should be dropped and logically split into two. The musl fix is already upstream as commit f6444fb306d6 ("core: add missing #include for basename()") which allows you to set the Upstream-Status tag to accepted. I will send an alternative version tomorrow morning. Bart
On Mon, Jun 10, 2024 at 12:56 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > On Mon, Jun 10, 2024 at 9:31 PM Khem Raj <raj.khem@gmail.com> wrote: > > > > On Mon, Jun 10, 2024 at 11:34 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > > > On Mon, 10 Jun 2024 at 20:21, Khem Raj <raj.khem@gmail.com> wrote: > > > > > > > > libgpiod-1.x is still in use by some BSPs e.g. > > > > variscite SOMs, so we can not get rid of completely > > > > so give some time to move away from 1.x and disable > > > > ptests as they need older version of catch2 which is > > > > being removed > > > > > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > > > Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > --- > > > > > > TBH I still support v1.6.x as this is what Debian stable still ships > > > with (and will continue to for some time) so how about dropping only > > > C++ tests? > > > > Should be ok I guess, would you mind sending a hint on top of this patch > > how to do it ? > > > > On top? This patch should be dropped and logically split into two. > > The musl fix is already upstream as commit f6444fb306d6 ("core: add > missing #include for basename()") which allows you to set the > Upstream-Status tag to accepted. Right, I have divided this into two patches and added the backport info to musl patch, thanks. > > I will send an alternative version tomorrow morning. cool. I will drop my workaround from master-next once you send it > > Bart
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch new file mode 100644 index 0000000000..4a250015ba --- /dev/null +++ b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch @@ -0,0 +1,25 @@ +From b0ea35260ded2fbd41af46f2f18a61fb783a35be Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 10 Jun 2024 11:09:31 -0700 +Subject: [PATCH] Include missing libgen.h for basename() + +This is an error with newer musl otherwise + +Upstream-Status: Inappropriate [ Code removed in upstream ] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/core.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/core.c b/lib/core.c +index 35dcd8e..cf1d677 100644 +--- a/lib/core.c ++++ b/lib/core.c +@@ -10,6 +10,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <gpiod.h> ++#include <libgen.h> + #include <limits.h> + #include <linux/gpio.h> + #include <poll.h> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb index 111a5727ba..9eec936f17 100644 --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb @@ -3,12 +3,16 @@ require libgpiod.inc LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" +SRC_URI += "file://0001-Include-missing-libgen.h-for-basename.patch" SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:" inherit python3native +# catch2 v2.x is no longer available +PACKAGECONFIG:remove = "tests" + PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" @@ -32,14 +36,8 @@ RRECOMMENDS:${PN}-ptest += " \ " RDEPENDS:${PN}-ptest += " \ python3-packaging \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'tests', 'bats', '', d)} \ " -do_install_ptest:append() { - 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/ - - 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/ - fi -} +deltask do_install_ptest +deltask do_install_ptest_base
libgpiod-1.x is still in use by some BSPs e.g. variscite SOMs, so we can not get rid of completely so give some time to move away from 1.x and disable ptests as they need older version of catch2 which is being removed Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- ...nclude-missing-libgen.h-for-basename.patch | 25 +++++++++++++++++++ .../libgpiod/libgpiod_1.6.4.bb | 16 ++++++------ 2 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch