diff --git a/check_1.9.2+.patch b/check_1.9.2+.patch index 44412c1..0fe9125 100644 --- a/check_1.9.2+.patch +++ b/check_1.9.2+.patch @@ -1,6 +1,6 @@ -diff --git src/http/modules/ngx_http_upstream_hash_module.c src/http/modules/ngx_http_upstream_hash_module.c -index 1e2e05c..44a72e2 100644 ---- src/http/modules/ngx_http_upstream_hash_module.c +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 @@ -12,7 +12,7 @@ index 1e2e05c..44a72e2 100644 typedef struct { uint32_t hash; -@@ -235,6 +238,15 @@ ngx_http_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data) +@@ -235,6 +238,15 @@ ngx_http_upstream_get_hash_peer(ngx_peer goto next; } @@ -28,7 +28,7 @@ index 1e2e05c..44a72e2 100644 if (peer->max_fails && peer->fails >= peer->max_fails && now - peer->checked <= peer->fail_timeout) -@@ -535,6 +547,15 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data) +@@ -535,6 +547,15 @@ ngx_http_upstream_get_chash_peer(ngx_pee continue; } @@ -44,9 +44,9 @@ index 1e2e05c..44a72e2 100644 if (peer->server.len != server->len || ngx_strncmp(peer->server.data, server->data, server->len) != 0) -diff --git src/http/modules/ngx_http_upstream_ip_hash_module.c src/http/modules/ngx_http_upstream_ip_hash_module.c -index 401b58e..ba656bd 100644 ---- src/http/modules/ngx_http_upstream_ip_hash_module.c +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 @@ -58,7 +58,7 @@ index 401b58e..ba656bd 100644 typedef struct { /* the round robin data must be first */ -@@ -205,6 +208,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data) +@@ -205,6 +208,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_p goto next; } @@ -74,9 +74,9 @@ index 401b58e..ba656bd 100644 if (peer->max_fails && peer->fails >= peer->max_fails && now - peer->checked <= peer->fail_timeout) -diff --git src/http/modules/ngx_http_upstream_least_conn_module.c src/http/modules/ngx_http_upstream_least_conn_module.c -index 92951bd..48aca2c 100644 ---- src/http/modules/ngx_http_upstream_least_conn_module.c +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 @@ -88,7 +88,7 @@ index 92951bd..48aca2c 100644 static ngx_int_t ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r, ngx_http_upstream_srv_conf_t *us); -@@ -148,6 +151,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data) +@@ -148,6 +151,16 @@ ngx_http_upstream_get_least_conn_peer(ng continue; } @@ -105,7 +105,7 @@ index 92951bd..48aca2c 100644 if (peer->max_fails && peer->fails >= peer->max_fails && now - peer->checked <= peer->fail_timeout) -@@ -199,6 +212,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data) +@@ -199,6 +212,16 @@ ngx_http_upstream_get_least_conn_peer(ng continue; } @@ -122,9 +122,9 @@ index 92951bd..48aca2c 100644 if (peer->conns * best->weight != best->conns * peer->weight) { continue; } -diff --git src/http/ngx_http_upstream_round_robin.c src/http/ngx_http_upstream_round_robin.c -index d6ae33b..416572a 100644 ---- src/http/ngx_http_upstream_round_robin.c +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 @@ -136,7 +136,7 @@ index d6ae33b..416572a 100644 #define ngx_http_upstream_tries(p) ((p)->number \ + ((p)->next ? (p)->next->number : 0)) -@@ -96,7 +99,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, +@@ -96,7 +99,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; @@ -152,7 +152,7 @@ index d6ae33b..416572a 100644 *peerp = &peer[n]; peerp = &peer[n].next; n++; -@@ -159,7 +169,15 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, +@@ -159,7 +169,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; @@ -169,7 +169,7 @@ index d6ae33b..416572a 100644 *peerp = &peer[n]; peerp = &peer[n].next; n++; -@@ -225,6 +243,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, +@@ -225,6 +243,9 @@ ngx_http_upstream_init_round_robin(ngx_c peer[i].current_weight = 0; peer[i].max_fails = 1; peer[i].fail_timeout = 10; @@ -179,7 +179,7 @@ index d6ae33b..416572a 100644 *peerp = &peer[i]; peerp = &peer[i].next; } -@@ -339,6 +360,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r, +@@ -339,6 +360,9 @@ ngx_http_upstream_create_round_robin_pee peer[0].current_weight = 0; peer[0].max_fails = 1; peer[0].fail_timeout = 10; @@ -189,7 +189,7 @@ index d6ae33b..416572a 100644 peers->peer = peer; } else { -@@ -381,6 +405,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r, +@@ -372,6 +396,9 @@ ngx_http_upstream_create_round_robin_pee peer[i].current_weight = 0; peer[i].max_fails = 1; peer[i].fail_timeout = 10; @@ -199,7 +199,7 @@ index d6ae33b..416572a 100644 *peerp = &peer[i]; peerp = &peer[i].next; } -@@ -441,6 +468,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data) +@@ -432,6 +459,12 @@ ngx_http_upstream_get_round_robin_peer(n goto failed; } @@ -212,7 +212,7 @@ index d6ae33b..416572a 100644 rrp->current = peer; } else { -@@ -542,6 +575,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp) +@@ -533,6 +566,12 @@ ngx_http_upstream_get_peer(ngx_http_upst continue; } @@ -225,9 +225,9 @@ index d6ae33b..416572a 100644 if (peer->max_fails && peer->fails >= peer->max_fails && now - peer->checked <= peer->fail_timeout) -diff --git src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_upstream_round_robin.h -index f2c573f..75e0ed6 100644 ---- src/http/ngx_http_upstream_round_robin.h +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 @@ -35,6 +35,10 @@ struct ngx_http_upstream_rr_peer_s { ngx_uint_t max_fails; diff --git a/nginx-1.11.2-html.patch b/nginx-1.11.2-html.patch index 40ed140..d510580 100644 --- a/nginx-1.11.2-html.patch +++ b/nginx-1.11.2-html.patch @@ -1,7 +1,8 @@ -diff -ur nginx-1.11.2.orig/auto/install nginx-1.11.2/auto/install ---- nginx-1.11.2.orig/auto/install 2016-05-06 09:12:12.617492168 +0200 -+++ nginx-1.11.2/auto/install 2016-05-06 09:30:12.164261301 +0200 -@@ -154,8 +154,7 @@ +Index: nginx-1.11.2/auto/install +=================================================================== +--- nginx-1.11.2.orig/auto/install ++++ nginx-1.11.2/auto/install +@@ -154,8 +154,7 @@ install: build $NGX_INSTALL_PERL_MODULES test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' \\ || mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' diff --git a/nginx-1.11.2-no_Werror.patch b/nginx-1.11.2-no_Werror.patch index 3084f6b..a7d283b 100644 --- a/nginx-1.11.2-no_Werror.patch +++ b/nginx-1.11.2-no_Werror.patch @@ -1,7 +1,8 @@ -diff -urp nginx-1.11.2/auto/cc/gcc nginx-1.11.2-patched/auto/cc/gcc ---- nginx-1.11.2/auto/cc/gcc 2014-03-04 03:39:24.000000000 -0800 -+++ nginx-1.11.2-patched/auto/cc/gcc 2014-03-13 20:54:13.301355329 -0700 -@@ -168,7 +168,7 @@ esac +Index: nginx-1.11.2/auto/cc/gcc +=================================================================== +--- nginx-1.11.2.orig/auto/cc/gcc ++++ nginx-1.11.2/auto/cc/gcc +@@ -166,7 +166,7 @@ esac # stop on warning @@ -10,10 +11,11 @@ diff -urp nginx-1.11.2/auto/cc/gcc nginx-1.11.2-patched/auto/cc/gcc # debug CFLAGS="$CFLAGS -g" -diff -urp nginx-1.11.2/auto/cc/icc nginx-1.11.2-patched/auto/cc/icc ---- nginx-1.11.2/auto/cc/icc 2014-03-04 03:39:24.000000000 -0800 -+++ nginx-1.11.2-patched/auto/cc/icc 2014-03-13 20:54:13.301355329 -0700 -@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in +Index: nginx-1.11.2/auto/cc/icc +=================================================================== +--- nginx-1.11.2.orig/auto/cc/icc ++++ nginx-1.11.2/auto/cc/icc +@@ -111,7 +111,7 @@ case "$NGX_ICC_VER" in esac # stop on warning diff --git a/nginx-1.11.2.tar.gz b/nginx-1.11.2.tar.gz deleted file mode 100644 index bcc85cf..0000000 --- a/nginx-1.11.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0327be3e647bdc4a1b3ef98946a8e8fbf258ce8da6bed9a94222b249ae2700a -size 924979 diff --git a/nginx-1.11.4.tar.gz b/nginx-1.11.4.tar.gz new file mode 100644 index 0000000..46cd498 --- /dev/null +++ b/nginx-1.11.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06221c1f43f643bc6bfe5b2c26d19e09f2588d5cde6c65bdb77dfcce7c026b3b +size 949793 diff --git a/nginx-aio.patch b/nginx-aio.patch index e8fae90..e4f91f1 100644 --- a/nginx-aio.patch +++ b/nginx-aio.patch @@ -1,25 +1,26 @@ -Index: nginx-1.9.1/auto/unix +Index: nginx-1.11.3/auto/unix =================================================================== ---- nginx-1.9.1.orig/auto/unix -+++ nginx-1.9.1/auto/unix -@@ -438,7 +438,11 @@ if [ $NGX_FILE_AIO = YES ]; then +--- nginx-1.11.3.orig/auto/unix ++++ nginx-1.11.3/auto/unix +@@ -531,7 +531,12 @@ if [ $NGX_FILE_AIO = YES ]; then ngx_feature="Linux AIO support (SYS_eventfd)" ngx_feature_incs="#include #include " -- ngx_feature_test="int n = SYS_eventfd; +- ngx_feature_test="struct iocb iocb; + ngx_feature_test="#ifdef SYS_eventfd + int n = SYS_eventfd; + #else + int n = SYS_eventfd2; + #endif - struct iocb iocb; ++ struct iocb iocb; iocb.aio_lio_opcode = IOCB_CMD_PREAD; iocb.aio_flags = IOCB_FLAG_RESFD; -Index: nginx-1.9.1/src/event/modules/ngx_epoll_module.c + iocb.aio_resfd = -1; +Index: nginx-1.11.3/src/event/modules/ngx_epoll_module.c =================================================================== ---- nginx-1.9.1.orig/src/event/modules/ngx_epoll_module.c -+++ nginx-1.9.1/src/event/modules/ngx_epoll_module.c -@@ -76,9 +76,7 @@ int epoll_wait(int epfd, struct epoll_ev +--- nginx-1.11.3.orig/src/event/modules/ngx_epoll_module.c ++++ nginx-1.11.3/src/event/modules/ngx_epoll_module.c +@@ -77,9 +77,7 @@ int epoll_wait(int epfd, struct epoll_ev #if (NGX_HAVE_FILE_AIO) @@ -30,7 +31,7 @@ Index: nginx-1.9.1/src/event/modules/ngx_epoll_module.c typedef u_int aio_context_t; -@@ -246,7 +244,11 @@ ngx_epoll_aio_init(ngx_cycle_t *cycle, n +@@ -254,7 +252,11 @@ ngx_epoll_aio_init(ngx_cycle_t *cycle, n #if (NGX_HAVE_SYS_EVENTFD_H) ngx_eventfd = eventfd(0, 0); #else diff --git a/nginx-rtmp-module-1.1.9.tar.gz b/nginx-rtmp-module-1.1.9.tar.gz new file mode 100644 index 0000000..a492436 --- /dev/null +++ b/nginx-rtmp-module-1.1.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46d914e3ba1f4c2353c1ef01a7423305255cb78226c84fac419586f849b7ea55 +size 519807 diff --git a/nginx.changes b/nginx.changes index 9324d91..4fc86b3 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,3 +1,106 @@ +------------------------------------------------------------------- +Thu Sep 29 10:45:57 UTC 2016 - mrueckert@suse.de + +- update to 11.4 + - Feature: the $upstream_bytes_received variable. + - Feature: the $bytes_received, $session_time, $protocol, + $status, $upstream_addr, $upstream_bytes_sent, + $upstream_bytes_received, $upstream_connect_time, + $upstream_first_byte_time, and $upstream_session_time variables + in the stream module. + - Feature: the ngx_stream_log_module. + - Feature: the "proxy_protocol" parameter of the "listen" + directive, the $proxy_protocol_addr and $proxy_protocol_port + variables in the stream module. + - Feature: the ngx_stream_realip_module. + - Bugfix: nginx could not be built with the stream module and the + ngx_http_ssl_module, but without ngx_stream_ssl_module; the bug + had appeared in 1.11.3. + - Feature: the IP_BIND_ADDRESS_NO_PORT socket option was not + used; the bug had appeared in 1.11.2. + - Bugfix: in the "ranges" parameter of the "geo" directive. + - Bugfix: an incorrect response might be returned when using the + "aio threads" and "sendfile" directives; the bug had appeared + in 1.9.13. +- drop nginx-1.11.3_ssl_stream.patch again +- refreshed the following patches to apply cleanly again + check_1.9.2+.patch + nginx-1.11.2-html.patch + nginx-1.11.2-no_Werror.patch + nginx-aio.patch + +------------------------------------------------------------------- +Wed Aug 24 11:34:50 UTC 2016 - mrueckert@suse.de + +- update to 1.11.3 + - Change: now the "accept_mutex" directive is turned off by + default. + - Feature: now nginx uses EPOLLEXCLUSIVE on Linux. + - Feature: the ngx_stream_geo_module. + - Feature: the ngx_stream_geoip_module. + - Feature: the ngx_stream_split_clients_module. + - Feature: variables support in the "proxy_pass" and + "proxy_ssl_name" directives in the stream module. + - Bugfix: socket leak when using HTTP/2. + - Bugfix: in configure tests. Thanks to Piotr Sikora. +- backport nginx-1.11.3_ssl_stream.patch from hg +- refresh patches to apply cleanly again: + - check_1.9.2+.patch + - nginx-1.11.2-html.patch + - nginx-1.11.2-no_Werror.patch + - nginx-aio.patch +- enable a few new upstream modules and move some from 1.11.x to + dynamic: + - stream_geoip_module + - mail_ssl_module + - stream_ssl_module +- build fancyindex unconditionally and update it to 0.4.1 + - New `fancyindex_directories_first` configuration directive + (enabled by default), which allows setting whether directories + are sorted before other files. + (Patch by Luke Zapart <>.) + - Fix index files not working when the fancyindex module is in + use (#46). + - The module can now be built as a [dynamic + module](https://www.nginx.com/resources/wiki/extending/converting/). + (Patch by RĂ³bert Nagy <>.) + - New configuration directive `fancyindex_show_path`, which + allows hiding the `

