[packages/apache-mod_vhost_limit] - build with apache 2.4 - rel 2

baggins baggins at pld-linux.org
Mon May 6 00:21:48 CEST 2013


commit d5b3bc4d2669d75f3bbdb98c5dc219aa39db9928
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon May 6 00:21:35 2013 +0200

    - build with apache 2.4
    - rel 2

 apache-mod_vhost_limit.spec    |  9 ++++++---
 mod_vhost_limit-apache24.patch | 31 +++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)
---
diff --git a/apache-mod_vhost_limit.spec b/apache-mod_vhost_limit.spec
index f876bce..fdaf6db 100644
--- a/apache-mod_vhost_limit.spec
+++ b/apache-mod_vhost_limit.spec
@@ -1,14 +1,15 @@
 %define		mod_name	vhost_limit
-%define 	apxs		/usr/sbin/apxs
+%define		apxs		/usr/sbin/apxs
 Summary:	Apache module: clients restriction per vhost
 Summary(pl.UTF-8):	Moduł Apache'a - ograniczanie klientów dla vhosta
 Name:		apache-mod_%{mod_name}
 Version:	0.2
-Release:	1
+Release:	2
 License:	Apache
 Group:		Networking/Daemons/HTTP
 Source0:	http://apache.ivn.cl/files/source/mod_vhost_limit-%{version}.tgz
 # Source0-md5:	7379520e078d26503f8323e7f36302fb
+Patch0:		mod_vhost_limit-apache24.patch
 URL:		http://apache.ivn.cl/#vhostlimit
 BuildRequires:	%{apxs}
 BuildRequires:	apache-devel >= 2.0.0
@@ -27,6 +28,7 @@ Moduł ograniczający liczbę jednoczesnych połączeń dla vhosta.
 
 %prep
 %setup -q -n mod_vhost_limit-%{version}
+%patch0 -p1
 
 %build
 %{apxs} -c mod_vhost_limit.c
@@ -35,7 +37,8 @@ Moduł ograniczający liczbę jednoczesnych połączeń dla vhosta.
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_pkglibdir}
 
-libtool install mod_vhost_limit.la $RPM_BUILD_ROOT%{_pkglibdir}
+libtool --mode=install install mod_vhost_limit.la $RPM_BUILD_ROOT%{_pkglibdir}
+libtool --finish $RPM_BUILD_ROOT%{_pkglibdir}
 rm -f $RPM_BUILD_ROOT%{_pkglibdir}/*.{l,}a
 
 %clean
diff --git a/mod_vhost_limit-apache24.patch b/mod_vhost_limit-apache24.patch
new file mode 100644
index 0000000..b3cc002
--- /dev/null
+++ b/mod_vhost_limit-apache24.patch
@@ -0,0 +1,31 @@
+--- mod_vhost_limit-0.2/mod_vhost_limit.c.orig	2007-04-06 19:52:03.000000000 +0200
++++ mod_vhost_limit-0.2/mod_vhost_limit.c	2013-05-06 00:18:00.883162004 +0200
+@@ -127,6 +127,7 @@
+     char cut_req_host[31] = "";
+     const char *req_host;
+     const char *vhost;
++    ap_generation_t mpm_generation;
+     
+     conf = (vhost_limit_conf *) ap_get_module_config(r->server->module_config,&vhost_limit_module);
+     
+@@ -144,17 +145,17 @@
+     ********************************************/
+ 
+     req_host = ap_get_server_name(r);
+-    
++    ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
+     
+     for (i = 0; i < server_limit; ++i) 
+     {
+         for (j = 0; j < thread_limit; ++j) 
+         {
+             ps_record = ap_get_scoreboard_process(i);
+-            ws_record = ap_get_scoreboard_worker(i, j);
++            ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
+             vhost = ws_record->vhost;
+ 
+-            if (ps_record->generation != ap_my_generation)
++            if (ps_record->generation != mpm_generation)
+                 vhost = NULL;
+             if (!vhost)
+                 continue;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_vhost_limit.git/commitdiff/d5b3bc4d2669d75f3bbdb98c5dc219aa39db9928



More information about the pld-cvs-commit mailing list