docs: update README and architecture for RPM-only packaging

- Remove DEB and el7 references (RPM only: el8, el9, el10)
- Remove Python integration tests from documentation (not automated in CI)
- Add file inventory in architecture.yml (source, packaging, tests)
- Update CI verify jobs to check RPM metadata with rpm -qi
- Organize RPM packages by distribution in dist/rpm/{el8,el9,el10}/
- Add security and RPM packaging features to README
- Split Requirements into Runtime and Packaging sections

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-01 00:29:51 +01:00
parent 8b381c7feb
commit e3ea1fb486
4 changed files with 45 additions and 86 deletions

View File

@ -36,6 +36,17 @@ context:
module:
name: mod_reqin_log
files:
source:
- src/mod_reqin_log.c
- src/mod_reqin_log.h
packaging:
- mod_reqin_log.spec
tests:
- tests/unit/test_module_real.c
- tests/unit/test_config_parsing.c
- tests/unit/test_header_handling.c
- tests/unit/test_json_serialization.c
hooks:
- name: register_hooks
responsibilities:
@ -310,53 +321,6 @@ testing:
execution:
- docker build -f Dockerfile.tests .
- docker run --rm <image> ctest --output-on-failure
integration_tests:
framework: python3
location: tests/integration/test_integration.py
env:
server: apache-httpd 2.4
os: rocky-linux-8+, rocky-linux-9+, almalinux-10+
log_consumer: Unix socket server (Python threading)
scenarios:
- name: basic_logging
description: >
With JsonSockLogEnabled On and valid socket, verify that each request
produces a valid JSON line with all required fields.
checks:
- All required fields present (time, timestamp, src_ip, dst_ip, method, path, host)
- Field types correct (timestamp is integer, time is ISO8601 string)
- Method matches HTTP request method
- name: header_limits
description: >
Configure more headers than JsonSockLogMaxHeaders and verify only
the first N are logged and values are truncated.
checks:
- Header values truncated to JsonSockLogMaxHeaderValueLen (default: 256)
- Only configured headers appear in output
- name: socket_unavailable_on_start
description: >
Start Apache with JsonSockLogEnabled On but socket not yet created;
verify periodic reconnect attempts and throttled error logging.
checks:
- Requests succeed even when socket unavailable
- Module reconnects when socket becomes available
- name: runtime_socket_loss
description: >
Drop the Unix socket while traffic is ongoing; verify that log lines
are dropped, worker threads are not blocked, and reconnect attempts
resume once the socket reappears.
checks:
- Requests complete quickly (<2s) when socket is down
- Module recovers and logs again after socket restoration
execution:
- python3 tests/integration/test_integration.py --url http://localhost:8080
bash_tests:
location: scripts/run_integration_tests.sh
description: >
Legacy bash-based integration tests for simple validation.
Tests JSON format, required fields, header logging via curl and grep.
execution:
- bash scripts/run_integration_tests.sh
ci:
@ -373,14 +337,13 @@ ci:
Separate RPMs are built for each major RHEL/CentOS/Rocky/AlmaLinux version
(el8, el9, el10) due to glibc and httpd-devel incompatibilities
across major versions. A single RPM cannot work across all versions.
All packages (DEB + multi-RPM) are built from Dockerfile.package.
RPM packages are built using rpmbuild with mod_reqin_log.spec file.
stages:
- name: build
description: >
Build all packages (1 DEB + 3 RPMs) using Dockerfile.package with multi-stage build.
Build all RPM packages (el8, el9, el10) using Dockerfile.package with multi-stage build.
dockerfile: Dockerfile.package
artifacts:
- dist/deb/*.deb
- dist/rpm/*.el8.*.rpm
- dist/rpm/*.el9.*.rpm
- dist/rpm/*.el10.*.rpm
@ -397,14 +360,11 @@ ci:
jobs:
- name: verify-rpm-el8
image: rockylinux:8
check: "httpd -M | grep reqin_log"
check: "rpm -qi mod_reqin_log && httpd -M | grep reqin_log"
- name: verify-rpm-el9
image: rockylinux:9
check: "httpd -M | grep reqin_log"
check: "rpm -qi mod_reqin_log && httpd -M | grep reqin_log"
- name: verify-rpm-el10
image: almalinux:10
check: "httpd -M | grep reqin_log"
- name: verify-deb
image: debian:stable
check: "ls -la /usr/lib/apache2/modules/mod_reqin_log.so"
check: "rpm -qi mod_reqin_log && httpd -M | grep reqin_log"