Page MenuHomeFreeBSD

D14007.id38371.diff
No OneTemporary

D14007.id38371.diff

Index: www/nginx/Makefile
===================================================================
--- www/nginx/Makefile
+++ www/nginx/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nginx
PORTVERSION= 1.12.2
-PORTREVISION?= 5
+PORTREVISION?= 6
PORTEPOCH= 2
CATEGORIES= www
MASTER_SITES= http://nginx.org/download/
@@ -872,9 +872,7 @@
.else
CONFIGURE_ARGS+=--add-module=${WRKSRC_lua}
.endif
-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 \
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_lua_headers.h \
${PATCHDIR}/extra-patch-ngx_http_lua_module.c \
${PATCHDIR}/extra-patch-ngx_http_lua_ssl_ocsp.c
.endif
@@ -901,8 +899,9 @@
USE_APACHE= 22+
USE_GNOME+= libxml2
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
+GH_ACCOUNT+= SpiderLabs:modsecurity
+GH_PROJECT+= ModSecurity:modsecurity
+GH_TAGNAME+= v${NGINX_MODSECURITY_VERSION}:modsecurity
CONFIGURE_ARGS+=--add-module=${WRKDIR}/modsecurity-${NGINX_MODSECURITY_VERSION}/nginx/modsecurity
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-nginx-modsecurity-configure \
${PATCHDIR}/extra-patch-ngx_http_modsecurity.c
@@ -980,7 +979,6 @@
GH_PROJECT+= redis2-nginx-module:redis2
GH_TAGNAME+= v${NGINX_REDIS2_VERSION}:redis2
CONFIGURE_ARGS+=--add-module=${WRKSRC_redis2}
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_redis2_util.c
.endif
.if ${PORT_OPTIONS:MRTMP}
Index: www/nginx/files/extra-patch-ngx_http_lua_common.h
===================================================================
--- www/nginx/files/extra-patch-ngx_http_lua_common.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- ../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;
Index: www/nginx/files/extra-patch-ngx_http_lua_headers.c
===================================================================
--- www/nginx/files/extra-patch-ngx_http_lua_headers.c
+++ /dev/null
@@ -1,124 +0,0 @@
---- ../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: */
Index: www/nginx/files/extra-patch-ngx_http_redis2_util.c
===================================================================
--- www/nginx/files/extra-patch-ngx_http_redis2_util.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ../redis2-nginx-module-0.12/src/ngx_http_redis2_util.c.orig 2016-11-20 15:00:28.997903000 -0500
-+++ ../redis2-nginx-module-0.12/src/ngx_http_redis2_util.c 2016-11-20 15:00:44.173323000 -0500
-@@ -77,6 +77,7 @@
- continue;
- }
-
-+#if (nginx_version < 1011006)
- if (uscfp[i]->default_port
- && url->default_port
- && uscfp[i]->default_port != url->default_port)
-@@ -84,6 +85,7 @@
- dd("upstream_add: default_port not match");
- continue;
- }
-+#endif
-
- return uscfp[i];
- }

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 26, 4:01 PM (1 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26218762
Default Alt Text
D14007.id38371.diff (6 KB)

Event Timeline