diff --git a/centos/SPECS/nginx.spec b/centos/SPECS/nginx.spec index 8fcea6a..f71b7f6 100644 --- a/centos/SPECS/nginx.spec +++ b/centos/SPECS/nginx.spec @@ -1,6 +1,8 @@ %global _hardened_build 1 %global nginx_user nginx %global with_ldap_module 1 +%global with_echo_module 1 +%define mod_echo_vers 0.62 %global with_modsecurity_module 0 %global with_vts_module 1 %global with_header_more_module 1 @@ -45,6 +47,7 @@ Source14: nginx-upgrade.8 Source15: headers-more-nginx-module-%{headervers}.tar.gz Source16: set-misc-nginx-module.tar.gz Source17: ngx_devel_kit.tar.gz +Source18: echo-nginx-module-%{mod_echo_vers}.tar.gz Source100: index.html Source101: poweredby.png Source102: nginx-logo.png @@ -110,6 +113,9 @@ Requires: %{name}-mod-vts = %{epoch}:%{version}-%{release} %if 0%{?with_header_more_module} Requires: %{name}-mod-header-more = %{epoch}:%{version}-%{release} %endif +%if 0%{?with_echo_module} +Requires: %{name}-mod-echo = %{epoch}:%{version}-%{release} +%endif %description all-modules %{summary}. @@ -252,6 +258,16 @@ Requires: nginx Header more module for nginx %endif +%if 0%{?with_echo_module} +%package mod-echo +Group: System Environment/Daemons +Summary: Nginx echo more module +Requires: nginx + +%description mod-echo +Echo module for nginx +%endif + %prep %if 0%{?with_vts_module} %setup -q -b 6 -n nginx-module-vts-%{vtsversion} @@ -269,11 +285,11 @@ Header more module for nginx %setup -q -b 16 -n set-misc-nginx-module-master %setup -q -b 17 -n ngx_devel_kit-master %endif -%setup -q +%if 0%{?with_echo_module} +%setup -q -b 18 -n echo-nginx-module-%{mod_echo_vers} +%endif +%setup -q -b 0 -n nginx-%{version} %patch0 -p0 -#%if 0%{?fedora} > 27 -#%patch1 -p1 -#%endif cp %{SOURCE200} %{SOURCE210} %{SOURCE10} %{SOURCE12} . %if 0%{?rhel} > 0 && 0%{?rhel} < 8 @@ -346,6 +362,9 @@ export DESTDIR=%{buildroot} %if 0%{?with_header_more_module} --add-dynamic-module=%{_builddir}/headers-more-nginx-module-%{headervers} \ %endif +%if 0%{?with_set_misc_module} + --add-dynamic-module=%{_builddir}/echo-nginx-module-%{mod_echo_vers} \ +%endif %if 0%{?with_modsecurity_module} --add-dynamic-module=%{_builddir}/modsecurity-nginx-%{modsecver} \ --with-compat \ @@ -451,6 +470,10 @@ echo 'load_module "%{_libdir}/nginx/modules/ngx_http_modsecurity_module.so";' \ echo 'load_module "%{_libdir}/nginx/modules/ngx_http_headers_more_filter_module.so";' \ > %{buildroot}%{_datadir}/nginx/modules/mod-header-more.conf %endif +%if 0%{?with_echo_module} +echo 'load_module "%{_libdir}/nginx/modules/ngx_http_echo_module.so";' \ + > %{buildroot}%{_datadir}/nginx/modules/mod-echo.conf +%endif %if 0%{?with_set_misc_module} echo 'load_module "%{_libdir}/nginx/modules/ndk_http_module.so";' \ > %{buildroot}%{_datadir}/nginx/modules/mod-set-misc.conf @@ -526,6 +549,13 @@ if [ $1 -eq 1 ]; then fi %endif +%if 0%{?with_echo_module} +%post mod-echo +if [ $1 -eq 1 ]; then + /usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || : +fi +%endif + %if 0%{?with_set_misc_module} %post mod-set-misc if [ $1 -eq 1 ]; then @@ -636,6 +666,12 @@ fi %{_libdir}/nginx/modules/ngx_http_headers_more_filter_module.so %endif +%if 0%{?with_echo_module} +%files mod-echo +%{_datadir}/nginx/modules/mod-echo.conf +%{_libdir}/nginx/modules/ngx_http_echo_module.so +%endif + %if 0%{?with_set_misc_module} %files mod-set-misc %{_datadir}/nginx/modules/mod-set-misc.conf @@ -658,8 +694,11 @@ fi [ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/* %changelog +* Thu Feb 18 2021 Daniel Steiner +- New ngx_echo_module added. + * Tue Feb 9 2021 Daniel Steiner -- Upadate to version 1.19.6 on CentOS 8. +- Upadate to version 1.19.6 on CentOS 8 (nginx:mainline module!) - New ngx_http_set_misc_module added. * Thu Jan 16 2020 Daniel Steiner