fix: Support Debian Bookworm et Ubuntu pour le package .deb
Cible: Debian Bookworm (12) et Ubuntu 22.04+ Changes: - packaging/Dockerfile.deb: Build via Docker avec Go 1.24 - packaging/build-deb.sh: Ajout paramètre distribution (debian/ubuntu) - packaging/test/Dockerfile.deb: Test sur Debian Bookworm - packaging/test/test-*.sh: Tests spécifiques Debian/Ubuntu - .github/workflows/build-deb.yml: * Nom du job: 'Build DEB Package (Debian/Ubuntu)' * TARGET_DIST: debian:bookworm * Build simplifié via Docker - Makefile: package-deb utilise Docker (cohérent avec RPM) Compatibilité: - Debian 11 (Bullseye) - Debian 12 (Bookworm) - Ubuntu 20.04 LTS - Ubuntu 22.04 LTS - Ubuntu 24.04 LTS Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
48
.github/workflows/build-deb.yml
vendored
48
.github/workflows/build-deb.yml
vendored
@ -39,10 +39,11 @@ on:
|
||||
env:
|
||||
GO_VERSION: '1.24'
|
||||
PACKAGE_NAME: ja4sentinel
|
||||
TARGET_DIST: debian:bookworm
|
||||
|
||||
jobs:
|
||||
build-deb:
|
||||
name: Build DEB Package
|
||||
name: Build DEB Package (Debian/Ubuntu)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@ -73,48 +74,36 @@ jobs:
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "Building version: ${VERSION}"
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Build DEB in Docker
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libpcap-dev \
|
||||
dpkg-dev \
|
||||
fakeroot \
|
||||
lintian
|
||||
|
||||
- name: Build Go binary
|
||||
run: |
|
||||
make build-linux
|
||||
ls -la dist/
|
||||
|
||||
- name: Build DEB package
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
./packaging/build-deb.sh "${VERSION}" "amd64"
|
||||
|
||||
- name: Run lintian checks
|
||||
run: |
|
||||
lintian build/deb/*.deb --suppress-tags "dir-or-file-in-/usr/share/doc" || true
|
||||
docker build --no-cache \
|
||||
-t ${PACKAGE_NAME}-packager-deb \
|
||||
--build-arg VERSION="${{ steps.version.outputs.version }}" \
|
||||
--build-arg ARCH=amd64 \
|
||||
-f packaging/Dockerfile.deb .
|
||||
|
||||
# Extract DEB from image
|
||||
mkdir -p build/deb
|
||||
docker run --rm ${PACKAGE_NAME}-packager-deb sh -c 'cat /packages/*.deb' > build/${PACKAGE_NAME}.deb
|
||||
|
||||
- name: List build artifacts
|
||||
run: |
|
||||
echo "=== Build Artifacts ==="
|
||||
ls -lah build/deb/
|
||||
echo "=== Checksums ==="
|
||||
cat build/deb/*.sha256 || true
|
||||
sha256sum build/${PACKAGE_NAME}.deb
|
||||
|
||||
- name: Upload DEB artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ja4sentinel-deb-amd64
|
||||
path: build/deb/*.deb
|
||||
name: ${PACKAGE_NAME}-deb-amd64
|
||||
path: build/*.deb
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload checksum artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ja4sentinel-deb-checksums
|
||||
path: build/deb/*.sha256
|
||||
name: ${PACKAGE_NAME}-deb-checksums
|
||||
path: build/*.deb.sha256
|
||||
retention-days: 30
|
||||
|
||||
- name: Create release and upload assets (on tag)
|
||||
@ -122,8 +111,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
build/deb/*.deb
|
||||
build/deb/*.sha256
|
||||
build/*.deb
|
||||
generate_release_notes: true
|
||||
make_latest: true
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user