From c423029c61b86fc111e65c2478dbb9c7bba620c3 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:49:33 +0000 Subject: [PATCH 1/8] ci: update checkout action for Node 24 GitHub Actions now warns that actions targeting Node.js 20 are being forced to run on Node.js 24. The warning is emitted by actions/checkout@v4 in every matrix job, which obscures the real CI failures and will eventually become a hard compatibility problem as Node 20 support is removed from runners. Move to actions/checkout@v5 so the workflow uses an action version that is compatible with the current runner JavaScript runtime. Signed-off-by: Bjorn Andersson --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60ec5c1..63f142c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,7 +183,7 @@ jobs: echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH" - name: Git checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install additional packages run: | From 163aad04dde5a5285ce8135499dcc41abfb1e3d3 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:50:10 +0000 Subject: [PATCH 2/8] ci: drop EOL distro images Several scheduled jobs are failing because the matrix still includes release-specific container images for distributions that have reached end of life. These images may still be pullable, but their package repositories are no longer maintained in the normal location and can fail during dependency installation. Remove the EOL Debian buster, Ubuntu oracular, and fixed Fedora release jobs. Keep rolling and moving targets such as debian:testing, alpine:edge, and latest tags so CI continues to catch issues users may see on active distributions. Signed-off-by: Bjorn Andersson --- .github/workflows/ci.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63f142c..4d4e1bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,18 +39,10 @@ jobs: - debian:stable - debian:bookworm - debian:bullseye - - debian:buster # Fails on configure on GCC and clang (process restrictions?) # - fedora:rawhide - fedora:latest - - fedora:42 - - fedora:41 - - fedora:40 - - fedora:39 - - fedora:38 - - fedora:37 - ubuntu:latest - - ubuntu:oracular - ubuntu:noble - ubuntu:jammy - ubuntu:focal @@ -86,14 +78,6 @@ jobs: pkg_config_path: /usr/lib/i386-linux-gnu/pkgconfig variant: i386 - - container: "debian:buster" - arch: i386 - family: x86 - compiler: gcc -m32 - cross_compile: i686-linux-gnu - pkg_config_path: /usr/lib/i386-linux-gnu/pkgconfig - variant: i386 - # Debian cross compilation builds - container: "debian:testing" arch: armhf From 3d788536e9232299439bf313ed7db3303c53c5cf Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:50:10 +0000 Subject: [PATCH 3/8] ci: use current libftdi package on Debian Debian testing no longer provides the legacy libftdi-dev package used by the CI install scripts. As a result, native, i386, and cross-compile Debian testing jobs fail at apt install before the build starts. Install libftdi1-dev instead. The Meson build already prefers the libftdi1 pkg-config dependency, so this matches the dependency that the source is actually using. Signed-off-by: Bjorn Andersson --- ci/debian.cross-compile.sh | 2 +- ci/debian.i386.sh | 2 +- ci/debian.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/debian.cross-compile.sh b/ci/debian.cross-compile.sh index 04be957..a685738 100755 --- a/ci/debian.cross-compile.sh +++ b/ci/debian.cross-compile.sh @@ -19,7 +19,7 @@ dpkg --add-architecture $ARCH apt update apt install -y --no-install-recommends \ - libftdi-dev:${ARCH} \ + libftdi1-dev:${ARCH} \ libudev-dev:${ARCH} \ libyaml-dev:${ARCH} \ libgpiod-dev:${ARCH} \ diff --git a/ci/debian.i386.sh b/ci/debian.i386.sh index 100cacc..219e201 100755 --- a/ci/debian.i386.sh +++ b/ci/debian.i386.sh @@ -20,7 +20,7 @@ apt install -y --no-install-recommends \ linux-libc-dev:i386 apt install -y --no-install-recommends \ - libftdi-dev:i386 \ + libftdi1-dev:i386 \ libudev-dev:i386 \ libyaml-dev:i386 \ libgpiod-dev:i386 \ diff --git a/ci/debian.sh b/ci/debian.sh index 2fdc362..91b5c56 100755 --- a/ci/debian.sh +++ b/ci/debian.sh @@ -29,7 +29,7 @@ esac apt install -y --no-install-recommends \ pkg-config \ - libftdi-dev \ + libftdi1-dev \ libudev-dev \ libyaml-dev \ libgpiod-dev \ From 2175378afea61d8dff003d8e315268bc69d03d33 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:50:10 +0000 Subject: [PATCH 4/8] ci: install full Alpine build toolchain The Alpine clang jobs fail during Meson compiler setup rather than during source compilation. Installing clang alone does not guarantee the complete native build environment needed for compiler sanity checks, linking, and startup objects on Alpine. Install build-base in the Alpine CI setup so both gcc and clang jobs have the standard compiler, libc, binutils, and make toolchain expected by Meson. Signed-off-by: Bjorn Andersson --- ci/alpine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/alpine.sh b/ci/alpine.sh index c4b5083..f3424ca 100755 --- a/ci/alpine.sh +++ b/ci/alpine.sh @@ -17,6 +17,7 @@ case $CC in esac apk add \ + build-base \ linux-headers \ libftdi1-dev \ yaml-dev \ From 1bead0f004741b0f19cb761bf8381714ea252535 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:50:10 +0000 Subject: [PATCH 5/8] drivers: initialize libgpiod v1 request config Ubuntu noble still ships libgpiod 1.x, which selects the local-gpio v1 implementation. That path declared struct gpiod_line_request_config without initializing the whole structure before passing it to libgpiod, leaving padding or future fields undefined under stricter toolchains. Zero-initialize the request configuration before filling the fields cdba uses, matching the defensive style needed for older supported distributions and newer compilers. Signed-off-by: Bjorn Andersson --- drivers/local-gpio-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/local-gpio-v1.c b/drivers/local-gpio-v1.c index 793dd1d..657a152 100644 --- a/drivers/local-gpio-v1.c +++ b/drivers/local-gpio-v1.c @@ -25,7 +25,7 @@ int local_gpio_init(struct local_gpio *local_gpio) int i; for (i = 0; i < GPIO_COUNT; ++i) { - struct gpiod_line_request_config cfg; + struct gpiod_line_request_config cfg = { 0 }; if (!local_gpio->options->gpios[i].present) continue; From f08d673b019ff6efebbbdbee1adcdd54a3b821ea Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 17:46:35 +0000 Subject: [PATCH 6/8] meson: fix forkpty dependency detection The forkpty check was compiled without including , which is the header that declares the function. On stricter toolchains, and in some cross builds, that can make Meson conclude that forkpty is not available from libc even when the target provides it there. The fallback then looked for a separate libutil as a required library. That breaks modern glibc targets where forkpty moved into libc and no separate libutil is available for Meson to find. Include in the function probe so libc implementations are detected correctly. Keep libutil as an optional compatibility fallback for older targets that still need it, without failing configuration when the separate library is absent. Signed-off-by: Bjorn Andersson --- meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index cd9c7ad..06e532f 100644 --- a/meson.build +++ b/meson.build @@ -59,10 +59,12 @@ cdbalib_deps = [dependency('libudev', required: server_opt), gpiod_dep, ftdi_dep] -# E.g. Debian reuires -lutil for forkpty -if not compiler.has_function('forkpty') - util_dep = compiler.find_library('util') - cdbalib_deps += util_dep +# E.g. Debian requires -lutil for forkpty +if not compiler.has_function('forkpty', prefix: '#include ') + util_dep = compiler.find_library('util', required: false) + if util_dep.found() + cdbalib_deps += util_dep + endif endif drivers_srcs = ['drivers/alpaca.c', From daee1325c124f39c765b4471fb007e173dfc1f07 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 17:51:57 +0000 Subject: [PATCH 7/8] ci: install target libc headers for Debian cross builds The Debian cross jobs install packages with --no-install-recommends. The cross compiler packages only recommend the target libc development headers, so the jobs can reach the compile step without basic headers such as sys/file.h, sys/socket.h, and bits/wordsize.h. Install libc6-dev for the target architecture explicitly. This provides the normal system headers needed by the cross compiler and keeps the CI setup independent of package recommendations. Signed-off-by: Bjorn Andersson --- ci/debian.cross-compile.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/debian.cross-compile.sh b/ci/debian.cross-compile.sh index a685738..153c526 100755 --- a/ci/debian.cross-compile.sh +++ b/ci/debian.cross-compile.sh @@ -19,6 +19,7 @@ dpkg --add-architecture $ARCH apt update apt install -y --no-install-recommends \ + libc6-dev:${ARCH} \ libftdi1-dev:${ARCH} \ libudev-dev:${ARCH} \ libyaml-dev:${ARCH} \ From 18ea7c899886f1cc9d70432ef3f68b8b9f10387d Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 18:09:58 +0000 Subject: [PATCH 8/8] cdba: avoid zero-length memcpy from NULL cdba_queue() passes a NULL payload with length zero through cdba_queue_data(). That eventually called memcpy() unconditionally, which is undefined for NULL pointers even when the requested copy length is zero. Ubuntu noble GCC with fortified libc inlines that call and reports the NULL source argument with -Wnonnull, which becomes a build failure under -Werror. Only copy the payload when the queued message actually has one. Signed-off-by: Bjorn Andersson --- cdba.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdba.c b/cdba.c index 68cbdc3..5331354 100644 --- a/cdba.c +++ b/cdba.c @@ -193,7 +193,8 @@ static void cdba_queue_data(int type, size_t len, const void *buf) item->type = type; item->len = len; item->fd = -1; - memcpy(item->payload, buf, len); + if (len) + memcpy(item->payload, buf, len); list_append(&tx_queue, &item->node); }