From b0b1b1d0e2ea5fc4813db032e7614df42b3e3452 Mon Sep 17 00:00:00 2001 From: Quintus Leung Date: Sat, 18 Jul 2026 18:18:26 +0100 Subject: [PATCH] Fix Debian amd64 build OpenSSL dependency issue - Add libssl3 and libpam0g to runtime dependencies in debian/control - Install libssl3 and libpam0g in GitHub Actions workflow for dpkg-shlibdeps - For cross-compilation, add architecture-specific library installation - Add dh_shlibdeps override in debian/rules to help locate libraries Fixes dpkg-shlibdeps errors when building Debian packages: - 'cannot find library libssl.so.1.0.0' - 'cannot find library libcrypto.so.1.0.0' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 8 ++++++++ debian/control | 2 +- debian/rules | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97d57e3..85946f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,12 +112,20 @@ jobs: run: | sudo apt-get update sudo apt-get install -y debhelper dpkg-dev + # Install runtime libraries for dpkg-shlibdeps dependency resolution + sudo apt-get install -y libssl3 libpam0g - name: Build Debian Package for ${{ matrix.arch }} run: | mkdir -p package-build rsync -a --exclude=package-build --exclude=target . package-build/ cd package-build + # For cross-compilation, also install cross-compile variants + if [ "${{ matrix.arch }}" != "amd64" ]; then + sudo dpkg --add-architecture ${{ matrix.arch }} + sudo apt-get update + sudo apt-get install -y libssl3:${{ matrix.arch }} libpam0g:${{ matrix.arch }} + fi USE_CROSS=1 CARGO_BUILD_TARGET=${{ matrix.target }} dpkg-buildpackage -b -uc -us -d -a${{ matrix.arch }} - name: Upload Debian package to release diff --git a/debian/control b/debian/control index a103087..bf7ecf7 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Vcs-Browser: https://github.com/quintusl/rust-socksd Package: rust-socksd Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, libssl3 Recommends: systemd Description: High-performance SOCKS5 and HTTP proxy server rust-socksd is a modern, high-performance proxy server written in Rust diff --git a/debian/rules b/debian/rules index a0835dc..837f8b8 100755 --- a/debian/rules +++ b/debian/rules @@ -52,4 +52,7 @@ override_dh_auto_test: .PHONY: override_dh_strip override_dh_strip: - dh_strip --exclude=rust-socksd \ No newline at end of file + dh_strip --exclude=rust-socksd + +override_dh_shlibdeps: + dh_shlibdeps -a -l/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu \ No newline at end of file