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}