1 |
commit: 497814c88251e3bf296c7e778560c3cfba8d9120 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 2 19:19:04 2016 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 2 19:19:04 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=497814c8 |
7 |
|
8 |
www-servers/nginx: Version bump |
9 |
|
10 |
Gentoo-Bug: 573046 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
|
14 |
www-servers/nginx/Manifest | 1 + |
15 |
www-servers/nginx/nginx-1.8.1.ebuild | 667 +++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 668 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest |
19 |
index 563f535..85b38ef 100644 |
20 |
--- a/www-servers/nginx/Manifest |
21 |
+++ b/www-servers/nginx/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST modsecurity-2.9.0.tar.gz 4246467 SHA256 e2bbf789966c1f80094d88d9085a81bde082b2054f8e38e0db571ca49208f434 SHA512 1af04f29bf23c51d03cdd3795c530f88b523a645aa02d776a6b23dcbc31decec7cd574919e5c7c7cf82684df2774062de5e465bddbbaf4c01a442c6d49401d3d WHIRLPOOL 1167ba6048a3ca05dcdabf03c67ae12720cca0cec74547fc223ee92ff76b6d5131785fa77b5f16da180e56590c851c192eaf02817b798e4d6f41fa6bfb2735a6 |
24 |
DIST nginx-1.8.0.tar.gz 832104 SHA256 23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5 SHA512 3e5d7e1b01839b2638251c47046149450b9b65985e611ef55e5953846e9eb0128c3708c695540ad4dfd0ce5e3060dfecb51213403048fab1a99dd5cea94f0038 WHIRLPOOL e4619e0e0454b86d725a21abe9300ad33ad700c4d577b33f1762b5af796093abd3c7b6afed38301dd0b2a235d6ff47db189b24fd19a5cbc777398bc237ae8534 |
25 |
+DIST nginx-1.8.1.tar.gz 833473 SHA256 8f4b3c630966c044ec72715754334d1fdf741caa1d5795fb4646c27d09f797b7 SHA512 546eba1749af0034cb8b924d2432be2f0e82a75c545aa929391ef7234103c3f29376235a2ef1363b120e1825cda15aeb085a05f9ce3596c88466e112e82aa882 WHIRLPOOL cd399083fb14bdb3498f1cd91a1cb59a73d37f323ce7c2a32500c9443f654cb5449137708cf149a0126aedb77abec9d1eb3dce3121f0b378d7d70e8eb18062af |
26 |
DIST nginx-1.9.6.tar.gz 884733 SHA256 ed501fc6d0eff9d3bc1049cc1ba3a3ac8c602de046acb2a4c108392bbfa865ea SHA512 d42199542585dc2c4feeeb5a86462b96ccd008a72a067d9fa83ed6171f098f4f515a62df2b4bf4b169b1aa78eccb6099701caea6a805de784a0f4bfe2ce92716 WHIRLPOOL 137643033860520610d707cb04f262e78e349e27ba6ed3fd5b91c95d4f8aeca49fa96721f58f809f81ed457040aa1c05d7f37400912376bc454829b491dd4983 |
27 |
DIST nginx-1.9.7.tar.gz 885562 SHA256 794bd217affdfce1c6263d9199c3961f387a2df9d57dcb42876faaf41c1748d5 SHA512 a3fa097164954b10120a0e7dca4b877da17c237f1e3ca47365aedf55ade2fe55b0f072404dcb909636b3afaa2b51f5c45b002b54424bd6b80ab76b835bbcc7de WHIRLPOOL 09a0b002d3cfc4650461c187d9192305208e38d738b2499109c3969c05aa8fb56d60730ab0a207bb64ffad5c450fb994b91a9a3ca1178633901ed236a4f3a245 |
28 |
DIST nginx_http_sticky_module_ng-1.2.5.tar.bz2 124072 SHA256 f975c033eb3c342f7247f6524774bbb727aaf630ed984576dbafe5de7a790c58 SHA512 d6ae723f739efb2f0548461931b1c395801684759962beda08067111426b1c9787ceaede91b0e984c023108fd17864c53c53925506f7e8e25ec8d2fc065585f6 WHIRLPOOL 1013c6a51f5989c8131392b3d9704d42c99f9727a673f6205878d0b7dfd265bb6042c1d30089603c9b38e339d48302e6873e77fe380b7e8edba25b71e9e84ba6 |
29 |
|
30 |
diff --git a/www-servers/nginx/nginx-1.8.1.ebuild b/www-servers/nginx/nginx-1.8.1.ebuild |
31 |
new file mode 100644 |
32 |
index 0000000..7fadd31 |
33 |
--- /dev/null |
34 |
+++ b/www-servers/nginx/nginx-1.8.1.ebuild |
35 |
@@ -0,0 +1,667 @@ |
36 |
+# Copyright 1999-2016 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+# $Id$ |
39 |
+ |
40 |
+EAPI=5 |
41 |
+ |
42 |
+# Maintainer notes: |
43 |
+# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite |
44 |
+# - any http-module activates the main http-functionality and overrides USE=-http |
45 |
+# - keep the following requirements in mind before adding external modules: |
46 |
+# * alive upstream |
47 |
+# * sane packaging |
48 |
+# * builds cleanly |
49 |
+# * does not need a patch for nginx core |
50 |
+# - TODO: test the google-perftools module (included in vanilla tarball) |
51 |
+ |
52 |
+# prevent perl-module from adding automagic perl DEPENDs |
53 |
+GENTOO_DEPEND_ON_PERL="no" |
54 |
+ |
55 |
+# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) |
56 |
+DEVEL_KIT_MODULE_PV="0.2.19" |
57 |
+DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1" |
58 |
+DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz" |
59 |
+DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" |
60 |
+ |
61 |
+# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) |
62 |
+HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1" |
63 |
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1" |
64 |
+HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz" |
65 |
+HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
66 |
+ |
67 |
+# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license) |
68 |
+HTTP_HEADERS_MORE_MODULE_PV="0.26" |
69 |
+HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" |
70 |
+HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz" |
71 |
+HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}" |
72 |
+ |
73 |
+# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) |
74 |
+HTTP_CACHE_PURGE_MODULE_PV="2.3" |
75 |
+HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
76 |
+HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" |
77 |
+HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
78 |
+ |
79 |
+# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) |
80 |
+HTTP_SLOWFS_CACHE_MODULE_PV="1.10" |
81 |
+HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
82 |
+HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" |
83 |
+HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
84 |
+ |
85 |
+# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license) |
86 |
+HTTP_FANCYINDEX_MODULE_PV="0.3.5" |
87 |
+HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" |
88 |
+HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" |
89 |
+HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" |
90 |
+ |
91 |
+# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) |
92 |
+HTTP_LUA_MODULE_PV="0.9.15" |
93 |
+HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" |
94 |
+HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz" |
95 |
+HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" |
96 |
+ |
97 |
+# http_auth_pam (http://web.iti.upv.es/~sto/nginx/, BSD-2 license) |
98 |
+HTTP_AUTH_PAM_MODULE_PV="1.4" |
99 |
+HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" |
100 |
+HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" |
101 |
+HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" |
102 |
+ |
103 |
+# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) |
104 |
+HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0" |
105 |
+HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" |
106 |
+HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" |
107 |
+HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" |
108 |
+ |
109 |
+# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) |
110 |
+HTTP_METRICS_MODULE_PV="0.1.1" |
111 |
+HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" |
112 |
+HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" |
113 |
+HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" |
114 |
+ |
115 |
+# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) |
116 |
+HTTP_NAXSI_MODULE_PV="0.53-2" |
117 |
+HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" |
118 |
+HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" |
119 |
+HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" |
120 |
+ |
121 |
+# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) |
122 |
+RTMP_MODULE_PV="1.1.7" |
123 |
+RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}" |
124 |
+RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz" |
125 |
+RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}" |
126 |
+ |
127 |
+# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license) |
128 |
+HTTP_DAV_EXT_MODULE_PV="0.0.3" |
129 |
+HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" |
130 |
+HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" |
131 |
+HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" |
132 |
+ |
133 |
+# echo-nginx-module (https://github.com/agentzh/echo-nginx-module, BSD license) |
134 |
+HTTP_ECHO_MODULE_PV="0.57" |
135 |
+HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" |
136 |
+HTTP_ECHO_MODULE_URI="https://github.com/agentzh/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" |
137 |
+HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" |
138 |
+ |
139 |
+# mod_security for nginx (https://modsecurity.org/, Apache-2.0) |
140 |
+# keep the MODULE_P here consistent with upstream to avoid tarball duplication |
141 |
+HTTP_SECURITY_MODULE_PV="2.9.0" |
142 |
+HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" |
143 |
+HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" |
144 |
+HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" |
145 |
+ |
146 |
+# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) |
147 |
+HTTP_PUSH_STREAM_MODULE_PV="0.4.1" |
148 |
+HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" |
149 |
+HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" |
150 |
+HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" |
151 |
+ |
152 |
+# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) |
153 |
+HTTP_STICKY_MODULE_PV="1.2.5" |
154 |
+HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" |
155 |
+HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" |
156 |
+HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-bd312d586752" |
157 |
+ |
158 |
+# mogilefs-module (http://www.grid.net.ru/nginx/mogilefs.en.html, BSD-2) |
159 |
+HTTP_MOGILEFS_MODULE_PV="1.0.4" |
160 |
+HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" |
161 |
+HTTP_MOGILEFS_MODULE_URI="http://www.grid.net.ru/nginx/download/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}.tar.gz" |
162 |
+HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" |
163 |
+ |
164 |
+inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib |
165 |
+ |
166 |
+DESCRIPTION="Robust, small and high performance http and reverse proxy server" |
167 |
+HOMEPAGE="http://nginx.org" |
168 |
+SRC_URI="http://nginx.org/download/${P}.tar.gz |
169 |
+ ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz |
170 |
+ nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) |
171 |
+ nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) |
172 |
+ nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz ) |
173 |
+ nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) |
174 |
+ nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) |
175 |
+ nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) |
176 |
+ nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) |
177 |
+ nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) |
178 |
+ nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) |
179 |
+ nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) |
180 |
+ rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz ) |
181 |
+ nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz ) |
182 |
+ nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz ) |
183 |
+ nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) |
184 |
+ nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) |
185 |
+ nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) |
186 |
+ nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )" |
187 |
+ |
188 |
+LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ |
189 |
+ nginx_modules_http_security? ( Apache-2.0 ) |
190 |
+ nginx_modules_http_push_stream? ( GPL-3 )" |
191 |
+ |
192 |
+SLOT="0" |
193 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
194 |
+ |
195 |
+NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi |
196 |
+geo gzip limit_req limit_conn map memcached proxy referer rewrite scgi ssi |
197 |
+split_clients upstream_ip_hash userid uwsgi" |
198 |
+NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip gzip_static |
199 |
+image_filter mp4 perl random_index realip secure_link spdy stub_status sub xslt" |
200 |
+NGINX_MODULES_MAIL="imap pop3 smtp" |
201 |
+NGINX_MODULES_3RD=" |
202 |
+ http_upload_progress |
203 |
+ http_headers_more |
204 |
+ http_cache_purge |
205 |
+ http_slowfs_cache |
206 |
+ http_fancyindex |
207 |
+ http_lua |
208 |
+ http_auth_pam |
209 |
+ http_upstream_check |
210 |
+ http_metrics |
211 |
+ http_naxsi |
212 |
+ http_dav_ext |
213 |
+ http_echo |
214 |
+ http_security |
215 |
+ http_push_stream |
216 |
+ http_sticky |
217 |
+ http_ajp |
218 |
+ http_mogilefs" |
219 |
+ |
220 |
+IUSE="aio debug +http +http-cache ipv6 libatomic luajit +pcre pcre-jit rtmp |
221 |
+selinux ssl userland_GNU vim-syntax" |
222 |
+ |
223 |
+for mod in $NGINX_MODULES_STD; do |
224 |
+ IUSE="${IUSE} +nginx_modules_http_${mod}" |
225 |
+done |
226 |
+ |
227 |
+for mod in $NGINX_MODULES_OPT; do |
228 |
+ IUSE="${IUSE} nginx_modules_http_${mod}" |
229 |
+done |
230 |
+ |
231 |
+for mod in $NGINX_MODULES_MAIL; do |
232 |
+ IUSE="${IUSE} nginx_modules_mail_${mod}" |
233 |
+done |
234 |
+ |
235 |
+for mod in $NGINX_MODULES_3RD; do |
236 |
+ IUSE="${IUSE} nginx_modules_${mod}" |
237 |
+done |
238 |
+ |
239 |
+CDEPEND=" |
240 |
+ pcre? ( >=dev-libs/libpcre-4.2 ) |
241 |
+ pcre-jit? ( >=dev-libs/libpcre-8.20[jit] ) |
242 |
+ ssl? ( dev-libs/openssl:0= ) |
243 |
+ http-cache? ( userland_GNU? ( dev-libs/openssl:0= ) ) |
244 |
+ nginx_modules_http_geoip? ( dev-libs/geoip ) |
245 |
+ nginx_modules_http_gunzip? ( sys-libs/zlib ) |
246 |
+ nginx_modules_http_gzip? ( sys-libs/zlib ) |
247 |
+ nginx_modules_http_gzip_static? ( sys-libs/zlib ) |
248 |
+ nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) |
249 |
+ nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) |
250 |
+ nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) |
251 |
+ nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl:0= ) ) |
252 |
+ nginx_modules_http_spdy? ( >=dev-libs/openssl-1.0.1c:0= ) |
253 |
+ nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt ) |
254 |
+ nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) ) |
255 |
+ nginx_modules_http_auth_pam? ( virtual/pam ) |
256 |
+ nginx_modules_http_metrics? ( dev-libs/yajl ) |
257 |
+ nginx_modules_http_dav_ext? ( dev-libs/expat ) |
258 |
+ nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )" |
259 |
+RDEPEND="${CDEPEND} |
260 |
+ selinux? ( sec-policy/selinux-nginx ) |
261 |
+" |
262 |
+DEPEND="${CDEPEND} |
263 |
+ arm? ( dev-libs/libatomic_ops ) |
264 |
+ libatomic? ( dev-libs/libatomic_ops )" |
265 |
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" |
266 |
+ |
267 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
268 |
+ nginx_modules_http_lua? ( nginx_modules_http_rewrite ) |
269 |
+ nginx_modules_http_naxsi? ( pcre ) |
270 |
+ nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) |
271 |
+ nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) |
272 |
+ nginx_modules_http_security? ( pcre ) |
273 |
+ nginx_modules_http_push_stream? ( ssl )" |
274 |
+ |
275 |
+pkg_setup() { |
276 |
+ NGINX_HOME="/var/lib/nginx" |
277 |
+ NGINX_HOME_TMP="${NGINX_HOME}/tmp" |
278 |
+ |
279 |
+ ebegin "Creating nginx user and group" |
280 |
+ enewgroup ${PN} |
281 |
+ enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} |
282 |
+ eend $? |
283 |
+ |
284 |
+ if use libatomic; then |
285 |
+ ewarn "GCC 4.1+ features built-in atomic operations." |
286 |
+ ewarn "Using libatomic_ops is only needed if using" |
287 |
+ ewarn "a different compiler or a GCC prior to 4.1" |
288 |
+ fi |
289 |
+ |
290 |
+ if [[ -n $NGINX_ADD_MODULES ]]; then |
291 |
+ ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" |
292 |
+ ewarn "This nginx installation is not supported!" |
293 |
+ ewarn "Make sure you can reproduce the bug without those modules" |
294 |
+ ewarn "_before_ reporting bugs." |
295 |
+ fi |
296 |
+ |
297 |
+ if use !http; then |
298 |
+ ewarn "To actually disable all http-functionality you also have to disable" |
299 |
+ ewarn "all nginx http modules." |
300 |
+ fi |
301 |
+ |
302 |
+ if use nginx_modules_http_ajp; then |
303 |
+ eerror "The AJP module currently doesn't build for nginx >1.8." |
304 |
+ eerror "It will be reintroduced with the 1.9 series when proven stable." |
305 |
+ eerror "Either disable it or stick with nginx 1.7.x." |
306 |
+ die "AJP module not supported" |
307 |
+ fi |
308 |
+} |
309 |
+ |
310 |
+src_prepare() { |
311 |
+ epatch "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" |
312 |
+ |
313 |
+ if use nginx_modules_http_upstream_check; then |
314 |
+ epatch "${FILESDIR}"/check_1.7.2+.patch |
315 |
+ fi |
316 |
+ |
317 |
+ if use nginx_modules_http_lua; then |
318 |
+ sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die |
319 |
+ fi |
320 |
+ |
321 |
+ find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die |
322 |
+ # We have config protection, don't rename etc files |
323 |
+ sed -i 's:.default::' auto/install || die |
324 |
+ # remove useless files |
325 |
+ sed -i -e '/koi-/d' -e '/win-/d' auto/install || die |
326 |
+ |
327 |
+ # don't install to /etc/nginx/ if not in use |
328 |
+ local module |
329 |
+ for module in fastcgi scgi uwsgi ; do |
330 |
+ if ! use nginx_modules_http_${module}; then |
331 |
+ sed -i -e "/${module}/d" auto/install || die |
332 |
+ fi |
333 |
+ done |
334 |
+ |
335 |
+ epatch_user |
336 |
+} |
337 |
+ |
338 |
+src_configure() { |
339 |
+ # mod_security needs to generate nginx/modsecurity/config before including it |
340 |
+ if use nginx_modules_http_security; then |
341 |
+ cd "${HTTP_SECURITY_MODULE_WD}" |
342 |
+ if use luajit ; then |
343 |
+ sed -i \ |
344 |
+ -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \ |
345 |
+ configure || die |
346 |
+ fi |
347 |
+ ./configure \ |
348 |
+ --enable-standalone-module \ |
349 |
+ $(use_enable pcre-jit) \ |
350 |
+ $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" |
351 |
+ fi |
352 |
+ |
353 |
+ cd "${S}" |
354 |
+ |
355 |
+ local myconf= http_enabled= mail_enabled= |
356 |
+ |
357 |
+ use aio && myconf+=" --with-file-aio --with-aio_module" |
358 |
+ use debug && myconf+=" --with-debug" |
359 |
+ use ipv6 && myconf+=" --with-ipv6" |
360 |
+ use libatomic && myconf+=" --with-libatomic" |
361 |
+ use pcre && myconf+=" --with-pcre" |
362 |
+ use pcre-jit && myconf+=" --with-pcre-jit" |
363 |
+ |
364 |
+ # HTTP modules |
365 |
+ for mod in $NGINX_MODULES_STD; do |
366 |
+ if use nginx_modules_http_${mod}; then |
367 |
+ http_enabled=1 |
368 |
+ else |
369 |
+ myconf+=" --without-http_${mod}_module" |
370 |
+ fi |
371 |
+ done |
372 |
+ |
373 |
+ for mod in $NGINX_MODULES_OPT; do |
374 |
+ if use nginx_modules_http_${mod}; then |
375 |
+ http_enabled=1 |
376 |
+ myconf+=" --with-http_${mod}_module" |
377 |
+ fi |
378 |
+ done |
379 |
+ |
380 |
+ if use nginx_modules_http_fastcgi; then |
381 |
+ myconf+=" --with-http_realip_module" |
382 |
+ fi |
383 |
+ |
384 |
+ # third-party modules |
385 |
+ if use nginx_modules_http_upload_progress; then |
386 |
+ http_enabled=1 |
387 |
+ myconf+=" --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD}" |
388 |
+ fi |
389 |
+ |
390 |
+ if use nginx_modules_http_headers_more; then |
391 |
+ http_enabled=1 |
392 |
+ myconf+=" --add-module=${HTTP_HEADERS_MORE_MODULE_WD}" |
393 |
+ fi |
394 |
+ |
395 |
+ if use nginx_modules_http_cache_purge; then |
396 |
+ http_enabled=1 |
397 |
+ myconf+=" --add-module=${HTTP_CACHE_PURGE_MODULE_WD}" |
398 |
+ fi |
399 |
+ |
400 |
+ if use nginx_modules_http_slowfs_cache; then |
401 |
+ http_enabled=1 |
402 |
+ myconf+=" --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD}" |
403 |
+ fi |
404 |
+ |
405 |
+ if use nginx_modules_http_fancyindex; then |
406 |
+ http_enabled=1 |
407 |
+ myconf+=" --add-module=${HTTP_FANCYINDEX_MODULE_WD}" |
408 |
+ fi |
409 |
+ |
410 |
+ if use nginx_modules_http_lua; then |
411 |
+ http_enabled=1 |
412 |
+ if use luajit; then |
413 |
+ export LUAJIT_LIB=$(pkg-config --variable libdir luajit) |
414 |
+ export LUAJIT_INC=$(pkg-config --variable includedir luajit) |
415 |
+ else |
416 |
+ export LUA_LIB=$(pkg-config --variable libdir lua) |
417 |
+ export LUA_INC=$(pkg-config --variable includedir lua) |
418 |
+ fi |
419 |
+ myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}" |
420 |
+ myconf+=" --add-module=${HTTP_LUA_MODULE_WD}" |
421 |
+ fi |
422 |
+ |
423 |
+ if use nginx_modules_http_auth_pam; then |
424 |
+ http_enabled=1 |
425 |
+ myconf+=" --add-module=${HTTP_AUTH_PAM_MODULE_WD}" |
426 |
+ fi |
427 |
+ |
428 |
+ if use nginx_modules_http_upstream_check; then |
429 |
+ http_enabled=1 |
430 |
+ myconf+=" --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD}" |
431 |
+ fi |
432 |
+ |
433 |
+ if use nginx_modules_http_metrics; then |
434 |
+ http_enabled=1 |
435 |
+ myconf+=" --add-module=${HTTP_METRICS_MODULE_WD}" |
436 |
+ fi |
437 |
+ |
438 |
+ if use nginx_modules_http_naxsi ; then |
439 |
+ http_enabled=1 |
440 |
+ myconf+=" --add-module=${HTTP_NAXSI_MODULE_WD}" |
441 |
+ fi |
442 |
+ |
443 |
+ if use rtmp ; then |
444 |
+ http_enabled=1 |
445 |
+ myconf+=" --add-module=${RTMP_MODULE_WD}" |
446 |
+ fi |
447 |
+ |
448 |
+ if use nginx_modules_http_dav_ext ; then |
449 |
+ http_enabled=1 |
450 |
+ myconf+=" --add-module=${HTTP_DAV_EXT_MODULE_WD}" |
451 |
+ fi |
452 |
+ |
453 |
+ if use nginx_modules_http_echo ; then |
454 |
+ http_enabled=1 |
455 |
+ myconf+=" --add-module=${HTTP_ECHO_MODULE_WD}" |
456 |
+ fi |
457 |
+ |
458 |
+ if use nginx_modules_http_security ; then |
459 |
+ http_enabled=1 |
460 |
+ myconf+=" --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity" |
461 |
+ fi |
462 |
+ |
463 |
+ if use nginx_modules_http_push_stream ; then |
464 |
+ http_enabled=1 |
465 |
+ myconf+=" --add-module=${HTTP_PUSH_STREAM_MODULE_WD}" |
466 |
+ fi |
467 |
+ |
468 |
+ if use nginx_modules_http_sticky ; then |
469 |
+ http_enabled=1 |
470 |
+ myconf+=" --add-module=${HTTP_STICKY_MODULE_WD}" |
471 |
+ fi |
472 |
+ |
473 |
+ if use nginx_modules_http_mogilefs ; then |
474 |
+ http_enabled=1 |
475 |
+ myconf+=" --add-module=${HTTP_MOGILEFS_MODULE_WD}" |
476 |
+ fi |
477 |
+ |
478 |
+ if use http || use http-cache; then |
479 |
+ http_enabled=1 |
480 |
+ fi |
481 |
+ |
482 |
+ if [ $http_enabled ]; then |
483 |
+ use http-cache || myconf+=" --without-http-cache" |
484 |
+ use ssl && myconf+=" --with-http_ssl_module" |
485 |
+ else |
486 |
+ myconf+=" --without-http --without-http-cache" |
487 |
+ fi |
488 |
+ |
489 |
+ # MAIL modules |
490 |
+ for mod in $NGINX_MODULES_MAIL; do |
491 |
+ if use nginx_modules_mail_${mod}; then |
492 |
+ mail_enabled=1 |
493 |
+ else |
494 |
+ myconf+=" --without-mail_${mod}_module" |
495 |
+ fi |
496 |
+ done |
497 |
+ |
498 |
+ if [ $mail_enabled ]; then |
499 |
+ myconf+=" --with-mail" |
500 |
+ use ssl && myconf+=" --with-mail_ssl_module" |
501 |
+ fi |
502 |
+ |
503 |
+ # custom modules |
504 |
+ for mod in $NGINX_ADD_MODULES; do |
505 |
+ myconf+=" --add-module=${mod}" |
506 |
+ done |
507 |
+ |
508 |
+ # https://bugs.gentoo.org/286772 |
509 |
+ export LANG=C LC_ALL=C |
510 |
+ tc-export CC |
511 |
+ |
512 |
+ if ! use prefix; then |
513 |
+ myconf+=" --user=${PN} --group=${PN}" |
514 |
+ fi |
515 |
+ |
516 |
+ ./configure \ |
517 |
+ --prefix="${EPREFIX}"/usr \ |
518 |
+ --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ |
519 |
+ --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ |
520 |
+ --pid-path="${EPREFIX}"/run/${PN}.pid \ |
521 |
+ --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ |
522 |
+ --with-cc-opt="-I${EROOT}usr/include" \ |
523 |
+ --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ |
524 |
+ --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ |
525 |
+ --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ |
526 |
+ --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ |
527 |
+ --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ |
528 |
+ --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ |
529 |
+ --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ |
530 |
+ ${myconf} || die "configure failed" |
531 |
+ |
532 |
+ # A purely cosmetic change that makes nginx -V more readable. This can be |
533 |
+ # good if people outside the gentoo community would troubleshoot and |
534 |
+ # question the users setup. |
535 |
+ sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die |
536 |
+} |
537 |
+ |
538 |
+src_compile() { |
539 |
+ use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" |
540 |
+ |
541 |
+ # https://bugs.gentoo.org/286772 |
542 |
+ export LANG=C LC_ALL=C |
543 |
+ emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" |
544 |
+} |
545 |
+ |
546 |
+src_install() { |
547 |
+ emake DESTDIR="${D%/}" install |
548 |
+ |
549 |
+ cp "${FILESDIR}"/nginx.conf "${ED}"etc/nginx/nginx.conf || die |
550 |
+ |
551 |
+ newinitd "${FILESDIR}"/nginx.initd-r2 nginx |
552 |
+ |
553 |
+ systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service |
554 |
+ |
555 |
+ doman man/nginx.8 |
556 |
+ dodoc CHANGES* README |
557 |
+ |
558 |
+ # just keepdir. do not copy the default htdocs files (bug #449136) |
559 |
+ keepdir /var/www/localhost |
560 |
+ rm -rf "${D}"usr/html || die |
561 |
+ |
562 |
+ # set up a list of directories to keep |
563 |
+ local keepdir_list="${NGINX_HOME_TMP}"/client |
564 |
+ local module |
565 |
+ for module in proxy fastcgi scgi uwsgi; do |
566 |
+ use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}" |
567 |
+ done |
568 |
+ |
569 |
+ keepdir /var/log/nginx ${keepdir_list} |
570 |
+ |
571 |
+ # this solves a problem with SELinux where nginx doesn't see the directories |
572 |
+ # as root and tries to create them as nginx |
573 |
+ fperms 0750 "${NGINX_HOME_TMP}" |
574 |
+ fowners ${PN}:0 "${NGINX_HOME_TMP}" |
575 |
+ |
576 |
+ fperms 0700 /var/log/nginx ${keepdir_list} |
577 |
+ fowners ${PN}:${PN} /var/log/nginx ${keepdir_list} |
578 |
+ |
579 |
+ # logrotate |
580 |
+ insinto /etc/logrotate.d |
581 |
+ newins "${FILESDIR}"/nginx.logrotate-r1 nginx |
582 |
+ |
583 |
+ if use nginx_modules_http_perl; then |
584 |
+ cd "${S}"/objs/src/http/modules/perl/ |
585 |
+ emake DESTDIR="${D}" INSTALLDIRS=vendor |
586 |
+ perl_delete_localpod |
587 |
+ fi |
588 |
+ |
589 |
+ if use nginx_modules_http_cache_purge; then |
590 |
+ docinto ${HTTP_CACHE_PURGE_MODULE_P} |
591 |
+ dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} |
592 |
+ fi |
593 |
+ |
594 |
+ if use nginx_modules_http_slowfs_cache; then |
595 |
+ docinto ${HTTP_SLOWFS_CACHE_MODULE_P} |
596 |
+ dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} |
597 |
+ fi |
598 |
+ |
599 |
+ if use nginx_modules_http_fancyindex; then |
600 |
+ docinto ${HTTP_FANCYINDEX_MODULE_P} |
601 |
+ dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst |
602 |
+ fi |
603 |
+ |
604 |
+ if use nginx_modules_http_lua; then |
605 |
+ docinto ${HTTP_LUA_MODULE_P} |
606 |
+ dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown} |
607 |
+ fi |
608 |
+ |
609 |
+ if use nginx_modules_http_auth_pam; then |
610 |
+ docinto ${HTTP_AUTH_PAM_MODULE_P} |
611 |
+ dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} |
612 |
+ fi |
613 |
+ |
614 |
+ if use nginx_modules_http_upstream_check; then |
615 |
+ docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} |
616 |
+ dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} |
617 |
+ fi |
618 |
+ |
619 |
+# README.md is still empty |
620 |
+# if use nginx_modules_http_metrics; then |
621 |
+# docinto ${HTTP_METRICS_MODULE_P} |
622 |
+# dodoc "${HTTP_METRICS_MODULE_WD}"/README.md |
623 |
+# fi |
624 |
+ |
625 |
+ if use nginx_modules_http_naxsi; then |
626 |
+ insinto /etc/nginx |
627 |
+ doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules |
628 |
+ fi |
629 |
+ |
630 |
+ if use rtmp; then |
631 |
+ docinto ${RTMP_MODULE_P} |
632 |
+ dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} |
633 |
+ fi |
634 |
+ |
635 |
+ if use nginx_modules_http_dav_ext; then |
636 |
+ docinto ${HTTP_DAV_EXT_MODULE_P} |
637 |
+ dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README |
638 |
+ fi |
639 |
+ |
640 |
+ if use nginx_modules_http_echo; then |
641 |
+ docinto ${HTTP_ECHO_MODULE_P} |
642 |
+ dodoc "${HTTP_ECHO_MODULE_WD}"/{README.markdown,doc/HttpEchoModule.wiki} |
643 |
+ fi |
644 |
+ |
645 |
+ if use nginx_modules_http_security; then |
646 |
+ docinto ${HTTP_SECURITY_MODULE_P} |
647 |
+ dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt} |
648 |
+ fi |
649 |
+ |
650 |
+ if use nginx_modules_http_push_stream; then |
651 |
+ docinto ${HTTP_PUSH_STREAM_MODULE_P} |
652 |
+ dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile} |
653 |
+ fi |
654 |
+ |
655 |
+ if use nginx_modules_http_sticky; then |
656 |
+ docinto ${HTTP_STICKY_MODULE_P} |
657 |
+ dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf} |
658 |
+ fi |
659 |
+} |
660 |
+ |
661 |
+pkg_postinst() { |
662 |
+ if use ssl; then |
663 |
+ if [ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]; then |
664 |
+ install_cert /etc/ssl/${PN}/${PN} |
665 |
+ use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem} |
666 |
+ fi |
667 |
+ fi |
668 |
+ |
669 |
+ if use nginx_modules_http_lua && use nginx_modules_http_spdy; then |
670 |
+ ewarn "Lua 3rd party module author warns against using ${P} with" |
671 |
+ ewarn "NGINX_MODULES_HTTP=\"lua spdy\". For more info, see http://git.io/OldLsg" |
672 |
+ fi |
673 |
+ |
674 |
+ # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for |
675 |
+ # existing installations |
676 |
+ local fix_perms=0 |
677 |
+ |
678 |
+ for rv in ${REPLACING_VERSIONS} ; do |
679 |
+ version_compare ${rv} 1.4.1-r2 |
680 |
+ [[ $? -eq 1 ]] && fix_perms=1 |
681 |
+ done |
682 |
+ |
683 |
+ if [[ $fix_perms -eq 1 ]] ; then |
684 |
+ ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following" |
685 |
+ ewarn "directories the world-readable bit removed (if set):" |
686 |
+ ewarn " ${EPREFIX}/var/log/nginx" |
687 |
+ ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" |
688 |
+ ewarn "Check if this is correct for your setup before restarting nginx!" |
689 |
+ ewarn "This is a one-time change and will not happen on subsequent updates." |
690 |
+ ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}" |
691 |
+ chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi} |
692 |
+ fi |
693 |
+ |
694 |
+ # If the nginx user can't change into or read the dir, display a warning. |
695 |
+ # If su is not available we display the warning nevertheless since we can't check properly |
696 |
+ su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null |
697 |
+ if [ $? -ne 0 ] ; then |
698 |
+ ewarn "Please make sure that the nginx user or group has at least" |
699 |
+ ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)" |
700 |
+ ewarn "Otherwise you end up with empty log files after a logrotate." |
701 |
+ fi |
702 |
+} |