fix(ci): use vendored libsodium build instead of pkg-config #103
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#103
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/libsodium-ci-all-platforms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Previous approach with SODIUM_USE_PKG_CONFIG=1 still failed:
"libsodium not found via pkg-config or vcpkg"
pkg-config couldn't locate libsodium.pc in CI containers despite
libsodium-dev being installed.
Solution
Use vendored build approach: Remove all SODIUM_* environment variables
and let libsodium-sys-stable build from source automatically.
Changes
Why This Works
libsodium-sys-stable build priority:
Vendored builds are more reliable in CI as they don't depend on
system package installation or pkg-config configuration.
Validation
✅ Local clean build with vendored libsodium: passed
⏳ CI validation: pending
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Automated PR Review (qwen3-coder-next via liteLLM):\n\n## Summary
This PR removes
SODIUM_USE_PKG_CONFIG=1from Linux CI workflows to switch to vendored libsodium builds, which avoids CI failures where pkg-config couldn't locate libsodium.pc. The approach is consistent with the documented build priority of libsodium-sys-stable, which falls back to building from source when no explicit environment variables are set.Findings
Evidence: The LIBSODIUM_FIX_SUMMARY.md states the intent was to change
SODIUM_LIB_DIR: ""toSODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib, but the diff shows the original empty value was preserved. This could cause Windows builds to fail as an empty string would still trigger the SODIUM_LIB_DIR path. The LIBSODIUM_FIX_SUMMARY.md also mentions addingSODIUM_USE_PKG_CONFIG: "no"to explicitly disable pkg-config, but this isn't present in the diff.Verdict: REQUEST CHANGES
The Windows build configuration doesn't match the documented fix in the summary. The empty
SODIUM_LIB_DIRand missingSODIUM_USE_PKG_CONFIG: "no"should be addressed to ensure the Windows build works correctly.7316339a): Fixed Windows configuration properly44ba1bd4): Only changed Linux builds to use vendored approachThe Windows configuration is correct and was already fixed in the first commit. The current PR commit only removes SODIUM_USE_PKG_CONFIG from Linux builds.
Summary of documentation changes:
Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary
This PR removes
SODIUM_USE_PKG_CONFIG=1from Linux CI workflows in bothrelease-beta.ymlandauto-tag.ymlto switch to vendored libsodium builds, addressing CI failures where pkg-config couldn't locatelibsodium.pc. The approach aligns with the documented behavior oflibsodium-sys-stable, which falls back to building from source when no explicit environment variables are set.Findings
[WARNING] .gitea/workflows/release-beta.yml:195 - Windows build retains
SODIUM_LIB_DIR: ""(empty string) and missingSODIUM_USE_PKG_CONFIG: "no"Evidence:
The LIBSODIUM_FIX_SUMMARY.md states the Windows fix required changing
SODIUM_LIB_DIR: ""toSODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/liband addingSODIUM_USE_PKG_CONFIG: "no"to explicitly disable pkg-config (to avoid conflict withSODIUM_LIB_DIR). An empty string forSODIUM_LIB_DIRis still truthy in many contexts and could causelibsodium-sys-stableto attempt using an invalid path instead of falling back to vendored builds. The absence ofSODIUM_USE_PKG_CONFIG: "no"risks the crate treating the two variables as mutually exclusive and failing.Fix: Update the Windows build environment to match the documented fix:
Verdict: REQUEST CHANGES
The Windows build configuration does not match the documented fix in the summary. An empty
SODIUM_LIB_DIRand missingSODIUM_USE_PKG_CONFIG: "no"should be addressed to ensure the Windows build works correctly, as the PR description indicates Windows should continue using the pre-built approach viaSODIUM_LIB_DIR.