Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145087217
D14007.id38373.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D14007.id38373.diff
View Options
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,11 +872,6 @@
.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 \
- ${PATCHDIR}/extra-patch-ngx_http_lua_module.c \
- ${PATCHDIR}/extra-patch-ngx_http_lua_ssl_ocsp.c
.endif
.if ${PORT_OPTIONS:MMEMC}
@@ -901,11 +896,11 @@
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
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_modsecurity.c
.endif
.if ${PORT_OPTIONS:MMODSECURITY_DEVEL}
@@ -980,7 +975,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-nginx-modsecurity-configure
===================================================================
--- www/nginx/files/extra-patch-nginx-modsecurity-configure
+++ /dev/null
@@ -1,29 +0,0 @@
---- ../modsecurity-2.9.1/configure.orig 2016-02-07 12:45:53.346098000 -0500
-+++ ../modsecurity-2.9.1/configure 2016-02-07 12:47:50.081558000 -0500
-@@ -14949,7 +14949,7 @@
- LUA_LDADD=""
- LUA_LDFLAGS=""
- LUA_CONFIG=${PKG_CONFIG}
--LUA_PKGNAMES="lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua lua5.2 lua-5.2 lua_5.2 lua-52 lua_52 lua52 lua5.3 lua-5.3 lua_5.3 lua-53 lua_53 lua53 "
-+LUA_PKGNAMES="luajit "
- LUA_SONAMES="so la sl dll dylib a"
-
-
-@@ -14965,7 +14965,7 @@
- no) :
- test_paths= ;; #(
- yes) :
-- test_paths="/usr/local/liblua /usr/local/lua /usr/local /opt/liblua /opt/lua /opt /usr" ;; #(
-+ test_paths="%%PREFIX%%/include/luajit-2.0" ;; #(
- *) :
- test_paths="${with_lua}" ;;
- esac
-@@ -15019,7 +15019,7 @@
- LUA_LDADD="`${LUA_CONFIG} ${LUA_PKGNAME} --libs-only-l`"
- if test "$verbose_output" -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: lua LDADD: $LUA_LDADD" >&5
- $as_echo "$as_me: lua LDADD: $LUA_LDADD" >&6;}; fi
-- LUA_LDFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --libs-only-L --libs-only-other`"
-+ LUA_LDFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --libs-only-L --libs-only-other | sed 's/\/lua51//'`"
- if test "$verbose_output" -eq 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: lua LDFLAGS: $LUA_LDFLAGS" >&5
- $as_echo "$as_me: lua LDFLAGS: $LUA_LDFLAGS" >&6;}; fi
- else
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.h
===================================================================
--- www/nginx/files/extra-patch-ngx_http_lua_headers.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- ../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_ */
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_lua_ssl_ocsp.c
===================================================================
--- www/nginx/files/extra-patch-ngx_http_lua_ssl_ocsp.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- ../lua-nginx-module-0.10.8/src/ngx_http_lua_ssl_ocsp.c.orig 2017-04-30 17:32:37.211186000 -0400
-+++ ../lua-nginx-module-0.10.8/src/ngx_http_lua_ssl_ocsp.c 2017-04-30 17:33:42.926721000 -0400
-@@ -490,7 +490,9 @@
-
- dd("set ocsp resp: resp_len=%d", (int) resp_len);
- (void) SSL_set_tlsext_status_ocsp_resp(ssl_conn, p, resp_len);
-+#ifndef LIBRESSL_VERSION_NUMBER
- ssl_conn->tlsext_status_expected = 1;
-+#endif
-
- return NGX_OK;
-
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 8:18 PM (16 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28788549
Default Alt Text
D14007.id38373.diff (9 KB)
Attached To
Mode
D14007: www/nginx: remove needless patch.
Attached
Detach File
Event Timeline
Log In to Comment