X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=nginx.spec;h=6a265ed13a45a3627a245e2e215c7b37167cd570;hb=0bd5043bbb32b3fb4c409364dd5d40049f23cfd4;hp=a18274e6c40b4e969da3d70647a2983260ef1dd4;hpb=57aa9c0afb37a2c812368a27343a79ca335d0138;p=packages%2Fnginx.git diff --git a/nginx.spec b/nginx.spec index a18274e..6a265ed 100644 --- a/nginx.spec +++ b/nginx.spec @@ -33,7 +33,7 @@ %endif %define ssl_version 1.0.2 -%define rtmp_version 1.1.7 +%define rtmp_version 1.1.11 %define modsecurity_version 2.9.1 Summary: High perfomance HTTP and reverse proxy server Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności @@ -41,12 +41,12 @@ Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności # - stable: production quality with stable API # - mainline: production quality but API can change Name: nginx -Version: 1.11.5 -Release: 0.5 +Version: 1.12.0 +Release: 2 License: BSD-like Group: Networking/Daemons/HTTP Source0: http://nginx.org/download/%{name}-%{version}.tar.gz -# Source0-md5: db43f2b19746f6f47401c3afc3924dc6 +# Source0-md5: 995eb0a140455cf0cfc497e5bd7f94b3 Source1: http://nginx.net/favicon.ico # Source1-md5: 2aaf2115c752cbdbfb8a2f0b3c3189ab Source2: proxy.conf @@ -60,7 +60,7 @@ Source18: %{name}.service Source22: http://www.modsecurity.org/tarball/%{modsecurity_version}/modsecurity-%{modsecurity_version}.tar.gz # Source22-md5: 0fa92b852abc857a20b9e24f83f814cf Source101: https://github.com/arut/nginx-rtmp-module/archive/v%{rtmp_version}/%{name}-rtmp-module-%{rtmp_version}.tar.gz -# Source101-md5: 8006de2560db3e55bb15d110220076ac +# Source101-md5: a87ab77c4414f80d394d712cceb39016 Patch0: %{name}-no-Werror.patch Patch1: %{name}-modsecurity-xheaders.patch URL: http://nginx.net/ @@ -117,11 +117,48 @@ Requires(pre): /usr/sbin/useradd Requires: rc-scripts >= 0.2.0 Requires: systemd-units >= 38 Suggests: vim-syntax-nginx +Conflicts: rpm < 4.4.2-0.2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/%{name} %define _nginxdir /home/services/%{name} +# minimizing restarts logics. we restart webserver: +# +# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2) +# 2. first install of module (post: $1 = 1) +# 2. uninstall of module (postun: $1 == 0) +# +# the strict internal deps between modules and +# main package are very important for all this to work. + +# restart webserver at the end of transaction + +%define restart_webserver \ + %systemd_post %{name}.service \ + %service %{name} force-reload \ + %{nil} + +# macro called at module post scriptlet +%define module_post \ +if [ "$1" = "1" ]; then \ + %restart_webserver \ +fi + +# macro called at module postun scriptlet +%define module_postun \ +if [ "$1" = "0" ]; then \ + %restart_webserver \ +fi + +# it's sooo annoying to write them +%define module_scripts() \ +%post %1 \ +%module_post \ +\ +%postun %1 \ +%module_postun + %description nginx ("engine x") is a high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor @@ -240,6 +277,7 @@ cp -f configure auto/ --http-client-body-temp-path=%{_localstatedir}/cache/%{name}/client_body_temp \ --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}/fastcgi_temp \ --http-proxy-temp-path=%{_localstatedir}/cache/%{name}/proxy_temp \ + --http-uwsgi-temp-path=%{_localstatedir}/cache/%{name}/uwsgi_temp \ --user=nginx \ --group=nginx \ %{?with_select:--with-select_module} \ @@ -370,8 +408,9 @@ for a in access.log error.log; do fi done /sbin/chkconfig --add %{name} -%systemd_post %{name}.service -%service %{name} force-reload + +%posttrans +%restart_webserver %preun if [ "$1" = "0" ];then @@ -387,6 +426,14 @@ if [ "$1" = "0" ]; then fi %systemd_reload +%module_scripts mod_http_geoip +%module_scripts mod_http_image_filter +%module_scripts mod_http_perl +%module_scripts mod_http_xslt_filter +%module_scripts mod_mail +%module_scripts mod_stream +%module_scripts mod_stream_geoip + %files %defattr(644,root,root,755) %doc CHANGES LICENSE README html/index.html conf/nginx.conf @@ -402,6 +449,7 @@ fi %attr(640,root,root) %{_sysconfdir}/koi-utf %attr(640,root,root) %{_sysconfdir}/koi-win %attr(640,root,root) %{_sysconfdir}/win-utf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fastcgi.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nginx.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/proxy.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fastcgi_params