[mod_evasive] adapt to httpd-2.4: changed remote_ip to client_ip

Ján ONDREJ ondrejj at fedoraproject.org
Sat Mar 31 14:19:54 UTC 2012


commit b78253ce539eea911b319d511ba2206f10f3a1e4
Author: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
Date:   Sat Mar 31 16:18:48 2012 +0200

    adapt to httpd-2.4: changed remote_ip to client_ip

 mod_evasive.spec |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/mod_evasive.spec b/mod_evasive.spec
index 3013c22..c3355f0 100644
--- a/mod_evasive.spec
+++ b/mod_evasive.spec
@@ -1,6 +1,6 @@
 Name:           mod_evasive
 Version:        1.10.1
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        Denial of Service evasion module for Apache
 
 Group:          System Environment/Daemons
@@ -27,7 +27,10 @@ reports abuses via email and syslog facilities.
 
 
 %build
-apxs -Wc,"%{optflags}" -c mod_evasive20.c
+# create apache httpd-2.4 version and compile it
+sed 's/connection->remote_ip/connection->client_ip/' \
+  < mod_evasive20.c > mod_evasive24.c
+apxs -Wc,"%{optflags}" -c mod_evasive24.c
 
 
 %install
@@ -35,7 +38,7 @@ rm -rf $RPM_BUILD_ROOT
 mkdir -pm 755 \
     $RPM_BUILD_ROOT%{_libdir}/httpd/modules \
     $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
-install -pm 755 .libs/mod_evasive20.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/
+install -pm 755 .libs/mod_evasive24.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/
 install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
 
 
@@ -51,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Mar 31 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.10.1-13
+- adapt to httpd-2.4: changed remote_ip to client_ip
+
 * Thu Mar 29 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.10.1-12
 - apxs moved to bindir, do not use sbindir macro
 


More information about the scm-commits mailing list