From 9da141aa8c062bfb3664214d0945fb95b6a44e8a Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 08:27:38 -0400 Subject: [PATCH 1/7] Add TFT docker builds (for CI) (#6614) --- .github/workflows/docker_build.yml | 7 +++++++ .github/workflows/main_matrix.yml | 26 ++++++++++++++++++++++---- Dockerfile | 13 ++++++++----- alpine.Dockerfile | 6 ++++-- bin/build-native.sh | 7 ++++--- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index eec0785c0..cde7fd274 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -26,6 +26,11 @@ on: required: false type: boolean default: false + pio_env: + description: PlatformIO environment to build + required: false + type: string + default: native outputs: digest: description: Digest of built image @@ -90,3 +95,5 @@ jobs: push: ${{ inputs.push }} tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job platforms: ${{ inputs.platform }} + build-args: | + PIO_ENV=${{ inputs.pio_env }} diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 5b11926f2..0889ce22e 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -145,7 +145,7 @@ jobs: test-native: uses: ./.github/workflows/test_native.yml - docker-debian-amd64: + docker-deb-amd64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -153,7 +153,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-alpine-amd64: + docker-deb-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: debian + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-alp-amd64: uses: ./.github/workflows/docker_build.yml with: distro: alpine @@ -161,7 +170,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-debian-arm64: + docker-alp-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: alpine + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-deb-arm64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -169,7 +187,7 @@ jobs: runs-on: ubuntu-24.04-arm push: false - docker-debian-armv7: + docker-deb-armv7: uses: ./.github/workflows/docker_build.yml with: distro: debian diff --git a/Dockerfile b/Dockerfile index 55580c579..be192f216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-bookworm AS builder ENV DEBIAN_FRONTEND=noninteractive @@ -12,9 +12,10 @@ ENV TZ=Etc/UTC # Install Dependencies ENV PIP_ROOT_USER_ACTION=ignore RUN apt-get update && apt-get install --no-install-recommends -y \ - curl wget g++ zip git ca-certificates \ + curl wget g++ zip git ca-certificates pkg-config \ libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \ - libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \ + libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \ + libx11-dev libinput-dev libxkbcommon-x11-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -24,7 +25,7 @@ WORKDIR /tmp/firmware COPY . /tmp/firmware # Build -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # Fetch web assets @@ -44,7 +45,9 @@ ENV TZ=Etc/UTC USER root RUN apt-get update && apt-get --no-install-recommends -y install \ - libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev liborcania2.3 libulfius2.7 libssl3 \ + libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev \ + liborcania2.3 libulfius2.7 libssl3 \ + libx11-6 libinput10 libxkbcommon-x11-0 \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 17afc2964..f85c147da 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -1,8 +1,8 @@ # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder @@ -10,6 +10,7 @@ ENV PIP_ROOT_USER_ACTION=ignore RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ + libx11-dev libinput-dev libxkbcommon-dev \ && rm -rf /var/cache/apk/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -21,7 +22,7 @@ COPY . /tmp/firmware # Add `argp` for musl ENV PLATFORMIO_BUILD_FLAGS="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -largp" -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # ##### PRODUCTION BUILD ############# @@ -33,6 +34,7 @@ USER root RUN apk --no-cache add \ libstdc++ libgpiod yaml-cpp libusb i2c-tools libuv \ + libx11 libinput libxkbcommon \ && rm -rf /var/cache/apk/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/bin/build-native.sh b/bin/build-native.sh index c6b1434dd..51379ad76 100755 --- a/bin/build-native.sh +++ b/bin/build-native.sh @@ -15,6 +15,7 @@ platformioFailed() { VERSION=$(bin/buildinfo.py long) SHORT_VERSION=$(bin/buildinfo.py short) +PIO_ENV=${1:-native} OUTDIR=release/ @@ -24,7 +25,7 @@ mkdir -p $OUTDIR/ rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -pio pkg update --environment native || platformioFailed -pio run --environment native || platformioFailed -cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)" +pio pkg update --environment "$PIO_ENV" || platformioFailed +pio run --environment "$PIO_ENV" || platformioFailed +cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)" cp bin/native-install.* $OUTDIR From 64a1cd3f99ca39f08f302b0cecd6b6aa0fdf4231 Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 10:29:39 -0400 Subject: [PATCH 2/7] Docker is fun (#6623) --- Dockerfile | 2 +- alpine.Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index be192f216..6c1b83653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-bookworm AS builder +ARG PIO_ENV=native ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC diff --git a/alpine.Dockerfile b/alpine.Dockerfile index f85c147da..f4a95095d 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -2,11 +2,11 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder - +ARG PIO_ENV=native ENV PIP_ROOT_USER_ACTION=ignore + RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ From 5ab1db01420210896082eb4fcc2be741a23b1d70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:36:23 -0500 Subject: [PATCH 3/7] chore(deps): update meshtastic-device-ui digest to 65eb74f (#6624) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 85505d63a..f0756cb89 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/da8fb5eaac7874c31508fad5252999ec82c02498.zip + https://github.com/meshtastic/device-ui/archive/65eb74fadf373e3ceec0bddb95a7cb978e2acd81.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From c6e5ec055f9bb44b823d0895eea053726fe07e3d Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 20:48:32 -0400 Subject: [PATCH 4/7] RPM: Build native-tft target (#6613) --- meshtasticd.spec.rpkg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshtasticd.spec.rpkg b/meshtasticd.spec.rpkg index 4d6c9d6f5..2d777bc76 100644 --- a/meshtasticd.spec.rpkg +++ b/meshtasticd.spec.rpkg @@ -42,6 +42,10 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(liborcania) BuildRequires: pkgconfig(libyder) BuildRequires: pkgconfig(libulfius) +# TFT components: +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(xkbcommon-x11) %description Meshtastic daemon for controlling Meshtastic devices. Meshtastic is an off-grid @@ -55,12 +59,12 @@ tar -xf %{SOURCE1} -C web gzip -dr web %build -# Use the “native” environment from platformio to build a Linux binary -platformio run -e native +# Use the “native-tft” environment from platformio to build a Linux binary +platformio run -e native-tft %install mkdir -p %{buildroot}%{_sbindir} -install -m 0755 .pio/build/native/program %{buildroot}%{_sbindir}/meshtasticd +install -m 0755 .pio/build/native-tft/program %{buildroot}%{_sbindir}/meshtasticd mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd install -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml From d26b50b78c28cf9cfaf2002fce0946b0fb14d36d Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 19 Apr 2025 00:29:59 -0400 Subject: [PATCH 5/7] docker alpine: Add available.d config templates (#6631) --- alpine.Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alpine.Dockerfile b/alpine.Dockerfile index f4a95095d..350129040 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -39,7 +39,11 @@ RUN apk --no-cache add \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ && mkdir -p /etc/meshtasticd/ssl + +# Fetch compiled binary from the builder COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/ +# Copy config templates +COPY ./bin/config.d /etc/meshtasticd/available.d WORKDIR /var/lib/meshtasticd VOLUME /var/lib/meshtasticd From 916afb5098d320cacb324e81d0f663a57696ba12 Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 19 Apr 2025 10:56:41 -0400 Subject: [PATCH 6/7] appdata.xml: Add date to all releases (#6632) --- bin/org.meshtastic.meshtasticd.metainfo.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index cb921fcb3..32e6eb077 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -1,4 +1,4 @@ - + org.meshtastic.meshtasticd @@ -87,13 +87,13 @@ - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.6 - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.5 - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.4 From a30f431b6a89261ef02ed115bd78f51cb0294299 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:49:05 +0200 Subject: [PATCH 7/7] Update Kongduino-Adafruit_nRFCrypto digest to 5f838d2 (#6634) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/nrf52/nrf52840.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini index fb5ba9960..f0a4ab6c0 100644 --- a/arch/nrf52/nrf52840.ini +++ b/arch/nrf52/nrf52840.ini @@ -7,7 +7,7 @@ lib_deps = ${nrf52_base.lib_deps} ${environmental_base.lib_deps} # renovate: datasource=git-refs depName=Kongduino-Adafruit_nRFCrypto packageName=https://github.com/Kongduino/Adafruit_nRFCrypto gitBranch=master - https://github.com/Kongduino/Adafruit_nRFCrypto/archive/e31a8825ea3300b163a0a3c1ddd5de34e10e1371.zip + https://github.com/Kongduino/Adafruit_nRFCrypto/archive/5f838d2709461a2c981f642917aa50254a25c14c.zip ; Common NRF52 debugging settings follow. See the Meshtastic developer docs for how to connect SWD debugging probes to your board.