- Use conditional for loading mod_unique_id (rhbz #879264)
- Fix syntax errors on httpd 2.4.x by using IncludeOptional (rhbz
This commit is contained in:
parent
713661ddaa
commit
712810bae0
5
10-mod_security.conf
Normal file
5
10-mod_security.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
LoadModule security2_module modules/mod_security2.so
|
||||||
|
|
||||||
|
<IfModule !mod_unique_id.c>
|
||||||
|
LoadModule unique_id_module modules/mod_unique_id.so
|
||||||
|
</IfModule>
|
@ -1,6 +1,3 @@
|
|||||||
LoadModule security2_module modules/mod_security2.so
|
|
||||||
LoadModule unique_id_module modules/mod_unique_id.so
|
|
||||||
|
|
||||||
<IfModule mod_security2.c>
|
<IfModule mod_security2.c>
|
||||||
# ModSecurity Core Rules Set configuration
|
# ModSecurity Core Rules Set configuration
|
||||||
Include modsecurity.d/*.conf
|
Include modsecurity.d/*.conf
|
||||||
|
@ -10,12 +10,13 @@
|
|||||||
Summary: Security module for the Apache HTTP Server
|
Summary: Security module for the Apache HTTP Server
|
||||||
Name: mod_security
|
Name: mod_security
|
||||||
Version: 2.7.1
|
Version: 2.7.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://www.modsecurity.org/
|
URL: http://www.modsecurity.org/
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_%{version}.tar.gz
|
Source: https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_%{version}.tar.gz
|
||||||
Source1: mod_security.conf
|
Source1: mod_security.conf
|
||||||
|
Source2: 10-mod_security.conf
|
||||||
Requires: httpd httpd-mmn = %{_httpd_mmn}
|
Requires: httpd httpd-mmn = %{_httpd_mmn}
|
||||||
BuildRequires: httpd-devel libxml2-devel pcre-devel curl-devel lua-devel
|
BuildRequires: httpd-devel libxml2-devel pcre-devel curl-devel lua-devel
|
||||||
|
|
||||||
@ -60,14 +61,13 @@ install -m0755 apache2/.libs/mod_security2.so %{buildroot}%{_httpd_moddir}/mod_s
|
|||||||
|
|
||||||
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
|
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
|
||||||
# 2.4-style
|
# 2.4-style
|
||||||
sed -n /^LoadModule/p %{SOURCE1} > 10-mod_security.conf
|
install -Dp -m0644 %{SOURCE2} %{buildroot}%{_httpd_modconfdir}/10-mod_security.conf
|
||||||
sed /LoadModule/d %{SOURCE1} > mod_security.conf
|
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_httpd_confdir}/mod_security.conf
|
||||||
touch -r %{SOURCE1} *.conf
|
sed -i 's/Include/IncludeOptional/' %{buildroot}%{_httpd_confdir}/mod_security.conf
|
||||||
install -Dp -m0644 mod_security.conf %{buildroot}%{_httpd_confdir}/mod_security.conf
|
|
||||||
install -Dp -m0644 10-mod_security.conf %{buildroot}%{_httpd_modconfdir}/10-mod_security.conf
|
|
||||||
%else
|
%else
|
||||||
# 2.2-style
|
# 2.2-style
|
||||||
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_httpd_confdir}/mod_security.conf
|
install -d -m0755 %{buildroot}%{_httpd_confdir}
|
||||||
|
cat %{SOURCE2} %{SOURCE1} > %{buildroot}%{_httpd_confdir}/mod_security.conf
|
||||||
%endif
|
%endif
|
||||||
install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
||||||
|
|
||||||
@ -107,6 +107,10 @@ rm -rf %{buildroot}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 22 2012 Athmane Madjoudj <athmane@fedoraproject.org> 2.7.1-5
|
||||||
|
- Use conditional for loading mod_unique_id (rhbz #879264)
|
||||||
|
- Fix syntax errors on httpd 2.4.x by using IncludeOptional (rhbz #879264, comment #2)
|
||||||
|
|
||||||
* Mon Nov 19 2012 Peter Vrabec <pvrabec@redhat.com> 2.7.1-4
|
* Mon Nov 19 2012 Peter Vrabec <pvrabec@redhat.com> 2.7.1-4
|
||||||
- mlogc subpackage is not provided on RHEL7
|
- mlogc subpackage is not provided on RHEL7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user