diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2009-07-24 12:14:33 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2009-07-24 12:14:33 +0000 |
commit | 7f563903411ad904fa823ce56be914c2df815f8e (patch) | |
tree | 5c17f4ed98421eb29de84f04a42d33ed67ca557b /www-apache | |
parent | As 0.0.6_pre7 is now unmasked, removing 0.0.6_pre3 which doesn't work with amd64 (diff) | |
download | gentoo-2-7f563903411ad904fa823ce56be914c2df815f8e.tar.gz gentoo-2-7f563903411ad904fa823ce56be914c2df815f8e.tar.bz2 gentoo-2-7f563903411ad904fa823ce56be914c2df815f8e.zip |
add virtualhost granularity patch for suexec and mpm-itk compatibility
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'www-apache')
-rw-r--r-- | www-apache/mod_fcgid/ChangeLog | 10 | ||||
-rw-r--r-- | www-apache/mod_fcgid/files/mod_fcgid-2.2-vhost-granularity.patch | 178 | ||||
-rw-r--r-- | www-apache/mod_fcgid/mod_fcgid-2.2-r1.ebuild | 37 |
3 files changed, 223 insertions, 2 deletions
diff --git a/www-apache/mod_fcgid/ChangeLog b/www-apache/mod_fcgid/ChangeLog index 4af465a606c8..3e1055133c62 100644 --- a/www-apache/mod_fcgid/ChangeLog +++ b/www-apache/mod_fcgid/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-apache/mod_fcgid -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/ChangeLog,v 1.37 2007/12/31 11:47:47 hollow Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/ChangeLog,v 1.38 2009/07/24 12:14:33 hollow Exp $ + +*mod_fcgid-2.2-r1 (24 Jul 2009) + + 24 Jul 2009; Benedikt Böhm <hollow@gentoo.org> +mod_fcgid-2.2-r1.ebuild, + +files/mod_fcgid-2.2-vhost-granularity.patch: + add virtualhost granularity patch for suexec and mpm-itk compatibility 31 Dec 2007; Benedikt Böhm <hollow@gentoo.org> -files/1.10/20_mod_fcgid.conf, files/2.2/20_mod_fcgid.conf, diff --git a/www-apache/mod_fcgid/files/mod_fcgid-2.2-vhost-granularity.patch b/www-apache/mod_fcgid/files/mod_fcgid-2.2-vhost-granularity.patch new file mode 100644 index 000000000000..3eaa63465bf2 --- /dev/null +++ b/www-apache/mod_fcgid/files/mod_fcgid-2.2-vhost-granularity.patch @@ -0,0 +1,178 @@ +diff --git a/arch/unix/fcgid_pm_unix.c b/arch/unix/fcgid_pm_unix.c +index 01932aa..2c0c4c4 100644 +--- a/arch/unix/fcgid_pm_unix.c ++++ b/arch/unix/fcgid_pm_unix.c +@@ -386,6 +386,7 @@ void procmgr_init_spawn_cmd(fcgid_command * command, request_rec * r, + command->deviceid = deviceid; + command->inode = inode; + command->share_grp_id = share_grp_id; ++ command->virtualhost = r->server->server_hostname; + + /* Update fcgid_command with wrapper info */ + command->wrapperpath[0] = '\0'; +diff --git a/arch/unix/fcgid_proctbl_unix.c b/arch/unix/fcgid_proctbl_unix.c +index bb8a46b..852c0c4 100644 +--- a/arch/unix/fcgid_proctbl_unix.c ++++ b/arch/unix/fcgid_proctbl_unix.c +@@ -279,7 +279,7 @@ void proctable_print_debug_info(server_rec * main_server) + current_node != g_proc_array; + current_node = &g_proc_array[current_node->next_index]) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_server, +- "mod_fcgid: idle node index: %td", ++ "mod_fcgid: idle node index: %d", + current_node - g_proc_array); + } + +@@ -287,7 +287,7 @@ void proctable_print_debug_info(server_rec * main_server) + current_node != g_proc_array; + current_node = &g_proc_array[current_node->next_index]) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_server, +- "mod_fcgid: busy node index: %td", ++ "mod_fcgid: busy node index: %d", + current_node - g_proc_array); + } + +@@ -295,7 +295,7 @@ void proctable_print_debug_info(server_rec * main_server) + current_node != g_proc_array; + current_node = &g_proc_array[current_node->next_index]) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_server, +- "mod_fcgid: error node index: %td", ++ "mod_fcgid: error node index: %d", + current_node - g_proc_array); + } + } +diff --git a/fcgid_bridge.c b/fcgid_bridge.c +index e4fc184..5a960ff 100644 +--- a/fcgid_bridge.c ++++ b/fcgid_bridge.c +@@ -34,6 +34,7 @@ static fcgid_procnode *apply_free_procnode(server_rec * main_server, + uid_t uid = command->uid; + gid_t gid = command->gid; + apr_size_t share_grp_id = command->share_grp_id; ++ char *virtualhost = command->virtualhost; + + proc_table = proctable_get_table_array(); + previous_node = proctable_get_idle_list(); +@@ -47,6 +48,7 @@ static fcgid_procnode *apply_free_procnode(server_rec * main_server, + if (current_node->inode == inode + && current_node->deviceid == deviceid + && current_node->share_grp_id == share_grp_id ++ && current_node->virtualhost == virtualhost + && current_node->uid == uid && current_node->gid == gid) { + /* Unlink from idle list */ + previous_node->next_index = current_node->next_index; +@@ -124,6 +126,7 @@ count_busy_processes(server_rec * main_server, fcgid_command * command) + if (current_node->inode == command->inode + && current_node->deviceid == command->deviceid + && current_node->share_grp_id == command->share_grp_id ++ && current_node->virtualhost == command->virtualhost + && current_node->uid == command->uid + && current_node->gid == command->gid) { + result++; +diff --git a/fcgid_pm.h b/fcgid_pm.h +index a157156..0c34f78 100644 +--- a/fcgid_pm.h ++++ b/fcgid_pm.h +@@ -11,6 +11,7 @@ typedef struct { + apr_ino_t inode; + dev_t deviceid; + apr_size_t share_grp_id; ++ char *virtualhost; /* Virtualhost granularity */ + uid_t uid; /* For suEXEC */ + gid_t gid; /* For suEXEC */ + int userdir; /* For suEXEC */ +diff --git a/fcgid_pm_main.c b/fcgid_pm_main.c +index 9618aec..fddab47 100644 +--- a/fcgid_pm_main.c ++++ b/fcgid_pm_main.c +@@ -386,7 +386,7 @@ fastcgi_spawn(fcgid_command * command, server_rec * main_server, + if (free_list_header->next_index == 0) { + safe_unlock(main_server); + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_server, +- "mod_fcgid: too much proecess, please increase FCGID_MAX_APPLICATION"); ++ "mod_fcgid: too much processes, please increase FCGID_MAX_APPLICATION"); + return; + } + procnode = &proctable_array[free_list_header->next_index]; +@@ -398,12 +398,14 @@ fastcgi_spawn(fcgid_command * command, server_rec * main_server, + procnode->deviceid = command->deviceid; + procnode->inode = command->inode; + procnode->share_grp_id = command->share_grp_id; ++ procnode->virtualhost = command->virtualhost; + procnode->uid = command->uid; + procnode->gid = command->gid; + procnode->start_time = procnode->last_active_time = apr_time_now(); + procnode->requests_handled = 0; + procnode->diewhy = FCGID_DIE_KILLSELF; + procnode->proc_pool = NULL; ++ + procinfo.cgipath = command->cgipath; + procinfo.configpool = configpool; + procinfo.main_server = main_server; +@@ -447,8 +449,8 @@ fastcgi_spawn(fcgid_command * command, server_rec * main_server, + link_node_to_list(main_server, idle_list_header, + procnode, proctable_array); + ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server, +- "mod_fcgid: server %s(%" APR_PID_T_FMT ") started", +- command->cgipath, procnode->proc_id->pid); ++ "mod_fcgid: server %s:%s(%" APR_PID_T_FMT ") started", ++ command->virtualhost, command->cgipath, procnode->proc_id->pid); + register_spawn(main_server, procnode); + } + } +diff --git a/fcgid_proctbl.h b/fcgid_proctbl.h +index 04d954b..f1807ba 100644 +--- a/fcgid_proctbl.h ++++ b/fcgid_proctbl.h +@@ -28,6 +28,7 @@ typedef struct { + gid_t gid; /* for suEXEC */ + uid_t uid; /* for suEXEC */ + apr_size_t share_grp_id; /* cgi wrapper share group id */ ++ char *virtualhost; /* the virtualhost this process belongs to */ + apr_time_t start_time; /* the time of this process create */ + apr_time_t last_active_time; /* the time this process last active */ + int requests_handled; /* number of requests process has handled */ +diff --git a/fcgid_spawn_ctl.c b/fcgid_spawn_ctl.c +index 17039eb..d21c7d0 100644 +--- a/fcgid_spawn_ctl.c ++++ b/fcgid_spawn_ctl.c +@@ -9,6 +9,7 @@ struct fcgid_stat_node { + uid_t uid; + gid_t gid; + apr_size_t share_grp_id; ++ char *virtualhost; + int score; + int process_counter; + apr_time_t last_stat_time; +@@ -42,6 +43,7 @@ register_life_death(server_rec * main_server, + if (current_node->inode == procnode->inode + && current_node->deviceid == procnode->deviceid + && current_node->share_grp_id == procnode->share_grp_id ++ && current_node->virtualhost == procnode->virtualhost + && current_node->uid == procnode->uid + && current_node->gid == procnode->gid) + break; +@@ -81,6 +83,7 @@ register_life_death(server_rec * main_server, + current_node->deviceid = procnode->deviceid; + current_node->inode = procnode->inode; + current_node->share_grp_id = procnode->share_grp_id; ++ current_node->virtualhost = procnode->virtualhost; + current_node->uid = procnode->uid; + current_node->gid = procnode->gid; + current_node->last_stat_time = apr_time_now(); +@@ -152,6 +155,7 @@ int is_spawn_allowed(server_rec * main_server, fcgid_command * command) + if (current_node->inode == command->inode + && current_node->deviceid == command->deviceid + && current_node->share_grp_id == command->share_grp_id ++ && current_node->virtualhost == command->virtualhost + && current_node->uid == command->uid + && current_node->gid == command->gid) + break; +@@ -218,6 +222,7 @@ int is_kill_allowed(fcgid_procnode * procnode) + if (current_node->inode == procnode->inode + && current_node->deviceid == procnode->deviceid + && current_node->share_grp_id == procnode->share_grp_id ++ && current_node->virtualhost == procnode->virtualhost + && current_node->uid == procnode->uid + && current_node->gid == procnode->gid) + break; diff --git a/www-apache/mod_fcgid/mod_fcgid-2.2-r1.ebuild b/www-apache/mod_fcgid/mod_fcgid-2.2-r1.ebuild new file mode 100644 index 000000000000..2f3e5cb03162 --- /dev/null +++ b/www-apache/mod_fcgid/mod_fcgid-2.2-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/mod_fcgid-2.2-r1.ebuild,v 1.1 2009/07/24 12:14:33 hollow Exp $ + +inherit apache-module eutils multilib + +DESCRIPTION="mod_fcgid is a binary-compatible alternative to mod_fastcgi with better process management." +HOMEPAGE="http://fastcgi.coremail.cn/" +SRC_URI="mirror://sourceforge/mod-fcgid/${PN}.${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" + +S="${WORKDIR}/${PN}.${PV}" + +APACHE2_MOD_CONF="${PV}/20_${PN}" +APACHE2_MOD_DEFINE="FCGID" + +APXS2_ARGS="-I ${S} -c ${PN}.c fcgid_bridge.c \ + fcgid_conf.c fcgid_pm_main.c \ + fcgid_spawn_ctl.c mod_fcgid.rc fcgid_bucket.c \ + fcgid_filter.c fcgid_protocol.c \ + arch/unix/fcgid_pm_unix.c \ + arch/unix/fcgid_proctbl_unix.c \ + arch/unix/fcgid_proc_unix.c" + +DOCFILES="AUTHOR ChangeLog" + +need_apache2_2 + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-vhost-granularity.patch +} |