Search
j0ke.net Open Build Service
>
Projects
>
internetx
>
mod_security
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 15
[-]
[+]
Changed
mod_security-ix.spec
@@ -12,8 +12,29 @@ Source4: zzz_asl_custom_local_exclude.conf Patch1: waf-label.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?sl_version} || 0%{?redhat_version} Requires: httpd httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && cat %{_includedir}/httpd/.mmn || echo missing) -BuildRequires: httpd-devel libxml2-devel pcre-devel libtool pkgconfig curl-devel +BuildRequires: httpd-devel pkgconfig +%define apxs %{_sbindir}/apxs +%define apache_libexecdir %(%{apxs} -q LIBEXECDIR) +##%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) +%define apache_sysconfdir /etc/httpd +%define apache_usr apache +%define apache_grp apache +%endif +%if 0%{?suse_version} +BuildRequires: apache2-devel apache2-prefork pkg-config +BuildRequires: -post-build-checks +%define apxs %{_sbindir}/apxs2 +%define apache_libexecdir %(%{apxs} -q LIBEXECDIR) +%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) +%define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)/MMN; test -x $MMN && $MMN) +%define apache_usr wwwrun +%define apache_grp www +Requires: apache2 %{apache_mmn} +%endif + +BuildRequires: libxml2-devel pcre-devel libtool curl-devel BuildRequires: curl BuildRequires: lua-devel @@ -48,16 +69,16 @@ %install rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_sysconfdir}/httpd/modsecurity.d/ -mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +mkdir -p %{buildroot}/%{apache_sysconfdir}/modsecurity.d/ +mkdir -p %{buildroot}/%{apache_sysconfdir}/conf.d/ mkdir -p %{buildroot}/var/asl/data/suspicious mkdir -p %{buildroot}/var/asl/data/msa mkdir -p %{buildroot}/var/asl/data/audit -install -D -m755 apache2/.libs/mod_security2.so %{buildroot}/%{_libdir}/httpd/modules/mod_security2.so -install -D -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/00_mod_security.conf -install -D -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/httpd/modsecurity.d/modsecurity_crs_10_config.conf -install -D -m644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/httpd/modsec/zzz_asl_custom_exclude.conf -install -D -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/httpd/modsec/zzz_asl_custom_local_exclude.conf +install -D -m755 apache2/.libs/mod_security2.so %{buildroot}/%{apache_libexecdir}/mod_security2.so +install -D -m644 %{SOURCE1} %{buildroot}/%{apache_sysconfdir}/conf.d/00_mod_security.conf +install -D -m644 %{SOURCE2} %{buildroot}/%{apache_sysconfdir}/modsecurity.d/modsecurity_crs_10_config.conf +install -D -m644 %{SOURCE3} %{buildroot}/%{apache_sysconfdir}/modsec/zzz_asl_custom_exclude.conf +install -D -m644 %{SOURCE4} %{buildroot}/%{apache_sysconfdir}/modsec/zzz_asl_custom_local_exclude.conf #install -D -m755 rules/util/modsec-clamscan.pl %{buildroot}%{_bindir}/modsec-clamscan.pl mkdir -p %{buildroot}/var/log/mlogc/data install -D -m755 mlogc/mlogc %{buildroot}%{_bindir}/mlogc @@ -68,22 +89,25 @@ %clean rm -rf %{buildroot} +%post +[ -x /usr/local/bin/modsec-permissions ] && /usr/local/bin/modsec-permissions || : + %files %defattr (-,root,root) %doc CHANGES LICENSE README.* modsecurity* doc -%{_libdir}/httpd/modules/mod_security2.so +%{apache_libexecdir}/mod_security2.so #%{_bindir}/modsec-clamscan.pl %{_bindir}/mlogc %{_bindir}/mlogc-batch-load.pl -%config %{_sysconfdir}/httpd/conf.d/00_mod_security.conf -%dir %{_sysconfdir}/httpd/modsecurity.d -%config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/modsecurity_crs_10_config.conf -%config %{_sysconfdir}/httpd/modsec/zzz_asl_custom_exclude.conf -%config(noreplace) %{_sysconfdir}/httpd/modsec/zzz_asl_custom_local_exclude.conf +%config %{apache_sysconfdir}/conf.d/00_mod_security.conf +%dir %{apache_sysconfdir}/modsecurity.d +%config(noreplace) %{apache_sysconfdir}/modsecurity.d/modsecurity_crs_10_config.conf +%dir %{apache_sysconfdir}/modsec +%config %{apache_sysconfdir}/modsec/zzz_asl_custom_exclude.conf +%config(noreplace) %{apache_sysconfdir}/modsec/zzz_asl_custom_local_exclude.conf %config(noreplace) %{_sysconfdir}/mlogc.conf %config %{_sysconfdir}/mlogc-default.conf - -%defattr(-,apache,apache) +%defattr(-,%{apache_usr},%{apache_grp}) %dir /var/asl %dir /var/asl/data %dir /var/asl/data/suspicious