nginx-mod-modsecurity-crs.spec 1.81 KB
Newer Older
53c70r's avatar
53c70r committed
1
2
3
%global debug_package %{nil}

Name:           nginx-mod-modsecurity-crs
53c70r's avatar
53c70r committed
4
Version:        3.3.0
53c70r's avatar
53c70r committed
5
Release:        8%{?dist}
53c70r's avatar
53c70r committed
6
Summary:        OWASP-CRS for Nginx
53c70r's avatar
53c70r committed
7
License:        ASL 2.0
53c70r's avatar
53c70r committed
8
BuildArch:      noarch
53c70r's avatar
53c70r committed
9
10
URL:            https://owasp.org/www-project-modsecurity-core-rule-set/
Group:          System Environment/Daemons
53c70r's avatar
53c70r committed
11
Source0:        https://github.com/coreruleset/coreruleset/archive/v%{version}.tar.gz
53c70r's avatar
53c70r committed
12
13
Source1:        load_file.conf
Source2:        modsecurity.conf
53c70r's avatar
53c70r committed
14
Source3:        LICENSE
53c70r's avatar
53c70r committed
15

53c70r's avatar
53c70r committed
16
Obsoletes:      mod_security_crs
53c70r's avatar
53c70r committed
17
Requires:       nginx-mod-modsecurity
53c70r's avatar
53c70r committed
18
19
20
21
22

%description
The OWASP ModSecurity Core Rule Set (CRS) is a set of generic attack detection rules for use with ModSecurity or compatible web application firewalls. The CRS aims to protect web applications from a wide range of attacks, including the OWASP Top Ten, with a minimum of false alerts.

%prep
53c70r's avatar
Revert.    
53c70r committed
23
%setup -c -q
53c70r's avatar
53c70r committed
24
25

%install
26
%{__install} -d %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/rules/
53c70r's avatar
53c70r committed
27
28
29
30
31
%{__install} -p -D -m 0644 ./coreruleset-%{version}/rules/* %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/rules/
%{__install} -p -D -m 0644 ./coreruleset-%{version}/crs-setup.conf.example %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/crs-setup.conf
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/load_file.conf
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/nginx/conf.d/modsecurity.conf
%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_datarootdir}/licenses/%{NAME}/LICENSE
53c70r's avatar
53c70r committed
32
33
34

%files
%defattr (-,root,root)
53c70r's avatar
53c70r committed
35
%config(noreplace) %{_sysconfdir}/nginx/modsecurity.d/coreruleset/crs-setup.conf
53c70r's avatar
53c70r committed
36
%config(noreplace) %{_sysconfdir}/nginx/conf.d/modsecurity.conf
53c70r's avatar
53c70r committed
37
38
39
%{_sysconfdir}/nginx/modsecurity.d/coreruleset
%{_sysconfdir}/nginx/conf.d/modsecurity.conf
%{_datarootdir}/licenses/%{NAME}/LICENSE