fix: Support Rocky Linux 9 pour le package RPM
Cible: Rocky Linux 9 (compatible RHEL/CentOS)
Changes:
- packaging/Dockerfile.rpm: Build pour Rocky Linux
- packaging/build-rpm.sh: Ajout paramètre distribution (rocky/rhel/centos)
- packaging/rpm/ja4sentinel.spec:
* Condition %if 0%{?rhel} >= 8 pour compatibilité RHEL
* Description mise à jour avec Rocky Linux
- packaging/test/Dockerfile.rpm: Test sur Rocky Linux 9
- packaging/test/test-*.sh: Tests spécifiques Rocky Linux
- .github/workflows/build-rpm.yml:
* Nom du job: 'Build RPM Package (Rocky Linux)'
* TARGET_DIST: rockylinux:9
* Simplification du build via Docker
Documentation:
- README.md: Instructions d'installation pour .rpm (Rocky/RHEL) et .deb (Debian/Ubuntu)
- Remplacement des instructions de build par installation via packages
Compatibilité:
- Rocky Linux 8.x et 9.x
- RHEL 8.x et 9.x
- CentOS Stream 8 et 9
- AlmaLinux 8.x et 9.x
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
44
.github/workflows/build-rpm.yml
vendored
44
.github/workflows/build-rpm.yml
vendored
@ -39,10 +39,11 @@ on:
|
||||
env:
|
||||
GO_VERSION: '1.24'
|
||||
PACKAGE_NAME: ja4sentinel
|
||||
TARGET_DIST: rockylinux:9
|
||||
|
||||
jobs:
|
||||
build-rpm:
|
||||
name: Build RPM Package
|
||||
name: Build RPM Package (Rocky Linux)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@ -73,44 +74,36 @@ jobs:
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "Building version: ${VERSION}"
|
||||
|
||||
- name: Set up RPM build environment
|
||||
- name: Build RPM in Docker
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
rpm \
|
||||
rpmbuild \
|
||||
libpcap-dev \
|
||||
libpcap0.8-dev
|
||||
|
||||
- name: Build Go binary
|
||||
run: |
|
||||
make build-linux
|
||||
ls -la dist/
|
||||
|
||||
- name: Build RPM package
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
./packaging/build-rpm.sh "${VERSION}" "x86_64"
|
||||
docker build --no-cache \
|
||||
-t ${PACKAGE_NAME}-packager-rpm \
|
||||
--build-arg VERSION="${{ steps.version.outputs.version }}" \
|
||||
--build-arg ARCH=x86_64 \
|
||||
-f packaging/Dockerfile.rpm .
|
||||
|
||||
# Extract RPM from image
|
||||
mkdir -p build/rpm
|
||||
docker run --rm ${PACKAGE_NAME}-packager-rpm sh -c 'cat /packages/*.rpm' > build/${PACKAGE_NAME}.rpm
|
||||
|
||||
- name: List build artifacts
|
||||
run: |
|
||||
echo "=== Build Artifacts ==="
|
||||
ls -lah build/rpm/
|
||||
echo "=== Checksums ==="
|
||||
cat build/rpm/*.sha256 || true
|
||||
sha256sum build/${PACKAGE_NAME}.rpm
|
||||
|
||||
- name: Upload RPM artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ja4sentinel-rpm-x86_64
|
||||
path: build/rpm/*.rpm
|
||||
name: ${PACKAGE_NAME}-rpm-x86_64
|
||||
path: build/*.rpm
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload checksum artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ja4sentinel-rpm-checksums
|
||||
path: build/rpm/*.sha256
|
||||
name: ${PACKAGE_NAME}-rpm-checksums
|
||||
path: build/*.rpm.sha256
|
||||
retention-days: 30
|
||||
|
||||
- name: Create release and upload assets (on tag)
|
||||
@ -118,8 +111,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
build/rpm/*.rpm
|
||||
build/rpm/*.sha256
|
||||
build/*.rpm
|
||||
generate_release_notes: true
|
||||
make_latest: true
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user