Accepting request 875609 from server:http
OBS-URL: https://build.opensuse.org/request/show/875609 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nginx?expand=0&rev=60
This commit is contained in:
commit
97d3670a55
@ -1,242 +0,0 @@
|
|||||||
Index: src/http/modules/ngx_http_upstream_hash_module.c
|
|
||||||
===================================================================
|
|
||||||
--- src/http/modules/ngx_http_upstream_hash_module.c.orig
|
|
||||||
+++ 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;
|
|
||||||
@@ -238,6 +241,15 @@ ngx_http_upstream_get_hash_peer(ngx_peer
|
|
||||||
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)
|
|
||||||
@@ -560,6 +572,15 @@ ngx_http_upstream_get_chash_peer(ngx_pee
|
|
||||||
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)
|
|
||||||
Index: src/http/modules/ngx_http_upstream_ip_hash_module.c
|
|
||||||
===================================================================
|
|
||||||
--- src/http/modules/ngx_http_upstream_ip_hash_module.c.orig
|
|
||||||
+++ 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 */
|
|
||||||
@@ -208,6 +211,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_p
|
|
||||||
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)
|
|
||||||
Index: src/http/modules/ngx_http_upstream_least_conn_module.c
|
|
||||||
===================================================================
|
|
||||||
--- src/http/modules/ngx_http_upstream_least_conn_module.c.orig
|
|
||||||
+++ 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);
|
|
||||||
@@ -147,6 +150,16 @@ ngx_http_upstream_get_least_conn_peer(ng
|
|
||||||
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)
|
|
||||||
@@ -202,6 +215,16 @@ ngx_http_upstream_get_least_conn_peer(ng
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
Index: src/http/ngx_http_upstream_round_robin.c
|
|
||||||
===================================================================
|
|
||||||
--- src/http/ngx_http_upstream_round_robin.c.orig
|
|
||||||
+++ 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))
|
|
||||||
@@ -97,7 +100,14 @@ ngx_http_upstream_init_round_robin(ngx_c
|
|
||||||
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++;
|
|
||||||
@@ -161,7 +171,15 @@ ngx_http_upstream_init_round_robin(ngx_c
|
|
||||||
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++;
|
|
||||||
@@ -228,6 +246,9 @@ ngx_http_upstream_init_round_robin(ngx_c
|
|
||||||
peer[i].max_conns = 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;
|
|
||||||
}
|
|
||||||
@@ -344,6 +365,9 @@ ngx_http_upstream_create_round_robin_pee
|
|
||||||
peer[0].max_conns = 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 {
|
|
||||||
@@ -378,6 +402,9 @@ ngx_http_upstream_create_round_robin_pee
|
|
||||||
peer[i].max_conns = 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;
|
|
||||||
}
|
|
||||||
@@ -443,6 +470,12 @@ ngx_http_upstream_get_round_robin_peer(n
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
|
||||||
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
rrp->current = peer;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
@@ -537,6 +570,12 @@ ngx_http_upstream_get_peer(ngx_http_upst
|
|
||||||
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)
|
|
||||||
Index: src/http/ngx_http_upstream_round_robin.h
|
|
||||||
===================================================================
|
|
||||||
--- src/http/ngx_http_upstream_round_robin.h.orig
|
|
||||||
+++ src/http/ngx_http_upstream_round_robin.h
|
|
||||||
@@ -38,6 +38,10 @@ struct ngx_http_upstream_rr_peer_s {
|
|
||||||
ngx_msec_t slow_start;
|
|
||||||
ngx_msec_t start_time;
|
|
||||||
|
|
||||||
+#if (NGX_HTTP_UPSTREAM_CHECK)
|
|
||||||
+ ngx_uint_t check_index;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
ngx_uint_t down;
|
|
||||||
|
|
||||||
#if (NGX_HTTP_SSL || NGX_COMPAT)
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b11195a02b1d3285ddf2987e02c6b6d28df41bb1b1dd25f33542848ef4fc33b5
|
|
||||||
size 1055982
|
|
@ -1,10 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iQEcBAABCAAGBQJf2NJhAAoJEFIKmZOhwFL46R4H/0lFIC7mX+NY5fbVFrOAfEyn
|
|
||||||
q/bo9n8eeOROkVDSs9kbrhtlAhUoTCu19LNug6BAwMfzB5RuPbjEe6tULO8XUorT
|
|
||||||
24rDGVZ1RLsETUucG1d033cl32BMshm7Qx6iv/kVhi2lB7pQk/suh8HzUf9SSbTb
|
|
||||||
aNhkYmJ9B2V47+jggltR8lb+UzH2Ln+aiMMCp8hUTFjAZLKOHNck2ruidbi1VbH9
|
|
||||||
Ah+Zq+7vSic9frPfVpgZ5N8rq40x8Z6sRXt787G5Ey39clj4wqRaJXcYohgfyT9F
|
|
||||||
xFAceJMStq3qhI2HD4kDyevDpIwpzOQHkR+K5HRCSD7sc2xho3oYpEgbpoKxn54=
|
|
||||||
=PlO1
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
nginx-1.19.7.tar.gz
Normal file
3
nginx-1.19.7.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7ae4dd020c41d3a5e1e6a8578fcc60e508e3e27e7668e845ddc87a05a775b50e
|
||||||
|
size 1056631
|
10
nginx-1.19.7.tar.gz.asc
Normal file
10
nginx-1.19.7.tar.gz.asc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQEcBAABCAAGBQJgK+wFAAoJEFIKmZOhwFL4tQMIAIpgYaTZuIYidhZ9YzVlzRKl
|
||||||
|
U94KBm49k86YPYpb/uUoODPuXR9j1xb/QXHe3J8XGATqEyNmqdTin+yfXqCoyFuo
|
||||||
|
eHLB4cDPEvFowZYbxPgiF8PWoG5v6IN2ZgOks4tcPiWhqe2YTrx33B6HOz42TSVY
|
||||||
|
XUHnGVwVCsY/J7N6Vr8+TjnEXZgPn4S0YSTwIi14zQj4WuMMRin+yqkaZek2WKjj
|
||||||
|
OtWrqzFBaJmykEGJqmllRvxFb/wOVK/vIO4wpPuJxmDJvV/v+byLqo13UvZeu5jq
|
||||||
|
HrhvUpZXkoWojxnGkAnK0qGbdDR/cqY7QlEKV/Zh4eMvpVuJvBRFjAVNJkHP/3k=
|
||||||
|
=fAVa
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,49 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Feb 27 12:04:02 UTC 2021 - Илья Индиго <ilya@ilya.pp.ua>
|
||||||
|
|
||||||
|
- Refreshed spec-file via spec-cleaner and manual optimizations.
|
||||||
|
* Droped obsolete conditional constructs.
|
||||||
|
* Removed pkg_name macro.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 17 00:02:08 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- Drop nginx_upstream_check module, there is no support for dynamic
|
||||||
|
loading upstream and the module seems kind of unmaintained.
|
||||||
|
- Removed patch check_1.9.2+.patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 16 23:40:16 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- Update to 1.19.7
|
||||||
|
* https://nginx.org/en/CHANGES
|
||||||
|
* Change: connections handling in HTTP/2 has been changed to
|
||||||
|
better match HTTP/1.x; the "http2_recv_timeout",
|
||||||
|
"http2_idle_timeout", and "http2_max_requests" directives have
|
||||||
|
been removed, the "keepalive_timeout" and "keepalive_requests"
|
||||||
|
directives should be used instead.
|
||||||
|
* Change: the "http2_max_field_size" and "http2_max_header_size"
|
||||||
|
directives have been removed, the "large_client_header_buffers"
|
||||||
|
directive should be used instead.
|
||||||
|
* Feature: now, if free worker connections are exhausted, nginx
|
||||||
|
starts closing not only keepalive connections, but also
|
||||||
|
connections in lingering close.
|
||||||
|
* Bugfix: "zero size buf in output" alerts might appear in logs
|
||||||
|
if an upstream server returned an incorrect response during
|
||||||
|
unbuffered proxying; the bug had appeared in 1.19.1.
|
||||||
|
* Bugfix: HEAD requests were handled incorrectly if the "return"
|
||||||
|
directive was used with the "image_filter" or "xslt_stylesheet"
|
||||||
|
directives.
|
||||||
|
* Bugfix: in the "add_trailer" directive.
|
||||||
|
- Since we only target sle 12 and above we can skip all
|
||||||
|
conditionals which apply to suse_version before 1315
|
||||||
|
|
||||||
|
With changes in nginx itself we will drop support for sysvinit.
|
||||||
|
http2, libatomic support and pcre_jit will always be on now.
|
||||||
|
and we build all binaries with PIE now.
|
||||||
|
- Moved the last 2 path macros from nginx.spec to the macros file.
|
||||||
|
(pid and lock path)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 23 07:18:28 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
Wed Dec 23 07:18:28 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
145
nginx.spec
145
nginx.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package nginx
|
# spec file for package nginx
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,44 +17,13 @@
|
|||||||
|
|
||||||
|
|
||||||
%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim/%(readlink %{_datadir}/vim/current)}
|
%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim/%(readlink %{_datadir}/vim/current)}
|
||||||
%define pkg_name nginx
|
|
||||||
%define nginx_upstream_check_version 0.3.0
|
|
||||||
%define nginx_upstream_check_module_path nginx_upstream_check_module-%{nginx_upstream_check_version}
|
|
||||||
%define src_install_dir %{_prefix}/src/%{name}
|
%define src_install_dir %{_prefix}/src/%{name}
|
||||||
%if 0%{?is_opensuse}
|
# keep in sync with #ngx_conditionals
|
||||||
%bcond_without extra_modules
|
|
||||||
%else
|
|
||||||
%bcond_with extra_modules
|
|
||||||
%endif
|
|
||||||
#
|
|
||||||
# keep in sync with ngx_conditionals in nginx-macros
|
|
||||||
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
|
|
||||||
%bcond_without ngx_libatomic
|
|
||||||
%else
|
|
||||||
%bcond_with ngx_libatomic
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1220
|
|
||||||
%bcond_without ngx_http2
|
|
||||||
%bcond_without ngx_pcre_jit
|
|
||||||
%bcond_without systemd
|
|
||||||
%else
|
|
||||||
%bcond_with ngx_http2
|
|
||||||
%bcond_with ngx_pcre_jit
|
|
||||||
%bcond_with systemd
|
|
||||||
%endif
|
|
||||||
%bcond_with ngx_cpp_test
|
%bcond_with ngx_cpp_test
|
||||||
%bcond_with ngx_google_perftools
|
%bcond_with ngx_google_perftools
|
||||||
#
|
#
|
||||||
%if %{with systemd}
|
|
||||||
%define ngx_pid_path /run/nginx.pid
|
|
||||||
%define ngx_lock_path /run/nginx.lock
|
|
||||||
%else
|
|
||||||
%define ngx_pid_path %{_localstatedir}/run/nginx.pid
|
|
||||||
%define ngx_lock_path %{_localstatedir}/run/nginx.lock
|
|
||||||
%endif
|
|
||||||
#
|
|
||||||
Name: nginx
|
Name: nginx
|
||||||
Version: 1.19.6
|
Version: 1.19.7
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A HTTP server and IMAP/POP3 proxy server
|
Summary: A HTTP server and IMAP/POP3 proxy server
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
@ -64,7 +33,6 @@ Source0: https://nginx.org/download/%{name}-%{version}.tar.gz
|
|||||||
Source1: nginx.init
|
Source1: nginx.init
|
||||||
Source2: nginx.logrotate
|
Source2: nginx.logrotate
|
||||||
Source3: nginx.service
|
Source3: nginx.service
|
||||||
Source4: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz
|
|
||||||
Source9: nginx.sysusers
|
Source9: nginx.sysusers
|
||||||
Source100: nginx.rpmlintrc
|
Source100: nginx.rpmlintrc
|
||||||
Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc
|
Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc
|
||||||
@ -79,20 +47,20 @@ Patch2: nginx-1.2.4-perl_vendor_install.patch
|
|||||||
Patch3: nginx-1.6.1-default_config.patch
|
Patch3: nginx-1.6.1-default_config.patch
|
||||||
# PATCH-FIX-UPSTREAM nginx-aio.patch fix support for Linux AIO
|
# PATCH-FIX-UPSTREAM nginx-aio.patch fix support for Linux AIO
|
||||||
Patch4: nginx-aio.patch
|
Patch4: nginx-aio.patch
|
||||||
# PATCH-FIX-UPSTREAM check_1.9.2+.patch
|
|
||||||
Patch5: check_1.9.2+.patch
|
|
||||||
# keep Buildrequires for the libraries and everything in sync with the requires in the nginx-source package
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gd-devel
|
BuildRequires: gd-devel
|
||||||
|
BuildRequires: libatomic-ops-devel
|
||||||
BuildRequires: libxslt-devel
|
BuildRequires: libxslt-devel
|
||||||
BuildRequires: nginx-macros
|
BuildRequires: nginx-macros
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: sysuser-shadow
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
BuildRequires: vim
|
BuildRequires: vim
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
%requires_eq perl
|
%requires_eq perl
|
||||||
#
|
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
Recommends: nginx-module-fancyindex
|
Recommends: nginx-module-fancyindex
|
||||||
Recommends: nginx-module-geoip2
|
Recommends: nginx-module-geoip2
|
||||||
@ -101,26 +69,12 @@ Recommends: nginx-module-http-flv
|
|||||||
Recommends: vim-plugin-nginx
|
Recommends: vim-plugin-nginx
|
||||||
Provides: http_daemon
|
Provides: http_daemon
|
||||||
Provides: httpd
|
Provides: httpd
|
||||||
|
%{?systemd_ordering}
|
||||||
|
%sysusers_requires
|
||||||
#
|
#
|
||||||
%if %{with ngx_google_perftools}
|
%if %{with ngx_google_perftools}
|
||||||
BuildRequires: google-perftools-devel
|
BuildRequires: google-perftools-devel
|
||||||
%endif
|
%endif
|
||||||
#
|
|
||||||
%if %{with ngx_libatomic}
|
|
||||||
BuildRequires: libatomic-ops-devel
|
|
||||||
%endif
|
|
||||||
#
|
|
||||||
%if %{with systemd}
|
|
||||||
BuildRequires: sysuser-shadow
|
|
||||||
BuildRequires: sysuser-tools
|
|
||||||
BuildRequires: pkgconfig(systemd)
|
|
||||||
%{?systemd_ordering}
|
|
||||||
%sysusers_requires
|
|
||||||
%else
|
|
||||||
Requires(pre): %fillup_prereq
|
|
||||||
Requires(pre): %insserv_prereq
|
|
||||||
Requires(pre): shadow
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev.
|
nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev.
|
||||||
@ -130,9 +84,7 @@ It has been running on many heavily loaded Russian sites for more than two years
|
|||||||
Summary: VIM support for nginx config files
|
Summary: VIM support for nginx config files
|
||||||
Group: Productivity/Text/Editors
|
Group: Productivity/Text/Editors
|
||||||
%requires_eq vim
|
%requires_eq vim
|
||||||
%if 0%{?suse_version} > 1110
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n vim-plugin-nginx
|
%description -n vim-plugin-nginx
|
||||||
nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev.
|
nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev.
|
||||||
@ -145,6 +97,7 @@ Summary: The nginx source
|
|||||||
Group: Development/Sources
|
Group: Development/Sources
|
||||||
Requires: gcc-c++
|
Requires: gcc-c++
|
||||||
Requires: gd-devel
|
Requires: gd-devel
|
||||||
|
Requires: libatomic-ops-devel
|
||||||
Requires: libxslt-devel
|
Requires: libxslt-devel
|
||||||
Requires: nginx = %{version}
|
Requires: nginx = %{version}
|
||||||
Requires: openssl-devel
|
Requires: openssl-devel
|
||||||
@ -154,23 +107,17 @@ Requires: vim
|
|||||||
Requires: zlib-devel
|
Requires: zlib-devel
|
||||||
%requires_ge nginx-macros
|
%requires_ge nginx-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with ngx_libatomic}
|
|
||||||
Requires: libatomic-ops-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n nginx-source
|
%description -n nginx-source
|
||||||
The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server.
|
The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pkg_name}-%{version} -a 4
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2
|
%patch2
|
||||||
%patch3
|
%patch3
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%if %{with ngx_extra_modules}
|
|
||||||
%patch5
|
|
||||||
%endif
|
|
||||||
|
|
||||||
perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl
|
perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl
|
||||||
# we just use lib here because nginx loads them relative to _prefix
|
# we just use lib here because nginx loads them relative to _prefix
|
||||||
@ -183,33 +130,20 @@ sed -i "s/\/var\/run/\/run/" conf/nginx.conf
|
|||||||
sed -i 's/^\(#define NGX_LISTEN_BACKLOG \).*/\1-1/' src/os/unix/ngx_linux_config.h
|
sed -i 's/^\(#define NGX_LISTEN_BACKLOG \).*/\1-1/' src/os/unix/ngx_linux_config.h
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# FIXME: you should use the %%configure macro
|
%{ngx_configure}
|
||||||
%{ngx_configure} \
|
|
||||||
%if %{with ngx_extra_modules}
|
|
||||||
--add-module=%{nginx_upstream_check_module_path} \
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%make_build
|
%make_build
|
||||||
%if %{with systemd}
|
|
||||||
%sysusers_generate_pre %{SOURCE9} nginx
|
%sysusers_generate_pre %{SOURCE9} nginx
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
|
|
||||||
install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi}
|
install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi}
|
||||||
|
install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name}
|
|
||||||
|
|
||||||
%if %{with systemd}
|
|
||||||
install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service
|
install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service
|
||||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx
|
|
||||||
install -Dpm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf
|
install -Dpm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf
|
||||||
%else
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx
|
||||||
install -Dpm0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
|
|
||||||
ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
rm %{buildroot}/srv/www/htdocs/index.html
|
rm %{buildroot}/srv/www/htdocs/index.html
|
||||||
|
|
||||||
@ -241,39 +175,17 @@ copydocs() {
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
copydocs %{nginx_upstream_check_module_path} \
|
|
||||||
doc/*
|
|
||||||
|
|
||||||
%post
|
|
||||||
%if %{with systemd}
|
|
||||||
%service_add_post nginx.service
|
|
||||||
%else
|
|
||||||
%fillup_and_insserv %{pkg_name}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
|
||||||
%if %{with systemd}
|
|
||||||
%service_del_preun nginx.service
|
|
||||||
%else
|
|
||||||
%stop_on_removal %{pkg_name}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%if %{with systemd}
|
|
||||||
%service_del_postun nginx.service
|
|
||||||
%else
|
|
||||||
%restart_on_update %{pkg_name}
|
|
||||||
%insserv_cleanup
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with systemd}
|
|
||||||
%pre -f nginx.pre
|
%pre -f nginx.pre
|
||||||
%service_add_pre nginx.service
|
%service_add_pre nginx.service
|
||||||
%else
|
|
||||||
%pre
|
%preun
|
||||||
%{_sbindir}/groupadd -r %{ngx_user_group} &>/dev/null ||:
|
%service_del_preun nginx.service
|
||||||
%{_sbindir}/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||:
|
|
||||||
%endif
|
%post
|
||||||
|
%service_add_post nginx.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun nginx.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{ngx_conf_dir}/
|
%dir %{ngx_conf_dir}/
|
||||||
@ -306,11 +218,8 @@ copydocs %{nginx_upstream_check_module_path} \
|
|||||||
%{ngx_module_dir}/ngx_stream_module.so
|
%{ngx_module_dir}/ngx_stream_module.so
|
||||||
%{_mandir}/man3/nginx.3pm*
|
%{_mandir}/man3/nginx.3pm*
|
||||||
/srv/www/htdocs/50x.html
|
/srv/www/htdocs/50x.html
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} < 1140
|
%{_sbindir}/rc%{name}
|
||||||
%{_localstatedir}/adm/perl-modules/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%endif
|
|
||||||
%{_sbindir}/rc%{pkg_name}
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{pkg_name}
|
|
||||||
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{_localstatedir}/log/nginx/
|
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{_localstatedir}/log/nginx/
|
||||||
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/
|
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/
|
||||||
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http}
|
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http}
|
||||||
@ -319,12 +228,8 @@ copydocs %{nginx_upstream_check_module_path} \
|
|||||||
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi}
|
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi}
|
||||||
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi}
|
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi}
|
||||||
%doc %{ngx_doc_dir}
|
%doc %{ngx_doc_dir}
|
||||||
%if %{with systemd}
|
|
||||||
%{_unitdir}/nginx.service
|
%{_unitdir}/nginx.service
|
||||||
%{_sysusersdir}/nginx.conf
|
%{_sysusersdir}/nginx.conf
|
||||||
%else
|
|
||||||
%{_sysconfdir}/init.d/%{pkg_name}
|
|
||||||
%endif
|
|
||||||
%{_datadir}/nginx/
|
%{_datadir}/nginx/
|
||||||
|
|
||||||
%files -n vim-plugin-nginx
|
%files -n vim-plugin-nginx
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c543bf427b38643c10dcd1a0c701392bc666708313e7b63f9272396a6cc9a461
|
|
||||||
size 136542
|
|
Loading…
Reference in New Issue
Block a user