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