From c0f8b314cafa504e07f435478789843a98515864 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 14 Jun 2026 07:34:23 -0500 Subject: [PATCH 1/2] fix(ci): enable libsodium pkg-config feature across all platforms Explicitly adds libsodium-sys-stable dependency with use-pkg-config feature to ensure builds use system libsodium via pkg-config instead of attempting vendored builds. Changes: - Add direct dependency on libsodium-sys-stable with use-pkg-config feature - Update Windows build to use pkg-config with cross-compilation support - Remove manual SODIUM_* env vars that bypass pkg-config This resolves "libsodium not found via pkg-config or vcpkg" build failures on Linux and Windows CI targets. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/auto-tag.yml | 5 ++--- src-tauri/Cargo.lock | 1 + src-tauri/Cargo.toml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml index c2f47376..9890bad5 100644 --- a/.gitea/workflows/auto-tag.yml +++ b/.gitea/workflows/auto-tag.yml @@ -444,9 +444,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" - SODIUM_USE_PKG_CONFIG: "no" + PKG_CONFIG_x86_64_pc_windows_gnu: x86_64-w64-mingw32-pkg-config + PKG_CONFIG_ALLOW_CROSS: "1" run: | npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-pc-windows-gnu diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 88b4a436..15fc4b3a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -6545,6 +6545,7 @@ dependencies = [ "http 1.4.1", "infer 0.15.0", "lazy_static", + "libsodium-sys-stable", "lopdf", "mockito", "portable-pty", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 350f1662..28f9b091 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -59,6 +59,7 @@ http = "1.4" flate2 = { version = "1", features = ["rust_backend"] } serde_yaml = "0.9" portable-pty = "0.8" +libsodium-sys-stable = { version = "1.24", features = ["use-pkg-config"] } -- 2.45.2 From d86da0033d6abcc46c979815d14fe9d8b1fa2db0 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 14 Jun 2026 08:34:49 -0500 Subject: [PATCH 2/2] fix(ci): add libsodium-dev to test workflow dependencies The test.yml workflow's rust-fmt-check, rust-clippy, and rust-tests jobs were missing libsodium-dev package installation. With the new use-pkg-config feature enabled, pkg-config must be able to find libsodium system libraries. This resolves "libsodium not found via pkg-config" failures in the test pipeline. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index b7bff204..6f38a423 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 @@ -96,6 +97,7 @@ jobs: libayatana-appindicator3-dev \ librsvg2-dev \ libdbus-1-dev \ + libsodium-dev \ pkg-config - name: Install clippy run: rustup component add clippy @@ -133,6 +135,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 -- 2.45.2