package init
This commit is contained in:
parent
2e0ffe6444
commit
deef6cf428
43
mod_security_crs.spec
Normal file
43
mod_security_crs.spec
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Name: mod_security_crs
|
||||||
|
Version: 3.0.0
|
||||||
|
Release: 8
|
||||||
|
Summary: Rules of ModSecurity
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://coreruleset.org/
|
||||||
|
Source: https://github.com/coreruleset/coreruleset/archive/v%{version}.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: mod_security >= 2.8.0
|
||||||
|
Obsoletes: mod_security_crs-extras < 3.0.0
|
||||||
|
|
||||||
|
%description
|
||||||
|
The base rules are provided for mod_security by this package.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n coreruleset-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/activated_rules
|
||||||
|
install -d %{buildroot}%{_datarootdir}/mod_modsecurity_crs/rules
|
||||||
|
|
||||||
|
mv rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/activated_rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
|
||||||
|
mv rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/activated_rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
|
||||||
|
|
||||||
|
install -m0644 rules/* %{buildroot}%{_datarootdir}/mod_modsecurity_crs/rules/
|
||||||
|
mv crs-setup.conf.example %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/crs-setup.conf
|
||||||
|
|
||||||
|
for f in `ls %{buildroot}%{_datarootdir}/mod_modsecurity_crs/rules/` ; do
|
||||||
|
ln -s %{_datarootdir}/mod_modsecurity_crs/rules/$f %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/activated_rules/$f;
|
||||||
|
done
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc CHANGES README.md LICENSE
|
||||||
|
%config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/{activated_rules/*,crs-setup.conf}
|
||||||
|
%{_datarootdir}/mod_modsecurity_crs
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Apr 28 2020 wangerfeng<wangerfeng5g@huawei.com> - 3.0.0-8
|
||||||
|
- Package init
|
||||||
4
mod_security_crs.yaml
Normal file
4
mod_security_crs.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: coreruleset/coreruleset
|
||||||
|
tag_prefix: ^
|
||||||
|
seperator: .
|
||||||
BIN
v3.0.0.tar.gz
Normal file
BIN
v3.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user