## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 14; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global origname nginx-module-modsecurity Name: nginx-mod-modsecurity Version: 1.0.3 Release: %autorelease Summary: ModSecurity v3 nginx connector License: Apache-2.0 URL: https://github.com/SpiderLabs/ModSecurity-nginx Source: %{url}/archive/v%{version}/%{origname}-%{version}.tar.gz Source: https://raw.githubusercontent.com/SpiderLabs/ModSecurity/v3/master/modsecurity.conf-recommended Source: https://raw.githubusercontent.com/SpiderLabs/ModSecurity/v3/master/unicode.mapping Source: nginx.conf.modsecurity # Upstream PR https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275 # Required since https://koschei.fedoraproject.org/build/16411365 Patch: 275.patch BuildRequires: gcc BuildRequires: libmodsecurity-devel BuildRequires: nginx-mod-devel BuildRequires: pcre-devel Requires: nginx-filesystem %description The ModSecurity-nginx connector is the connection point between nginx and libmodsecurity (ModSecurity v3). Said another way, this project provides a communication channel between nginx and libmodsecurity. This connector is required to use LibModSecurity with nginx. The ModSecurity-nginx connector takes the form of an nginx module. The module simply serves as a layer of communication between nginx and ModSecurity %prep %autosetup -n ModSecurity-nginx-%{version} # Change default path to avoid issues with SELinux sed -i 's:/var/log/modsec_audit.log:/var/log/nginx/modsec_audit.log:' %{SOURCE1} %build %nginx_modconfigure %nginx_modbuild %install pushd %{_vpath_builddir} install -dm 0755 %{buildroot}%{nginx_moddir} install -pm 0755 ngx_http_modsecurity_module.so %{buildroot}%{nginx_moddir} install -dm 0755 %{buildroot}%{nginx_modconfdir} echo 'load_module "%{nginx_moddir}/ngx_http_modsecurity_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-modsecurity.conf popd install -dm 0755 %{buildroot}%{_sysconfdir}/nginx/conf.d/ install -pm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nginx/modsecurity.conf install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/nginx/unicode.mapping install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nginx/nginx.conf.modsecurity %files %license LICENSE %doc README.md %{nginx_moddir}/ngx_http_modsecurity_module.so %{nginx_modconfdir}/mod-modsecurity.conf %config(noreplace) %{_sysconfdir}/nginx/modsecurity.conf %{_sysconfdir}/nginx/nginx.conf.modsecurity %{_sysconfdir}/nginx/unicode.mapping %changelog ## START: Generated by rpmautospec * Mon Aug 26 2024 Felix Kaechele - 1.0.3-14 - Rebuild for nginx 1.26.2... again. * Sat Aug 17 2024 Felix Kaechele - 1.0.3-13 - Rebuild for nginx 1.26.2 * Thu Jul 18 2024 Fedora Release Engineering - 1.0.3-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jun 17 2024 Felix Kaechele - 1.0.3-11 - Rebuild for 1.26.1 again, last rebuild still pulled in 1.26.0 * Tue Jun 04 2024 Felix Kaechele - 1.0.3-10 - Rebuild for nginx 1.26.1 * Tue Apr 30 2024 Felix Kaechele - 1.0.3-9 - Rebuild for nginx 1.26.0 * Sat Mar 16 2024 Mikel Olasagasti Uranga - 1.0.3-8 - Change default log path in proposed configuration - Closes rhbz#2269267 * Sun Feb 11 2024 Mikel Olasagasti Uranga - 1.0.3-7 - Fix FTBFS - Closes rhbz#2261403 * Thu Jan 25 2024 Fedora Release Engineering - 1.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 1.0.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jul 20 2023 Fedora Release Engineering - 1.0.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Apr 23 2023 Mikel Olasagasti Uranga - 1.0.3-3 - Rebuild for nginx 1.24.0 * Thu Apr 13 2023 Mikel Olasagasti Uranga - 1.0.3-2 - Fix config and add config example * Tue Apr 11 2023 Mikel Olasagasti Uranga - 1.0.3-1 - Initial package - Closes rhbz#2182207 ## END: Generated by rpmautospec