From f3588c756883c01fe10e467e035ea63c9146f147273dcb64afc0b93159414561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=98=D0=BD=D0=B4=D0=B8=D0=B3?= =?UTF-8?q?=D0=BE?= Date: Sat, 27 Feb 2021 10:57:30 +0000 Subject: [PATCH 1/3] Accepting request 872999 from home:darix:apps cleanup build conditionals and fix the previous change for the is_opensuse. update to 1.19.7 OBS-URL: https://build.opensuse.org/request/show/872999 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=189 --- nginx-1.19.6.tar.gz | 3 -- nginx-1.19.6.tar.gz.asc | 10 ----- nginx-1.19.7.tar.gz | 3 ++ nginx-1.19.7.tar.gz.asc | 10 +++++ nginx.changes | 32 +++++++++++++++ nginx.spec | 91 +++++++---------------------------------- 6 files changed, 60 insertions(+), 89 deletions(-) delete mode 100644 nginx-1.19.6.tar.gz delete mode 100644 nginx-1.19.6.tar.gz.asc create mode 100644 nginx-1.19.7.tar.gz create mode 100644 nginx-1.19.7.tar.gz.asc diff --git a/nginx-1.19.6.tar.gz b/nginx-1.19.6.tar.gz deleted file mode 100644 index b6077ea..0000000 --- a/nginx-1.19.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b11195a02b1d3285ddf2987e02c6b6d28df41bb1b1dd25f33542848ef4fc33b5 -size 1055982 diff --git a/nginx-1.19.6.tar.gz.asc b/nginx-1.19.6.tar.gz.asc deleted file mode 100644 index 268e009..0000000 --- a/nginx-1.19.6.tar.gz.asc +++ /dev/null @@ -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----- diff --git a/nginx-1.19.7.tar.gz b/nginx-1.19.7.tar.gz new file mode 100644 index 0000000..9f42bce --- /dev/null +++ b/nginx-1.19.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ae4dd020c41d3a5e1e6a8578fcc60e508e3e27e7668e845ddc87a05a775b50e +size 1056631 diff --git a/nginx-1.19.7.tar.gz.asc b/nginx-1.19.7.tar.gz.asc new file mode 100644 index 0000000..ed0694c --- /dev/null +++ b/nginx-1.19.7.tar.gz.asc @@ -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----- diff --git a/nginx.changes b/nginx.changes index 29a465d..76f8503 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Tue Feb 16 23:40:16 UTC 2021 - Marcus Rueckert + +- 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 diff --git a/nginx.spec b/nginx.spec index 7a4b2cd..b3f208d 100644 --- a/nginx.spec +++ b/nginx.spec @@ -1,7 +1,7 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -26,35 +26,14 @@ %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 +# keep in sync with %ngx_conditionals %bcond_with ngx_cpp_test %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 -Version: 1.19.6 +Version: 1.19.7 Release: 0 Summary: A HTTP server and IMAP/POP3 proxy server License: BSD-2-Clause @@ -106,21 +85,13 @@ Provides: httpd BuildRequires: google-perftools-devel %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 nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. @@ -154,9 +125,7 @@ Requires: vim Requires: zlib-devel %requires_ge nginx-macros BuildArch: noarch -%if %{with ngx_libatomic} Requires: libatomic-ops-devel -%endif %description -n nginx-source The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server. @@ -190,9 +159,7 @@ sed -i 's/^\(#define NGX_LISTEN_BACKLOG \).*/\1-1/' src/os/unix/ngx_linux_config %endif %make_build -%if %{with systemd} %sysusers_generate_pre %{SOURCE9} nginx -%endif %install %make_install @@ -202,14 +169,9 @@ install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name} -%if %{with systemd} -install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service +install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service +install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx -install -Dpm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf -%else -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 @@ -244,36 +206,17 @@ copydocs() { 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 %service_add_pre nginx.service -%else -%pre -%{_sbindir}/groupadd -r %{ngx_user_group} &>/dev/null ||: -%{_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 + +%preun +%service_del_preun nginx.service + +%post +%service_add_post nginx.service + +%postun +%service_del_postun nginx.service %files %dir %{ngx_conf_dir}/ @@ -319,12 +262,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_uwsgi} %doc %{ngx_doc_dir} -%if %{with systemd} %{_unitdir}/nginx.service %{_sysusersdir}/nginx.conf -%else -%{_sysconfdir}/init.d/%{pkg_name} -%endif %{_datadir}/nginx/ %files -n vim-plugin-nginx From 0a2b98db54ae0943561ae31334750f97975b5842cfc1b7a2c2ba94ccb4aaf725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=98=D0=BD=D0=B4=D0=B8=D0=B3?= =?UTF-8?q?=D0=BE?= Date: Sat, 27 Feb 2021 11:04:31 +0000 Subject: [PATCH 2/3] Accepting request 875591 from home:darix:apps - Drop nginx_upstream_check module, there is no support for dynamic loading upstream and the module seems kind of unmaintained. OBS-URL: https://build.opensuse.org/request/show/875591 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=190 --- check_1.9.2+.patch | 242 ----------------------- nginx.changes | 6 + nginx.spec | 24 +-- nginx_upstream_check_module-0.3.0.tar.gz | 3 - 4 files changed, 8 insertions(+), 267 deletions(-) delete mode 100644 check_1.9.2+.patch delete mode 100644 nginx_upstream_check_module-0.3.0.tar.gz diff --git a/check_1.9.2+.patch b/check_1.9.2+.patch deleted file mode 100644 index 17e0e84..0000000 --- a/check_1.9.2+.patch +++ /dev/null @@ -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 - #include - -+#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 - #include - -+#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 - #include - -+#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 - #include - -+#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) diff --git a/nginx.changes b/nginx.changes index 76f8503..33e7d69 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 17 00:02:08 UTC 2021 - Marcus Rueckert + +- Drop nginx_upstream_check module, there is no support for dynamic + loading upstream and the module seems kind of unmaintained. + ------------------------------------------------------------------- Tue Feb 16 23:40:16 UTC 2021 - Marcus Rueckert diff --git a/nginx.spec b/nginx.spec index b3f208d..2f42dcb 100644 --- a/nginx.spec +++ b/nginx.spec @@ -18,14 +18,7 @@ %{!?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} -%if 0%{?is_opensuse} -%bcond_without extra_modules -%else -%bcond_with extra_modules -%endif # keep in sync with %ngx_conditionals %bcond_with ngx_cpp_test %bcond_with ngx_google_perftools @@ -43,7 +36,6 @@ Source0: https://nginx.org/download/%{name}-%{version}.tar.gz Source1: nginx.init Source2: nginx.logrotate 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 Source100: nginx.rpmlintrc Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc @@ -59,8 +51,6 @@ 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 -# keep Buildrequires for the libraries and everything in sync with the requires in the nginx-source package BuildRequires: gcc-c++ BuildRequires: gd-devel BuildRequires: libxslt-devel @@ -131,15 +121,12 @@ Requires: libatomic-ops-devel The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server. %prep -%setup -q -n %{pkg_name}-%{version} -a 4 +%setup -q -n %{pkg_name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 %patch3 %patch4 -p1 -%if %{with ngx_extra_modules} -%patch5 -%endif perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl # we just use lib here because nginx loads them relative to _prefix @@ -152,11 +139,7 @@ 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 %build -# FIXME: you should use the %%configure macro -%{ngx_configure} \ - %if %{with ngx_extra_modules} - --add-module=%{nginx_upstream_check_module_path} \ - %endif +%{ngx_configure} %make_build %sysusers_generate_pre %{SOURCE9} nginx @@ -203,9 +186,6 @@ copydocs() { popd } -copydocs %{nginx_upstream_check_module_path} \ - doc/* - %pre -f nginx.pre %service_add_pre nginx.service diff --git a/nginx_upstream_check_module-0.3.0.tar.gz b/nginx_upstream_check_module-0.3.0.tar.gz deleted file mode 100644 index 74a6f49..0000000 --- a/nginx_upstream_check_module-0.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c543bf427b38643c10dcd1a0c701392bc666708313e7b63f9272396a6cc9a461 -size 136542 From 33a12580f119f276cca86f8f36ab3f4c54651de3609ab2d3f386751bed7cb8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=98=D0=BD=D0=B4=D0=B8=D0=B3?= =?UTF-8?q?=D0=BE?= Date: Sat, 27 Feb 2021 12:15:03 +0000 Subject: [PATCH 3/3] Accepting request 875608 from home:13ilya:branches:server:http - Refreshed spec-file via spec-cleaner and manual optimizations. * Droped obsolete conditional constructs. * Removed pkg_name macro. - 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. - 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) OBS-URL: https://build.opensuse.org/request/show/875608 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=191 --- nginx.changes | 8 ++++++++ nginx.spec | 46 ++++++++++++++++------------------------------ 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/nginx.changes b/nginx.changes index 33e7d69..6fff677 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,8 +1,16 @@ +------------------------------------------------------------------- +Sat Feb 27 12:04:02 UTC 2021 - Илья Индиго + +- 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 - 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 diff --git a/nginx.spec b/nginx.spec index 2f42dcb..8c51341 100644 --- a/nginx.spec +++ b/nginx.spec @@ -17,13 +17,10 @@ %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim/%(readlink %{_datadir}/vim/current)} -%define pkg_name nginx %define src_install_dir %{_prefix}/src/%{name} -# keep in sync with %ngx_conditionals +# keep in sync with #ngx_conditionals %bcond_with ngx_cpp_test %bcond_with ngx_google_perftools -# - # Name: nginx Version: 1.19.7 @@ -50,18 +47,20 @@ Patch2: nginx-1.2.4-perl_vendor_install.patch 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 BuildRequires: gcc-c++ BuildRequires: gd-devel +BuildRequires: libatomic-ops-devel BuildRequires: libxslt-devel BuildRequires: nginx-macros BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig +BuildRequires: sysuser-shadow +BuildRequires: sysuser-tools BuildRequires: vim BuildRequires: zlib-devel +BuildRequires: pkgconfig(systemd) %requires_eq perl -# Recommends: logrotate Recommends: nginx-module-fancyindex Recommends: nginx-module-geoip2 @@ -70,18 +69,12 @@ Recommends: nginx-module-http-flv Recommends: vim-plugin-nginx Provides: http_daemon Provides: httpd +%{?systemd_ordering} +%sysusers_requires # %if %{with ngx_google_perftools} BuildRequires: google-perftools-devel %endif -# -BuildRequires: libatomic-ops-devel -# -BuildRequires: sysuser-shadow -BuildRequires: sysuser-tools -BuildRequires: pkgconfig(systemd) -%{?systemd_ordering} -%sysusers_requires %description nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. @@ -91,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 Group: Productivity/Text/Editors %requires_eq vim -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif %description -n vim-plugin-nginx nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. @@ -106,6 +97,7 @@ Summary: The nginx source Group: Development/Sources Requires: gcc-c++ Requires: gd-devel +Requires: libatomic-ops-devel Requires: libxslt-devel Requires: nginx = %{version} Requires: openssl-devel @@ -115,13 +107,12 @@ Requires: vim Requires: zlib-devel %requires_ge nginx-macros BuildArch: noarch -Requires: libatomic-ops-devel %description -n nginx-source The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server. %prep -%setup -q -n %{pkg_name}-%{version} +%setup -q %patch0 -p1 %patch1 -p1 %patch2 @@ -139,7 +130,7 @@ 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 %build -%{ngx_configure} +%{ngx_configure} %make_build %sysusers_generate_pre %{SOURCE9} nginx @@ -149,12 +140,10 @@ sed -i 's/^\(#define NGX_LISTEN_BACKLOG \).*/\1-1/' src/os/unix/ngx_linux_config %perl_process_packlist install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} - -install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name} - -install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service -install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf -ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx +install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service +install -Dpm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx rm %{buildroot}/srv/www/htdocs/index.html @@ -229,11 +218,8 @@ copydocs() { %{ngx_module_dir}/ngx_stream_module.so %{_mandir}/man3/nginx.3pm* /srv/www/htdocs/50x.html -%if 0%{?suse_version} && 0%{?suse_version} < 1140 -%{_localstatedir}/adm/perl-modules/%{name} -%endif -%{_sbindir}/rc%{pkg_name} -%config(noreplace) %{_sysconfdir}/logrotate.d/%{pkg_name} +%{_sbindir}/rc%{name} +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %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_tmp_http}