fix: correction bugs + tests + migration el7 vers el10
Correctifs de bugs critiques: - Overflow entier dans le calcul du timestamp (nanoseconds) - Validation des composantes temporelles dans format_iso8601 - Race condition mutex: échec dur pour MPM threadés (worker/event) - Rejet des espaces en tête dans parse_int_strict Nouveaux tests unitaires (38 ajoutés): - Overflow timestamp, limites ISO8601, format fixe 20 chars - Limite de taille JSON 64KB - Détection headers sensibles (blacklist) - Validation parse_int_strict - dynbuf NULL handling et strlen mode Migration packaging: - Suppression CentOS 7 (EOL) - Ajout AlmaLinux 10 (el10) - RPMs supportés: el8, el9, el10 Mise à jour CI/CD et documentation: - .gitlab-ci.yml: jobs verify pour el8/el9/el10 - architecture.yml: OS supportés à jour - 70/70 tests pass Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@ -2,43 +2,13 @@
|
||||
# =============================================================================
|
||||
# mod_reqin_log - Dockerfile de packaging unifié (DEB + RPM avec fpm)
|
||||
# Builds RPMs for multiple RHEL-compatible versions:
|
||||
# - AlmaLinux 7 / CentOS 7 (el7) - RHEL 7 compatible (using vault repos)
|
||||
# - Rocky Linux 8 (el8) - RHEL 8 compatible
|
||||
# - Rocky Linux 9 (el9) - RHEL 9 compatible
|
||||
# - AlmaLinux 10 (el10) - RHEL 10 compatible
|
||||
# =============================================================================
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1a: Builder CentOS 7 (RHEL 7 compatible, EOL - using vault)
|
||||
# =============================================================================
|
||||
FROM centos:7 AS builder-el7
|
||||
|
||||
# CentOS 7 is EOL since June 2024, use vault.centos.org for repositories
|
||||
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
|
||||
sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/*.repo && \
|
||||
sed -i 's/metalink/#metalink/g' /etc/yum.repos.d/*.repo
|
||||
|
||||
# Install build dependencies
|
||||
RUN yum install -y \
|
||||
gcc \
|
||||
make \
|
||||
httpd \
|
||||
httpd-devel \
|
||||
apr-devel \
|
||||
apr-util-devel \
|
||||
python3 \
|
||||
curl \
|
||||
redhat-rpm-config \
|
||||
&& yum clean all
|
||||
|
||||
WORKDIR /build
|
||||
COPY src/ src/
|
||||
COPY Makefile Makefile
|
||||
COPY conf/ conf/
|
||||
RUN make APXS=/usr/bin/apxs
|
||||
RUN ls -la modules/mod_reqin_log.so
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1b: Builder Rocky Linux 8
|
||||
# Stage 1a: Builder Rocky Linux 8
|
||||
# =============================================================================
|
||||
FROM rockylinux:8 AS builder-el8
|
||||
|
||||
@ -63,7 +33,7 @@ RUN make APXS=/usr/bin/apxs
|
||||
RUN ls -la modules/mod_reqin_log.so
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1c: Builder Rocky Linux 9
|
||||
# Stage 1b: Builder Rocky Linux 9
|
||||
# =============================================================================
|
||||
FROM rockylinux:9 AS builder-el9
|
||||
|
||||
@ -87,6 +57,31 @@ COPY conf/ conf/
|
||||
RUN make APXS=/usr/bin/apxs
|
||||
RUN ls -la modules/mod_reqin_log.so
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1c: Builder AlmaLinux 10 (RHEL 10 compatible)
|
||||
# =============================================================================
|
||||
FROM almalinux:10 AS builder-el10
|
||||
|
||||
RUN dnf install -y epel-release && \
|
||||
dnf install -y --allowerasing \
|
||||
gcc \
|
||||
make \
|
||||
httpd \
|
||||
httpd-devel \
|
||||
apr-devel \
|
||||
apr-util-devel \
|
||||
python3 \
|
||||
curl \
|
||||
redhat-rpm-config \
|
||||
&& dnf clean all
|
||||
|
||||
WORKDIR /build
|
||||
COPY src/ src/
|
||||
COPY Makefile Makefile
|
||||
COPY conf/ conf/
|
||||
RUN make APXS=/usr/bin/apxs
|
||||
RUN ls -la modules/mod_reqin_log.so
|
||||
|
||||
# =============================================================================
|
||||
# Stage 2: Package builder - fpm pour DEB et RPM
|
||||
# =============================================================================
|
||||
@ -108,12 +103,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Copy binaries from each builder stage
|
||||
# =============================================================================
|
||||
|
||||
# CentOS 7 (el7)
|
||||
COPY --from=builder-el7 /build/modules/mod_reqin_log.so /tmp/pkgroot-el7/usr/lib64/httpd/modules/mod_reqin_log.so
|
||||
COPY --from=builder-el7 /build/conf/mod_reqin_log.conf /tmp/pkgroot-el7/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
RUN chmod 755 /tmp/pkgroot-el7/usr/lib64/httpd/modules/mod_reqin_log.so && \
|
||||
chmod 644 /tmp/pkgroot-el7/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# Rocky Linux 8 (el8)
|
||||
COPY --from=builder-el8 /build/modules/mod_reqin_log.so /tmp/pkgroot-el8/usr/lib64/httpd/modules/mod_reqin_log.so
|
||||
COPY --from=builder-el8 /build/conf/mod_reqin_log.conf /tmp/pkgroot-el8/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
@ -126,9 +115,15 @@ COPY --from=builder-el9 /build/conf/mod_reqin_log.conf /tmp/pkgroot-el9/etc/http
|
||||
RUN chmod 755 /tmp/pkgroot-el9/usr/lib64/httpd/modules/mod_reqin_log.so && \
|
||||
chmod 644 /tmp/pkgroot-el9/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# AlmaLinux 10 (el10)
|
||||
COPY --from=builder-el10 /build/modules/mod_reqin_log.so /tmp/pkgroot-el10/usr/lib64/httpd/modules/mod_reqin_log.so
|
||||
COPY --from=builder-el10 /build/conf/mod_reqin_log.conf /tmp/pkgroot-el10/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
RUN chmod 755 /tmp/pkgroot-el10/usr/lib64/httpd/modules/mod_reqin_log.so && \
|
||||
chmod 644 /tmp/pkgroot-el10/etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# DEB package (Debian paths)
|
||||
COPY --from=builder-el9 /build/modules/mod_reqin_log.so /tmp/pkgroot-deb/usr/lib/apache2/modules/mod_reqin_log.so
|
||||
COPY --from=builder-el9 /build/conf/mod_reqin_log.conf /tmp/pkgroot-deb/etc/apache2/conf-available/mod_reqin_log.conf
|
||||
COPY --from=builder-el10 /build/modules/mod_reqin_log.so /tmp/pkgroot-deb/usr/lib/apache2/modules/mod_reqin_log.so
|
||||
COPY --from=builder-el10 /build/conf/mod_reqin_log.conf /tmp/pkgroot-deb/etc/apache2/conf-available/mod_reqin_log.conf
|
||||
RUN chmod 755 /tmp/pkgroot-deb/usr/lib/apache2/modules/mod_reqin_log.so && \
|
||||
chmod 644 /tmp/pkgroot-deb/etc/apache2/conf-available/mod_reqin_log.conf
|
||||
|
||||
@ -155,26 +150,9 @@ RUN mkdir -p /packages/deb && \
|
||||
# Build RPM packages for each distribution
|
||||
# =============================================================================
|
||||
|
||||
# CentOS 7 (el7)
|
||||
# Rocky Linux 8 (el8)
|
||||
ARG VERSION=1.0.0
|
||||
RUN mkdir -p /packages/rpm && \
|
||||
fpm -s dir -t rpm \
|
||||
-n mod_reqin_log \
|
||||
-v "${VERSION}" \
|
||||
--rpm-dist el7 \
|
||||
-C /tmp/pkgroot-el7 \
|
||||
--architecture "x86_64" \
|
||||
--description "Apache HTTPD module for logging HTTP requests as JSON to Unix socket" \
|
||||
--url "https://github.com/example/mod_reqin_log" \
|
||||
--license "Apache-2.0" \
|
||||
--vendor "Developer <dev@example.com>" \
|
||||
--depends "httpd" \
|
||||
-p /packages/rpm/mod_reqin_log-${VERSION}-1.el7.x86_64.rpm \
|
||||
usr/lib64/httpd/modules/mod_reqin_log.so \
|
||||
etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# Rocky Linux 8 (el8)
|
||||
RUN \
|
||||
fpm -s dir -t rpm \
|
||||
-n mod_reqin_log \
|
||||
-v "${VERSION}" \
|
||||
@ -207,6 +185,23 @@ RUN \
|
||||
usr/lib64/httpd/modules/mod_reqin_log.so \
|
||||
etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# AlmaLinux 10 (el10)
|
||||
RUN \
|
||||
fpm -s dir -t rpm \
|
||||
-n mod_reqin_log \
|
||||
-v "${VERSION}" \
|
||||
--rpm-dist el10 \
|
||||
-C /tmp/pkgroot-el10 \
|
||||
--architecture "x86_64" \
|
||||
--description "Apache HTTPD module for logging HTTP requests as JSON to Unix socket" \
|
||||
--url "https://github.com/example/mod_reqin_log" \
|
||||
--license "Apache-2.0" \
|
||||
--vendor "Developer <dev@example.com>" \
|
||||
--depends "httpd" \
|
||||
-p /packages/rpm/mod_reqin_log-${VERSION}-1.el10.x86_64.rpm \
|
||||
usr/lib64/httpd/modules/mod_reqin_log.so \
|
||||
etc/httpd/conf.d/mod_reqin_log.conf
|
||||
|
||||
# =============================================================================
|
||||
# Stage 3: Output - Image finale avec les packages
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user