` header which contains the current + path. (Patch by Thomas P. <>.) + - Directory and file links in listings now have a title="..." + attribute. (Patch by `@janglapuk` <>.) + - Fix for hung requests when the module is used along with + `ngx_pagespeed`. + (Patch by Otto van der Schaaf <>.) + - New feature: Allow filtering out symbolic links using the + `fancyindex_hide_symlinks` configuration directive. (Idea and + prototype patch by Thomas Wemm.) + - New feature: Allow specifying the format of timestamps using + the `fancyindex_time_format` configuration directive. (Idea + suggested by Xiao Meng <>). + - Listings in top-level directories will not generate a "Parent + Directory" link as first element of the listing. + (Patch by Thomas P.) + - Fix propagation and overriding of the `fancyindex_css_href` + setting inside nested locations. + - Minor changes in the code to allow building cleanly under + Windows with Visual Studio 2013. + (Patch by Y. Yuan <>). +- added nginx-rtmp-module +- make all modules dynamic that support it: + - ngx-fancyindex + - headers_more_nginx-module + - nginx-rtmp-module +- manually install the docs instead of using %doc +- unify how we install documentation for the modules +- restructure contrib file handling + - moved vim files into the normal vim paths so we can use them + directly + - new BR/R: vim + - split out vim files into a subpackage vim-plugin-nginx so we + dont have the vim requires on the main package + - perl scripts are moved to /usr/share/nginx/ + ------------------------------------------------------------------- Fri Aug 5 11:03:32 UTC 2016 - rodrigo.oshiro@emc.com diff --git a/nginx.spec b/nginx.spec index 119107b..85f3675 100644 --- a/nginx.spec +++ b/nginx.spec @@ -18,7 +18,6 @@ %bcond_with cpp_test %bcond_with google_perftools -%bcond_without fancyindex %if 0%{?suse_version} != 1315 || 0%{?is_opensuse} %bcond_without libatomic @@ -36,6 +35,8 @@ %bcond_with systemd %endif +%{!?vim_data_dir:%global vim_data_dir /usr/share/vim/%(readlink /usr/share/vim/current)} + %define pkg_name nginx %define ngx_prefix %{_prefix} %define ngx_sbin_path %{_sbindir}/nginx @@ -60,13 +61,23 @@ %define ngx_pid_path %{_localstatedir}/run/nginx.pid %define ngx_lock_path %{_localstatedir}/run/nginx.lock %endif +%define ngx_doc_dir %{_datadir}/doc/packages/%{name} # Name: nginx -Version: 1.11.2 +Version: 1.11.4 Release: 0 -%define fancyindex_version 0.3.5 +%define ngx_fancyindex_version 0.4.1 +%define ngx_fancyindex_module_path ngx-fancyindex-%{ngx_fancyindex_version} + %define headers_more_nginx_version 0.30 +%define headers_more_nginx_module_path headers-more-nginx-module-%{headers_more_nginx_version} + %define nginx_upstream_check_version 0.3.0 +%define nginx_upstream_check_module_path nginx_upstream_check_module-%{nginx_upstream_check_version} + +%define nginx_rtmp_version 1.1.9 +%define nginx_rtmp_module_path nginx-rtmp-module-%{nginx_rtmp_version} + Summary: A HTTP server and IMAP/POP3 proxy server License: BSD-2-Clause Group: Productivity/Networking/Web/Proxy @@ -75,9 +86,10 @@ Source: http://nginx.org/download/nginx-%{version}.tar.gz Source1: nginx.init Source2: nginx.logrotate Source3: nginx.service -Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{fancyindex_version}/ngx-fancyindex-%{fancyindex_version}.tar.gz -Source5: https://github.com/openresty/headers-more-nginx-module/archive/v%{headers_more_nginx_version}/headers-more-nginx-module-%{headers_more_nginx_version}.tar.gz -Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/nginx_upstream_check_module-%{nginx_upstream_check_version}.tar.gz +Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{ngx_fancyindex_version}/%{ngx_fancyindex_module_path}.tar.gz +Source5: https://github.com/openresty/headers-more-nginx-module/archive/v%{headers_more_nginx_version}/%{headers_more_nginx_module_path}.tar.gz +Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz +Source7: https://github.com/arut/nginx-rtmp-module/archive/v%{nginx_rtmp_version}/%{nginx_rtmp_module_path}.tar.gz Source100: nginx.rpmlintrc # PATCH-FIX-UPSTREAM nginx-1.11.2-no_Werror.patch Patch0: nginx-1.11.2-no_Werror.patch @@ -97,12 +109,14 @@ BuildRequires: libxslt-devel BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig +BuildRequires: vim BuildRequires: zlib-devel %requires_eq perl Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq Requires(pre): pwdutils Recommends: logrotate +Recommends: vim-plugin-nginx Conflicts: otherproviders(nginx) Provides: http_daemon Provides: httpd @@ -119,7 +133,7 @@ BuildRequires: libatomic-ops-devel %endif # %if %{with systemd} -BuildRequires: systemd +BuildRequires: pkgconfig(systemd) %{?systemd_requires} %endif @@ -127,14 +141,21 @@ BuildRequires: systemd nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. It has been running on many heavily loaded Russian sites for more than two years. -%prep -%if %{with fancyindex} -%setup -q -n %{pkg_name}-%{version} -b4 -%else -%setup -q -n %{pkg_name}-%{version} +%package -n vim-plugin-nginx +Summary: VIM support for nginx config files +Group: Productivity/Editors/Vi +%if 0%{?suse_version} > 1110 +BuildArch: noarch %endif -%setup -D -T -a 5 -n %{pkg_name}-%{version} -%setup -D -T -a 6 -n %{pkg_name}-%{version} +%requires_eq vim +%description -n vim-plugin-nginx +nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. +It has been running on many heavily loaded Russian sites for more than two years. + +This package holds the VIM support for nginx config files. + +%prep +%setup -q -n %{pkg_name}-%{version} -a 4 -a 5 -a 6 -a 7 %patch0 -p1 %patch1 -p1 %patch2 @@ -146,13 +167,6 @@ perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl # we just use lib here because nginx loads them relative to _prefix perl -pi -e 's|#LIBDIR#|%{_lib}|g' conf/nginx.conf -%if %{with fancyindex} -mkdir -p ngx-fancyindex-%{fancyindex_version} -pushd ../ngx-fancyindex-%{fancyindex_version} -cp -r template* LICENSE *.rst $RPM_BUILD_DIR/%{pkg_name}-%{version}/ngx-fancyindex-%{fancyindex_version}/ -popd -%endif - %if %{with systemd} sed -i "s/\/var\/run/\/run/" %{_sourcedir}/nginx.init %endif @@ -202,8 +216,11 @@ sed -i "s/\/var\/run/\/run/" %{_sourcedir}/nginx.init --with-http_perl_module=dynamic \ --with-perl=%{_bindir}/perl \ --with-mail=dynamic \ - --with-stream=dynamic \ --with-mail_ssl_module \ + --with-stream=dynamic \ + --with-stream_ssl_module \ + --with-stream_realip_module \ + --with-stream_geoip_module=dynamic \ --with-pcre \ %if %{with pcre_jit} --with-pcre-jit \ @@ -217,13 +234,10 @@ sed -i "s/\/var\/run/\/run/" %{_sourcedir}/nginx.init %if %{with cpp_test} --with-cpp_test_module \ %endif - %if %{with fancyindex} - --add-module=../ngx-fancyindex-%{fancyindex_version} \ - %endif - --add-module=headers-more-nginx-module-%{headers_more_nginx_version} \ - --add-module=nginx_upstream_check_module-%{nginx_upstream_check_version} \ - --with-md5=%{_prefix} \ - --with-sha1=%{_prefix} \ + --add-module=%{nginx_upstream_check_module_path} \ + --add-dynamic-module=%{ngx_fancyindex_module_path} \ + --add-dynamic-module=%{headers_more_nginx_module_path} \ + --add-dynamic-module=%{nginx_rtmp_module_path} \ %if 0%{?suse_version} > 1220 --with-cc-opt="%{optflags} -fPIC -D_GNU_SOURCE -std=gnu99 -fstack-protector" \ --with-ld-opt="-Wl,-z,relro,-z,now -pie" @@ -250,6 +264,40 @@ ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} rm %{buildroot}/srv/www/htdocs/index.html +mkdir -p %{buildroot}%{ngx_doc_dir} +cp -av CHANGES* LICENSE \ + %{buildroot}%{ngx_doc_dir} + +mkdir -p %{buildroot}%{vim_data_dir}/ +cp -av contrib/vim/* \ + %{buildroot}%{vim_data_dir}/ + +mkdir -p %{buildroot}%{_datadir}/nginx/ +chmod a+rx contrib/geo2nginx.pl +cp -av contrib/geo2nginx.pl contrib/unicode2nginx/ \ + %{buildroot}%{_datadir}/nginx/ + +copydocs() { + subdir=$1; + shift; + mkdir -p %{buildroot}%{ngx_doc_dir}/$subdir/ + pushd $subdir + cp -av $* %{buildroot}%{ngx_doc_dir}/$subdir/ + popd +} + +copydocs %{ngx_fancyindex_module_path} \ + template* LICENSE *.rst + +copydocs %{headers_more_nginx_module_path} \ + README.markdown + +copydocs %{nginx_upstream_check_module_path} \ + doc/* + +copydocs %{nginx_rtmp_module_path} \ + AUTHORS LICENSE README.md stat.xsl + %post %if %{with systemd} %service_add_post nginx.service @@ -309,6 +357,11 @@ rm %{buildroot}/srv/www/htdocs/index.html %{ngx_module_dir}/ngx_http_xslt_filter_module.so %{ngx_module_dir}/ngx_mail_module.so %{ngx_module_dir}/ngx_stream_module.so +%{ngx_module_dir}/ngx_stream_geoip_module.so +# external modules +%{ngx_module_dir}/ngx_http_fancyindex_module.so +%{ngx_module_dir}/ngx_http_headers_more_filter_module.so +%{ngx_module_dir}/ngx_rtmp_module.so %{_mandir}/man3/nginx.3pm* /srv/www/htdocs/50x.html %if 0%{?suse_version} && 0%{?suse_version} < 1140 @@ -323,15 +376,19 @@ rm %{buildroot}/srv/www/htdocs/index.html %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_fcgi} %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 CHANGES* -%doc conf/ contrib/ -%if %{with fancyindex} -%doc ngx-fancyindex-%{fancyindex_version}/ -%endif +%doc %{ngx_doc_dir} %if %{with systemd} %{_unitdir}/nginx.service %else %{_sysconfdir}/init.d/%{pkg_name} %endif +%{_datadir}/nginx/ + +%files -n vim-plugin-nginx +%defattr(-,root,root) +%dir %{vim_data_dir}/ftdetect/ +%{vim_data_dir}/ftdetect/nginx.vim +%{vim_data_dir}/indent/nginx.vim +%{vim_data_dir}/syntax/nginx.vim %changelog diff --git a/ngx-fancyindex-0.3.5.tar.gz b/ngx-fancyindex-0.3.5.tar.gz deleted file mode 100644 index b50aa9f..0000000 --- a/ngx-fancyindex-0.3.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0998e83be58bc5787fa9243a76a9d21de3cd01088d3cf63177ba88a562634a1 -size 14837 diff --git a/ngx-fancyindex-0.4.1.tar.gz b/ngx-fancyindex-0.4.1.tar.gz new file mode 100644 index 0000000..ff673b3 --- /dev/null +++ b/ngx-fancyindex-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b00d8e0ad2a67152a9cee7b7ee67990c742d501412df912baaf1eee9bb6dc71 +size 21130