docs: update architecture.yml with unified packaging section

- Update CI package stage to use Dockerfile.package with fpm
- Replace rpmbuild and debhelper with unified fpm approach
- Document multi-stage build pipeline (builder, package_builder, output)
- Add file mappings, dependencies, and verification commands

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-02-27 15:41:29 +01:00
parent 802ce75a80
commit 395635ab36

View File

@ -440,47 +440,47 @@ ci:
- name: package - name: package
description: > description: >
Build RPM and DEB packages for mod_reqin_log inside Docker. Build RPM and DEB packages for mod_reqin_log using Docker and fpm.
jobs: Both packages are built from a single Dockerfile.package with multi-stage build.
- name: rpm-rocky-8 dockerfile: Dockerfile.package
image: "rockylinux:8" stages:
steps: - name: builder
- install_deps: description: >
- rpm-build Compile mod_reqin_log.so as Apache 2.4 module using apxs.
- rpmlint - name: package_builder
- gcc description: >
- make Install fpm, rpm, dpkg-dev, apache2-dev. Create filesystem layout
- httpd and run fpm to generate both DEB and RPM packages.
- httpd-devel - name: output
- create_tarball: description: >
command: "tar -czf mod_reqin_log-1.0.0.tar.gz --transform 's,^,mod_reqin_log-1.0.0/,' ." Minimal Alpine image with packages in /packages/deb and /packages/rpm.
- setup_rpmbuild: files:
command: | module:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} source: build/mod_reqin_log.so
cp mod_reqin_log-1.0.0.tar.gz ~/rpmbuild/SOURCES/ dest: /usr/lib/apache2/modules/mod_reqin_log.so
cp packaging/rpm/mod_reqin_log.spec ~/rpmbuild/SPECS/ mode: "0755"
- build_rpm: config:
command: "rpmbuild -ba ~/rpmbuild/SPECS/mod_reqin_log.spec" - source: conf/mod_reqin_log.conf
- upload_artifact: dest: /etc/apache2/conf-available/mod_reqin_log.conf
paths: "~/rpmbuild/RPMS/x86_64/*.rpm" mode: "0644"
- name: deb-debian config_file: true
image: "debian:stable" dependencies:
steps: deb:
- install_deps: - apache2
- build-essential rpm:
- apache2 - httpd
- apache2-dev outputs:
- debhelper deb:
- devscripts name: libapache2-mod-reqin-log
- dpkg-dev path: dist/deb/libapache2-mod-reqin-log_${VERSION}_amd64.deb
- setup_package: rpm:
command: | name: mod_reqin_log
cp -r packaging/deb/* ./debian/ path: dist/rpm/mod_reqin_log-${VERSION}-1.x86_64.rpm
# Create changelog verify:
- build_deb: deb:
command: "debuild -us -uc -b" command: docker run --rm -v $(pwd)/dist/deb:/packages debian:latest sh -c "apt-get update && apt-get install -y /packages/*.deb"
- upload_artifact: rpm:
paths: "../*.deb" command: docker run --rm -v $(pwd)/dist/rpm:/packages rockylinux:8 sh -c "dnf install -y /packages/*.rpm"
artifacts: artifacts:
retention: retention:
@ -489,7 +489,7 @@ ci:
- type: module - type: module
path: "modules/mod_reqin_log.so" path: "modules/mod_reqin_log.so"
- type: rpm - type: rpm
path: "~/rpmbuild/RPMS/x86_64/" path: "dist/rpm/"
- type: deb - type: deb
path: "../" path: "dist/deb/"