Skip to content

Commit 5fd0a41

Browse files
fzipiCopilot
andcommitted
fix: patch msc_find_lib.m4 for multiarch library detection
ModSecurity v3.0.15 refactored library detection to centralize hardcoded architecture paths in build/msc_find_lib.m4. The ssdeep.m4 and pcre2.m4 files are now thin wrappers that delegate to MSC_CHECK_LIB. Patch only msc_find_lib.m4 to replace 'i386-linux-gnu' with the actual detected architecture. This fixes SSDEEP library detection on arm64 and other non-x86 platforms. Fixes: build failures on linux/arm64 and linux/i386 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dbcb017 commit 5fd0a41

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

nginx/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ RUN set -eux; \
5151
git clone https://github.com/owasp-modsecurity/ModSecurity --branch "v${MODSEC3_VERSION}" --depth 1 --recursive; \
5252
cd ModSecurity; \
5353
ARCH=$(gcc -print-multiarch); \
54-
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/ssdeep.m4; \
55-
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/pcre2.m4; \
54+
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/msc_find_lib.m4; \
5655
./build.sh; \
5756
./configure ${MODSEC3_FLAGS}; \
5857
make -j$(nproc) install; \

nginx/Dockerfile-alpine

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ RUN set -eux; \
4848
git clone https://github.com/owasp-modsecurity/ModSecurity --branch "v${MODSEC3_VERSION}" --depth 1 --recursive; \
4949
cd ModSecurity; \
5050
ARCH=$(gcc -print-multiarch); \
51-
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/ssdeep.m4; \
52-
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/pcre2.m4; \
51+
sed -ie "s/i386-linux-gnu/${ARCH}/g" build/msc_find_lib.m4; \
5352
./build.sh; \
5453
./configure ${MODSEC3_FLAGS}; \
5554
make -j$(nproc) install; \

0 commit comments

Comments
 (0)