nginx: 1.26.2

This commit is contained in:
Raven 2024-08-25 08:56:02 +06:00
parent bf38c68048
commit 67e18b7f32

View File

@ -18,6 +18,7 @@
%bcond_without brotli
%bcond_without fancyindex
%bcond_without vts
%bcond_without echo
%bcond_with http3
%if 0%{?rhel} >= 8
@ -29,21 +30,27 @@
%endif
%endif
# specific package versions
%if %{with lua}
%define luamod_ver 0.10.26
%define ndk_ver 0.3.1
%global _suffix -cp
%if %{with http3}
%global _suffix -h3
%endif
%define openssl_ver 3.0
%define fi_ver 0.5.2
%define hm_ver 0.34
%define geoip2_ver 3.4
%define vts_ver 0.2.2
# specific package versions
%if %{with lua}
%global luamod_ver 0.10.26
%global ndk_ver 0.3.1
%endif
Name: nginx-cp
%global openssl_ver 3.0
%global fi_ver 0.5.2
%global hm_ver 0.34
%global geoip2_ver 3.4
%global vts_ver 0.2.2
%global echo_ver 0.63
Name: nginx%{_suffix}
Epoch: 1
Version: 1.26.0
Version: 1.26.2
Release: 1%{?dist}
Summary: A high performance web server and reverse proxy server
@ -88,7 +95,11 @@ Source321: ngx_brotli-master.zip
%endif
%if %{with vts}
Source322: https://github.com/vozlt/nginx-module-vts/archive/refs/tags/v0.2.2.tar.gz#/nginx-module-vts-%{vts_ver}.tar.gz
Source322: https://github.com/vozlt/nginx-module-vts/archive/refs/tags/v%{vts_ver}.tar.gz#/nginx-module-vts-%{vts_ver}.tar.gz
%endif
%if %{with echo}
Source323: https://github.com/openresty/echo-nginx-module/archive/refs/tags/v%{echo_ver}.tar.gz
%endif
# removes -Werror in upstream build scripts. -Werror conflicts with
@ -189,7 +200,16 @@ Provides: webserver
Modularitylabel: %{name}:stable:%{version}:latest
%endif
Provides: nginx
Provides: nginx%{_isa} = %{epoch}:%{version}-%{release}
Provides: nginx(abi) = %{epoch}:%{version}-%{release}
Provides: config(nginx) = %{epoch}:%{version}-%{release}
Obsoletes: nginx <= %{epoch}:%{version}-%{release}
%if %{with http3}
Conflicts: nginx-cp
%else
Conflicts: nginx-h3
%endif
%if 0%{?rhel} >= 7
BuildRequires: systemd
@ -253,14 +273,27 @@ for the Nginx server including the correct permissions for the
directories.
%endif
%if %{with vts}
%package module-vts
Summary: Nginx virtual host traffic status module
Requires: %{name} = %{version}-%{release}
Provides: ngx_http_vhost_traffic_status_module == %{vts_ver}
Conflicts: %{real_name}-module-vts
%if %{with echo}
%package -n nginx-module-echo
Summary: Brings "echo", "sleep", "time", "exec" and more shell-style goodies to Nginx config file.
Requires: nginx(abi) = %{epoch}:%{version}-%{release}
Obsoletes: nginx-cp-modile-echo <= %{epoch}:%{version}-%{release}
Obsoletes: nginx-h3-modile-echo <= %{epoch}:%{version}-%{release}
%description module-vts
%description -n nginx-module-echo
%{summary}.
%endif
%if %{with vts}
%package -n nginx-module-vts
Summary: Nginx virtual host traffic status module
Requires: %{name} = %{epoch}:%{version}-%{release}
Provides: ngx_http_vhost_traffic_status_module == %{vts_ver}
Requires: nginx(abi) = %{epoch}:%{version}-%{release}
Obsoletes: nginx-cp-modile-vts <= %{epoch}:%{version}-%{release}
Obsoletes: nginx-h3-modile-vts <= %{epoch}:%{version}-%{release}
%description -n nginx-module-vts
This is an Nginx module that provides access to virtual host status
information. It contains the current status such as servers, upstreams,
caches.
@ -302,6 +335,10 @@ unzip -qq %{SOURCE321}
tar -xf %{SOURCE322}
%endif
%if %{with echo}
tar -xf %{SOURCE323}
%endif
%if 0%{?rhel} < 8
sed -i -e 's#KillMode=.*#KillMode=process#g' %{SOURCE10}
sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' %{SOURCE12}
@ -420,6 +457,9 @@ export DESTDIR=%{buildroot}
%endif
%if %{with brotli}
--add-dynamic-module=ngx_brotli-master \
%endif
%if %{with echo}
--add-dynamic-module=echo-nginx-module-%{echo_ver} \
%endif
--with-ld-opt="$ngx_ldflags" \
--with-cc-opt="$ngx_cflags"
@ -532,6 +572,10 @@ echo -e 'load_module "%{_libdir}/nginx/modules/ngx_http_vhost_traffic_status_mod
> %{buildroot}%{_datadir}/nginx/modules/mod-http-vhost-traffic-status.conf
%endif
%if %{with echo}
echo -e 'load_module "%{_libdir}/nginx/modules/ngx_http_echo_module.so";' \
> %{buildroot}%{_datadir}/nginx/modules/mod-http-echo.conf
%endif
mv -f %{buildroot}%{_sysconfdir}/nginx/*.default %{buildroot}%{_sysconfdir}/nginx/default.d/
@ -663,13 +707,28 @@ fi
%dir %{_sysconfdir}/nginx/users
%dir %{_sysconfdir}/nginx/ssl
%if %{with echo}
%files -n nginx-module-echo
%{_libdir}/nginx/modules/ngx_http_echo_module.so
%{_datadir}/nginx/modules/mod-http-echo.conf
%endif
%if %{with vts}
%files module-vts
%files -n nginx-module-vts
%{_libdir}/nginx/modules/ngx_http_vhost_traffic_status_module.so
%{_datadir}/nginx/modules/mod-http-vhost-traffic-status.conf
%endif
%changelog
* Thu Aug 15 2024 Raven <raven@sysadmins.ws> - 1.26.2-1
- new stable version
* Sat Jun 1 2024 Raven <raven@sysadmins.ws> - 1.26.1-1
- new stable version
* Tue May 14 2024 Raven <raven@sysadmins.ws> - 1.26.0-2
- add conditional build of echo module
* Wed Apr 24 2024 Raven <raven@sysadmins.ws> - 1.26.0-1
- new stable version
- get rid of http2 HPACK