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>
This commit is contained in:
Quintus Leung
2026-07-18 18:18:26 +01:00
co-authored by Copilot
parent d5dbdf548c
commit b0b1b1d0e2
3 changed files with 13 additions and 2 deletions
+8
View File
@@ -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
+1 -1
View File
@@ -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
+4 -1
View File
@@ -52,4 +52,7 @@ override_dh_auto_test:
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --exclude=rust-socksd
dh_strip --exclude=rust-socksd
override_dh_shlibdeps:
dh_shlibdeps -a -l/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu