git: 10c8a4ae2497 - 2025Q2 - www/mod_security: 2.9.6 -> 2.9.10

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Fri, 06 Jun 2025 06:29:26 UTC
The branch 2025Q2 has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=10c8a4ae2497caf86fefce1142aed8e203c8a074

commit 10c8a4ae2497caf86fefce1142aed8e203c8a074
Author:     Einar Bjarni Halldórsson <einar@isnic.is>
AuthorDate: 2025-06-06 06:12:09 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2025-06-06 06:29:08 +0000

    www/mod_security: 2.9.6 -> 2.9.10
    
    - Trustwave has announced the transfer of ModSecurity custodianship to OWASP
      in January 2024
    - uses pcre2 instead of pcre
    
    PR:             278180
    Submitted-by:   Pascal Christen <pascal.christen@hostpoint.ch>
    Reviewed-by:    Dani I. <i.dani@outlook.com>
    Changes:        https://github.com/owasp-modsecurity/ModSecurity/releases
    Security:       CVE 2025-47947, CVE 2025-48866
    (cherry picked from commit dd398a9719057d8089c51e1e3ddbf8d25241f051)
---
 www/mod_security/Makefile        | 16 +++++++---------
 www/mod_security/distinfo        |  6 +++---
 www/mod_security/files/README.in | 16 ++++++++++------
 3 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/www/mod_security/Makefile b/www/mod_security/Makefile
index 93992f953db4..422a359bdf8c 100644
--- a/www/mod_security/Makefile
+++ b/www/mod_security/Makefile
@@ -1,10 +1,8 @@
 PORTNAME=	mod_security
+PORTVERSION=	2.9.10
 DISTVERSIONPREFIX=	v
-PORTVERSION=	2.9.6
 CATEGORIES=	www security
-MASTER_SITES=	https://github.com/SpiderLabs/ModSecurity/releases/download/v${PORTVERSION}/
 PKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}
-DISTNAME=	${PORTNAME:S/_//:S/2//}-${PORTVERSION}
 
 MAINTAINER=	joneum@FreeBSD.org
 COMMENT=	Intrusion detection and prevention engine
@@ -12,14 +10,17 @@ WWW=		https://www.modsecurity.org/
 
 LICENSE=	APACHE20
 
-LIB_DEPENDS+=	libpcre.so:devel/pcre \
+LIB_DEPENDS+=	libpcre2-8.so:devel/pcre2 \
 		libapr-1.so:devel/apr1 \
 		libyajl.so:devel/yajl \
 		libcurl.so:ftp/curl \
 		libgdbm.so:databases/gdbm \
 		libexpat.so:textproc/expat2
 
-USES=		apache bdb gnome perl5 pkgconfig shebangfix
+USES=		apache bdb:18 gnome perl5 pkgconfig shebangfix autoreconf libtool:build
+USE_GITHUB=	yes
+GH_ACCOUNT=	owasp-modsecurity
+GH_PROJECT=	ModSecurity
 USE_GNOME=	libxml2
 GNU_CONFIGURE=	yes
 SHEBANG_FILES=	tools/rules-updater.pl.in mlogc/mlogc-batch-load.pl.in
@@ -59,10 +60,7 @@ ETCDIR=		${PREFIX}/etc/modsecurity
 
 REINPLACE_ARGS=	-i ""
 AP_EXTRAS+=	-DWITH_LIBXML2
-CONFIGURE_ARGS+=--with-apxs=${APXS} --with-pcre=${LOCALBASE} --with-yajl=${LOCALBASE} --with-curl=${LOCALBASE}
-
-post-patch:
-	@${REINPLACE_CMD} -e "s/lua5.1/lua-${LUA_VER}/g" ${WRKSRC}/configure
+CONFIGURE_ARGS+=--with-apxs=${APXS} --with-pcre2=${LOCALBASE} --with-yajl=${LOCALBASE} --with-curl=${LOCALBASE}
 
 pre-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
diff --git a/www/mod_security/distinfo b/www/mod_security/distinfo
index 950e40698d76..063cf2ff129a 100644
--- a/www/mod_security/distinfo
+++ b/www/mod_security/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1662714949
-SHA256 (modsecurity-2.9.6.tar.gz) = 626a831aca92cdff73ea68a85b7f5c105d9a15365fa270fbed3139a81eaf3344
-SIZE (modsecurity-2.9.6.tar.gz) = 4316582
+TIMESTAMP = 1749190237
+SHA256 (owasp-modsecurity-ModSecurity-v2.9.10_GH0.tar.gz) = d18bf74fa2073a6aad8e08a6f46c1eaac6c1841afb0b309b3acc54788a0b05d0
+SIZE (owasp-modsecurity-ModSecurity-v2.9.10_GH0.tar.gz) = 3901245
diff --git a/www/mod_security/files/README.in b/www/mod_security/files/README.in
index 9c13fcd1248e..c18d7e419348 100644
--- a/www/mod_security/files/README.in
+++ b/www/mod_security/files/README.in
@@ -21,15 +21,19 @@ under it.
 
   pkg install git
   cd %%ETCDIR%%
-  git clone https://github.com/SpiderLabs/owasp-modsecurity-crs
-  cp owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example \
-    crs.conf
+  git clone https://github.com/coreruleset/coreruleset.git
+  cp coreruleset/crs-setup.conf.example \
+    crs-setup.conf
 
-The CRS has various config options. To change them, edit crs.conf.
+The CRS has various config options. To change them, edit crs-setup.conf.
 
 To activate the CRS base rules, add the following to your httpd.conf:
 
-  Include etc/modsecurity/owasp-modsecurity-crs/base_rules/*.conf
+  IncludeOptional %%ETCDIR%%/coreruleset/crs-setup.conf
+  IncludeOptional %%ETCDIR%%/coreruleset/plugins/*-config.conf
+  IncludeOptional %%ETCDIR%%/coreruleset/plugins/*-before.conf
+  IncludeOptional %%ETCDIR%%/coreruleset/rules/*.conf
+  IncludeOptional %%ETCDIR%%/coreruleset/plugins/*-after.conf
 
 You can also add custom configuration and CRS exceptions here.
 For instance, you might want to disable rules that generate false
@@ -84,6 +88,6 @@ exceptions.
 You probably want to keep the CRS updated from time to time. You can
 do this with Git:
 
-  cd %%ETCDIR%%/owasp-modsecurity-crs
+  cd %%ETCDIR%%/coreruleset
   git pull
   apachectl restart