diff options
author | prlw1 <prlw1@pkgsrc.org> | 2015-11-12 15:21:51 +0000 |
---|---|---|
committer | prlw1 <prlw1@pkgsrc.org> | 2015-11-12 15:21:51 +0000 |
commit | c4d3fb80ace5328a338c36478022a82044e67cd9 (patch) | |
tree | 52541c17fb3a26c67e6ab01fcf5ba91f797a3cd2 /www/apache22 | |
parent | bd2e37d1507933e80aed00b18df62acb5b57ee01 (diff) | |
download | pkgsrc-c4d3fb80ace5328a338c36478022a82044e67cd9.tar.gz |
Fix a regression with Apache 2.2.31 that caused inherited workers to
use a different scoreboard slot then the original one.
https://svn.apache.org/viewvc?view=revision&revision=1700408
Diffstat (limited to 'www/apache22')
-rw-r--r-- | www/apache22/Makefile | 3 | ||||
-rw-r--r-- | www/apache22/distinfo | 6 | ||||
-rw-r--r-- | www/apache22/patches/patch-include_ap_mmn.h | 27 | ||||
-rw-r--r-- | www/apache22/patches/patch-modules_proxy_mod_proxy.c | 25 | ||||
-rw-r--r-- | www/apache22/patches/patch-modules_proxy_mod_proxy.h | 25 | ||||
-rw-r--r-- | www/apache22/patches/patch-modules_proxy_proxy_util.c | 63 |
6 files changed, 147 insertions, 2 deletions
diff --git a/www/apache22/Makefile b/www/apache22/Makefile index 691df890cdf..2aa3b8221ce 100644 --- a/www/apache22/Makefile +++ b/www/apache22/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.105 2015/07/20 18:28:59 adam Exp $ +# $NetBSD: Makefile,v 1.106 2015/11/12 15:21:51 prlw1 Exp $ DISTNAME= httpd-2.2.31 PKGNAME= ${DISTNAME:S/httpd/apache/} +PKGREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/} \ http://archive.apache.org/dist/httpd/ \ diff --git a/www/apache22/distinfo b/www/apache22/distinfo index aa3b9f76a34..42699ec6b41 100644 --- a/www/apache22/distinfo +++ b/www/apache22/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.63 2015/11/04 02:46:49 agc Exp $ +$NetBSD: distinfo,v 1.64 2015/11/12 15:21:51 prlw1 Exp $ SHA1 (httpd-2.2.31.tar.bz2) = e3b55387112206307ba76526820a2627472f3787 RMD160 (httpd-2.2.31.tar.bz2) = 5b073f5f556c74e19eba8e40faa5c5fa308e018a @@ -15,6 +15,10 @@ SHA1 (patch-al) = 56b9f5c2f6fd01fe5067f9210e328cbf674c68f1 SHA1 (patch-am) = ab4a2f7e5a1a3064e908b61157e7fd349c0b0c08 SHA1 (patch-aw) = ca53d67beeb2c2c4d9adb04d3d79e24a8c427fd4 SHA1 (patch-docs_man_apxs.8) = 70797ea73ae6379492971bec1106a8427ae7fdaa +SHA1 (patch-include_ap_mmn.h) = 2fec04379f38ecc90debc69faafe38932099e5e1 SHA1 (patch-lock.c) = 770ca03f1cb4421879bd5baa5a7c30cc91acb6e1 +SHA1 (patch-modules_proxy_mod_proxy.c) = 67d8d441c546a46aa729ed82673da4883f73dec8 +SHA1 (patch-modules_proxy_mod_proxy.h) = a4453d85f6a3cf43df44f4e491aee07aaff44905 SHA1 (patch-modules_proxy_mod_proxy_connect.c) = b2b5d0242a92c7bf20b14c16d8cd3abae42f3746 +SHA1 (patch-modules_proxy_proxy_util.c) = 1368694ef3141c3a1e9a1ddd73664bbb33465271 SHA1 (patch-repos.c) = 0e0361b91d4b0fe6c7c55a12fdfd2e6aacc710e1 diff --git a/www/apache22/patches/patch-include_ap_mmn.h b/www/apache22/patches/patch-include_ap_mmn.h new file mode 100644 index 00000000000..e72493a2223 --- /dev/null +++ b/www/apache22/patches/patch-include_ap_mmn.h @@ -0,0 +1,27 @@ +$NetBSD: patch-include_ap_mmn.h,v 1.1 2015/11/12 15:21:51 prlw1 Exp $ + +Fix a regression with 2.2.31 that caused inherited workers to +use a different scoreboard slot then the original one. + +https://svn.apache.org/viewvc?view=revision&revision=1700408 + +--- include/ap_mmn.h.orig 2015-06-05 16:50:47.000000000 +0000 ++++ include/ap_mmn.h +@@ -158,6 +158,8 @@ + * 20051115.38 (2.2.30) Add ap_proxy_set_scoreboard_lb() in mod_proxy.h + * 20051115.39 (2.2.30) Add ap_proxy_connection_reusable() + * 20051115.40 (2.2.30) Add ap_map_http_request_error() ++ * 20051115.41 (2.2.32) Add s member to proxy_server_conf struct and server ++ * member to proxy_worker struct. + */ + + #define MODULE_MAGIC_COOKIE 0x41503232UL /* "AP22" */ +@@ -165,7 +167,7 @@ + #ifndef MODULE_MAGIC_NUMBER_MAJOR + #define MODULE_MAGIC_NUMBER_MAJOR 20051115 + #endif +-#define MODULE_MAGIC_NUMBER_MINOR 40 /* 0...n */ ++#define MODULE_MAGIC_NUMBER_MINOR 41 /* 0...n */ + + /** + * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/www/apache22/patches/patch-modules_proxy_mod_proxy.c b/www/apache22/patches/patch-modules_proxy_mod_proxy.c new file mode 100644 index 00000000000..8922b90454a --- /dev/null +++ b/www/apache22/patches/patch-modules_proxy_mod_proxy.c @@ -0,0 +1,25 @@ +$NetBSD: patch-modules_proxy_mod_proxy.c,v 1.3 2015/11/12 15:21:51 prlw1 Exp $ + +Fix a regression with 2.2.31 that caused inherited workers to +use a different scoreboard slot then the original one. + +https://svn.apache.org/viewvc?view=revision&revision=1700408 + +--- modules/proxy/mod_proxy.c.orig 2015-06-05 16:50:47.000000000 +0000 ++++ modules/proxy/mod_proxy.c +@@ -1129,6 +1129,7 @@ static void * create_proxy_config(apr_po + ps->badopt = bad_error; + ps->badopt_set = 0; + ps->pool = p; ++ ps->s = s; + + return ps; + } +@@ -1172,6 +1173,7 @@ static void * merge_proxy_config(apr_poo + ps->proxy_status = (overrides->proxy_status_set == 0) ? base->proxy_status : overrides->proxy_status; + ps->proxy_status_set = overrides->proxy_status_set || base->proxy_status_set; + ps->pool = p; ++ ps->s = overrides->s; + return ps; + } + diff --git a/www/apache22/patches/patch-modules_proxy_mod_proxy.h b/www/apache22/patches/patch-modules_proxy_mod_proxy.h new file mode 100644 index 00000000000..7779283e6ba --- /dev/null +++ b/www/apache22/patches/patch-modules_proxy_mod_proxy.h @@ -0,0 +1,25 @@ +$NetBSD: patch-modules_proxy_mod_proxy.h,v 1.1 2015/11/12 15:21:51 prlw1 Exp $ + +Fix a regression with 2.2.31 that caused inherited workers to +use a different scoreboard slot then the original one. + +https://svn.apache.org/viewvc?view=revision&revision=1700408 + +--- modules/proxy/mod_proxy.h.orig 2015-07-15 16:10:27.000000000 +0000 ++++ modules/proxy/mod_proxy.h +@@ -193,6 +193,7 @@ typedef struct { + } proxy_status; /* Status display options */ + char proxy_status_set; + apr_pool_t *pool; /* Pool used for allocating this struct */ ++ server_rec *s; /* The server_rec where this configuration was created in */ + } proxy_server_conf; + + +@@ -369,6 +370,7 @@ struct proxy_worker { + char disablereuse_set; + apr_interval_time_t conn_timeout; + char conn_timeout_set; ++ server_rec *server; /* The server_rec where this configuration was created in */ + }; + + /* diff --git a/www/apache22/patches/patch-modules_proxy_proxy_util.c b/www/apache22/patches/patch-modules_proxy_proxy_util.c new file mode 100644 index 00000000000..3d34ea0d1b9 --- /dev/null +++ b/www/apache22/patches/patch-modules_proxy_proxy_util.c @@ -0,0 +1,63 @@ +$NetBSD: patch-modules_proxy_proxy_util.c,v 1.1 2015/11/12 15:21:51 prlw1 Exp $ + +Fix a regression with 2.2.31 that caused inherited workers to +use a different scoreboard slot then the original one. + +https://svn.apache.org/viewvc?view=revision&revision=1700408 + +--- modules/proxy/proxy_util.c.orig 2015-07-15 16:10:27.000000000 +0000 ++++ modules/proxy/proxy_util.c +@@ -1460,6 +1460,7 @@ PROXY_DECLARE(const char *) ap_proxy_add + (*worker)->flush_packets = flush_off; + (*worker)->flush_wait = PROXY_FLUSH_WAIT; + (*worker)->smax = -1; ++ (*worker)->server = conf->s; + /* Increase the total worker count */ + proxy_lb_workers++; + init_conn_pool(p, *worker); +@@ -1807,6 +1808,7 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb + server_rec *server) + { + if (ap_scoreboard_image && !worker->s) { ++ server_rec *id_server; + int i = 0; + proxy_worker_stat *free_slot = NULL; + proxy_worker_stat *s; +@@ -1824,14 +1826,20 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb + apr_md5_update(&ctx, (unsigned char *)balancer->name, + strlen(balancer->name)); + } +- if (server) { ++ if (worker->server) { ++ id_server = worker->server; ++ } ++ else { ++ id_server = server; ++ } ++ if (id_server) { + server_addr_rec *addr; + /* Assumes the unique identifier of a vhost is its address(es) + * plus the ServerName:Port. Should two or more vhosts have this + * same identifier, the first one would always be elected to + * handle the requests, so this shouldn't be an issue... + */ +- for (addr = server->addrs; addr; addr = addr->next) { ++ for (addr = id_server->addrs; addr; addr = addr->next) { + char host_ip[64]; /* for any IPv[46] string */ + apr_sockaddr_ip_getbuf(host_ip, sizeof host_ip, + addr->host_addr); +@@ -1840,10 +1848,10 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb + apr_md5_update(&ctx, (unsigned char *)&addr->host_port, + sizeof(addr->host_port)); + } +- apr_md5_update(&ctx, (unsigned char *)server->server_hostname, +- strlen(server->server_hostname)); +- apr_md5_update(&ctx, (unsigned char *)&server->port, +- sizeof(server->port)); ++ apr_md5_update(&ctx, (unsigned char *)id_server->server_hostname, ++ strlen(id_server->server_hostname)); ++ apr_md5_update(&ctx, (unsigned char *)&id_server->port, ++ sizeof(id_server->port)); + } + apr_md5_final(digest, &ctx); + |