Accepting request 416956 from home:ipeoshir
update to version 1.11.2 OBS-URL: https://build.opensuse.org/request/show/416956 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=67
This commit is contained in:
parent
0643ec846f
commit
1ac6359aaf
242
check_1.9.2+.patch
Normal file
242
check_1.9.2+.patch
Normal file
@ -0,0 +1,242 @@
|
||||
diff --git src/http/modules/ngx_http_upstream_hash_module.c src/http/modules/ngx_http_upstream_hash_module.c
|
||||
index 1e2e05c..44a72e2 100644
|
||||
--- src/http/modules/ngx_http_upstream_hash_module.c
|
||||
+++ src/http/modules/ngx_http_upstream_hash_module.c
|
||||
@@ -9,6 +9,9 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+#include "ngx_http_upstream_check_module.h"
|
||||
+#endif
|
||||
|
||||
typedef struct {
|
||||
uint32_t hash;
|
||||
@@ -235,6 +238,15 @@ ngx_http_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data)
|
||||
goto next;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
+ "get hash peer, check_index: %ui",
|
||||
+ peer->check_index);
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ goto next;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->max_fails
|
||||
&& peer->fails >= peer->max_fails
|
||||
&& now - peer->checked <= peer->fail_timeout)
|
||||
@@ -535,6 +547,15 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
|
||||
continue;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
+ "get consistent_hash peer, check_index: %ui",
|
||||
+ peer->check_index);
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->server.len != server->len
|
||||
|| ngx_strncmp(peer->server.data, server->data, server->len)
|
||||
!= 0)
|
||||
diff --git src/http/modules/ngx_http_upstream_ip_hash_module.c src/http/modules/ngx_http_upstream_ip_hash_module.c
|
||||
index 401b58e..ba656bd 100644
|
||||
--- src/http/modules/ngx_http_upstream_ip_hash_module.c
|
||||
+++ src/http/modules/ngx_http_upstream_ip_hash_module.c
|
||||
@@ -9,6 +9,9 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+#include "ngx_http_upstream_check_module.h"
|
||||
+#endif
|
||||
|
||||
typedef struct {
|
||||
/* the round robin data must be first */
|
||||
@@ -205,6 +208,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
|
||||
goto next;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
+ "get ip_hash peer, check_index: %ui",
|
||||
+ peer->check_index);
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ goto next;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->max_fails
|
||||
&& peer->fails >= peer->max_fails
|
||||
&& now - peer->checked <= peer->fail_timeout)
|
||||
diff --git src/http/modules/ngx_http_upstream_least_conn_module.c src/http/modules/ngx_http_upstream_least_conn_module.c
|
||||
index 92951bd..48aca2c 100644
|
||||
--- src/http/modules/ngx_http_upstream_least_conn_module.c
|
||||
+++ src/http/modules/ngx_http_upstream_least_conn_module.c
|
||||
@@ -9,6 +9,9 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+#include "ngx_http_upstream_check_module.h"
|
||||
+#endif
|
||||
|
||||
static ngx_int_t ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r,
|
||||
ngx_http_upstream_srv_conf_t *us);
|
||||
@@ -148,6 +151,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
|
||||
continue;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
+ "get least_conn peer, check_index: %ui",
|
||||
+ peer->check_index);
|
||||
+
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->max_fails
|
||||
&& peer->fails >= peer->max_fails
|
||||
&& now - peer->checked <= peer->fail_timeout)
|
||||
@@ -199,6 +212,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
|
||||
continue;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
+ "get least_conn peer, check_index: %ui",
|
||||
+ peer->check_index);
|
||||
+
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->conns * best->weight != best->conns * peer->weight) {
|
||||
continue;
|
||||
}
|
||||
diff --git src/http/ngx_http_upstream_round_robin.c src/http/ngx_http_upstream_round_robin.c
|
||||
index d6ae33b..416572a 100644
|
||||
--- src/http/ngx_http_upstream_round_robin.c
|
||||
+++ src/http/ngx_http_upstream_round_robin.c
|
||||
@@ -9,6 +9,9 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+#include "ngx_http_upstream_check_module.h"
|
||||
+#endif
|
||||
|
||||
#define ngx_http_upstream_tries(p) ((p)->number \
|
||||
+ ((p)->next ? (p)->next->number : 0))
|
||||
@@ -96,7 +99,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
|
||||
peer[n].fail_timeout = server[i].fail_timeout;
|
||||
peer[n].down = server[i].down;
|
||||
peer[n].server = server[i].name;
|
||||
-
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ if (!server[i].down) {
|
||||
+ peer[n].check_index =
|
||||
+ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
|
||||
+ } else {
|
||||
+ peer[n].check_index = (ngx_uint_t) NGX_ERROR;
|
||||
+ }
|
||||
+#endif
|
||||
*peerp = &peer[n];
|
||||
peerp = &peer[n].next;
|
||||
n++;
|
||||
@@ -159,7 +169,15 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
|
||||
peer[n].fail_timeout = server[i].fail_timeout;
|
||||
peer[n].down = server[i].down;
|
||||
peer[n].server = server[i].name;
|
||||
-
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ if (!server[i].down) {
|
||||
+ peer[n].check_index =
|
||||
+ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
|
||||
+ }
|
||||
+ else {
|
||||
+ peer[n].check_index = (ngx_uint_t) NGX_ERROR;
|
||||
+ }
|
||||
+#endif
|
||||
*peerp = &peer[n];
|
||||
peerp = &peer[n].next;
|
||||
n++;
|
||||
@@ -225,6 +243,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
|
||||
peer[i].current_weight = 0;
|
||||
peer[i].max_fails = 1;
|
||||
peer[i].fail_timeout = 10;
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ peer[i].check_index = (ngx_uint_t) NGX_ERROR;
|
||||
+#endif
|
||||
*peerp = &peer[i];
|
||||
peerp = &peer[i].next;
|
||||
}
|
||||
@@ -339,6 +360,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
|
||||
peer[0].current_weight = 0;
|
||||
peer[0].max_fails = 1;
|
||||
peer[0].fail_timeout = 10;
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ peer[0].check_index = (ngx_uint_t) NGX_ERROR;
|
||||
+#endif
|
||||
peers->peer = peer;
|
||||
|
||||
} else {
|
||||
@@ -381,6 +405,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
|
||||
peer[i].current_weight = 0;
|
||||
peer[i].max_fails = 1;
|
||||
peer[i].fail_timeout = 10;
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ peer[i].check_index = (ngx_uint_t) NGX_ERROR;
|
||||
+#endif
|
||||
*peerp = &peer[i];
|
||||
peerp = &peer[i].next;
|
||||
}
|
||||
@@ -441,6 +468,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ goto failed;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rrp->current = peer;
|
||||
|
||||
} else {
|
||||
@@ -542,6 +575,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
|
||||
continue;
|
||||
}
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (peer->max_fails
|
||||
&& peer->fails >= peer->max_fails
|
||||
&& now - peer->checked <= peer->fail_timeout)
|
||||
diff --git src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_upstream_round_robin.h
|
||||
index f2c573f..75e0ed6 100644
|
||||
--- src/http/ngx_http_upstream_round_robin.h
|
||||
+++ src/http/ngx_http_upstream_round_robin.h
|
||||
@@ -35,6 +35,10 @@ struct ngx_http_upstream_rr_peer_s {
|
||||
ngx_uint_t max_fails;
|
||||
time_t fail_timeout;
|
||||
|
||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
||||
+ ngx_uint_t check_index;
|
||||
+#endif
|
||||
+
|
||||
ngx_uint_t down; /* unsigned down:1; */
|
||||
|
||||
#if (NGX_HTTP_SSL)
|
3
headers-more-nginx-module-0.30.tar.gz
Normal file
3
headers-more-nginx-module-0.30.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2aad309a9313c21c7c06ee4e71a39c99d4d829e31c8b3e7d76f8c964ea8047f5
|
||||
size 27793
|
@ -1,11 +0,0 @@
|
||||
--- nginx-1.10.0.orig/auto/cc/gcc 2016-05-06 09:12:12.617492168 +0200
|
||||
+++ nginx-1.10.0/auto/cc/gcc 2016-05-06 10:07:04.218072918 +0200
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+CFLAGS="$CFLAGS"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1fd35846566485e03c0e318989561c135c598323ff349c503a6c14826487a801
|
||||
size 909077
|
@ -1,6 +1,6 @@
|
||||
diff -ur nginx-1.10.0.orig/auto/install nginx-1.10.0/auto/install
|
||||
--- nginx-1.10.0.orig/auto/install 2016-05-06 09:12:12.617492168 +0200
|
||||
+++ nginx-1.10.0/auto/install 2016-05-06 09:30:12.164261301 +0200
|
||||
diff -ur nginx-1.11.2.orig/auto/install nginx-1.11.2/auto/install
|
||||
--- nginx-1.11.2.orig/auto/install 2016-05-06 09:12:12.617492168 +0200
|
||||
+++ nginx-1.11.2/auto/install 2016-05-06 09:30:12.164261301 +0200
|
||||
@@ -154,8 +154,7 @@
|
||||
test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' \\
|
||||
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`'
|
24
nginx-1.11.2-no_Werror.patch
Normal file
24
nginx-1.11.2-no_Werror.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -urp nginx-1.11.2/auto/cc/gcc nginx-1.11.2-patched/auto/cc/gcc
|
||||
--- nginx-1.11.2/auto/cc/gcc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.11.2-patched/auto/cc/gcc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -168,7 +168,7 @@ esac
|
||||
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
diff -urp nginx-1.11.2/auto/cc/icc nginx-1.11.2-patched/auto/cc/icc
|
||||
--- nginx-1.11.2/auto/cc/icc 2014-03-04 03:39:24.000000000 -0800
|
||||
+++ nginx-1.11.2-patched/auto/cc/icc 2014-03-13 20:54:13.301355329 -0700
|
||||
@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in
|
||||
esac
|
||||
|
||||
# stop on warning
|
||||
-CFLAGS="$CFLAGS -Werror"
|
||||
+#CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
3
nginx-1.11.2.tar.gz
Normal file
3
nginx-1.11.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0327be3e647bdc4a1b3ef98946a8e8fbf258ce8da6bed9a94222b249ae2700a
|
||||
size 924979
|
21
nginx.spec
21
nginx.spec
@ -62,9 +62,11 @@
|
||||
%endif
|
||||
#
|
||||
Name: nginx
|
||||
Version: 1.10.1
|
||||
Version: 1.11.2
|
||||
Release: 0
|
||||
%define fancyindex_version 0.3.5
|
||||
%define headers_more_nginx_version 0.30
|
||||
%define nginx_upstream_check_version 0.3.0
|
||||
Summary: A HTTP server and IMAP/POP3 proxy server
|
||||
License: BSD-2-Clause
|
||||
Group: Productivity/Networking/Web/Proxy
|
||||
@ -74,17 +76,21 @@ Source1: nginx.init
|
||||
Source2: nginx.logrotate
|
||||
Source3: nginx.service
|
||||
Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{fancyindex_version}/ngx-fancyindex-%{fancyindex_version}.tar.gz
|
||||
Source5: https://github.com/openresty/headers-more-nginx-module/archive/v%{headers_more_nginx_version}/headers-more-nginx-module-%{headers_more_nginx_version}.tar.gz
|
||||
Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/nginx_upstream_check_module-%{nginx_upstream_check_version}.tar.gz
|
||||
Source100: nginx.rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM nginx-1.10.0-no_Werror.patch
|
||||
Patch0: nginx-1.10.0-no_Werror.patch
|
||||
# PATCH-FIX-OPENSUSE nginx-1.10.0-html.patch
|
||||
Patch1: nginx-1.10.0-html.patch
|
||||
# PATCH-FIX-UPSTREAM nginx-1.11.2-no_Werror.patch
|
||||
Patch0: nginx-1.11.2-no_Werror.patch
|
||||
# PATCH-FIX-OPENSUSE nginx-1.11.2-html.patch
|
||||
Patch1: nginx-1.11.2-html.patch
|
||||
# PATCH-FIX-UPSTREAM nginx-1.2.4-perl_vendor_install.patch
|
||||
Patch2: nginx-1.2.4-perl_vendor_install.patch
|
||||
# PATCH-FIX-UPSTREAM fix /etc/nginx/nginx.conf to suit Linux env
|
||||
Patch3: nginx-1.6.1-default_config.patch
|
||||
# PATCH-FIX-UPSTREAM nginx-aio.patch fix support for Linux AIO
|
||||
Patch4: nginx-aio.patch
|
||||
# PATCH-FIX-UPSTREAM check_1.9.2+.patch
|
||||
Patch5: check_1.9.2+.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gd-devel
|
||||
BuildRequires: libxslt-devel
|
||||
@ -127,11 +133,14 @@ It has been running on many heavily loaded Russian sites for more than two years
|
||||
%else
|
||||
%setup -q -n %{pkg_name}-%{version}
|
||||
%endif
|
||||
%setup -D -T -a 5 -n %{pkg_name}-%{version}
|
||||
%setup -D -T -a 6 -n %{pkg_name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
%patch5
|
||||
|
||||
perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl
|
||||
# we just use lib here because nginx loads them relative to _prefix
|
||||
@ -211,6 +220,8 @@ sed -i "s/\/var\/run/\/run/" %{_sourcedir}/nginx.init
|
||||
%if %{with fancyindex}
|
||||
--add-module=../ngx-fancyindex-%{fancyindex_version} \
|
||||
%endif
|
||||
--add-module=headers-more-nginx-module-%{headers_more_nginx_version} \
|
||||
--add-module=nginx_upstream_check_module-%{nginx_upstream_check_version} \
|
||||
--with-md5=%{_prefix} \
|
||||
--with-sha1=%{_prefix} \
|
||||
%if 0%{?suse_version} > 1220
|
||||
|
3
nginx_upstream_check_module-0.3.0.tar.gz
Normal file
3
nginx_upstream_check_module-0.3.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c543bf427b38643c10dcd1a0c701392bc666708313e7b63f9272396a6cc9a461
|
||||
size 136542
|
Loading…
Reference in New Issue
Block a user