From 2fae73fb3a8a1ea486789b84bc088ef43d616bc5 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sat, 13 Jun 2026 19:35:09 -0500 Subject: [PATCH 1/2] fix: register missing updater commands - Add check_app_updates, install_app_updates, get_update_channel, set_update_channel to Tauri handler - Add unit tests for update channel functionality This fixes the 'Command check_app_updates not found' and 'Failed to update channel' errors reported in the latest build. --- src-tauri/src/commands/system.rs | 13 +++++++++++++ src-tauri/src/lib.rs | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/src-tauri/src/commands/system.rs b/src-tauri/src/commands/system.rs index 55c17d60..f20cbc61 100644 --- a/src-tauri/src/commands/system.rs +++ b/src-tauri/src/commands/system.rs @@ -626,4 +626,17 @@ mod updater_tests { assert!(!is_newer_version("", "1.0.0")); assert!(!is_newer_version("1.0.0", "")); } + + #[test] + fn test_update_channel_default() { + let settings = AppSettings::default(); + assert_eq!(settings.update_channel, "stable"); + } + + #[test] + fn test_update_channel_serialization() { + let settings = AppSettings::default(); + let json = serde_json::to_string(&settings).unwrap(); + assert!(json.contains("\"stable\"")); + } } diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 4f3d3403..93a95a18 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -256,6 +256,10 @@ pub fn run() { commands::system::get_sudo_config_status, commands::system::test_sudo_password, commands::system::clear_sudo_password, + commands::system::check_app_updates, + commands::system::install_app_updates, + commands::system::get_update_channel, + commands::system::set_update_channel, // MCP Servers mcp::commands::list_mcp_servers, mcp::commands::create_mcp_server, -- 2.45.2 From 10b931809bc3c13e359dfde1f16f754c11589160 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Wed, 17 Jun 2026 19:00:06 -0500 Subject: [PATCH 2/2] fix(ci): add libsodium to all build environments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tauri-plugin-stronghold pulls in libsodium-sys-stable which panics at build time if libsodium is not found via pkg-config — it does not compile from source. All builder images and the test job inline apt installs were missing libsodium-dev, breaking every Rust compilation step. - Add libsodium-dev to Dockerfile.linux-amd64 - Add libsodium-dev (host) + libsodium-dev:arm64 (cross target) to Dockerfile.linux-arm64 - Add libsodium-dev to all three Rust jobs in test.yml - Add inline apt-get install to linux-amd64 and linux-arm64 Build steps in auto-tag.yml and release-beta.yml (bridges the timing race between build-images and auto-tag triggering on the same push) - Add SODIUM_LIB_DIR + SODIUM_STATIC to Windows Build env (Dockerfile already pre-builds libsodium; this tells the crate where to find it) --- .docker/Dockerfile.linux-amd64 | 1 + .docker/Dockerfile.linux-arm64 | 2 ++ .gitea/workflows/auto-tag.yml | 4 ++++ .gitea/workflows/release-beta.yml | 4 ++++ .gitea/workflows/test.yml | 3 +++ PR_LIBSODIUM_FIX.md | 40 +++++++++++++++++++++++++++++++ 6 files changed, 54 insertions(+) create mode 100644 PR_LIBSODIUM_FIX.md diff --git a/.docker/Dockerfile.linux-amd64 b/.docker/Dockerfile.linux-amd64 index 2a4cb8ed..a8e7b0ec 100644 --- a/.docker/Dockerfile.linux-amd64 +++ b/.docker/Dockerfile.linux-amd64 @@ -14,6 +14,7 @@ RUN apt-get update -qq \ libgtk-3-dev \ libayatana-appindicator3-dev \ librsvg2-dev \ + libsodium-dev \ patchelf \ pkg-config \ curl \ diff --git a/.docker/Dockerfile.linux-arm64 b/.docker/Dockerfile.linux-arm64 index 5acf4478..2ea11ae7 100644 --- a/.docker/Dockerfile.linux-arm64 +++ b/.docker/Dockerfile.linux-arm64 @@ -14,6 +14,7 @@ RUN apt-get update -qq \ && apt-get install -y -qq --no-install-recommends \ ca-certificates curl git gcc g++ make patchelf pkg-config perl jq \ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ + libsodium-dev \ && rm -rf /var/lib/apt/lists/* # Step 2: Enable arm64 multiarch. Ubuntu uses ports.ubuntu.com for arm64 to avoid @@ -32,6 +33,7 @@ RUN dpkg --add-architecture arm64 \ libssl-dev:arm64 \ libgtk-3-dev:arm64 \ librsvg2-dev:arm64 \ + libsodium-dev:arm64 \ && rm -rf /var/lib/apt/lists/* # Step 3: Node.js 22 diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml index d3026ed1..eb6b1c82 100644 --- a/.gitea/workflows/auto-tag.yml +++ b/.gitea/workflows/auto-tag.yml @@ -345,6 +345,7 @@ jobs: env: APPIMAGE_EXTRACT_AND_RUN: "1" run: | + apt-get update -qq && apt-get install -y --no-install-recommends libsodium-dev npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-unknown-linux-gnu - name: Upload artifacts @@ -444,6 +445,8 @@ jobs: CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc OPENSSL_NO_VENDOR: "0" OPENSSL_STATIC: "1" + SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib + SODIUM_STATIC: "1" run: | npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-pc-windows-gnu @@ -633,6 +636,7 @@ jobs: OPENSSL_STATIC: "1" APPIMAGE_EXTRACT_AND_RUN: "1" run: | + apt-get update -qq && apt-get install -y --no-install-recommends libsodium-dev:arm64 npm ci --legacy-peer-deps CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm - name: Upload artifacts diff --git a/.gitea/workflows/release-beta.yml b/.gitea/workflows/release-beta.yml index 18a56c5e..babbd527 100644 --- a/.gitea/workflows/release-beta.yml +++ b/.gitea/workflows/release-beta.yml @@ -225,6 +225,7 @@ jobs: env: APPIMAGE_EXTRACT_AND_RUN: "1" run: | + apt-get update -qq && apt-get install -y --no-install-recommends libsodium-dev npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-unknown-linux-gnu - name: Upload artifacts @@ -317,6 +318,8 @@ jobs: CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc OPENSSL_NO_VENDOR: "0" OPENSSL_STATIC: "1" + SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib + SODIUM_STATIC: "1" run: | npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-pc-windows-gnu @@ -492,6 +495,7 @@ jobs: OPENSSL_STATIC: "1" APPIMAGE_EXTRACT_AND_RUN: "1" run: | + apt-get update -qq && apt-get install -y --no-install-recommends libsodium-dev:arm64 npm ci --legacy-peer-deps CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm - name: Upload artifacts diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 1d2aa989..8bc9c0ba 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -45,6 +45,7 @@ jobs: libayatana-appindicator3-dev \ librsvg2-dev \ libdbus-1-dev \ + libsodium-dev \ pkg-config - name: Install Rust components run: rustup component add rustfmt @@ -87,6 +88,7 @@ jobs: libayatana-appindicator3-dev \ librsvg2-dev \ libdbus-1-dev \ + libsodium-dev \ pkg-config - name: Install clippy run: rustup component add clippy @@ -124,6 +126,7 @@ jobs: libayatana-appindicator3-dev \ librsvg2-dev \ libdbus-1-dev \ + libsodium-dev \ pkg-config - run: cargo test --manifest-path src-tauri/Cargo.toml -- --test-threads=1 diff --git a/PR_LIBSODIUM_FIX.md b/PR_LIBSODIUM_FIX.md new file mode 100644 index 00000000..bd92e032 --- /dev/null +++ b/PR_LIBSODIUM_FIX.md @@ -0,0 +1,40 @@ +# fix(ci): add libsodium to all build environments + +## Description + +All CI builds started failing with: + +``` +libsodium not found via pkg-config or vcpkg +``` + +`tauri-plugin-stronghold` depends on `libsodium-sys-stable` v1.24.0, which does **not** compile libsodium from source — it requires a pre-installed system library. None of the builder Docker images or the inline test job apt installs included `libsodium-dev`, so every build involving Rust compilation has been broken since `tauri-plugin-stronghold` was added. + +The Windows cross-compile Dockerfile already pre-built libsodium from source (into `/usr/x86_64-w64-mingw32`), but the workflow never set `SODIUM_LIB_DIR` to tell the crate where to look, so it also failed via the same code path. + +There is a secondary timing constraint: `build-images.yml` and `auto-tag.yml` both trigger on push to `master`. Even after Dockerfiles are fixed, the rebuilt images won't be ready in time for the concurrent release builds. Inline `apt-get install` is added to the workflow build steps to bridge that window; once images are rebuilt, the inline install becomes a harmless no-op. + +## Acceptance Criteria + +- [ ] `rust-fmt-check`, `rust-clippy`, and `rust-tests` CI jobs pass +- [ ] `build-linux-amd64` produces `.deb`/`.rpm` artifacts +- [ ] `build-linux-arm64` produces `.deb`/`.rpm` artifacts +- [ ] `build-windows-amd64` produces installer artifacts +- [ ] `build-macos-arm64` produces `.dmg` artifact (macOS runner assumed to have `libsodium` via Homebrew; if not, add `brew install libsodium || true` to the Build step) + +## Work Implemented + +| File | Change | +|---|---| +| `.docker/Dockerfile.linux-amd64` | Added `libsodium-dev` to apt packages baked into the image | +| `.docker/Dockerfile.linux-arm64` | Added `libsodium-dev` (amd64 host) in Step 1 and `libsodium-dev:arm64` (cross target) in Step 2 | +| `.gitea/workflows/test.yml` | Added `libsodium-dev` to the system deps apt install in `rust-fmt-check`, `rust-clippy`, and `rust-tests` | +| `.gitea/workflows/auto-tag.yml` | Inline `apt-get install libsodium-dev` before build (linux-amd64 and linux-arm64 jobs); `SODIUM_LIB_DIR`/`SODIUM_STATIC` env vars for Windows job | +| `.gitea/workflows/release-beta.yml` | Same three changes as `auto-tag.yml` | + +## Testing Needed + +1. Merge this PR to `master` — verify `Auto Tag` workflow succeeds across all four platform jobs +2. Push to `beta` — verify `Release Beta` workflow succeeds +3. After `Build CI Docker Images` workflow finishes rebuilding images, trigger a manual release run to confirm inline apt installs are redundant (both paths should work) +4. **macOS**: if `build-macos-arm64` still fails with a libsodium error, add `brew install libsodium || true` to the Build step in both `auto-tag.yml` and `release-beta.yml` -- 2.45.2