From 66a961cb750afc340d86f98521825b833ea2b5a9 Mon Sep 17 00:00:00 2001 From: isseysandei Date: Fri, 3 Jan 2025 18:35:34 +0100 Subject: [PATCH 01/19] increased buffer size to 1024 (#5733) --- src/mqtt/MQTT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 46fb607b5..3db3c37bb 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -435,7 +435,7 @@ void MQTT::reconnect() serverAddr = hostAndPort.first.c_str(); serverPort = hostAndPort.second; pubSub.setServer(serverAddr, serverPort); - pubSub.setBufferSize(512); + pubSub.setBufferSize(1024); LOG_INFO("Connect directly to MQTT server %s, port: %d, username: %s, password: %s", serverAddr, serverPort, mqttUsername, mqttPassword); From 9afadde2f4ef8c59c80c7926d1c77153f6f9ca33 Mon Sep 17 00:00:00 2001 From: Alex Markley Date: Fri, 3 Jan 2025 18:00:39 -0500 Subject: [PATCH 02/19] Add support for LS20031 GPS module. (#5718) Hardware documentation referenced: - https://cdn.sparkfun.com/datasheets/GPS/LS20030~3_datasheet_v1.3.pdf - https://cdn-shop.adafruit.com/datasheets/PMTK%20command%20packet-Complete-C39-A01.pdf --- src/gps/GPS.cpp | 4 +++- src/gps/GPS.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index dcece305a..e88e774bd 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1190,6 +1190,8 @@ GnssModel_t GPS::probe(int serialSpeed) PROBE_SIMPLE("L76B", "$PMTK605*31", "Quectel-L76B", GNSS_MODEL_MTK_L76B, 500); PROBE_SIMPLE("PA1616S", "$PMTK605*31", "1616S", GNSS_MODEL_MTK_PA1616S, 500); + PROBE_SIMPLE("LS20031", "$PMTK605*31", "MC-1513", GNSS_MODEL_LS20031, 500); + uint8_t cfg_rate[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00}; UBXChecksum(cfg_rate, sizeof(cfg_rate)); clearBuffer(); @@ -1750,4 +1752,4 @@ void GPS::toggleGpsMode() enable(); } } -#endif // Exclude GPS \ No newline at end of file +#endif // Exclude GPS diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 15fc50fe7..df85b7cbf 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -29,7 +29,8 @@ typedef enum { GNSS_MODEL_MTK_L76B, GNSS_MODEL_MTK_PA1616S, GNSS_MODEL_AG3335, - GNSS_MODEL_AG3352 + GNSS_MODEL_AG3352, + GNSS_MODEL_LS20031 } GnssModel_t; typedef enum { @@ -239,4 +240,4 @@ class GPS : private concurrency::OSThread }; extern GPS *gps; -#endif // Exclude GPS \ No newline at end of file +#endif // Exclude GPS From 2c654454cffabdd165311ac7bac3770ba975b53b Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 4 Jan 2025 14:39:37 -0500 Subject: [PATCH 03/19] meshtasticd debian source package (#5741) --- bin/.gitignore | 1 + debian/.gitignore | 6 ++++++ debian/changelog | 5 +++++ debian/control | 25 +++++++++++++++++++++++++ debian/meshtasticd.dirs | 3 +++ debian/meshtasticd.install | 6 ++++++ debian/rules | 15 +++++++++++++++ debian/source/format | 1 + debian/update_changelog.sh | 5 +++++ 9 files changed, 67 insertions(+) create mode 100644 bin/.gitignore create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/meshtasticd.dirs create mode 100644 debian/meshtasticd.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/update_changelog.sh diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 000000000..5b6b0720c --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +config.yaml diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..b36ab39fc --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,6 @@ +.debhelper +debhelper-build-stamp +meshtasticd +files +meshtasticd.substvars +meshtasticd.postrm.debhelper diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..5dd6fb1c0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +meshtasticd (2.5.19) unstable; urgency=medium + + * Initial packaging + + -- Austin Lane Thu, 02 Jan 2025 12:00:00 +0000 \ No newline at end of file diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..b00c6d78e --- /dev/null +++ b/debian/control @@ -0,0 +1,25 @@ +Source: meshtasticd +Section: misc +Priority: optional +Maintainer: Austin Lane +Build-Depends: debhelper-compat (= 13), + python3-pip, + python3-venv, + git, + g++, + pkg-config, + libyaml-cpp-dev, + libgpiod-dev, + libbluetooth-dev, + libusb-1.0-0-dev, + libi2c-dev +Standards-Version: 4.6.2 +Homepage: https://github.com/meshtastic/firmware +Rules-Requires-Root: no + +Package: meshtasticd +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Meshtastic daemon for communicating with Meshtastic devices + Meshtastic is an off-grid text communication platform that uses inexpensive + LoRa radios. diff --git a/debian/meshtasticd.dirs b/debian/meshtasticd.dirs new file mode 100644 index 000000000..cf1ba7a37 --- /dev/null +++ b/debian/meshtasticd.dirs @@ -0,0 +1,3 @@ +etc/meshtasticd +etc/meshtasticd/config.d +etc/meshtasticd/available.d diff --git a/debian/meshtasticd.install b/debian/meshtasticd.install new file mode 100644 index 000000000..04bf34daf --- /dev/null +++ b/debian/meshtasticd.install @@ -0,0 +1,6 @@ +.pio/build/native/meshtasticd usr/sbin + +bin/config.yaml etc/meshtasticd +bin/config.d/* etc/meshtasticd/available.d + +bin/meshtasticd.service lib/systemd/system diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..5486611a6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +# Use the "dh" sequencer +%: + dh $@ + +override_dh_auto_build: + # Terrible hack to use modern platformio to build the native version + python3 -m venv venv + venv/bin/pip install platformio + venv/bin/platformio run -e native + rm -rf venv + # Move the binary and default config to the correct name + mv .pio/build/native/program .pio/build/native/meshtasticd + cp bin/config-dist.yaml bin/config.yaml diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..9f6742789 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) \ No newline at end of file diff --git a/debian/update_changelog.sh b/debian/update_changelog.sh new file mode 100644 index 000000000..60af34511 --- /dev/null +++ b/debian/update_changelog.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash +export DEBEMAIL="github-actions[bot]@users.noreply.github.com" +dch --newversion "$(python3 bin/buildinfo.py short)-1" \ + --distribution unstable \ + "GitHub Actions Automatic version bump" From 7c21d7761cf8f63e8acdfe09be7ede63a3a9c379 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:12:54 -0600 Subject: [PATCH 04/19] Move the RFM9x to config.available (#5742) --- bin/config-dist.yaml | 6 ------ bin/config.d/lora-Adafruit-RFM9x | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 bin/config.d/lora-Adafruit-RFM9x diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index 49de1675b..e68b01ba3 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -12,12 +12,6 @@ Lora: # IRQ: 17 # Reset: 22 -# Module: RF95 # Adafruit RFM9x -# Reset: 25 -# CS: 7 -# IRQ: 22 -# Busy: 23 - # Module: RF95 # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html # Reset: 22 # CS: 7 diff --git a/bin/config.d/lora-Adafruit-RFM9x b/bin/config.d/lora-Adafruit-RFM9x new file mode 100644 index 000000000..2d64f1f91 --- /dev/null +++ b/bin/config.d/lora-Adafruit-RFM9x @@ -0,0 +1,5 @@ +# Module: RF95 # Adafruit RFM9x +# Reset: 25 +# CS: 7 +# IRQ: 22 +# Busy: 23 \ No newline at end of file From 7480378aed611dad0acf5ea0b2e288f67ba13348 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:37:13 -0600 Subject: [PATCH 05/19] Update debian build rules --- debian/rules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 5486611a6..ee8e74c32 100755 --- a/debian/rules +++ b/debian/rules @@ -7,8 +7,10 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version python3 -m venv venv - venv/bin/pip install platformio - venv/bin/platformio run -e native + source venv/bin/activate + pip install platformio + platformio run -e native + deactivate rm -rf venv # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd From eb72ee0fc19b435ff435ca2f4b31f2ba24870eea Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:51:36 -0600 Subject: [PATCH 06/19] don't use "source" for deb builds --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index ee8e74c32..2ea031c51 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,7 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version python3 -m venv venv - source venv/bin/activate + . venv/bin/activate pip install platformio platformio run -e native deactivate From 6aabbedc006bd48def207d5b8337f6dfffb6447f Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 15:41:49 -0600 Subject: [PATCH 07/19] Last Ditch effort for PPA build --- debian/rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 2ea031c51..c60d611a4 100755 --- a/debian/rules +++ b/debian/rules @@ -6,12 +6,12 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version - python3 -m venv venv - . venv/bin/activate - pip install platformio + # python3 -m venv venv + # . venv/bin/activate + pip install platformio --break-system-packages platformio run -e native - deactivate - rm -rf venv + # deactivate + # rm -rf venv # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd cp bin/config-dist.yaml bin/config.yaml From 35814fd4bc10ba38c69d95bd7079db68fd303b2f Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 11:22:11 -0500 Subject: [PATCH 08/19] meshtasticd debian: split libs for PPA (#5745) --- .github/workflows/build_debian_src.yml | 41 +++++++++++++ .github/workflows/main_matrix.yml | 8 +++ .github/workflows/package_ppa.yml | 58 +++++++++++++++++++ .gitignore | 1 + .../{update_changelog.sh => ci_changelog.sh} | 1 + debian/ci_pack_sdeb.sh | 9 +++ debian/control | 5 +- debian/rules | 15 ++--- debian/source/include-binaries | 2 + debian/source/options | 1 + 10 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build_debian_src.yml create mode 100644 .github/workflows/package_ppa.yml rename debian/{update_changelog.sh => ci_changelog.sh} (99%) mode change 100644 => 100755 create mode 100755 debian/ci_pack_sdeb.sh create mode 100644 debian/source/include-binaries create mode 100644 debian/source/options diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml new file mode 100644 index 000000000..59e925838 --- /dev/null +++ b/.github/workflows/build_debian_src.yml @@ -0,0 +1,41 @@ +name: Build Debian Source Package + +on: workflow_call + +permissions: + contents: write + packages: write + +jobs: + build-debian-src: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Install deps + shell: bash + run: | + sudo apt-get update -y --fix-missing + sudo apt-get install -y devscripts equivs + + - name: Fetch libdeps, package debian source + run: debian/ci_pack_sdeb.sh + + - name: Get release version string + run: | + echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT + id: version + + - name: Store binaries as an artifact + uses: actions/upload-artifact@v4 + with: + name: firmware-debian-${{ steps.version.outputs.long }}-src.zip + overwrite: true + path: | + ../meshtasticd_${{ steps.version.outputs.short }}* diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index a437411b5..9685ff91f 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -128,6 +128,9 @@ jobs: with: board: ${{ matrix.board }} + package-ppa: + uses: ./.github/workflows/package_ppa.yml + package-raspbian: uses: ./.github/workflows/package_raspbian.yml @@ -332,12 +335,17 @@ jobs: run: >- bin/bump_version.py + - name: Update debian changelog + run: >- + debian/ci_changelog.sh + - name: Create version.properties pull request uses: peter-evans/create-pull-request@v7 with: title: Bump version.properties add-paths: | version.properties + debian/changelog release-firmware: strategy: diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml new file mode 100644 index 000000000..284048466 --- /dev/null +++ b/.github/workflows/package_ppa.yml @@ -0,0 +1,58 @@ +name: Package Launchpad PPA + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: write + packages: write + +jobs: + build-debian-src: + uses: ./.github/workflows/build_debian_src.yml + + package-ppa: + runs-on: ubuntu-24.04 + needs: build-debian-src + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Get release version string + run: | + echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT + id: version + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: firmware-debian-${{ steps.version.outputs.long }}-src.zip + merge-multiple: true + + # - name: Install deps + # shell: bash + # run: | + # sudo apt-get update -y --fix-missing + # sudo apt-get install -y dput + + - name: Display structure of downloaded files + run: ls -R + + - name: Publish PPA + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + uses: yuezk/publish-ppa-package@v2 + with: + # See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily + repository: "meshtastic/meshtastic-daily" + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz" + # Supported Ubuntu versions + series: "plucky oracular noble jammy" + deb_email: "github-actions[bot]@users.noreply.github.com" + deb_fullname: "github-actions[bot]" diff --git a/.gitignore b/.gitignore index 28f9a24cc..8998b60d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .pio +pio # ignore vscode IDE settings files .vscode/* diff --git a/debian/update_changelog.sh b/debian/ci_changelog.sh old mode 100644 new mode 100755 similarity index 99% rename from debian/update_changelog.sh rename to debian/ci_changelog.sh index 60af34511..56688f99b --- a/debian/update_changelog.sh +++ b/debian/ci_changelog.sh @@ -1,5 +1,6 @@ #!/usr/bin/bash export DEBEMAIL="github-actions[bot]@users.noreply.github.com" + dch --newversion "$(python3 bin/buildinfo.py short)-1" \ --distribution unstable \ "GitHub Actions Automatic version bump" diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh new file mode 100755 index 000000000..97f102209 --- /dev/null +++ b/debian/ci_pack_sdeb.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash +export PLATFORMIO_LIBDEPS_DIR=pio/libdeps +export PLATFORMIO_PACKAGES_DIR=pio/packages + +# Download libraries to `libdeps` +platformio pkg install -e native + +# Build the source deb +debuild -S diff --git a/debian/control b/debian/control index b00c6d78e..9814933e3 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,9 @@ Section: misc Priority: optional Maintainer: Austin Lane Build-Depends: debhelper-compat (= 13), - python3-pip, - python3-venv, + platformio, + python3-protobuf, + python3-grpcio, git, g++, pkg-config, diff --git a/debian/rules b/debian/rules index c60d611a4..f535ad6eb 100755 --- a/debian/rules +++ b/debian/rules @@ -1,17 +1,18 @@ #!/usr/bin/make -f +# export DH_VERBOSE = 1 # Use the "dh" sequencer %: dh $@ +# https://docs.platformio.org/en/latest/envvars.html +PIO_ENV:=\ + PLATFORMIO_LIBDEPS_DIR=pio/libdeps \ + PLATFORMIO_PACKAGES_DIR=pio/packages + override_dh_auto_build: - # Terrible hack to use modern platformio to build the native version - # python3 -m venv venv - # . venv/bin/activate - pip install platformio --break-system-packages - platformio run -e native - # deactivate - # rm -rf venv + # Build with platformio + $(PIO_ENV) platformio run -e native # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd cp bin/config-dist.yaml bin/config.yaml diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 000000000..1632328ca --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1,2 @@ +pio/libdeps +pio/packages \ No newline at end of file diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..0553b485d --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "\.pio" \ No newline at end of file From 15019e8663741d12321173c5a2dcdab0d2dc2f7b Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 11:37:38 -0500 Subject: [PATCH 09/19] meshtasticd: deps for debian_build_src (#5748) --- .github/workflows/build_debian_src.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index 59e925838..6b1c014c2 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -21,7 +21,11 @@ jobs: shell: bash run: | sudo apt-get update -y --fix-missing - sudo apt-get install -y devscripts equivs + sudo apt-get install -y software-properties-common + sudo add-apt-repository ppa:meshtastic/meshtastic-daily -y + sudo apt-get install -y build-essential devscripts equivs \ + platformio python3-protobuf python3-grpcio \ + libyaml-cpp-dev libgpiod-dev libbluetooth-dev libusb-1.0-0-dev libi2c-dev - name: Fetch libdeps, package debian source run: debian/ci_pack_sdeb.sh From b2a89b8136fe27689805e07a84ef78efb191d919 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 12:06:00 -0500 Subject: [PATCH 10/19] meshtasticd: gpg tomfoolery (#5750) --- .github/workflows/build_debian_src.yml | 8 ++++++++ debian/ci_pack_sdeb.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index 6b1c014c2..bae3e442d 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -27,8 +27,16 @@ jobs: platformio python3-protobuf python3-grpcio \ libyaml-cpp-dev libgpiod-dev libbluetooth-dev libusb-1.0-0-dev libi2c-dev + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + id: gpg + - name: Fetch libdeps, package debian source run: debian/ci_pack_sdeb.sh + env: + GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }} - name: Get release version string run: | diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 97f102209..79b484a35 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -6,4 +6,4 @@ export PLATFORMIO_PACKAGES_DIR=pio/packages platformio pkg install -e native # Build the source deb -debuild -S +debuild -S -k$GPG_KEY_ID From 02a5a91da0813858c5fd0c27282f3a01271968cd Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 12:30:43 -0500 Subject: [PATCH 11/19] meshtasticd debian: secrets perms (#5751) --- .github/workflows/build_debian_src.yml | 6 +++++- .github/workflows/main_matrix.yml | 1 + .github/workflows/package_ppa.yml | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index bae3e442d..cc93b5748 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -1,6 +1,10 @@ name: Build Debian Source Package -on: workflow_call +on: + workflow_call: + secrets: + PPA_GPG_PRIVATE_KEY: + required: true permissions: contents: write diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 9685ff91f..f4c5de228 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -130,6 +130,7 @@ jobs: package-ppa: uses: ./.github/workflows/package_ppa.yml + secrets: inherit package-raspbian: uses: ./.github/workflows/package_raspbian.yml diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml index 284048466..1fcc96e11 100644 --- a/.github/workflows/package_ppa.yml +++ b/.github/workflows/package_ppa.yml @@ -2,6 +2,9 @@ name: Package Launchpad PPA on: workflow_call: + secrets: + PPA_GPG_PRIVATE_KEY: + required: true workflow_dispatch: permissions: @@ -11,6 +14,7 @@ permissions: jobs: build-debian-src: uses: ./.github/workflows/build_debian_src.yml + secrets: inherit package-ppa: runs-on: ubuntu-24.04 From 5196ee39cb8d8122f794fe0b100e4757887028ea Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 12:44:05 -0500 Subject: [PATCH 12/19] meshtasticd: debian checkout to subdir (#5752) --- .github/workflows/build_debian_src.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index cc93b5748..72e4adf3e 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + path: meshtasticd ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} @@ -38,11 +39,13 @@ jobs: id: gpg - name: Fetch libdeps, package debian source + working-directory: meshtasticd run: debian/ci_pack_sdeb.sh env: GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }} - name: Get release version string + working-directory: meshtasticd run: | echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT @@ -54,4 +57,4 @@ jobs: name: firmware-debian-${{ steps.version.outputs.long }}-src.zip overwrite: true path: | - ../meshtasticd_${{ steps.version.outputs.short }}* + meshtasticd_${{ steps.version.outputs.short }}* From 7c10caa78b927e31cdd69f550ac3aaafc50c7be1 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 13:31:01 -0500 Subject: [PATCH 13/19] meshtastic-debian: publish with dput (#5753) --- .github/workflows/build_debian_src.yml | 8 ++--- .github/workflows/package_ppa.yml | 50 ++++++++++++++++---------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index 72e4adf3e..dfd8b66fb 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -24,13 +24,13 @@ jobs: - name: Install deps shell: bash + working-directory: meshtasticd run: | sudo apt-get update -y --fix-missing sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:meshtastic/meshtastic-daily -y - sudo apt-get install -y build-essential devscripts equivs \ - platformio python3-protobuf python3-grpcio \ - libyaml-cpp-dev libgpiod-dev libbluetooth-dev libusb-1.0-0-dev libi2c-dev + sudo apt-get install -y build-essential devscripts equivs + sudo mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control - name: Import GPG key uses: crazy-max/ghaction-import-gpg@v6 @@ -54,7 +54,7 @@ jobs: - name: Store binaries as an artifact uses: actions/upload-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-src.zip + name: firmware-debian-${{ steps.version.outputs.long }}-src overwrite: true path: | meshtasticd_${{ steps.version.outputs.short }}* diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml index 1fcc96e11..9d59df472 100644 --- a/.github/workflows/package_ppa.yml +++ b/.github/workflows/package_ppa.yml @@ -24,10 +24,24 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + path: meshtasticd ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} + - name: Install deps + shell: bash + run: | + sudo apt-get update -y --fix-missing + sudo apt-get install -y dput + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + id: gpg + - name: Get release version string + working-directory: meshtasticd run: | echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT @@ -36,27 +50,27 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-src.zip + name: firmware-debian-${{ steps.version.outputs.long }}-src merge-multiple: true - # - name: Install deps - # shell: bash - # run: | - # sudo apt-get update -y --fix-missing - # sudo apt-get install -y dput - - name: Display structure of downloaded files run: ls -R - - name: Publish PPA + - name: Publish with dput if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} - uses: yuezk/publish-ppa-package@v2 - with: - # See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily - repository: "meshtastic/meshtastic-daily" - gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} - tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz" - # Supported Ubuntu versions - series: "plucky oracular noble jammy" - deb_email: "github-actions[bot]@users.noreply.github.com" - deb_fullname: "github-actions[bot]" + run: | + dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.short }}_source.changes + + # - name: Publish PPA + # if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + # uses: yuezk/publish-ppa-package@v2 + # with: + # # See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily + # repository: "meshtastic/meshtastic-daily" + # gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + # gpg_passphrase: "" + # tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz" + # deb_email: "github-actions[bot]@users.noreply.github.com" + # deb_fullname: "github-actions[bot]" + # # Supported Ubuntu versions + # series: "plucky oracular noble jammy" From 031aecac665c4e4ebf28026a9a3196b16037d9e2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 5 Jan 2025 13:14:56 -0600 Subject: [PATCH 14/19] [create-pull-request] automated change (#5755) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/config.pb.cpp | 2 ++ src/mesh/generated/meshtastic/config.pb.h | 26 ++++++++++++++++---- src/mesh/generated/meshtastic/device_ui.pb.h | 16 ++++++++---- src/mesh/generated/meshtastic/localonly.pb.h | 2 +- 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/protobufs b/protobufs index c55f120a9..76f806e1b 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit c55f120a9c1ce90c85e4826907a0b9bcb2d5f5a2 +Subproject commit 76f806e1bb1e2a7b157a14fadd095775f63db5e4 diff --git a/src/mesh/generated/meshtastic/config.pb.cpp b/src/mesh/generated/meshtastic/config.pb.cpp index 6fd2161ae..5512584a7 100644 --- a/src/mesh/generated/meshtastic/config.pb.cpp +++ b/src/mesh/generated/meshtastic/config.pb.cpp @@ -63,6 +63,8 @@ PB_BIND(meshtastic_Config_SessionkeyConfig, meshtastic_Config_SessionkeyConfig, + + diff --git a/src/mesh/generated/meshtastic/config.pb.h b/src/mesh/generated/meshtastic/config.pb.h index 5e105ab17..14aed9dfe 100644 --- a/src/mesh/generated/meshtastic/config.pb.h +++ b/src/mesh/generated/meshtastic/config.pb.h @@ -139,6 +139,14 @@ typedef enum _meshtastic_Config_NetworkConfig_AddressMode { meshtastic_Config_NetworkConfig_AddressMode_STATIC = 1 } meshtastic_Config_NetworkConfig_AddressMode; +/* Available flags auxiliary network protocols */ +typedef enum _meshtastic_Config_NetworkConfig_ProtocolFlags { + /* Do not broadcast packets over any network protocol */ + meshtastic_Config_NetworkConfig_ProtocolFlags_NO_BROADCAST = 0, + /* Enable broadcasting packets via UDP over the local network */ + meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST = 1 +} meshtastic_Config_NetworkConfig_ProtocolFlags; + /* How the GPS coordinates are displayed on the OLED screen. */ typedef enum _meshtastic_Config_DisplayConfig_GpsCoordinateFormat { /* GPS coordinates are displayed in the normal decimal degrees format: @@ -429,6 +437,8 @@ typedef struct _meshtastic_Config_NetworkConfig { meshtastic_Config_NetworkConfig_IpV4Config ipv4_config; /* rsyslog Server and Port */ char rsyslog_server[33]; + /* Flags for enabling/disabling network protocols */ + uint32_t enabled_protocols; } meshtastic_Config_NetworkConfig; /* Display Config */ @@ -613,6 +623,10 @@ extern "C" { #define _meshtastic_Config_NetworkConfig_AddressMode_MAX meshtastic_Config_NetworkConfig_AddressMode_STATIC #define _meshtastic_Config_NetworkConfig_AddressMode_ARRAYSIZE ((meshtastic_Config_NetworkConfig_AddressMode)(meshtastic_Config_NetworkConfig_AddressMode_STATIC+1)) +#define _meshtastic_Config_NetworkConfig_ProtocolFlags_MIN meshtastic_Config_NetworkConfig_ProtocolFlags_NO_BROADCAST +#define _meshtastic_Config_NetworkConfig_ProtocolFlags_MAX meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST +#define _meshtastic_Config_NetworkConfig_ProtocolFlags_ARRAYSIZE ((meshtastic_Config_NetworkConfig_ProtocolFlags)(meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST+1)) + #define _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN meshtastic_Config_DisplayConfig_GpsCoordinateFormat_DEC #define _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MAX meshtastic_Config_DisplayConfig_GpsCoordinateFormat_OSGR #define _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_ARRAYSIZE ((meshtastic_Config_DisplayConfig_GpsCoordinateFormat)(meshtastic_Config_DisplayConfig_GpsCoordinateFormat_OSGR+1)) @@ -674,7 +688,7 @@ extern "C" { #define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0} #define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN} #define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, ""} +#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, "", 0} #define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0} #define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN} #define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0} @@ -685,7 +699,7 @@ extern "C" { #define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0} #define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN} #define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, ""} +#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, "", 0} #define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0} #define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN} #define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0} @@ -739,6 +753,7 @@ extern "C" { #define meshtastic_Config_NetworkConfig_address_mode_tag 7 #define meshtastic_Config_NetworkConfig_ipv4_config_tag 8 #define meshtastic_Config_NetworkConfig_rsyslog_server_tag 9 +#define meshtastic_Config_NetworkConfig_enabled_protocols_tag 10 #define meshtastic_Config_DisplayConfig_screen_on_secs_tag 1 #define meshtastic_Config_DisplayConfig_gps_format_tag 2 #define meshtastic_Config_DisplayConfig_auto_screen_carousel_secs_tag 3 @@ -867,7 +882,8 @@ X(a, STATIC, SINGULAR, STRING, ntp_server, 5) \ X(a, STATIC, SINGULAR, BOOL, eth_enabled, 6) \ X(a, STATIC, SINGULAR, UENUM, address_mode, 7) \ X(a, STATIC, OPTIONAL, MESSAGE, ipv4_config, 8) \ -X(a, STATIC, SINGULAR, STRING, rsyslog_server, 9) +X(a, STATIC, SINGULAR, STRING, rsyslog_server, 9) \ +X(a, STATIC, SINGULAR, UINT32, enabled_protocols, 10) #define meshtastic_Config_NetworkConfig_CALLBACK NULL #define meshtastic_Config_NetworkConfig_DEFAULT NULL #define meshtastic_Config_NetworkConfig_ipv4_config_MSGTYPE meshtastic_Config_NetworkConfig_IpV4Config @@ -972,12 +988,12 @@ extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg; #define meshtastic_Config_DisplayConfig_size 30 #define meshtastic_Config_LoRaConfig_size 85 #define meshtastic_Config_NetworkConfig_IpV4Config_size 20 -#define meshtastic_Config_NetworkConfig_size 196 +#define meshtastic_Config_NetworkConfig_size 202 #define meshtastic_Config_PositionConfig_size 62 #define meshtastic_Config_PowerConfig_size 52 #define meshtastic_Config_SecurityConfig_size 178 #define meshtastic_Config_SessionkeyConfig_size 0 -#define meshtastic_Config_size 199 +#define meshtastic_Config_size 205 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/device_ui.pb.h b/src/mesh/generated/meshtastic/device_ui.pb.h index 0c4f5384e..f090b5b4f 100644 --- a/src/mesh/generated/meshtastic/device_ui.pb.h +++ b/src/mesh/generated/meshtastic/device_ui.pb.h @@ -51,6 +51,8 @@ typedef enum _meshtastic_Language { meshtastic_Language_GREEK = 13, /* Norwegian */ meshtastic_Language_NORWEGIAN = 14, + /* Slovenian */ + meshtastic_Language_SLOVENIAN = 15, /* Simplified Chinese (experimental) */ meshtastic_Language_SIMPLIFIED_CHINESE = 30, /* Traditional Chinese (experimental) */ @@ -71,6 +73,8 @@ typedef struct _meshtastic_NodeFilter { bool position_switch; /* Filter nodes by matching name string */ char node_name[16]; + /* Filter based on channel */ + int8_t channel; } meshtastic_NodeFilter; typedef struct _meshtastic_NodeHighlight { @@ -138,10 +142,10 @@ extern "C" { /* Initializer values for message structs */ #define meshtastic_DeviceUIConfig_init_default {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_default, false, meshtastic_NodeHighlight_init_default, {0, {0}}} -#define meshtastic_NodeFilter_init_default {0, 0, 0, 0, 0, ""} +#define meshtastic_NodeFilter_init_default {0, 0, 0, 0, 0, "", 0} #define meshtastic_NodeHighlight_init_default {0, 0, 0, 0, ""} #define meshtastic_DeviceUIConfig_init_zero {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_zero, false, meshtastic_NodeHighlight_init_zero, {0, {0}}} -#define meshtastic_NodeFilter_init_zero {0, 0, 0, 0, 0, ""} +#define meshtastic_NodeFilter_init_zero {0, 0, 0, 0, 0, "", 0} #define meshtastic_NodeHighlight_init_zero {0, 0, 0, 0, ""} /* Field tags (for use in manual encoding/decoding) */ @@ -151,6 +155,7 @@ extern "C" { #define meshtastic_NodeFilter_hops_away_tag 4 #define meshtastic_NodeFilter_position_switch_tag 5 #define meshtastic_NodeFilter_node_name_tag 6 +#define meshtastic_NodeFilter_channel_tag 7 #define meshtastic_NodeHighlight_chat_switch_tag 1 #define meshtastic_NodeHighlight_position_switch_tag 2 #define meshtastic_NodeHighlight_telemetry_switch_tag 3 @@ -198,7 +203,8 @@ X(a, STATIC, SINGULAR, BOOL, offline_switch, 2) \ X(a, STATIC, SINGULAR, BOOL, public_key_switch, 3) \ X(a, STATIC, SINGULAR, INT32, hops_away, 4) \ X(a, STATIC, SINGULAR, BOOL, position_switch, 5) \ -X(a, STATIC, SINGULAR, STRING, node_name, 6) +X(a, STATIC, SINGULAR, STRING, node_name, 6) \ +X(a, STATIC, SINGULAR, INT32, channel, 7) #define meshtastic_NodeFilter_CALLBACK NULL #define meshtastic_NodeFilter_DEFAULT NULL @@ -222,8 +228,8 @@ extern const pb_msgdesc_t meshtastic_NodeHighlight_msg; /* Maximum encoded size of messages (where known) */ #define MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_MAX_SIZE meshtastic_DeviceUIConfig_size -#define meshtastic_DeviceUIConfig_size 117 -#define meshtastic_NodeFilter_size 36 +#define meshtastic_DeviceUIConfig_size 128 +#define meshtastic_NodeFilter_size 47 #define meshtastic_NodeHighlight_size 25 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/localonly.pb.h b/src/mesh/generated/meshtastic/localonly.pb.h index 30f70ed90..dc0f507c9 100644 --- a/src/mesh/generated/meshtastic/localonly.pb.h +++ b/src/mesh/generated/meshtastic/localonly.pb.h @@ -187,7 +187,7 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg; /* Maximum encoded size of messages (where known) */ #define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size -#define meshtastic_LocalConfig_size 735 +#define meshtastic_LocalConfig_size 741 #define meshtastic_LocalModuleConfig_size 699 #ifdef __cplusplus From d21d6c1301d2a3fd06faf17f0ca411e8d6d83d0f Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 14:24:05 -0500 Subject: [PATCH 15/19] meshtasticd-debian: Build multiple series (#5756) --- .github/workflows/build_debian_src.yml | 9 ++++++++- .github/workflows/main_matrix.yml | 6 ++++++ .github/workflows/package_ppa.yml | 11 +++++++++-- debian/ci_pack_sdeb.sh | 7 +++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index dfd8b66fb..1424774b0 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -5,6 +5,11 @@ on: secrets: PPA_GPG_PRIVATE_KEY: required: true + inputs: + series: + description: 'Ubuntu series to target' + required: true + type: string permissions: contents: write @@ -42,7 +47,9 @@ jobs: working-directory: meshtasticd run: debian/ci_pack_sdeb.sh env: + SERIES: ${{ inputs.series }} GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }} + REVISION: ${{ github.sha }} - name: Get release version string working-directory: meshtasticd @@ -54,7 +61,7 @@ jobs: - name: Store binaries as an artifact uses: actions/upload-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-src + name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src overwrite: true path: | meshtasticd_${{ steps.version.outputs.short }}* diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index f4c5de228..be8cddaf3 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -129,7 +129,13 @@ jobs: board: ${{ matrix.board }} package-ppa: + strategy: + fail-fast: false + matrix: + series: [plucky, oracular, noble, jammy] uses: ./.github/workflows/package_ppa.yml + with: + series: ${{ matrix.series }} secrets: inherit package-raspbian: diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml index 9d59df472..d630e8092 100644 --- a/.github/workflows/package_ppa.yml +++ b/.github/workflows/package_ppa.yml @@ -5,6 +5,11 @@ on: secrets: PPA_GPG_PRIVATE_KEY: required: true + inputs: + series: + description: 'Ubuntu series to target' + required: true + type: string workflow_dispatch: permissions: @@ -15,6 +20,8 @@ jobs: build-debian-src: uses: ./.github/workflows/build_debian_src.yml secrets: inherit + with: + series: ${{ inputs.series }} package-ppa: runs-on: ubuntu-24.04 @@ -50,11 +57,11 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-src + name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src merge-multiple: true - name: Display structure of downloaded files - run: ls -R + run: ls -lah - name: Publish with dput if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 79b484a35..acab2683f 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -1,9 +1,16 @@ #!/usr/bin/bash +export DEBEMAIL="github-actions[bot]@users.noreply.github.com" export PLATFORMIO_LIBDEPS_DIR=pio/libdeps export PLATFORMIO_PACKAGES_DIR=pio/packages # Download libraries to `libdeps` platformio pkg install -e native +package=$(dpkg-parsechangelog --show-field Source) +pkg_version=$(dpkg-parsechangelog --show-field Version | cut -d- -f1) + +dch --create --distribution $SERIES --package $package --newversion $pkg_version-ppa${REVISION::7}~$SERIES \ + "GitHub Actions Automatic packaging for $SERIES" + # Build the source deb debuild -S -k$GPG_KEY_ID From 892e0922ff32eb50211e460079d011cc41c269cc Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 14:37:15 -0500 Subject: [PATCH 16/19] meshtastic-debian: --create requires missing changelog (#5757) --- debian/ci_pack_sdeb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index acab2683f..23490f1bd 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -9,6 +9,7 @@ platformio pkg install -e native package=$(dpkg-parsechangelog --show-field Source) pkg_version=$(dpkg-parsechangelog --show-field Version | cut -d- -f1) +rm -rf debian/changelog dch --create --distribution $SERIES --package $package --newversion $pkg_version-ppa${REVISION::7}~$SERIES \ "GitHub Actions Automatic packaging for $SERIES" From 2f552d15e5b272ac2a0a572fd0b414f7ca47a6b0 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 15:14:47 -0500 Subject: [PATCH 17/19] meshtasticd-debian: Cleanup debian versioning (#5758) --- .github/workflows/build_debian_src.yml | 19 +++++++++---------- .github/workflows/package_ppa.yml | 21 +++------------------ bin/readprops.py | 7 ++++--- debian/ci_pack_sdeb.sh | 5 ++--- 4 files changed, 18 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index 1424774b0..9bb7dfb9c 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -43,25 +43,24 @@ jobs: gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} id: gpg + - name: Get release version string + working-directory: meshtasticd + run: | + echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT + id: version + - name: Fetch libdeps, package debian source working-directory: meshtasticd run: debian/ci_pack_sdeb.sh env: SERIES: ${{ inputs.series }} GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }} - REVISION: ${{ github.sha }} - - - name: Get release version string - working-directory: meshtasticd - run: | - echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT - id: version + PKG_VERSION: ${{ steps.version.outputs.deb }} - name: Store binaries as an artifact uses: actions/upload-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src + name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src overwrite: true path: | - meshtasticd_${{ steps.version.outputs.short }}* + meshtasticd_${{ steps.version.outputs.deb }}* diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml index d630e8092..f716fdff4 100644 --- a/.github/workflows/package_ppa.yml +++ b/.github/workflows/package_ppa.yml @@ -50,14 +50,13 @@ jobs: - name: Get release version string working-directory: meshtasticd run: | - echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT + echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT id: version - name: Download artifacts uses: actions/download-artifact@v4 with: - name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src + name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src merge-multiple: true - name: Display structure of downloaded files @@ -66,18 +65,4 @@ jobs: - name: Publish with dput if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} run: | - dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.short }}_source.changes - - # - name: Publish PPA - # if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} - # uses: yuezk/publish-ppa-package@v2 - # with: - # # See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily - # repository: "meshtastic/meshtastic-daily" - # gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} - # gpg_passphrase: "" - # tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz" - # deb_email: "github-actions[bot]@users.noreply.github.com" - # deb_fullname: "github-actions[bot]" - # # Supported Ubuntu versions - # series: "plucky oracular noble jammy" + dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes diff --git a/bin/readprops.py b/bin/readprops.py index 4b730658a..68516b74c 100644 --- a/bin/readprops.py +++ b/bin/readprops.py @@ -10,6 +10,7 @@ def readProps(prefsLoc): version = dict(config.items("VERSION")) verObj = dict( short="{}.{}.{}".format(version["major"], version["minor"], version["build"]), + deb="unset", long="unset", ) @@ -27,13 +28,13 @@ def readProps(prefsLoc): # if isDirty: # # short for 'dirty', we want to keep our verstrings source for protobuf reasons # suffix = sha + "-d" - verObj["long"] = "{}.{}.{}.{}".format( - version["major"], version["minor"], version["build"], suffix - ) + verObj["long"] = "{}.{}".format(verObj["short"], suffix) + verObj["deb"] = "{}-ppa{}".format(verObj["short"], sha) except: # print("Unexpected error:", sys.exc_info()[0]) # traceback.print_exc() verObj["long"] = verObj["short"] + verObj["deb"] = "{}-ppa".format(verObj["short"]) # print("firmware version " + verStr) return verObj diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 23490f1bd..b8c40decb 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -7,11 +7,10 @@ export PLATFORMIO_PACKAGES_DIR=pio/packages platformio pkg install -e native package=$(dpkg-parsechangelog --show-field Source) -pkg_version=$(dpkg-parsechangelog --show-field Version | cut -d- -f1) rm -rf debian/changelog -dch --create --distribution $SERIES --package $package --newversion $pkg_version-ppa${REVISION::7}~$SERIES \ - "GitHub Actions Automatic packaging for $SERIES" +dch --create --distribution $SERIES --package $package --newversion $PKG_VERSION~$SERIES \ + "GitHub Actions Automatic packaging for $PKG_VERSION~$SERIES" # Build the source deb debuild -S -k$GPG_KEY_ID From 29a7866fc11411f015698f2ef7326572bfbf0a80 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 15:26:56 -0500 Subject: [PATCH 18/19] Use jbennett for gpg email (#5759) --- debian/ci_pack_sdeb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index b8c40decb..72d3a9399 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash -export DEBEMAIL="github-actions[bot]@users.noreply.github.com" +export DEBEMAIL="jbennett@incomsystems.biz" export PLATFORMIO_LIBDEPS_DIR=pio/libdeps export PLATFORMIO_PACKAGES_DIR=pio/packages From fb74e1d182f13d660c0c1ca597b471871ee7eebf Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 5 Jan 2025 16:00:01 -0500 Subject: [PATCH 19/19] meshtasticd-debian: set PLATFORMIO_CORE_DIR (#5760) --- .gitignore | 1 + debian/ci_pack_sdeb.sh | 1 + debian/rules | 1 + debian/source/options | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8998b60d6..d44374919 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .pio +.pio_core pio # ignore vscode IDE settings files diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 72d3a9399..f78738b65 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -2,6 +2,7 @@ export DEBEMAIL="jbennett@incomsystems.biz" export PLATFORMIO_LIBDEPS_DIR=pio/libdeps export PLATFORMIO_PACKAGES_DIR=pio/packages +export PLATFORMIO_CORE_DIR=.pio_core # Download libraries to `libdeps` platformio pkg install -e native diff --git a/debian/rules b/debian/rules index f535ad6eb..ccff53eb3 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,7 @@ # https://docs.platformio.org/en/latest/envvars.html PIO_ENV:=\ + PLATFORMIO_CORE_DIR=.pio_core \ PLATFORMIO_LIBDEPS_DIR=pio/libdeps \ PLATFORMIO_PACKAGES_DIR=pio/packages diff --git a/debian/source/options b/debian/source/options index 0553b485d..94358cb74 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1 +1 @@ -extend-diff-ignore = "\.pio" \ No newline at end of file +extend-diff-ignore = "\.pio\w*?$" \ No newline at end of file