[packages/nginx] fix modsecurity detection with gcc 14

atler atler at pld-linux.org
Mon Jun 10 15:47:26 CEST 2024


commit c54e2db192eeb96147c818a5e5dfe4f7b6803f78
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jun 10 15:04:10 2024 +0200

    fix modsecurity detection with gcc 14

 modsecurity-gcc14.patch | 23 +++++++++++++++++++++++
 nginx.spec              |  2 ++
 2 files changed, 25 insertions(+)
---
diff --git a/nginx.spec b/nginx.spec
index 11645a7..141611f 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -77,6 +77,7 @@ Source103:	https://github.com/openresty/headers-more-nginx-module/archive/v%{hea
 Source104:	https://github.com/nginx-modules/ngx_cache_purge/archive/refs/tags/%{http_cache_purge_version}.tar.gz
 # Source104-md5:	bf92baae08e4c850825a8543c7d4aaa8
 Patch0:		%{name}-no-Werror.patch
+Patch1:		modsecurity-gcc14.patch
 URL:		https://nginx.org/
 BuildRequires:	mailcap
 BuildRequires:	pcre2-8-devel
@@ -305,6 +306,7 @@ Plik monitrc do monitorowania serwera WWW nginx.
 %prep
 %setup -q %{?with_rtmp:-a101} %{?with_modsecurity:-a33} %{?with_vts:-a102} %{?with_headers_more:-a103} -a104
 %patch0 -p0
+%{?with_modsecurity:%patch1 -p1 -d modsecurity-nginx-v%{modsecurity_version}}
 
 %if %{with rtmp}
 mv nginx-rtmp-module-%{rtmp_version} nginx-rtmp-module
diff --git a/modsecurity-gcc14.patch b/modsecurity-gcc14.patch
new file mode 100644
index 0000000..6e13b82
--- /dev/null
+++ b/modsecurity-gcc14.patch
@@ -0,0 +1,23 @@
+From 7d37ace7431ea9704faa98f29876bcd72ef4b1ff Mon Sep 17 00:00:00 2001
+From: Ervin Hegedus <airween at gmail.com>
+Date: Tue, 23 Apr 2024 21:42:02 +0200
+Subject: [PATCH] fix: Added missing header for conftest
+
+---
+ config | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/config b/config
+index c6e7467..3bf06a8 100644
+--- a/config
++++ b/config
+@@ -10,7 +10,8 @@
+ 
+ ngx_feature_name=
+ ngx_feature_run=no
+-ngx_feature_incs="#include <modsecurity/modsecurity.h>"
++ngx_feature_incs="#include <modsecurity/modsecurity.h>
++#include <stdio.h>"
+ ngx_feature_libs="-lmodsecurity"
+ ngx_feature_test='printf("hello");'
+ ngx_modsecurity_opt_I=
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nginx.git/commitdiff/3aeb100a3947c45fe3129940e42a7f78e2411525



More information about the pld-cvs-commit mailing list