fix: patch msc_find_lib.m4 for multiarch library detection#426
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request updates the ModSecurity build-time architecture substitution logic in both ChangesModSecurity Build Architecture Substitution
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the ModSecurity v3 build patching logic for nginx images to match ModSecurity 3.0.15’s refactored library detection, where architecture-specific paths are centralized in build/msc_find_lib.m4.
Changes:
- Replaces separate patches to
ssdeep.m4andpcre2.m4. - Applies the architecture replacement once in
msc_find_lib.m4. - Keeps both Debian-based and Alpine nginx builds aligned.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
nginx/Dockerfile |
Updates Debian-based nginx ModSecurity v3 build patching to target msc_find_lib.m4. |
nginx/Dockerfile-alpine |
Updates Alpine nginx ModSecurity v3 build patching to target msc_find_lib.m4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 with ModSecurity v3.0.15.
Summary by CodeRabbit