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
This commit is contained in:
Илья Индиго 2021-02-27 12:15:03 +00:00 committed by Git OBS Bridge
parent 0a2b98db54
commit 33a12580f1
2 changed files with 24 additions and 30 deletions

View File

@ -1,8 +1,16 @@
-------------------------------------------------------------------
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>

View File

@ -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}