feat: add multi-distro RPM packaging for CentOS 7 and Rocky Linux 8/9/10

- Create RPM maintainer scripts (post, preun, postun)
- Add Docker build stages for each target distribution (el7, el8, el9, el10)
- Update architecture.yml with supported RPM distributions
- Update build.sh to extract distro-specific RPM packages

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-02-28 17:17:56 +01:00
parent 85f7af357c
commit 7a9d92a469
7 changed files with 491 additions and 32 deletions

17
packaging/rpm/preun Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# preun script for logcorrelator RPM package
# Compatible with CentOS 7, Rocky Linux 8, 9, 10
set -e
# $1 = 0: package is being removed
# $1 = 1: package is being upgraded
if [ "$1" -eq 0 ]; then
# Package removal, stop and disable service
if [ -x /bin/systemctl ]; then
systemctl stop logcorrelator.service
systemctl disable logcorrelator.service
fi
fi
exit 0