commit:     9907619044963ae63bcc6a85b3006dde06ce31d8
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sun Feb 11 22:17:17 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 22:17:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99076190

www-servers/nginx: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/7023
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../nginx/files/http_echo-nginx-1.11.11+.patch     |  59 ------
 .../nginx/files/http_lua_nginx-1.11.11+-r1.patch   | 214 ---------------------
 .../nginx/files/http_security-pr_1158.patch        | 103 ----------
 .../nginx/files/http_security-pr_1373.patch        |  33 ----
 4 files changed, 409 deletions(-)

diff --git a/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch 
b/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch
deleted file mode 100644
index d4f3db80809..00000000000
--- a/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From d16babcc09050966f5055df41572429bd84d811a Mon Sep 17 00:00:00 2001
-From: Andrei Belov <[email protected]>
-Date: Wed, 22 Mar 2017 08:43:30 +0300
-Subject: [PATCH] fixed build with nginx/1.11.11
-
-Closes openresty/echo-nginx-module#64
-
-See also:
-http://hg.nginx.org/nginx/rev/e662cbf1b932
----
- src/ngx_http_echo_request_info.c | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/src/ngx_http_echo_request_info.c 
b/src/ngx_http_echo_request_info.c
-index d28ec4d..27b3c52 100644
---- a/src/ngx_http_echo_request_info.c
-+++ b/src/ngx_http_echo_request_info.c
-@@ -179,6 +179,9 @@ 
ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r,
-     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 @@ 
ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r,
- 
-     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,15 @@ 
ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r,
-     }
- 
-     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) {

diff --git a/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch 
b/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch
deleted file mode 100644
index 2a61c03b200..00000000000
--- a/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-From 0459a285ca0159d45e73da8bd1164edb5c57cde3 Mon Sep 17 00:00:00 2001
-From: Andrei Belov <[email protected]>
-Date: Wed, 22 Mar 2017 07:50:57 +0300
-Subject: [PATCH] feature: nginx 1.11.11+ can now build with this module.
-
-Note: nginx 1.11.11+ are still not an officially supported target yet.
-More work needed.
-
-Closes openresty/lua-nginx-module#1016
-
-See also:
-http://hg.nginx.org/nginx/rev/e662cbf1b932
----
- src/ngx_http_lua_common.h  |  6 ++++
- src/ngx_http_lua_headers.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++
- src/ngx_http_lua_headers.h |  3 ++
- src/ngx_http_lua_module.c  | 13 ++++++++-
- 4 files changed, 89 insertions(+), 1 deletion(-)
-
-diff --git a/src/ngx_http_lua_common.h b/src/ngx_http_lua_common.h
-index 079a4dc..f37d776 100644
---- a/src/ngx_http_lua_common.h
-+++ b/src/ngx_http_lua_common.h
-@@ -199,6 +199,12 @@ struct ngx_http_lua_main_conf_s {
-                                                 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;
-diff --git a/src/ngx_http_lua_headers.c b/src/ngx_http_lua_headers.c
-index 2392598..6700ce8 100644
---- a/src/ngx_http_lua_headers.c
-+++ b/src/ngx_http_lua_headers.c
-@@ -26,6 +26,9 @@ static int ngx_http_lua_ngx_req_get_headers(lua_State *L);
- 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 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L)
-     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 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L)
-         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 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L)
-     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 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L)
-     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 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L)
-     }
- 
-     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 @@ ngx_http_lua_ffi_get_resp_header(ngx_http_request_t *r,
- #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: */
-diff --git a/src/ngx_http_lua_headers.h b/src/ngx_http_lua_headers.h
-index 39f1114..ee4d21c 100644
---- a/src/ngx_http_lua_headers.h
-+++ b/src/ngx_http_lua_headers.h
-@@ -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_ */
-diff --git a/src/ngx_http_lua_module.c b/src/ngx_http_lua_module.c
-index 3dc2817..875f933 100644
---- a/src/ngx_http_lua_module.c
-+++ b/src/ngx_http_lua_module.c
-@@ -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 @@ ngx_http_lua_init(ngx_conf_t *cf)
-     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 @@ ngx_http_lua_init(ngx_conf_t *cf)
-     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");
- 

diff --git a/www-servers/nginx/files/http_security-pr_1158.patch 
b/www-servers/nginx/files/http_security-pr_1158.patch
deleted file mode 100644
index 92f1094c243..00000000000
--- a/www-servers/nginx/files/http_security-pr_1158.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 2fa8ffea68498e02005e85c27e61bde30718ae3b Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <[email protected]>
-Date: Sat, 11 Jun 2016 16:18:17 +0200
-Subject: [PATCH 1/2] configure: Fix detection whether libcurl is linked
- against gnutls
-
-The find_curl macro is also checking whether libcurl is linked against
-gnutls. However the check depends on "CURL_LIBS" which wasn't defined
-by the macro.
-
-This commit will define "CURL_LIBS" so that the check works as expected.
----
- build/find_curl.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/build/find_curl.m4 b/build/find_curl.m4
-index 6b23ad6..3310e40 100644
---- a/build/find_curl.m4
-+++ b/build/find_curl.m4
-@@ -2,6 +2,7 @@ dnl Check for CURL Libraries
- dnl CHECK_CURL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
- dnl Sets:
- dnl  CURL_CFLAGS
-+dnl  CURL_LDADD
- dnl  CURL_LIBS
- 
- CURL_CONFIG=""
-@@ -57,7 +58,8 @@ if test -n "${curl_path}"; then
-     if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl VERSION: 
$CURL_VERSION); fi
-     CURL_CFLAGS="`${CURL_CONFIG} --cflags`"
-     if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl CFLAGS: 
$CURL_CFLAGS); fi
--    CURL_LDADD="`${CURL_CONFIG} --libs`"
-+    CURL_LIBS="`${CURL_CONFIG} --libs`"
-+    CURL_LDADD="${CURL_LIBS}"
-     if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl LDADD: 
$CURL_LIBS); fi
- 
-     dnl # Check version is ok
-
-From 67f98e7da04251a40a0172e3dfac2c5a6ac6f7dd Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <[email protected]>
-Date: Sat, 11 Jun 2016 16:48:58 +0200
-Subject: [PATCH 2/2] configure: Move verbose_output declaration up to the
- beginning
-
-Macros like "find_curl" are using "verbose_output" variable but because some
-of them are called before we define the variable we are seeing errors like
-
-  ./configure: line 13855: test: : integer expression expected
-
-This commit will fix the problem by moving the "verbose_output" declaration
-up to the beginning so that the variable is available for every macro.
----
- configure.ac | 30 ++++++++++++++++--------------
- 1 file changed, 16 insertions(+), 14 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 7517885..0f32b01 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,22 @@ AC_SUBST(MSC_REGRESSION_DOCROOT_DIR)
- 
- ### Configure Options
- 
-+# Verbose output
-+AC_ARG_ENABLE(verbose-output,
-+              AS_HELP_STRING([--enable-verbose-output],
-+                             [Enable more verbose configure output.]),
-+[
-+  if test "$enableval" != "no"; then
-+    verbose_output=1
-+  else
-+    verbose_output=0
-+  fi
-+],
-+[
-+  verbose_output=0
-+])
-+
-+
- #OS type
- 
- AC_CANONICAL_HOST
-@@ -410,20 +426,6 @@ AC_ARG_ENABLE(errors,
-   report_errors=1
- ])
- 
--# Verbose output
--AC_ARG_ENABLE(verbose-output,
--              AS_HELP_STRING([--enable-verbose-output],
--                             [Enable more verbose configure output.]),
--[
--  if test "$enableval" != "no"; then
--    verbose_output=1
--  else
--    verbose_output=0
--  fi
--],
--[
--  verbose_output=0
--])
- 
- # Strict Compile
- AC_ARG_ENABLE(strict-compile,

diff --git a/www-servers/nginx/files/http_security-pr_1373.patch 
b/www-servers/nginx/files/http_security-pr_1373.patch
deleted file mode 100644
index e4069e16330..00000000000
--- a/www-servers/nginx/files/http_security-pr_1373.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From d19df159043106a4d6dfd113696900b5b0dae24b Mon Sep 17 00:00:00 2001
-From: Andrei Belov <[email protected]>
-Date: Mon, 3 Apr 2017 12:52:01 +0300
-Subject: [PATCH] Fix building with nginx >= 1.11.11
-
-Closes SpiderLabs/ModSecurity#1359
-
-See also:
-http://hg.nginx.org/nginx/rev/e662cbf1b932
----
- nginx/modsecurity/ngx_http_modsecurity.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/nginx/modsecurity/ngx_http_modsecurity.c 
b/nginx/modsecurity/ngx_http_modsecurity.c
-index 7c13953..367b2b8 100644
---- a/nginx/modsecurity/ngx_http_modsecurity.c
-+++ b/nginx/modsecurity/ngx_http_modsecurity.c
-@@ -528,9 +528,15 @@ ngx_http_modsecurity_save_request_body(ngx_http_request_t 
*r)
- 
-         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",

Reply via email to