From cc30485cc3ca0bf341d085feb90096e638e3aaa3 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 12:25:02 +0200 Subject: [PATCH 01/28] feat: use rustup package for PPA builds Use rustup from Ubuntu repos instead of curl download to install stable Rust toolchain. Fixes Launchpad build failures where system cargo 1.75.0 doesn't support edition 2024. --- debian/control | 3 +-- debian/rules | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/debian/control b/debian/control index 500a76d..b649ff1 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,7 @@ Section: net Priority: optional Maintainer: Marco Cadetg Build-Depends: debhelper-compat (= 13), - cargo, - rustc, + rustup, libpcap-dev, libelf-dev, elfutils, diff --git a/debian/rules b/debian/rules index 9ad5474..d3dbaec 100755 --- a/debian/rules +++ b/debian/rules @@ -3,8 +3,9 @@ export DH_VERBOSE = 1 export RUSTFLAGS = -C strip=symbols -# Use rustup-installed cargo/rustc instead of system version -export PATH := $(HOME)/.cargo/bin:$(PATH) +# Use rustup-installed toolchain +export CARGO_HOME := $(CURDIR)/debian/.cargo +export RUSTUP_HOME := $(CURDIR)/debian/.rustup # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release @@ -16,14 +17,23 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Use rustup cargo for clean - [ ! -f Cargo.toml ] || cargo clean || true + # Clean cargo build artifacts + [ ! -f Cargo.toml ] || [ ! -d $(CARGO_HOME) ] || $(CARGO_HOME)/bin/cargo clean || true + # Clean rustup installation + rm -rf $(CARGO_HOME) $(RUSTUP_HOME) + +override_dh_auto_configure: + # Install stable Rust toolchain using rustup (from package) + rustup-init -y --default-toolchain stable --profile minimal + @echo "Rust version:" + $(CARGO_HOME)/bin/cargo --version + $(CARGO_HOME)/bin/rustc --version override_dh_auto_build: # Create asset directory for build.rs mkdir -p $(RUSTNET_ASSET_DIR) - # Build with rustup cargo (supports edition 2024) - cargo build --release --verbose + # Build with rustup-installed cargo (supports edition 2024) + $(CARGO_HOME)/bin/cargo build --release --verbose override_dh_auto_install: # Install binary From b02d1fcdebfc464004f2dd197ab8c895d1c7e244 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 12:39:16 +0200 Subject: [PATCH 02/28] feat: add build validation before PPA upload Test package compilation in CI using rustup before uploading to Launchpad to catch build issues early. --- .github/workflows/ppa-release.yml | 29 ++++++++++++++ scripts/test-deb-build.sh | 66 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100755 scripts/test-deb-build.sh diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index c5ec188..8772c76 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -121,6 +121,35 @@ jobs: cd "${PACKAGE_NAME}-${VERSION}" debuild -S -sa -d -us -uc + - name: Test build locally + run: | + VERSION="${{ steps.version.outputs.version }}" + PACKAGE_NAME="rustnet-monitor" + + cd build-ppa + + # Extract source package + dpkg-source -x ${PACKAGE_NAME}_${VERSION}-*.dsc test-build + cd test-build + + # Install rustup (simulating Launchpad environment) + sudo apt-get install -y rustup + + # Run the configure step to test rustup installation + export CARGO_HOME=$(pwd)/debian/.cargo + export RUSTUP_HOME=$(pwd)/debian/.rustup + rustup-init -y --default-toolchain stable --profile minimal + + # Verify Rust version + $CARGO_HOME/bin/cargo --version + $CARGO_HOME/bin/rustc --version + + # Test compilation + echo "Testing Rust compilation..." + $CARGO_HOME/bin/cargo build --release --verbose + + echo "✅ Build test passed!" + - name: Sign and upload env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} diff --git a/scripts/test-deb-build.sh b/scripts/test-deb-build.sh new file mode 100755 index 0000000..80392ab --- /dev/null +++ b/scripts/test-deb-build.sh @@ -0,0 +1,66 @@ +#!/bin/bash +set -e + +UBUNTU_RELEASE=${1:-noble} +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_DIR="$(dirname "$SCRIPT_DIR")" + +echo "Testing Debian package build for Ubuntu $UBUNTU_RELEASE" +echo "==================================================" + +# Build the Docker container +docker build -t rustnet-deb-test:$UBUNTU_RELEASE -f - "$PROJECT_DIR" < Date: Mon, 13 Oct 2025 12:42:03 +0200 Subject: [PATCH 03/28] fix: add rustup cargo to PATH in debian/rules Ensure rustup-installed cargo is used instead of system cargo by prepending CARGO_HOME/bin to PATH. --- debian/rules | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index d3dbaec..76f904c 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,7 @@ export RUSTFLAGS = -C strip=symbols # Use rustup-installed toolchain export CARGO_HOME := $(CURDIR)/debian/.cargo export RUSTUP_HOME := $(CURDIR)/debian/.rustup +export PATH := $(CARGO_HOME)/bin:$(PATH) # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release @@ -17,23 +18,27 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Clean cargo build artifacts - [ ! -f Cargo.toml ] || [ ! -d $(CARGO_HOME) ] || $(CARGO_HOME)/bin/cargo clean || true + # Clean cargo build artifacts if rustup is installed + if [ -x "$(CARGO_HOME)/bin/cargo" ]; then \ + cargo clean || true; \ + fi # Clean rustup installation rm -rf $(CARGO_HOME) $(RUSTUP_HOME) + # Clean target directory + rm -rf target override_dh_auto_configure: # Install stable Rust toolchain using rustup (from package) rustup-init -y --default-toolchain stable --profile minimal @echo "Rust version:" - $(CARGO_HOME)/bin/cargo --version - $(CARGO_HOME)/bin/rustc --version + cargo --version + rustc --version override_dh_auto_build: # Create asset directory for build.rs mkdir -p $(RUSTNET_ASSET_DIR) # Build with rustup-installed cargo (supports edition 2024) - $(CARGO_HOME)/bin/cargo build --release --verbose + cargo build --release --verbose override_dh_auto_install: # Install binary From 35ff55dcb44abc9f7875e79b124cc8c1d48f2ba2 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 12:59:22 +0200 Subject: [PATCH 04/28] feat: support only Ubuntu 24.04 (Noble) and later The rustup package is only available in Noble and later releases, so we're dropping support for Jammy (22.04). --- .github/workflows/ppa-release.yml | 37 +++---------------------------- debian/README.md | 4 ++-- debian/changelog | 4 ++-- 3 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 8772c76..fd97a29 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -10,7 +10,7 @@ on: type: choice options: - noble # 24.04 LTS - - jammy # 22.04 LTS + - oracular # 24.10 push: tags: - 'v*' @@ -22,12 +22,11 @@ env: jobs: build-and-upload: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: ubuntu_release: - noble - - jammy steps: - name: Checkout code @@ -68,37 +67,7 @@ jobs: run: | VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT - - # Set debian revision - if [ "${{ matrix.ubuntu_release }}" = "noble" ]; then - DEBIAN_REVISION="1ubuntu1" - else - DEBIAN_REVISION="1ubuntu1~${{ matrix.ubuntu_release }}1" - fi - echo "debian_revision=$DEBIAN_REVISION" >> $GITHUB_OUTPUT - - - name: Update debian/changelog - run: | - cd debian - - # Update distribution - sed -i "s/) noble;/) ${{ matrix.ubuntu_release }};/" changelog - - # For jammy, add backport entry - if [ "${{ matrix.ubuntu_release }}" = "jammy" ]; then - VERSION="${{ steps.version.outputs.version }}" - REVISION="${{ steps.version.outputs.debian_revision }}" - TIMESTAMP=$(date -R) - - echo "rustnet-monitor ($VERSION-$REVISION) jammy; urgency=medium" > changelog.new - echo "" >> changelog.new - echo " * Backport to Ubuntu 22.04 Jammy" >> changelog.new - echo "" >> changelog.new - echo " -- Marco Cadetg $TIMESTAMP" >> changelog.new - echo "" >> changelog.new - cat changelog >> changelog.new - mv changelog.new changelog - fi + echo "debian_revision=1ubuntu1" >> $GITHUB_OUTPUT - name: Build source package run: | diff --git a/debian/README.md b/debian/README.md index 04fa81b..de4b79a 100644 --- a/debian/README.md +++ b/debian/README.md @@ -11,7 +11,7 @@ git tag v0.15.0 git push origin v0.15.0 ``` -This automatically builds and uploads to both Ubuntu 22.04 (Jammy) and 24.04 (Noble). +This automatically builds and uploads to Ubuntu 24.04 (Noble) and later. ## GitHub Secrets Setup @@ -49,7 +49,7 @@ sudo apt install rustnet - **Binary**: rustnet - **Maintainer**: Marco Cadetg - **PPA**: https://launchpad.net/~domcyrus/+archive/ubuntu/rustnet -- **Supported**: Ubuntu 22.04 LTS, 24.04 LTS +- **Supported**: Ubuntu 24.04 LTS (Noble) and later - **Architectures**: amd64, arm64, armhf ## Workflow diff --git a/debian/changelog b/debian/changelog index bfeb1a5..62f4193 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,7 @@ rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium * Desktop integration with .desktop file and icon * Automatic capability setting for non-root packet capture - -- Marco Cadetg Mon, 13 Oct 2025 12:00:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 12:00:00 +0000 rustnet-monitor (0.14.0-1) unstable; urgency=medium @@ -20,4 +20,4 @@ rustnet-monitor (0.14.0-1) unstable; urgency=medium * Fixed high CPU usage on Linux * Bundled vmlinux.h files to eliminate network dependency during builds - -- Marco Cadetg Sat, 12 Oct 2025 00:00:00 +0000 + -- Marco Cadetg Sat, 12 Oct 2025 00:00:00 +0000 From 86ec61189e5f90fb7334dd851d7f5affbf7ec753 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 14:51:02 +0200 Subject: [PATCH 05/28] fix: use cargo/rustc from rustup package directly Ubuntu rustup package provides cargo and rustc executables directly, no need to run rustup-init. Simplified build configuration. --- .github/workflows/ppa-release.yml | 13 ++++--------- debian/rules | 16 +++------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index fd97a29..2fdfe26 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -101,21 +101,16 @@ jobs: dpkg-source -x ${PACKAGE_NAME}_${VERSION}-*.dsc test-build cd test-build - # Install rustup (simulating Launchpad environment) + # Install rustup package (provides cargo/rustc directly) sudo apt-get install -y rustup - # Run the configure step to test rustup installation - export CARGO_HOME=$(pwd)/debian/.cargo - export RUSTUP_HOME=$(pwd)/debian/.rustup - rustup-init -y --default-toolchain stable --profile minimal - # Verify Rust version - $CARGO_HOME/bin/cargo --version - $CARGO_HOME/bin/rustc --version + cargo --version + rustc --version # Test compilation echo "Testing Rust compilation..." - $CARGO_HOME/bin/cargo build --release --verbose + cargo build --release --verbose echo "✅ Build test passed!" diff --git a/debian/rules b/debian/rules index 76f904c..698253f 100755 --- a/debian/rules +++ b/debian/rules @@ -3,11 +3,6 @@ export DH_VERBOSE = 1 export RUSTFLAGS = -C strip=symbols -# Use rustup-installed toolchain -export CARGO_HOME := $(CURDIR)/debian/.cargo -export RUSTUP_HOME := $(CURDIR)/debian/.rustup -export PATH := $(CARGO_HOME)/bin:$(PATH) - # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release @@ -18,18 +13,13 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Clean cargo build artifacts if rustup is installed - if [ -x "$(CARGO_HOME)/bin/cargo" ]; then \ - cargo clean || true; \ - fi - # Clean rustup installation - rm -rf $(CARGO_HOME) $(RUSTUP_HOME) + # Clean cargo build artifacts + cargo clean || true # Clean target directory rm -rf target override_dh_auto_configure: - # Install stable Rust toolchain using rustup (from package) - rustup-init -y --default-toolchain stable --profile minimal + # Verify Rust toolchain from rustup package @echo "Rust version:" cargo --version rustc --version From 17a4da28e98da86d6c15f963be7978d248dd05e6 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 15:25:02 +0200 Subject: [PATCH 06/28] fix: use rustup to install stable Rust toolchain Ubuntu rustup package provides cargo 1.75 by default, which doesn't support edition 2024. Use 'rustup default stable' to install the latest stable toolchain that supports edition 2024. --- .github/workflows/ppa-release.yml | 10 +++++++++- debian/rules | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 2fdfe26..afa09e6 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -101,9 +101,17 @@ jobs: dpkg-source -x ${PACKAGE_NAME}_${VERSION}-*.dsc test-build cd test-build - # Install rustup package (provides cargo/rustc directly) + # Install rustup package sudo apt-get install -y rustup + # Setup environment like debian/rules does + export RUSTUP_HOME=$(pwd)/debian/.rustup + export CARGO_HOME=$(pwd)/debian/.cargo + export PATH=$CARGO_HOME/bin:$PATH + + # Install stable toolchain using rustup + rustup default stable + # Verify Rust version cargo --version rustc --version diff --git a/debian/rules b/debian/rules index 698253f..2eb4c8e 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,11 @@ export DH_VERBOSE = 1 export RUSTFLAGS = -C strip=symbols +# Use rustup-managed Rust toolchain +export RUSTUP_HOME := $(CURDIR)/debian/.rustup +export CARGO_HOME := $(CURDIR)/debian/.cargo +export PATH := $(CARGO_HOME)/bin:$(PATH) + # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release @@ -13,13 +18,18 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Clean cargo build artifacts - cargo clean || true + # Clean cargo build artifacts if installed + if [ -x "$(CARGO_HOME)/bin/cargo" ]; then \ + cargo clean || true; \ + fi + # Clean rustup installation + rm -rf $(CARGO_HOME) $(RUSTUP_HOME) # Clean target directory rm -rf target override_dh_auto_configure: - # Verify Rust toolchain from rustup package + # Use rustup to install stable toolchain (supports edition 2024) + rustup default stable @echo "Rust version:" cargo --version rustc --version From 3ca5ed3e80fadfb67420f1038779c931aade1ef8 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 15:42:57 +0200 Subject: [PATCH 07/28] debug: add verbose rustup output to diagnose issue --- debian/rules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/rules b/debian/rules index 2eb4c8e..fbea841 100755 --- a/debian/rules +++ b/debian/rules @@ -28,8 +28,14 @@ override_dh_auto_clean: rm -rf target override_dh_auto_configure: + # Check rustup availability + which rustup + rustup --version # Use rustup to install stable toolchain (supports edition 2024) + rustup toolchain install stable rustup default stable + rustup show + # Verify Rust version @echo "Rust version:" cargo --version rustc --version From d192b2f5fd51788172887bc2f157e5b60f5abb93 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 16:57:00 +0200 Subject: [PATCH 08/28] feat: target Ubuntu 25.10 Questing with Rust 1.85 Switch from Noble to Questing (25.10) to support Rust edition 2024. Use versioned cargo-1.85 and rustc-1.85 packages from Ubuntu repos. Will migrate to 26.04 LTS when available. --- .github/workflows/ppa-release.yml | 7 +++---- debian/README.md | 2 +- debian/changelog | 3 ++- debian/control | 3 ++- debian/rules | 33 +++++++++++-------------------- 5 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index afa09e6..954f4b8 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -6,11 +6,10 @@ on: ubuntu_release: description: 'Ubuntu release codename' required: true - default: 'noble' + default: 'questing' type: choice options: - - noble # 24.04 LTS - - oracular # 24.10 + - questing # 25.04 (dev release with Rust 1.85) push: tags: - 'v*' @@ -26,7 +25,7 @@ jobs: strategy: matrix: ubuntu_release: - - noble + - questing steps: - name: Checkout code diff --git a/debian/README.md b/debian/README.md index de4b79a..c99488a 100644 --- a/debian/README.md +++ b/debian/README.md @@ -11,7 +11,7 @@ git tag v0.15.0 git push origin v0.15.0 ``` -This automatically builds and uploads to Ubuntu 24.04 (Noble) and later. +This automatically builds and uploads to Ubuntu 25.04 (Questing) which has Rust 1.85 for edition 2024 support. ## GitHub Secrets Setup diff --git a/debian/changelog b/debian/changelog index 62f4193..2e64260 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium +rustnet-monitor (0.14.0-1ubuntu1) questing; urgency=medium * Initial Ubuntu PPA release * eBPF enabled by default on Linux with automatic procfs fallback @@ -7,6 +7,7 @@ rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium * Multi-architecture support (amd64, arm64, armhf) * Desktop integration with .desktop file and icon * Automatic capability setting for non-root packet capture + * Targets Ubuntu Questing (25.04) with Rust 1.85 for edition 2024 support -- Marco Cadetg Mon, 13 Oct 2025 12:00:00 +0000 diff --git a/debian/control b/debian/control index b649ff1..7e6046b 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,8 @@ Section: net Priority: optional Maintainer: Marco Cadetg Build-Depends: debhelper-compat (= 13), - rustup, + cargo-1.85, + rustc-1.85, libpcap-dev, libelf-dev, elfutils, diff --git a/debian/rules b/debian/rules index fbea841..6bf667d 100755 --- a/debian/rules +++ b/debian/rules @@ -3,10 +3,10 @@ export DH_VERBOSE = 1 export RUSTFLAGS = -C strip=symbols -# Use rustup-managed Rust toolchain -export RUSTUP_HOME := $(CURDIR)/debian/.rustup -export CARGO_HOME := $(CURDIR)/debian/.cargo -export PATH := $(CARGO_HOME)/bin:$(PATH) +# Use versioned Rust 1.85 from Ubuntu Questing +export CARGO = /usr/bin/cargo-1.85 +export RUSTC = /usr/bin/rustc-1.85 +export RUSTDOC = /usr/bin/rustdoc-1.85 # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release @@ -18,33 +18,22 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Clean cargo build artifacts if installed - if [ -x "$(CARGO_HOME)/bin/cargo" ]; then \ - cargo clean || true; \ - fi - # Clean rustup installation - rm -rf $(CARGO_HOME) $(RUSTUP_HOME) + # Clean cargo build artifacts + $(CARGO) clean || true # Clean target directory rm -rf target override_dh_auto_configure: - # Check rustup availability - which rustup - rustup --version - # Use rustup to install stable toolchain (supports edition 2024) - rustup toolchain install stable - rustup default stable - rustup show - # Verify Rust version + # Verify Rust 1.85 version @echo "Rust version:" - cargo --version - rustc --version + $(CARGO) --version + $(RUSTC) --version override_dh_auto_build: # Create asset directory for build.rs mkdir -p $(RUSTNET_ASSET_DIR) - # Build with rustup-installed cargo (supports edition 2024) - cargo build --release --verbose + # Build with cargo-1.85 (supports edition 2024) + $(CARGO) build --release --verbose override_dh_auto_install: # Install binary From 2b9fcfc77000f92a62b3dd4d090bd910411a243b Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 17:52:09 +0200 Subject: [PATCH 09/28] chore: bump version to 0.14.0-2ubuntu1 for Questing Previous upload was rejected due to file conflict. --- debian/changelog | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2e64260..6224fb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,11 @@ -rustnet-monitor (0.14.0-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium + + * Target Ubuntu Questing (25.10) with Rust 1.85 for edition 2024 support + * Use versioned cargo-1.85 and rustc-1.85 packages + + -- Marco Cadetg Mon, 13 Oct 2025 17:45:00 +0000 + +rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium * Initial Ubuntu PPA release * eBPF enabled by default on Linux with automatic procfs fallback @@ -7,7 +14,6 @@ rustnet-monitor (0.14.0-1ubuntu1) questing; urgency=medium * Multi-architecture support (amd64, arm64, armhf) * Desktop integration with .desktop file and icon * Automatic capability setting for non-root packet capture - * Targets Ubuntu Questing (25.04) with Rust 1.85 for edition 2024 support -- Marco Cadetg Mon, 13 Oct 2025 12:00:00 +0000 From 17c4ec0e94abe3a0bc29604b7ed9a6164d819dfa Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 18:01:46 +0200 Subject: [PATCH 10/28] feat: use Rust 1.88 from Questing Update to cargo-1.88 and rustc-1.88 to match rust-version in Cargo.toml. --- debian/changelog | 6 +++--- debian/control | 4 ++-- debian/rules | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6224fb2..516d0d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium - * Target Ubuntu Questing (25.10) with Rust 1.85 for edition 2024 support - * Use versioned cargo-1.85 and rustc-1.85 packages + * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support + * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 17:45:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 17:55:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium diff --git a/debian/control b/debian/control index 7e6046b..177f876 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: net Priority: optional Maintainer: Marco Cadetg Build-Depends: debhelper-compat (= 13), - cargo-1.85, - rustc-1.85, + cargo-1.88, + rustc-1.88, libpcap-dev, libelf-dev, elfutils, diff --git a/debian/rules b/debian/rules index 6bf667d..ea5fb0f 100755 --- a/debian/rules +++ b/debian/rules @@ -3,10 +3,10 @@ export DH_VERBOSE = 1 export RUSTFLAGS = -C strip=symbols -# Use versioned Rust 1.85 from Ubuntu Questing -export CARGO = /usr/bin/cargo-1.85 -export RUSTC = /usr/bin/rustc-1.85 -export RUSTDOC = /usr/bin/rustdoc-1.85 +# Use versioned Rust 1.88 from Ubuntu Questing +export CARGO = /usr/bin/cargo-1.88 +export RUSTC = /usr/bin/rustc-1.88 +export RUSTDOC = /usr/bin/rustdoc-1.88 # eBPF is enabled by default, no need for explicit feature flag export CARGO_BUILD_FLAGS = --release From eb125c32b5581f57accc4fa357e1e967d5af8b92 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 18:15:28 +0200 Subject: [PATCH 11/28] fix: extract Debian revision from changelog Parse debian/changelog to get actual revision instead of hardcoding. --- .github/workflows/ppa-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 954f4b8..421d795 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -6,10 +6,11 @@ on: ubuntu_release: description: 'Ubuntu release codename' required: true - default: 'questing' + default: 'oracular' type: choice options: - - questing # 25.04 (dev release with Rust 1.85) + - oracular # 24.10 with Rust 1.81 + - noble # 24.04 LTS with Rust 1.82 push: tags: - 'v*' @@ -66,7 +67,10 @@ jobs: run: | VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "debian_revision=1ubuntu1" >> $GITHUB_OUTPUT + + # Extract Debian revision from changelog + DEBIAN_REVISION=$(head -1 debian/changelog | sed 's/.*(\(.*\)-\(.*\)).*/\2/') + echo "debian_revision=$DEBIAN_REVISION" >> $GITHUB_OUTPUT - name: Build source package run: | From 5867744e92f9290aba492e2a8fa1261d700171a8 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 18:32:08 +0200 Subject: [PATCH 12/28] fix: use debian tag for reproducible orig tarballs --- .github/workflows/ppa-release.yml | 23 ++++++++++++++++++++--- debian/changelog | 5 +++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 421d795..5e70dec 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -80,9 +80,23 @@ jobs: # Create build directory mkdir -p build-ppa - # Create orig tarball - git archive --format=tar.gz --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD \ - > "build-ppa/${PACKAGE_NAME}_${VERSION}.orig.tar.gz" + # Create orig tarball from debian/ tag for reproducibility + # This ensures the same upstream version always generates identical tarballs + ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" + DEBIAN_TAG="debian/${VERSION}" + + if git rev-parse "$DEBIAN_TAG" >/dev/null 2>&1; then + echo "✓ Found debian tag: $DEBIAN_TAG" + git archive --format=tar.gz --prefix="${PACKAGE_NAME}-${VERSION}/" "$DEBIAN_TAG" \ + > "build-ppa/${ORIG_TARBALL}" + echo "✓ Created orig tarball from $DEBIAN_TAG" + else + echo "⚠ Warning: debian tag $DEBIAN_TAG not found, using HEAD" + echo " For reproducible builds, create the tag with: git tag $DEBIAN_TAG" + git archive --format=tar.gz --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD \ + > "build-ppa/${ORIG_TARBALL}" + echo "✓ Created orig tarball from HEAD" + fi # Extract and add debian directory cd build-ppa @@ -91,6 +105,9 @@ jobs: # Build source package cd "${PACKAGE_NAME}-${VERSION}" + + # Always use -sa to include orig tarball + # Launchpad will reuse existing file if hash matches debuild -S -sa -d -us -uc - name: Test build locally diff --git a/debian/changelog b/debian/changelog index 516d0d2..6b0769a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ -rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0-3ubuntu1) questing; urgency=medium + * Use debian/ tag for reproducible orig tarballs * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 17:55:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 19:00:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium From 4a15628a12b75f523dff1f53b80bc3fad9c99c8c Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 18:58:34 +0200 Subject: [PATCH 13/28] feat: support tarball suffix for PPA reuploads --- .github/workflows/ppa-release.yml | 17 ++++++++++++++++- debian/changelog | 5 +++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 5e70dec..5a652f8 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -11,6 +11,11 @@ on: options: - oracular # 24.10 with Rust 1.81 - noble # 24.04 LTS with Rust 1.82 + tarball_suffix: + description: 'Tarball suffix (e.g., ds1, ds2) - leave empty for new releases' + required: false + default: '' + type: string push: tags: - 'v*' @@ -66,7 +71,17 @@ jobs: id: version run: | VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') - echo "version=$VERSION" >> $GITHUB_OUTPUT + + # Add tarball suffix if provided (e.g., +ds1, +ds2) + TARBALL_SUFFIX="${{ github.event.inputs.tarball_suffix }}" + if [ -n "$TARBALL_SUFFIX" ]; then + TARBALL_VERSION="${VERSION}+${TARBALL_SUFFIX}" + echo "version=$TARBALL_VERSION" >> $GITHUB_OUTPUT + echo "Using tarball version: $TARBALL_VERSION" + else + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Using version: $VERSION" + fi # Extract Debian revision from changelog DEBIAN_REVISION=$(head -1 debian/changelog | sed 's/.*(\(.*\)-\(.*\)).*/\2/') diff --git a/debian/changelog b/debian/changelog index 6b0769a..c4ae75e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,11 @@ -rustnet-monitor (0.14.0-3ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds1-1ubuntu1) questing; urgency=medium + * Repackaged tarball with +ds1 suffix * Use debian/ tag for reproducible orig tarballs * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 19:00:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 19:20:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium From 022f2a2a58520eed865756f9aa643b6f5f34c87a Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 19:26:16 +0200 Subject: [PATCH 14/28] feat: vendor Rust dependencies for offline builds --- .github/workflows/ppa-release.yml | 69 ++++++++++++++++--------------- debian/changelog | 7 ++-- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 5a652f8..7fd6d0b 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -87,6 +87,21 @@ jobs: DEBIAN_REVISION=$(head -1 debian/changelog | sed 's/.*(\(.*\)-\(.*\)).*/\2/') echo "debian_revision=$DEBIAN_REVISION" >> $GITHUB_OUTPUT + - name: Vendor dependencies + run: | + echo "Vendoring Rust dependencies..." + cargo vendor vendor + + # Create cargo config to use vendored deps + mkdir -p .cargo + cat > .cargo/config.toml << 'EOF' + [source.crates-io] + replace-with = "vendored-sources" + + [source.vendored-sources] + directory = "vendor" + EOF + - name: Build source package run: | VERSION="${{ steps.version.outputs.version }}" @@ -95,27 +110,23 @@ jobs: # Create build directory mkdir -p build-ppa - # Create orig tarball from debian/ tag for reproducibility - # This ensures the same upstream version always generates identical tarballs + # Create orig tarball with vendored dependencies + # Include vendor/ and .cargo/ directories for offline builds ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" - DEBIAN_TAG="debian/${VERSION}" - if git rev-parse "$DEBIAN_TAG" >/dev/null 2>&1; then - echo "✓ Found debian tag: $DEBIAN_TAG" - git archive --format=tar.gz --prefix="${PACKAGE_NAME}-${VERSION}/" "$DEBIAN_TAG" \ - > "build-ppa/${ORIG_TARBALL}" - echo "✓ Created orig tarball from $DEBIAN_TAG" - else - echo "⚠ Warning: debian tag $DEBIAN_TAG not found, using HEAD" - echo " For reproducible builds, create the tag with: git tag $DEBIAN_TAG" - git archive --format=tar.gz --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD \ - > "build-ppa/${ORIG_TARBALL}" - echo "✓ Created orig tarball from HEAD" - fi + echo "Creating tarball with vendored dependencies..." + tar -czf "build-ppa/${ORIG_TARBALL}" \ + --transform="s,^,${PACKAGE_NAME}-${VERSION}/," \ + --exclude='.git' \ + --exclude='target' \ + --exclude='build-ppa' \ + --exclude='.github' \ + --exclude='scripts' \ + . # Extract and add debian directory cd build-ppa - tar -xzf "${PACKAGE_NAME}_${VERSION}.orig.tar.gz" + tar -xzf "${ORIG_TARBALL}" cp -r "$GITHUB_WORKSPACE/debian" "${PACKAGE_NAME}-${VERSION}/" # Build source package @@ -136,24 +147,16 @@ jobs: dpkg-source -x ${PACKAGE_NAME}_${VERSION}-*.dsc test-build cd test-build - # Install rustup package - sudo apt-get install -y rustup - - # Setup environment like debian/rules does - export RUSTUP_HOME=$(pwd)/debian/.rustup - export CARGO_HOME=$(pwd)/debian/.cargo - export PATH=$CARGO_HOME/bin:$PATH - - # Install stable toolchain using rustup - rustup default stable - - # Verify Rust version - cargo --version - rustc --version + # Verify vendored dependencies exist + if [ ! -d "vendor" ]; then + echo "❌ Error: vendor/ directory not found in tarball!" + exit 1 + fi + echo "✓ Found vendored dependencies ($(du -sh vendor | cut -f1))" - # Test compilation - echo "Testing Rust compilation..." - cargo build --release --verbose + # Test compilation with vendored deps + echo "Testing Rust compilation with vendored dependencies..." + cargo build --release --verbose --offline echo "✅ Build test passed!" diff --git a/debian/changelog b/debian/changelog index c4ae75e..6a0f156 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,10 @@ -rustnet-monitor (0.14.0+ds1-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds2-1ubuntu1) questing; urgency=medium - * Repackaged tarball with +ds1 suffix - * Use debian/ tag for reproducible orig tarballs + * Include vendored Rust dependencies for offline builds * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 19:20:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 19:35:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium From 83b926d9961ef8e170bb2b32486be7762bc90608 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:19:25 +0200 Subject: [PATCH 15/28] feat: use release tags instead of debian tags, clean vendor .orig files --- .github/workflows/ppa-release.yml | 56 ++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 7fd6d0b..a5165ab 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -87,11 +87,33 @@ jobs: DEBIAN_REVISION=$(head -1 debian/changelog | sed 's/.*(\(.*\)-\(.*\)).*/\2/') echo "debian_revision=$DEBIAN_REVISION" >> $GITHUB_OUTPUT + - name: Update changelog + run: | + VERSION="${{ steps.version.outputs.version }}" + CURRENT_VERSION=$(head -1 debian/changelog | sed 's/.*(\(.*\)).*/\1/') + + if [ "$VERSION-1ubuntu1" != "$CURRENT_VERSION" ]; then + echo "Updating changelog from $CURRENT_VERSION to $VERSION-1ubuntu1" + + # Create new changelog entry + DEBFULLNAME="${{ env.DEBFULLNAME }}" DEBEMAIL="${{ env.DEBEMAIL }}" \ + dch --newversion "$VERSION-1ubuntu1" \ + --distribution "questing" \ + "New upstream release $VERSION" + + echo "✓ Changelog updated" + else + echo "✓ Changelog already at correct version" + fi + - name: Vendor dependencies run: | echo "Vendoring Rust dependencies..." cargo vendor vendor + # Clean up .orig backup files created by cargo vendor + find vendor -name "*.orig" -delete + # Create cargo config to use vendored deps mkdir -p .cargo cat > .cargo/config.toml << 'EOF' @@ -105,28 +127,36 @@ jobs: - name: Build source package run: | VERSION="${{ steps.version.outputs.version }}" + BASE_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') PACKAGE_NAME="rustnet-monitor" # Create build directory mkdir -p build-ppa - # Create orig tarball with vendored dependencies - # Include vendor/ and .cargo/ directories for offline builds + # Create orig tarball with vendored dependencies from release tag + # Use vX.Y.Z tag if it exists, otherwise use HEAD ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" + RELEASE_TAG="v${BASE_VERSION}" + if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1; then + echo "✓ Found release tag: $RELEASE_TAG" + git archive --format=tar --prefix="${PACKAGE_NAME}-${VERSION}/" "$RELEASE_TAG" | tar -x -C build-ppa + else + echo "⚠ Release tag $RELEASE_TAG not found, using HEAD" + git archive --format=tar --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD | tar -x -C build-ppa + fi + + # Copy vendored dependencies into extracted archive + echo "Copying vendored dependencies..." + cp -r vendor build-ppa/${PACKAGE_NAME}-${VERSION}/ + cp -r .cargo build-ppa/${PACKAGE_NAME}-${VERSION}/ + + # Create tarball with vendored deps echo "Creating tarball with vendored dependencies..." - tar -czf "build-ppa/${ORIG_TARBALL}" \ - --transform="s,^,${PACKAGE_NAME}-${VERSION}/," \ - --exclude='.git' \ - --exclude='target' \ - --exclude='build-ppa' \ - --exclude='.github' \ - --exclude='scripts' \ - . - - # Extract and add debian directory cd build-ppa - tar -xzf "${ORIG_TARBALL}" + tar -czf "${ORIG_TARBALL}" "${PACKAGE_NAME}-${VERSION}" + + # Add debian directory cp -r "$GITHUB_WORKSPACE/debian" "${PACKAGE_NAME}-${VERSION}/" # Build source package From 3809c92923c2826b5a26afe84aba831091726d3b Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:24:42 +0200 Subject: [PATCH 16/28] fix: vendor dependencies after git archive extraction --- .github/workflows/ppa-release.yml | 47 +++++++++++++------------------ 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index a5165ab..68c22fa 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -106,24 +106,6 @@ jobs: echo "✓ Changelog already at correct version" fi - - name: Vendor dependencies - run: | - echo "Vendoring Rust dependencies..." - cargo vendor vendor - - # Clean up .orig backup files created by cargo vendor - find vendor -name "*.orig" -delete - - # Create cargo config to use vendored deps - mkdir -p .cargo - cat > .cargo/config.toml << 'EOF' - [source.crates-io] - replace-with = "vendored-sources" - - [source.vendored-sources] - directory = "vendor" - EOF - - name: Build source package run: | VERSION="${{ steps.version.outputs.version }}" @@ -133,11 +115,8 @@ jobs: # Create build directory mkdir -p build-ppa - # Create orig tarball with vendored dependencies from release tag - # Use vX.Y.Z tag if it exists, otherwise use HEAD - ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" + # Extract source from release tag RELEASE_TAG="v${BASE_VERSION}" - if git rev-parse "$RELEASE_TAG" >/dev/null 2>&1; then echo "✓ Found release tag: $RELEASE_TAG" git archive --format=tar --prefix="${PACKAGE_NAME}-${VERSION}/" "$RELEASE_TAG" | tar -x -C build-ppa @@ -146,14 +125,28 @@ jobs: git archive --format=tar --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD | tar -x -C build-ppa fi - # Copy vendored dependencies into extracted archive - echo "Copying vendored dependencies..." - cp -r vendor build-ppa/${PACKAGE_NAME}-${VERSION}/ - cp -r .cargo build-ppa/${PACKAGE_NAME}-${VERSION}/ + # Vendor dependencies inside the extracted source + echo "Vendoring Rust dependencies..." + cd build-ppa/${PACKAGE_NAME}-${VERSION} + cargo vendor vendor + + # Clean up .orig backup files created by cargo vendor + find vendor -name "*.orig" -delete + + # Create cargo config to use vendored deps + mkdir -p .cargo + cat > .cargo/config.toml << 'EOF' + [source.crates-io] + replace-with = "vendored-sources" + + [source.vendored-sources] + directory = "vendor" + EOF # Create tarball with vendored deps echo "Creating tarball with vendored dependencies..." - cd build-ppa + cd .. + ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" tar -czf "${ORIG_TARBALL}" "${PACKAGE_NAME}-${VERSION}" # Add debian directory From 203a71f8e0712cdf295b9419eb09c970431e973d Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:35:49 +0200 Subject: [PATCH 17/28] fix: remove prebuilt binaries and create cargo config after cleanup --- .github/workflows/ppa-release.yml | 7 ++++++- debian/source/options | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 debian/source/options diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 68c22fa..540d567 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -128,10 +128,15 @@ jobs: # Vendor dependencies inside the extracted source echo "Vendoring Rust dependencies..." cd build-ppa/${PACKAGE_NAME}-${VERSION} + cargo vendor vendor - # Clean up .orig backup files created by cargo vendor + # Remove prebuilt binaries and backup files that Debian doesn't like + echo "Cleaning vendor directory..." find vendor -name "*.orig" -delete + find vendor -name "*.a" -delete + find vendor -name "*.dll" -delete + find vendor -name "*.lib" -delete # Create cargo config to use vendored deps mkdir -p .cargo diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..cbb6ee6 --- /dev/null +++ b/debian/source/options @@ -0,0 +1,2 @@ +# Exclude patterns for source package +extend-diff-ignore = "(^|/)(\\.orig|\\.a|\\.lib|\\.dll)$" From a1e5eace7a169b670296af7257c84a379b0038f5 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:36:12 +0200 Subject: [PATCH 18/28] chore: bump to ds3 --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6a0f156..4adc4c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,11 @@ -rustnet-monitor (0.14.0+ds2-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds3-1ubuntu1) questing; urgency=medium * Include vendored Rust dependencies for offline builds + * Remove prebuilt binaries from vendor directory * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 19:35:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 20:30:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium From 6b72540dd4ee44ca89766855bbee0201f83508ab Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:56:23 +0200 Subject: [PATCH 19/28] chore: remove redundant local build test --- .github/workflows/ppa-release.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 540d567..bcc3b04 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -164,30 +164,6 @@ jobs: # Launchpad will reuse existing file if hash matches debuild -S -sa -d -us -uc - - name: Test build locally - run: | - VERSION="${{ steps.version.outputs.version }}" - PACKAGE_NAME="rustnet-monitor" - - cd build-ppa - - # Extract source package - dpkg-source -x ${PACKAGE_NAME}_${VERSION}-*.dsc test-build - cd test-build - - # Verify vendored dependencies exist - if [ ! -d "vendor" ]; then - echo "❌ Error: vendor/ directory not found in tarball!" - exit 1 - fi - echo "✓ Found vendored dependencies ($(du -sh vendor | cut -f1))" - - # Test compilation with vendored deps - echo "Testing Rust compilation with vendored dependencies..." - cargo build --release --verbose --offline - - echo "✅ Build test passed!" - - name: Sign and upload env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} From e8988aa8009b90f67e2a8193b65e797f4895f384 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:59:01 +0200 Subject: [PATCH 20/28] fix: regenerate cargo checksums after cleaning vendor files --- .github/workflows/ppa-release.yml | 9 +++++++++ debian/source/options | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index bcc3b04..c1c2ae5 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -138,6 +138,15 @@ jobs: find vendor -name "*.dll" -delete find vendor -name "*.lib" -delete + # Regenerate checksums for all crates after deletion + echo "Regenerating cargo checksums..." + for crate in vendor/*/; do + if [ -f "${crate}.cargo-checksum.json" ]; then + # Use jq to remove entries for deleted files, or regenerate from scratch + echo '{"files":{},"package":null}' > "${crate}.cargo-checksum.json" + fi + done + # Create cargo config to use vendored deps mkdir -p .cargo cat > .cargo/config.toml << 'EOF' diff --git a/debian/source/options b/debian/source/options index cbb6ee6..298358d 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1,2 +1,5 @@ -# Exclude patterns for source package -extend-diff-ignore = "(^|/)(\\.orig|\\.a|\\.lib|\\.dll)$" +# Exclude backup and binary files from source package +tar-ignore = "*.orig" +tar-ignore = "*.a" +tar-ignore = "*.lib" +tar-ignore = "*.dll" From fdef27911c9fe52906e6a8c63fc00aa22253773b Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 20:59:20 +0200 Subject: [PATCH 21/28] chore: bump to ds4 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4adc4c6..096167a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -rustnet-monitor (0.14.0+ds3-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds4-1ubuntu1) questing; urgency=medium * Include vendored Rust dependencies for offline builds - * Remove prebuilt binaries from vendor directory + * Remove prebuilt binaries and regenerate cargo checksums * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - -- Marco Cadetg Mon, 13 Oct 2025 20:30:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 21:00:00 +0000 rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium From af2c6e50b3719658a87ba64214ba3e86042b8da1 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:13:57 +0200 Subject: [PATCH 22/28] refactor: use separate vendor.tar.xz approach (simpler and cleaner) --- .github/workflows/ppa-release.yml | 36 ++++++++++--------------------- debian/changelog | 19 +++++----------- debian/rules | 15 ++++++++++--- debian/source/options | 5 ----- 4 files changed, 28 insertions(+), 47 deletions(-) delete mode 100644 debian/source/options diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index c1c2ae5..87888b8 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -125,46 +125,32 @@ jobs: git archive --format=tar --prefix="${PACKAGE_NAME}-${VERSION}/" HEAD | tar -x -C build-ppa fi - # Vendor dependencies inside the extracted source + # Vendor dependencies separately from orig tarball echo "Vendoring Rust dependencies..." cd build-ppa/${PACKAGE_NAME}-${VERSION} cargo vendor vendor - # Remove prebuilt binaries and backup files that Debian doesn't like + # Remove prebuilt binaries that Debian doesn't like echo "Cleaning vendor directory..." - find vendor -name "*.orig" -delete find vendor -name "*.a" -delete find vendor -name "*.dll" -delete find vendor -name "*.lib" -delete - # Regenerate checksums for all crates after deletion - echo "Regenerating cargo checksums..." - for crate in vendor/*/; do - if [ -f "${crate}.cargo-checksum.json" ]; then - # Use jq to remove entries for deleted files, or regenerate from scratch - echo '{"files":{},"package":null}' > "${crate}.cargo-checksum.json" - fi - done - - # Create cargo config to use vendored deps - mkdir -p .cargo - cat > .cargo/config.toml << 'EOF' - [source.crates-io] - replace-with = "vendored-sources" - - [source.vendored-sources] - directory = "vendor" - EOF - - # Create tarball with vendored deps - echo "Creating tarball with vendored dependencies..." + # Pack vendor directory as separate tarball in debian/ + echo "Creating vendor tarball..." + tar -cJf ../vendor.tar.xz vendor + rm -rf vendor + + # Create orig tarball (without vendor directory) + echo "Creating orig tarball..." cd .. ORIG_TARBALL="${PACKAGE_NAME}_${VERSION}.orig.tar.gz" tar -czf "${ORIG_TARBALL}" "${PACKAGE_NAME}-${VERSION}" - # Add debian directory + # Add debian directory and vendor tarball cp -r "$GITHUB_WORKSPACE/debian" "${PACKAGE_NAME}-${VERSION}/" + mv vendor.tar.xz "${PACKAGE_NAME}-${VERSION}/debian/" # Build source package cd "${PACKAGE_NAME}-${VERSION}" diff --git a/debian/changelog b/debian/changelog index 096167a..2181752 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,23 +1,14 @@ -rustnet-monitor (0.14.0+ds4-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0-1ubuntu1) questing; urgency=medium - * Include vendored Rust dependencies for offline builds - * Remove prebuilt binaries and regenerate cargo checksums - * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support + * Initial release for Ubuntu Questing (25.10) + * Vendored Rust dependencies in debian/vendor.tar.xz + * Target Ubuntu Questing with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages - - -- Marco Cadetg Mon, 13 Oct 2025 21:00:00 +0000 - -rustnet-monitor (0.14.0-1ubuntu1) noble; urgency=medium - - * Initial Ubuntu PPA release * eBPF enabled by default on Linux with automatic procfs fallback * JSON logging for SIEM integration * TUN/TAP interface support for VPN monitoring - * Multi-architecture support (amd64, arm64, armhf) - * Desktop integration with .desktop file and icon - * Automatic capability setting for non-root packet capture - -- Marco Cadetg Mon, 13 Oct 2025 12:00:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 21:15:00 +0000 rustnet-monitor (0.14.0-1) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index ea5fb0f..650bf97 100755 --- a/debian/rules +++ b/debian/rules @@ -20,11 +20,20 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets override_dh_auto_clean: # Clean cargo build artifacts $(CARGO) clean || true - # Clean target directory - rm -rf target + # Clean target and vendor directories + rm -rf target vendor .cargo override_dh_auto_configure: - # Verify Rust 1.85 version + # Extract vendored dependencies + tar -xJf debian/vendor.tar.xz + # Configure cargo to use vendored dependencies + mkdir -p .cargo + echo '[source.crates-io]' > .cargo/config.toml + echo 'replace-with = "vendored-sources"' >> .cargo/config.toml + echo '' >> .cargo/config.toml + echo '[source.vendored-sources]' >> .cargo/config.toml + echo 'directory = "vendor"' >> .cargo/config.toml + # Verify Rust 1.88 version @echo "Rust version:" $(CARGO) --version $(RUSTC) --version diff --git a/debian/source/options b/debian/source/options deleted file mode 100644 index 298358d..0000000 --- a/debian/source/options +++ /dev/null @@ -1,5 +0,0 @@ -# Exclude backup and binary files from source package -tar-ignore = "*.orig" -tar-ignore = "*.a" -tar-ignore = "*.lib" -tar-ignore = "*.dll" From 9a2b0980e5a7fd4f4423b61d8e95891e971bc6ed Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:17:22 +0200 Subject: [PATCH 23/28] fix: extract vendor in build step, use cargo config file --- debian/cargo.config | 5 +++++ debian/rules | 26 +++++++------------------- 2 files changed, 12 insertions(+), 19 deletions(-) create mode 100644 debian/cargo.config diff --git a/debian/cargo.config b/debian/cargo.config new file mode 100644 index 0000000..0236928 --- /dev/null +++ b/debian/cargo.config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" diff --git a/debian/rules b/debian/rules index 650bf97..fa30df6 100755 --- a/debian/rules +++ b/debian/rules @@ -18,31 +18,19 @@ export RUSTNET_ASSET_DIR = $(CURDIR)/debian/tmp/assets dh $@ override_dh_auto_clean: - # Clean cargo build artifacts $(CARGO) clean || true - # Clean target and vendor directories rm -rf target vendor .cargo -override_dh_auto_configure: - # Extract vendored dependencies - tar -xJf debian/vendor.tar.xz - # Configure cargo to use vendored dependencies - mkdir -p .cargo - echo '[source.crates-io]' > .cargo/config.toml - echo 'replace-with = "vendored-sources"' >> .cargo/config.toml - echo '' >> .cargo/config.toml - echo '[source.vendored-sources]' >> .cargo/config.toml - echo 'directory = "vendor"' >> .cargo/config.toml - # Verify Rust 1.88 version - @echo "Rust version:" - $(CARGO) --version - $(RUSTC) --version - override_dh_auto_build: + # Setup cargo to use vendored dependencies + mkdir -p .cargo + cp debian/cargo.config .cargo/config + # Extract vendored dependencies + tar xJf debian/vendor.tar.xz # Create asset directory for build.rs mkdir -p $(RUSTNET_ASSET_DIR) - # Build with cargo-1.85 (supports edition 2024) - $(CARGO) build --release --verbose + # Build with cargo-1.88 using vendored dependencies + $(CARGO) build --release --frozen override_dh_auto_install: # Install binary From 5571028f3301a6fc76a693b6bcee8106fcf583c1 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:22:22 +0200 Subject: [PATCH 24/28] fix: allow vendor.tar.xz binary in source package --- debian/source/include-binaries | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/source/include-binaries diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 0000000..4758f48 --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1 @@ +debian/vendor.tar.xz From 9f07164c2117761409de3ad3af576013a1155494 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:31:34 +0200 Subject: [PATCH 25/28] chore: bump to 0.14.0-2ubuntu1 --- debian/changelog | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2181752..02cb9a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,13 @@ -rustnet-monitor (0.14.0-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium - * Initial release for Ubuntu Questing (25.10) - * Vendored Rust dependencies in debian/vendor.tar.xz - * Target Ubuntu Questing with Rust 1.88 for edition 2024 support + * Refactored packaging with vendored dependencies in debian/vendor.tar.xz + * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support * Use versioned cargo-1.88 and rustc-1.88 packages * eBPF enabled by default on Linux with automatic procfs fallback * JSON logging for SIEM integration * TUN/TAP interface support for VPN monitoring - -- Marco Cadetg Mon, 13 Oct 2025 21:15:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 21:25:00 +0000 rustnet-monitor (0.14.0-1) unstable; urgency=medium From 3136664d278121d1bfbce6916b62e53bc5d69d34 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:32:16 +0200 Subject: [PATCH 26/28] chore: use ds5 suffix for new orig tarball --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 02cb9a6..01d9b30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds5-1ubuntu1) questing; urgency=medium * Refactored packaging with vendored dependencies in debian/vendor.tar.xz * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support @@ -7,7 +7,7 @@ rustnet-monitor (0.14.0-2ubuntu1) questing; urgency=medium * JSON logging for SIEM integration * TUN/TAP interface support for VPN monitoring - -- Marco Cadetg Mon, 13 Oct 2025 21:25:00 +0000 + -- Marco Cadetg Mon, 13 Oct 2025 21:32:00 +0000 rustnet-monitor (0.14.0-1) unstable; urgency=medium From c9355e37b9bfbf7b60040df3020b87ae43c2db40 Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:43:52 +0200 Subject: [PATCH 27/28] fix: use config.toml and keep dll test files --- .github/workflows/ppa-release.yml | 3 +-- debian/rules | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ppa-release.yml b/.github/workflows/ppa-release.yml index 87888b8..7742db1 100644 --- a/.github/workflows/ppa-release.yml +++ b/.github/workflows/ppa-release.yml @@ -131,10 +131,9 @@ jobs: cargo vendor vendor - # Remove prebuilt binaries that Debian doesn't like + # Remove prebuilt static libraries (keep .dll for tests) echo "Cleaning vendor directory..." find vendor -name "*.a" -delete - find vendor -name "*.dll" -delete find vendor -name "*.lib" -delete # Pack vendor directory as separate tarball in debian/ diff --git a/debian/rules b/debian/rules index fa30df6..b9ca1d0 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,7 @@ override_dh_auto_clean: override_dh_auto_build: # Setup cargo to use vendored dependencies mkdir -p .cargo - cp debian/cargo.config .cargo/config + cp debian/cargo.config .cargo/config.toml # Extract vendored dependencies tar xJf debian/vendor.tar.xz # Create asset directory for build.rs From 6ac76f2e10df401bd2e3e401744b36762f3df8bc Mon Sep 17 00:00:00 2001 From: Marco Cadetg Date: Mon, 13 Oct 2025 21:44:11 +0200 Subject: [PATCH 28/28] chore: bump to ds6 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 01d9b30..ace08cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -rustnet-monitor (0.14.0+ds5-1ubuntu1) questing; urgency=medium +rustnet-monitor (0.14.0+ds6-1ubuntu1) questing; urgency=medium * Refactored packaging with vendored dependencies in debian/vendor.tar.xz * Target Ubuntu Questing (25.10) with Rust 1.88 for edition 2024 support