Date: Sat, 15 Apr 2017 15:55:19 +0000 (UTC) From: "Sergey A. Osokin" <osa@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438588 - in head/www/nginx-devel: . files Message-ID: <201704151555.v3FFtJnW000616@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: osa Date: Sat Apr 15 15:55:19 2017 New Revision: 438588 URL: https://svnweb.freebsd.org/changeset/ports/438588 Log: Upgrade from 1.11.10 to 1.12.0. ChangeLog: http://nginx.org/en/CHANGES-1.12 Also, remove third-party modules: o) udplog o) statsd Upgrade third-party modules: o) lua to 0.10.8 o) upstream_fair to b5be36f (upstream has been changed) Please see this comment in case of the production use of the lua module: https://github.com/openresty/lua-nginx-module/pull/1017#issuecomment-294076002 Patches obtained from: o) https://github.com/openresty/lua-nginx-module/commit/0459a285ca0159d45e73da8bd1164edb5c57cde3 o) https://github.com/SpiderLabs/ModSecurity/pull/1373/commits/d19df159043106a4d6dfd113696900b5b0dae24b Added: head/www/nginx-devel/files/extra-patch-ngx_http_echo_request_info.c (contents, props changed) head/www/nginx-devel/files/extra-patch-ngx_http_lua_common.h (contents, props changed) head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.c (contents, props changed) head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.h (contents, props changed) head/www/nginx-devel/files/extra-patch-ngx_http_lua_module.c (contents, props changed) head/www/nginx-devel/files/extra-patch-ngx_http_modsecurity.c (contents, props changed) Deleted: head/www/nginx-devel/files/extra-patch-ngx_http_udplog_module.c Modified: head/www/nginx-devel/Makefile head/www/nginx-devel/distinfo Modified: head/www/nginx-devel/Makefile ============================================================================== --- head/www/nginx-devel/Makefile Sat Apr 15 15:54:54 2017 (r438587) +++ head/www/nginx-devel/Makefile Sat Apr 15 15:55:19 2017 (r438588) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= nginx -PORTVERSION= 1.11.10 +PORTVERSION= 1.12.0 CATEGORIES= www MASTER_SITES= http://nginx.org/download/ MASTER_SITES+= LOCAL/osa @@ -122,8 +122,6 @@ OPTIONS_DEFINE= \ SLOWFS_CACHE \ SMALL_LIGHT \ SRCACHE \ - STATSD \ - UDPLOG \ X11 \ XRID_HEADER \ XSS @@ -234,8 +232,6 @@ SHIBBOLETH_DESC= 3rd party shibboleth m SLOWFS_CACHE_DESC= 3rd party slowfs_cache module SMALL_LIGHT_DESC= 3rd party small_light module SRCACHE_DESC= 3rd party srcache module -STATSD_DESC= 3rd party statsd module -UDPLOG_DESC= 3rd party udplog (syslog) module X11_DESC= graphics/ImageMagick[-nox11] dependency XRID_HEADER_DESC= 3rd party x-rid header module XSS_DESC= 3rd party xss module @@ -465,6 +461,7 @@ CONFIGURE_ARGS+=--add-dynamic-module=${W .else CONFIGURE_ARGS+=--add-module=${WRKSRC_echo} .endif +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_echo_request_info.c .endif .if ${PORT_OPTIONS:MFASTDFS} @@ -744,14 +741,14 @@ EXTRA_PATCHES+= ${PATCHDIR}/extra-patch- .endif .if !empty(PORT_OPTIONS:MHTTP_UPSTREAM_FAIR) -NGINX_UPSTREAM_FAIR_VERSION= 20090923 -MASTER_SITES+= LOCAL/osa:upstreamfair -DISTFILES+= nginx_upstream_fair-${NGINX_UPSTREAM_FAIR_VERSION}.tar.gz:upstreamfair -CONFIGURE_ARGS+=--add-module=${WRKDIR}/nginx_upstream_fair-${NGINX_UPSTREAM_FAIR_VERSION} -.if !empty(PORT_OPTIONS:MHTTP_UPSTREAM_CHECK) -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_upstream_fair_module.c -IGNORE= HTTP_UPSTREAM_FAIR: a patch requires -.endif +NGINX_UPSTREAM_FAIR_VERSION= b5be36f +GH_ACCOUNT+= cryptofuture:upstreamfair +GH_PROJECT+= nginx-upstream-fair:upstreamfair +GH_TAGNAME+= ${NGINX_UPSTREAM_FAIR_VERSION}:upstreamfair +CONFIGURE_ARGS+=--add-module=${WRKSRC_upstreamfair} +#.if !empty(PORT_OPTIONS:MHTTP_UPSTREAM_CHECK) +#EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_upstream_fair_module.c +#.endif .endif .if ${PORT_OPTIONS:MHTTP_UPSTREAM_STICKY} @@ -826,6 +823,10 @@ GH_ACCOUNT+= simpl:devel_kit GH_PROJECT+= ngx_devel_kit:devel_kit GH_TAGNAME+= v${NGINX_DEVEL_KIT_VERSION}:devel_kit CONFIGURE_ARGS+=--add-module=${WRKSRC_devel_kit} +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_lua_common.h \ + ${PATCHDIR}/extra-patch-ngx_http_lua_headers.c \ + ${PATCHDIR}/extra-patch-ngx_http_lua_headers.h \ + ${PATCHDIR}/extra-patch-ngx_http_lua_module.c .endif .if ${PORT_OPTIONS:MENCRYPTSESSION} @@ -857,7 +858,7 @@ CONFIGURE_ARGS+=--add-module=${WRKSRC_le LIB_DEPENDS+= libluajit-5.1.so:lang/luajit CONFIGURE_ENV+= "LUAJIT_INC=${LOCALBASE}/include/luajit-2.0" CONFIGURE_ENV+= "LUAJIT_LIB=${LOCALBASE}/lib" -NGINX_LUA_VERSION= 0.10.7 +NGINX_LUA_VERSION= 0.10.8 GH_ACCOUNT+= openresty:lua GH_PROJECT+= lua-nginx-module:lua GH_TAGNAME+= v${NGINX_LUA_VERSION}:lua @@ -890,7 +891,8 @@ USES+= pkgconfig shebangfix MASTER_SITES+= http://www.modsecurity.org/tarball/${NGINX_MODSECURITY_VERSION:S/RC/rc/}/:modsecurity DISTFILES+= modsecurity-${NGINX_MODSECURITY_VERSION}.tar.gz:modsecurity CONFIGURE_ARGS+=--add-module=${WRKDIR}/modsecurity-${NGINX_MODSECURITY_VERSION}/nginx/modsecurity -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-nginx-modsecurity-configure +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-nginx-modsecurity-configure \ + ${PATCHDIR}/extra-patch-ngx_http_modsecurity.c .endif .if ${PORT_OPTIONS:MNAXSI} @@ -1029,22 +1031,6 @@ GH_TAGNAME+= v${NGINX_SRCACHE_VERSION}:s CONFIGURE_ARGS+=--add-module=${WRKSRC_srcache} .endif -.if ${PORT_OPTIONS:MSTATSD} -NGINX_STATSD_VERSION= b756a12 -GH_ACCOUNT+= zebrafishlabs:statsd -GH_PROJECT+= nginx-statsd:statsd -GH_TAGNAME+= ${NGINX_STATSD_VERSION}:statsd -CONFIGURE_ARGS+=--add-module=${WRKSRC_statsd} -.endif - -.if ${PORT_OPTIONS:MUDPLOG} -NGINX_UDPLOG_VERSION= 1.0.0 -MASTER_SITES+= http://www.grid.net.ru/nginx/download/:udplog -DISTFILES+= nginx_udplog_module-${NGINX_UDPLOG_VERSION}.tar.gz:udplog -CONFIGURE_ARGS+=--add-module=${WRKDIR}/nginx_udplog_module-${NGINX_UDPLOG_VERSION} -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_udplog_module.c -.endif - .if ${PORT_OPTIONS:MXRID_HEADER} GIT_XRID_VERSION= 0daa3cc GH_ACCOUNT+= gabor:xrid @@ -1266,20 +1252,6 @@ post-patch: 's!%%PREFIX%%!${LOCALBASE}!g' \ ${WRKDIR}/nginx-sflow-module-${NGINX_SFLOW_VERSION}/ngx_http_sflow_config.h .endif -.if ${PORT_OPTIONS:MSTATSD} - @${REINPLACE_CMD} \ - 's!ngx_udp_connection_t!ngx_resolver_connection_t!g; \ - s!uc->connection!uc->udp!g; \ - s!e->udp_connection->connection!e->udp_connection->udp!g' \ - ${WRKSRC_statsd}/ngx_http_statsd.c -.endif -.if ${PORT_OPTIONS:MUDPLOG} - @${REINPLACE_CMD} \ - 's!ngx_udp_connection_t!ngx_resolver_connection_t!g; \ - s!uc->connection!uc->udp!g; \ - s!e->udp_connection->connection!e->udp_connection->udp!g' \ - ${WRKDIR}/nginx_udplog_module-${NGINX_UDPLOG_VERSION}/ngx_http_udplog_module.c -.endif .if ${PORT_OPTIONS:MICONV} @${REINPLACE_CMD} \ 's!%%PREFIX%%!${LOCALBASE}!g' \ Modified: head/www/nginx-devel/distinfo ============================================================================== --- head/www/nginx-devel/distinfo Sat Apr 15 15:54:54 2017 (r438587) +++ head/www/nginx-devel/distinfo Sat Apr 15 15:55:19 2017 (r438588) @@ -1,6 +1,6 @@ -TIMESTAMP = 1487637530 -SHA256 (nginx-1.11.10.tar.gz) = 778b3cabb07633f754cd9dee32fc8e22582bce22bfa407be76a806abd935533d -SIZE (nginx-1.11.10.tar.gz) = 967773 +TIMESTAMP = 1492269919 +SHA256 (nginx-1.12.0.tar.gz) = b4222e26fdb620a8d3c3a3a8b955e08b713672e1bc5198d1e4f462308a795b30 +SIZE (nginx-1.12.0.tar.gz) = 980831 SHA256 (ngx_http_auth_pam_module-1.2.tar.gz) = 5a85970ba61a99f55a26d2536a11d512b39bbd622f5737d25a9a8c10db81efa9 SIZE (ngx_http_auth_pam_module-1.2.tar.gz) = 5424 SHA256 (ngx_cache_purge-2.3.tar.gz) = 279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c @@ -13,8 +13,6 @@ SHA256 (ngx_http_redis-0.3.8.tar.gz) = 9 SIZE (ngx_http_redis-0.3.8.tar.gz) = 12342 SHA256 (ngx_http_response-0.3.tar.gz) = 0835584029f053051c624adbe33a826ab0205c9d85a02af6019e6b57607e9045 SIZE (ngx_http_response-0.3.tar.gz) = 2244 -SHA256 (nginx_upstream_fair-20090923.tar.gz) = ec9ed7f856263e17faadee3dc7209932364ded4e546b829841c2454aa432450b -SIZE (nginx_upstream_fair-20090923.tar.gz) = 10024 SHA256 (08a395c66e42.tar.gz) = 53e440737ed1aff1f09fae150219a45f16add0c8d6e84546cb7d80f73ebffd90 SIZE (08a395c66e42.tar.gz) = 120603 SHA256 (modsecurity-2.9.1.tar.gz) = 958cc5a7a7430f93fac0fd6f8b9aa92fc1801efce0cda797d6029d44080a9b24 @@ -23,8 +21,6 @@ SHA256 (passenger-5.1.2.tar.gz) = 7fb03a SIZE (passenger-5.1.2.tar.gz) = 5646103 SHA256 (ngx_slowfs_cache-1.10.tar.gz) = 1e81453942e5b0877de1f1f06c56ae82918ea9818255cb935bcb673c95a758a1 SIZE (ngx_slowfs_cache-1.10.tar.gz) = 11809 -SHA256 (nginx_udplog_module-1.0.0.tar.gz) = e0c0bfa524c3a675ad6c08b916d08e57ef45f9818cb8a0d848c2c83785c6e659 -SIZE (nginx_udplog_module-1.0.0.tar.gz) = 6284 SHA256 (giom-nginx_accept_language_module-2f69842_GH0.tar.gz) = 5534ca63cdfc2a7dc4e1cbf9c2d54d3ed3f0e6c86b4a95be48ec0a3f41cc1eb0 SIZE (giom-nginx_accept_language_module-2f69842_GH0.tar.gz) = 3393 SHA256 (atomx-nginx-http-auth-digest-cc61b4a_GH0.tar.gz) = e68b34e03516a4ab43006eb4c481d6bc5e813e0d40876359c606a26c5c68ccf6 @@ -75,6 +71,8 @@ SHA256 (masterzen-nginx-upload-progress- SIZE (masterzen-nginx-upload-progress-module-v0.9.0_GH0.tar.gz) = 16990 SHA256 (yaoweibin-nginx_upstream_check_module-10782ea_GH0.tar.gz) = 52e6acd8c0264a59c5c948271015a59acd3cbcf91377456b7c8dc6f9feecef4a SIZE (yaoweibin-nginx_upstream_check_module-10782ea_GH0.tar.gz) = 128281 +SHA256 (cryptofuture-nginx-upstream-fair-b5be36f_GH0.tar.gz) = e765afcaab6cd1601e914039a8d00ab18eb6fe01180c58e0e4e098bc5b4d8233 +SIZE (cryptofuture-nginx-upstream-fair-b5be36f_GH0.tar.gz) = 10174 SHA256 (wandenberg-nginx-video-thumbextractor-module-0.7.0_GH0.tar.gz) = 382bb41fa739f471fdab9fbabc5384d8ec7f25b5bb0c45c153f5cc01d428abe2 SIZE (wandenberg-nginx-video-thumbextractor-module-0.7.0_GH0.tar.gz) = 2709351 SHA256 (evanmiller-mod_zip-ca0b345_GH0.tar.gz) = babab586ebde83d3cf128eabdc3a66f922db740a43c943ffd9cd8b055acf3a5b @@ -93,8 +91,8 @@ SHA256 (mongodb-mongo-c-driver-v0.3.1_GH SIZE (mongodb-mongo-c-driver-v0.3.1_GH0.tar.gz) = 53024 SHA256 (arut-nginx-let-module-v0.0.4_GH0.tar.gz) = cbf6fcddc00a7e30289134bdeace12565e000cc7d4efee2d2ebb8799d0b88270 SIZE (arut-nginx-let-module-v0.0.4_GH0.tar.gz) = 20534 -SHA256 (openresty-lua-nginx-module-v0.10.7_GH0.tar.gz) = c21c8937dcdd6fc2b6a955f929e3f4d1388610f47180e60126e6dcab06786f77 -SIZE (openresty-lua-nginx-module-v0.10.7_GH0.tar.gz) = 605171 +SHA256 (openresty-lua-nginx-module-v0.10.8_GH0.tar.gz) = d67449c71051b3cc2d6dd60df0ae0d21fca08aa19c9b30c5b95ee21ff38ef8dd +SIZE (openresty-lua-nginx-module-v0.10.8_GH0.tar.gz) = 606643 SHA256 (openresty-memc-nginx-module-v0.17_GH0.tar.gz) = 25cbe3ff4931283a681260607bc91ae4a922075345d5770b293c6cd7f1e3bdcc SIZE (openresty-memc-nginx-module-v0.17_GH0.tar.gz) = 36369 SHA256 (nbs-system-naxsi-0.54_GH0.tar.gz) = 9cc2c09405bc71f78ef26a8b6d70afcea3fccbe8125df70cb0cfc480133daba5 @@ -119,8 +117,6 @@ SHA256 (cubicdaiya-ngx_small_light-v0.8. SIZE (cubicdaiya-ngx_small_light-v0.8.0_GH0.tar.gz) = 55918 SHA256 (openresty-srcache-nginx-module-v0.30_GH0.tar.gz) = e34b1ab5f5007661f73819f9c20fd6c2a46ed3e53364e9449b02ef2bd3628633 SIZE (openresty-srcache-nginx-module-v0.30_GH0.tar.gz) = 58777 -SHA256 (zebrafishlabs-nginx-statsd-b756a12_GH0.tar.gz) = 4c5886edb1fbeb0b9a83c879b4be4b15a620627a18978aef636da3feafb284fe -SIZE (zebrafishlabs-nginx-statsd-b756a12_GH0.tar.gz) = 6636 SHA256 (gabor-nginx-x-rid-header-0daa3cc_GH0.tar.gz) = de784142d867a35ecc5443fa347c2903af0935669cdf2eaa9274f5253aac2267 SIZE (gabor-nginx-x-rid-header-0daa3cc_GH0.tar.gz) = 2711 SHA256 (openresty-xss-nginx-module-v0.05_GH0.tar.gz) = 958bd8de773601d8d3138501cc4be0420f1c818a3987a70cc9c0023371e432cf Added: head/www/nginx-devel/files/extra-patch-ngx_http_echo_request_info.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_echo_request_info.c Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,43 @@ +--- ../echo-nginx-module-46334b3/src/ngx_http_echo_request_info.c.orig 2017-04-15 10:03:29.616243000 -0400 ++++ ../echo-nginx-module-46334b3/src/ngx_http_echo_request_info.c 2017-04-15 10:07:41.329695000 -0400 +@@ -179,6 +179,9 @@ + ngx_int_t i, j; + ngx_buf_t *b, *first = NULL; + unsigned found; ++#if defined(nginx_version) && nginx_version >= 1011011 ++ ngx_chain_t *cl; ++#endif + ngx_connection_t *c; + ngx_http_request_t *mr; + ngx_http_connection_t *hc; +@@ -215,8 +218,15 @@ + + if (hc->nbusy) { + b = NULL; ++ ++#if defined(nginx_version) && nginx_version >= 1011011 ++ for (cl = hc->busy; cl; /* void */) { ++ b = cl->buf; ++ cl = cl->next; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (first == NULL) { + if (mr->request_line.data >= b->pos +@@ -280,8 +290,14 @@ + } + + if (hc->nbusy) { ++#if defined(nginx_version) && nginx_version >= 1011011 ++ for (cl = hc->busy; cl; /* void */) { ++ b = cl->buf; ++ cl = cl->next; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (!found) { + if (b != first) { Added: head/www/nginx-devel/files/extra-patch-ngx_http_lua_common.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_lua_common.h Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,15 @@ +--- ../lua-nginx-module-0.10.8/src/ngx_http_lua_common.h.orig 2017-04-15 10:55:20.591680000 -0400 ++++ ../lua-nginx-module-0.10.8/src/ngx_http_lua_common.h 2017-04-15 10:55:50.449108000 -0400 +@@ -199,6 +199,12 @@ + of reqeusts */ + ngx_uint_t malloc_trim_req_count; + ++#if nginx_version >= 1011011 ++ /* the following 2 fields are only used by ngx.req.raw_headers() for now */ ++ ngx_buf_t **busy_buf_ptrs; ++ ngx_int_t busy_buf_ptr_count; ++#endif ++ + unsigned requires_header_filter:1; + unsigned requires_body_filter:1; + unsigned requires_capture_filter:1; Added: head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.c Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,124 @@ +--- ../lua-nginx-module-0.10.8/src/ngx_http_lua_headers.c.orig 2017-04-15 10:57:48.875770000 -0400 ++++ ../lua-nginx-module-0.10.8/src/ngx_http_lua_headers.c 2017-04-15 11:02:00.492564000 -0400 +@@ -26,6 +26,9 @@ + static int ngx_http_lua_ngx_req_header_clear(lua_State *L); + static int ngx_http_lua_ngx_req_header_set(lua_State *L); + static int ngx_http_lua_ngx_resp_get_headers(lua_State *L); ++#if nginx_version >= 1011011 ++void ngx_http_lua_ngx_raw_header_cleanup(void *data); ++#endif + + + static int +@@ -77,6 +80,11 @@ + size_t size; + ngx_buf_t *b, *first = NULL; + ngx_int_t i, j; ++#if nginx_version >= 1011011 ++ ngx_buf_t **bb; ++ ngx_chain_t *cl; ++ ngx_http_lua_main_conf_t *lmcf; ++#endif + ngx_connection_t *c; + ngx_http_request_t *r, *mr; + ngx_http_connection_t *hc; +@@ -93,6 +101,10 @@ + return luaL_error(L, "no request object found"); + } + ++#if nginx_version >= 1011011 ++ lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module); ++#endif ++ + ngx_http_lua_check_fake_request(L, r); + + mr = r->main; +@@ -109,8 +121,13 @@ + dd("hc->nbusy: %d", (int) hc->nbusy); + + if (hc->nbusy) { ++#if nginx_version >= 1011011 ++ dd("hc->busy: %p %p %p %p", hc->busy->buf->start, hc->busy->buf->pos, ++ hc->busy->buf->last, hc->busy->buf->end); ++#else + dd("hc->busy: %p %p %p %p", hc->busy[0]->start, hc->busy[0]->pos, + hc->busy[0]->last, hc->busy[0]->end); ++#endif + } + + dd("request line: %p %p", mr->request_line.data, +@@ -146,9 +163,37 @@ + dd("size: %d", (int) size); + + if (hc->nbusy) { ++#if nginx_version >= 1011011 ++ if (hc->nbusy > lmcf->busy_buf_ptr_count) { ++ if (lmcf->busy_buf_ptrs) { ++ ngx_free(lmcf->busy_buf_ptrs); ++ } ++ ++ lmcf->busy_buf_ptrs = ngx_alloc(hc->nbusy * sizeof(ngx_buf_t *), ++ r->connection->log); ++ ++ if (lmcf->busy_buf_ptrs == NULL) { ++ return luaL_error(L, "no memory"); ++ } ++ ++ lmcf->busy_buf_ptr_count = hc->nbusy; ++ } ++ ++ bb = lmcf->busy_buf_ptrs; ++ for (cl = hc->busy; cl; cl = cl->next) { ++ *bb++ = cl->buf; ++ } ++#endif + b = NULL; ++ ++#if nginx_version >= 1011011 ++ bb = lmcf->busy_buf_ptrs; ++ for (i = hc->nbusy; i > 0; i--) { ++ b = bb[i - 1]; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + dd("busy buf: %d: [%.*s]", (int) i, (int) (b->pos - b->start), + b->start); +@@ -223,8 +268,15 @@ + } + + if (hc->nbusy) { ++ ++#if nginx_version >= 1011011 ++ bb = lmcf->busy_buf_ptrs; ++ for (i = hc->nbusy - 1; i >= 0; i--) { ++ b = bb[i]; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (!found) { + if (b != first) { +@@ -1431,4 +1483,20 @@ + #endif /* NGX_LUA_NO_FFI_API */ + + ++#if nginx_version >= 1011011 ++void ++ngx_http_lua_ngx_raw_header_cleanup(void *data) ++{ ++ ngx_http_lua_main_conf_t *lmcf; ++ ++ lmcf = (ngx_http_lua_main_conf_t *) data; ++ ++ if (lmcf->busy_buf_ptrs) { ++ ngx_free(lmcf->busy_buf_ptrs); ++ lmcf->busy_buf_ptrs = NULL; ++ } ++} ++#endif ++ ++ + /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ Added: head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_lua_headers.h Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,12 @@ +--- ../lua-nginx-module-0.10.8/src/ngx_http_lua_headers.h.orig 2017-04-15 11:05:40.649209000 -0400 ++++ ../lua-nginx-module-0.10.8/src/ngx_http_lua_headers.h 2017-04-15 11:06:01.658936000 -0400 +@@ -15,6 +15,9 @@ + void ngx_http_lua_inject_resp_header_api(lua_State *L); + void ngx_http_lua_inject_req_header_api(lua_State *L); + void ngx_http_lua_create_headers_metatable(ngx_log_t *log, lua_State *L); ++#if nginx_version >= 1011011 ++void ngx_http_lua_ngx_raw_header_cleanup(void *data); ++#endif + + + #endif /* _NGX_HTTP_LUA_HEADERS_H_INCLUDED_ */ Added: head/www/nginx-devel/files/extra-patch-ngx_http_lua_module.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_lua_module.c Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,36 @@ +--- ../lua-nginx-module-0.10.8/src/ngx_http_lua_module.c.orig 2017-04-15 11:07:10.366543000 -0400 ++++ ../lua-nginx-module-0.10.8/src/ngx_http_lua_module.c 2017-04-15 11:08:25.640520000 -0400 +@@ -28,6 +28,7 @@ + #include "ngx_http_lua_ssl_certby.h" + #include "ngx_http_lua_ssl_session_storeby.h" + #include "ngx_http_lua_ssl_session_fetchby.h" ++#include "ngx_http_lua_headers.h" + + + static void *ngx_http_lua_create_main_conf(ngx_conf_t *cf); +@@ -624,7 +625,7 @@ + volatile ngx_cycle_t *saved_cycle; + ngx_http_core_main_conf_t *cmcf; + ngx_http_lua_main_conf_t *lmcf; +-#ifndef NGX_LUA_NO_FFI_API ++#if !defined(NGX_LUA_NO_FFI_API) || nginx_version >= 1011011 + ngx_pool_cleanup_t *cln; + #endif + +@@ -716,6 +717,16 @@ + cln->handler = ngx_http_lua_sema_mm_cleanup; + #endif + ++#if nginx_version >= 1011011 ++ cln = ngx_pool_cleanup_add(cf->pool, 0); ++ if (cln == NULL) { ++ return NGX_ERROR; ++ } ++ ++ cln->data = lmcf; ++ cln->handler = ngx_http_lua_ngx_raw_header_cleanup; ++#endif ++ + if (lmcf->lua == NULL) { + dd("initializing lua vm"); + Added: head/www/nginx-devel/files/extra-patch-ngx_http_modsecurity.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-devel/files/extra-patch-ngx_http_modsecurity.c Sat Apr 15 15:55:19 2017 (r438588) @@ -0,0 +1,18 @@ +--- ../modsecurity-2.9.1/nginx/modsecurity/ngx_http_modsecurity.c.orig 2017-04-15 10:45:12.886736000 -0400 ++++ ../modsecurity-2.9.1/nginx/modsecurity/ngx_http_modsecurity.c 2017-04-15 10:45:59.921529000 -0400 +@@ -528,9 +528,15 @@ + + hc = r->http_connection; + ++#if defined(nginx_version) && nginx_version >= 1011011 ++ if (hc->free && size == cscf->large_client_header_buffers.size) { ++ ++ buf = hc->free->buf; ++#else + if (hc->nfree && size == cscf->large_client_header_buffers.size) { + + buf = hc->free[--hc->nfree]; ++#endif + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ModSecurity: use http free large header buffer: %p %uz",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704151555.v3FFtJnW000616>