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 | 9d4732be1c7a5837078c4f84df53b63adacd1d4f (patch) | |
tree | 6410d8c245c840886a0081271d2eec8c0e21db80 /www-apache/mod_fcgid | |
parent | As 0.0.6_pre7 is now unmasked, removing 0.0.6_pre3 which doesn't work with amd64 (diff) | |
download | historical-9d4732be1c7a5837078c4f84df53b63adacd1d4f.tar.gz historical-9d4732be1c7a5837078c4f84df53b63adacd1d4f.tar.bz2 historical-9d4732be1c7a5837078c4f84df53b63adacd1d4f.zip |
add virtualhost granularity patch for suexec and mpm-itk compatibility
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'www-apache/mod_fcgid')
-rw-r--r-- | www-apache/mod_fcgid/ChangeLog | 10 | ||||
-rw-r--r-- | www-apache/mod_fcgid/Manifest | 4 | ||||
-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 |
4 files changed, 226 insertions, 3 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/Manifest b/www-apache/mod_fcgid/Manifest index 3874ba018377..f28438610375 100644 --- a/www-apache/mod_fcgid/Manifest +++ b/www-apache/mod_fcgid/Manifest @@ -1,5 +1,7 @@ AUX 2.2/20_mod_fcgid.conf 165 RMD160 3eb1141ad06aafd37f17b9d6fe93699555afdc48 SHA1 f261d61fc79ddc39cdd9722165a8db133378edeb SHA256 5b1b5584360b3811241459c435260cd2af8aa2a612f940e376b6aefdbca283ff +AUX mod_fcgid-2.2-vhost-granularity.patch 7485 RMD160 72e2052bfaf45af5d941b45fc4b7b833f7baebb1 SHA1 80efd2b6775c8a76b44a1adcf311a70872273b45 SHA256 6e9c66a25aecd6728a13aacb647ce0a876c27f31c7b68424edc3abd30156e603 DIST mod_fcgid.2.2.tar.gz 56954 RMD160 9c45c2b25fcf0f4069cee4fb8917493f0a13b338 SHA1 dc817a20ad6528480a441e4b7ad6920ec11c55e0 SHA256 7a0985a120dceb4c6974e8bf216752b0b763ae949f5dfbbf93cc350510e4c80e +EBUILD mod_fcgid-2.2-r1.ebuild 1038 RMD160 c0848fdfbc988100deba5de7f2906af6733b4dcf SHA1 8e5fb5023c87ad54c3ce0398d3ece911fcf41d70 SHA256 f062000a4ba0056e82e4c6c5f5e04088cc902aece7d3d717cd8472fc76f0e0d4 EBUILD mod_fcgid-2.2.ebuild 939 RMD160 28cd28553664f2116e914696b55323d6cde995e5 SHA1 ec2e35bf78885eac12ff723eb42b546cb200ce14 SHA256 bf5fe595acabc749f4703d1bf2d29d7c262266e532752f1879328b3de601845e -MISC ChangeLog 6891 RMD160 6d35cfbe91b75011175102b76147e22174ed3a12 SHA1 8ef39db6db95cc1a64d8b76cefcbbb232e0458a5 SHA256 dd80bac04f8201c0d9e8dc0bbf4feb74b5e2fea6455075af3feb706d86f7dd1a +MISC ChangeLog 7122 RMD160 2dfa082693209eb75e0f7ed43be4d8e004934b82 SHA1 8684381c11a833b6df674b696fe80b2033d59b11 SHA256 5e09c1ba1514e14fd7be66b48148d3bb14ce0cd0f4987b1adba9c471393259b6 MISC metadata.xml 483 RMD160 56be90c965ab5663636d639624c7778409e72347 SHA1 4704b1f7b6e558722c8613e66df8d148165d7a64 SHA256 9acd2c7ac26a99c1ba655aa7912526906c3e5d03529aeadcb08f9b40373244bc 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 +} |