Skip to content

Commit 2b7b423

Browse files
committed
chore: parameterize compilation flags
1 parent 0be91fd commit 2b7b423

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

.github/workflows/verifyimage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,4 @@ jobs:
146146
-d tests/regression/tests \
147147
--log-file "tests/logs/${modsec_version}/error.log" \
148148
--overrides "tests/regression/${backend}-overrides.yaml" \
149-
--show-failures-only \
150-
--trace
149+
--show-failures-only

apache/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG HTTPD_VERSION="n/a"
33
FROM image AS build
44

55
ARG MODSEC2_VERSION="n/a"
6+
ARG MODSEC2_FLAGS="n/a"
67
ARG LUA_VERSION="n/a"
78

89
RUN set -eux; \
@@ -31,7 +32,7 @@ RUN set -eux; \
3132
tar -zxvf v${MODSEC2_VERSION}.tar.gz; \
3233
cd ModSecurity-${MODSEC2_VERSION}; \
3334
./autogen.sh; \
34-
./configure --with-yajl --with-ssdeep --with-pcre2; \
35+
./configure ${MODSEC2_FLAGS}; \
3536
make; \
3637
make install; \
3738
make clean

apache/Dockerfile-alpine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG HTTPD_VERSION="n/a"
33
FROM image AS build
44

55
ARG MODSEC2_VERSION="n/a"
6+
ARG MODSEC2_FLAGS="n/a"
67
ARG LUA_VERSION="n/a"
78

89
# see https://httpd.apache.org/docs/2.4/install.html#requirements
@@ -41,7 +42,7 @@ RUN set -eux; \
4142
tar -zxvf v${MODSEC2_VERSION}.tar.gz; \
4243
cd ModSecurity-${MODSEC2_VERSION}; \
4344
./autogen.sh; \
44-
./configure --with-yajl --with-ssdeep --with-lmdb --with-pcre2; \
45+
./configure ${MODSEC2_FLAGS}; \
4546
make; \
4647
make install; \
4748
make clean

docker-bake.hcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ variable "modsec3-version" {
44
default = "3.0.14"
55
}
66

7+
variable "modsec3-flags" {
8+
default = "--with-yajl --with-ssdeep --with-lmdb --with-pcre2 --with-maxmind --enable-silent-rules"
9+
}
10+
711
variable "modsec2-version" {
812
# renovate: depName=ModSecurity2 packageName=owasp-modsecurity/ModSecurity datasource=github-releases
913
default = "2.9.8"
1014
}
1115

16+
variable "modsec2-flags" {
17+
default = "--with-yajl --with-ssdeep --with-pcre2"
18+
}
19+
1220
variable "crs-version" {
1321
# renovate: depName=coreruleset/coreruleset datasource=github-releases
1422
default = "4.12.0"
@@ -109,7 +117,9 @@ target "platforms-base" {
109117
args = {
110118
CRS_RELEASE = "${crs-version}"
111119
MODSEC2_VERSION = "${modsec2-version}"
120+
MODSEC2_FLAGS = modsec2-flags
112121
MODSEC3_VERSION = "${modsec3-version}"
122+
MODSEC3_FLAGS = modsec3-flags
113123
LUA_VERSION = "${lua-version}"
114124
LMDB_VERSION = "${lmdb-version}"
115125
}

nginx/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM image AS build
22

33
ARG NGINX_VERSION="n/a"
44
ARG MODSEC3_VERSION="n/a"
5+
ARG MODSEC3_FLAGS="n/a"
56
ARG LMDB_VERSION="n/a"
67
ARG LUA_VERSION="n/a"
78
ARG NGINX_DYNAMIC_MODULES="n/a"
@@ -50,7 +51,7 @@ RUN set -eux; \
5051
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/ssdeep.m4; \
5152
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/pcre2.m4; \
5253
./build.sh; \
53-
./configure --with-yajl --with-ssdeep --with-pcre2 --with-maxmind --enable-silent-rules; \
54+
./configure ${MODSEC3_FLAGS}; \
5455
make -j$(nproc) install; \
5556
strip /usr/local/modsecurity/lib/lib*.so*
5657

nginx/Dockerfile-alpine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM image AS build
22

33
ARG NGINX_VERSION="n/a"
44
ARG MODSEC3_VERSION="n/a"
5+
ARG MODSEC3_FLAGS="n/a"
56
ARG LUA_VERSION="n/a"
67
ARG NGINX_DYNAMIC_MODULES="n/a"
78
ARG NGINX_HOME="n/a"
@@ -48,7 +49,7 @@ RUN set -eux; \
4849
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/ssdeep.m4; \
4950
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/pcre2.m4; \
5051
./build.sh; \
51-
./configure --with-yajl --with-ssdeep --with-lmdb --with-pcre2 --with-maxmind --enable-silent-rules; \
52+
./configure ${MODSEC3_FLAGS}; \
5253
make -j$(nproc) install; \
5354
strip /usr/local/modsecurity/lib/lib*.so*
5455

0 commit comments

Comments
 (0)