%bcond_without gd # without http image filter module
%bcond_without geoip # without http geoip module and stream geoip module
%bcond_without http2 # HTTP/2 module
+%bcond_without http3 # HTTP/3 module
%bcond_without mail # don't build imap/mail proxy
%bcond_without perl # don't build with perl module
%bcond_without poll # poll module
Summary: High perfomance HTTP and reverse proxy server
Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
-# nginx lines:
-# - stable: production quality with stable API
-# - mainline: production quality but API can change
+# nginx mainline is recommended by nginx team: https://www.nginx.com/blog/nginx-1-6-1-7-released/
# http://nginx.org/en/download.html
Name: nginx
-Version: 1.24.0
-Release: 6
+Version: 1.25.4
+Release: 1
License: BSD-like
Group: Networking/Daemons/HTTP
Source0: https://nginx.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: f95835b55b3cbf05a4368e7bccbb8a46
+# Source0-md5: 527a2e135e8b158ef502239ce4701018
Source1: https://nginx.org/favicon.ico
# Source1-md5: 72e228c3809db53da8a884b6676ed36a
Source2: proxy.conf
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: pcre2-mem-leak.patch
URL: https://nginx.org/
BuildRequires: mailcap
BuildRequires: pcre2-8-devel
%prep
%setup -q %{?with_rtmp:-a101} %{?with_modsecurity:-a33} %{?with_vts:-a102} %{?with_headers_more:-a103} -a104
%patch0 -p0
-%patch1 -p1
%if %{with rtmp}
mv nginx-rtmp-module-%{rtmp_version} nginx-rtmp-module
%{?with_auth_request:--with-http_auth_request_module} \
%{?with_threads:--with-threads} \
%{?with_http2:--with-http_v2_module} \
+ %{?with_http3:--with-http_v3_module} \
%{?with_modsecurity:--add-dynamic-module=modsecurity-nginx-v%{modsecurity_version}} \
--with-http_secure_link_module \
%{?with_file_aio:--with-file-aio} \
+++ /dev/null
-From 284a0c73771e3a2c57af6e74d96d9a6878b2e7b4 Mon Sep 17 00:00:00 2001
-From: Maxim Dounin <mdounin@mdounin.ru>
-Date: Tue, 17 Oct 2023 02:39:38 +0300
-Subject: [PATCH] Core: fixed memory leak on configuration reload with PCRE2.
-
-In ngx_regex_cleanup() allocator wasn't configured when calling
-pcre2_compile_context_free() and pcre2_match_data_free(), resulting
-in no ngx_free() call and leaked memory. Fix is ensure that allocator
-is configured for global allocations, so that ngx_free() is actually
-called to free memory.
-
-Additionally, ngx_regex_compile_context was cleared in
-ngx_regex_module_init(). It should be either not cleared, so it will
-be freed by ngx_regex_cleanup(), or properly freed. Fix is to
-not clear it, so ngx_regex_cleanup() will be able to free it.
-
-Reported by ZhenZhong Wu,
-https://mailman.nginx.org/pipermail/nginx-devel/2023-September/3Z5FIKUDRN2WBSL3JWTZJ7SXDA6YIWPB.html
----
- src/core/ngx_regex.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c
-index 91381f4994..5b13c5db38 100644
---- a/src/core/ngx_regex.c
-+++ b/src/core/ngx_regex.c
-@@ -600,6 +600,8 @@ ngx_regex_cleanup(void *data)
- * the new cycle, these will be re-allocated.
- */
-
-+ ngx_regex_malloc_init(NULL);
-+
- if (ngx_regex_compile_context) {
- pcre2_compile_context_free(ngx_regex_compile_context);
- ngx_regex_compile_context = NULL;
-@@ -611,6 +613,8 @@ ngx_regex_cleanup(void *data)
- ngx_regex_match_data_size = 0;
- }
-
-+ ngx_regex_malloc_done();
-+
- #endif
- }
-
-@@ -706,9 +710,6 @@ ngx_regex_module_init(ngx_cycle_t *cycle)
- ngx_regex_malloc_done();
-
- ngx_regex_studies = NULL;
--#if (NGX_PCRE2)
-- ngx_regex_compile_context = NULL;
--#endif
-
- return NGX_OK;
- }