1 |
commit: fe0bae189dcc562ff934b8623812fc0ea4790b7a |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 31 20:42:43 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 31 20:42:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe0bae18 |
7 |
|
8 |
www-servers/nginx: rev bump to bump 3rd party modules |
9 |
|
10 |
- nginScript module bumped to v0.2.3 |
11 |
|
12 |
Package-Manager: Portage-2.3.44, Repoman-2.3.10 |
13 |
|
14 |
www-servers/nginx/Manifest | 1 + |
15 |
www-servers/nginx/nginx-1.15.2-r1.ebuild | 1081 ++++++++++++++++++++++++++++++ |
16 |
2 files changed, 1082 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest |
19 |
index 31358801c55..58bdee5c0ef 100644 |
20 |
--- a/www-servers/nginx/Manifest |
21 |
+++ b/www-servers/nginx/Manifest |
22 |
@@ -26,3 +26,4 @@ DIST ngx_metrics-0.1.1.tar.gz 2964 BLAKE2B 95d71ea26c949c345b83e353bd66a20df18cc |
23 |
DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 BLAKE2B e0729b66554c8890727190a624d4c9aef6499dfc2e301541a9bfc15690caf6d3155c8a4b8f7a1555a7655b47aa0cd1b797aeb8ba82efa92ab80808218a0bdcff SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 |
24 |
DIST ngx_rtmp-1.2.1.tar.gz 519919 BLAKE2B 744ccb8031eb9653f158f9eceba64fc9c8af7b9a42e64ef996ab3bbbe1402e5ffd3efcc8e4aaca437eb5e208e4b6f2d8643fcca953b32f32543eaa1ae4d9505c SHA512 4a0af5e9afa4deb0b53de8de7ddb2cfa6430d372e1ef9e421f01b509548bd134d427345442ac1ce667338cc2a1484dc2ab732e316e878ac7d3537dc527d5f922 |
25 |
DIST njs-0.2.2.tar.gz 253349 BLAKE2B 1ca508677a251ff38f5bca01292f2c7d2c41ac1c5d2cffae8b565694cbed9ebb2811b7e8893ea03384810e169ebb0cccfbf51d36166fcbc32e77fb30ba90d664 SHA512 e309b06b66e955873b82ef6c8881c3a98e0cf22e379b292c7561947db34c28990ade5461f42561e73c79c8e1e7914a990a003926054f884551edc16015ac4792 |
26 |
+DIST njs-0.2.3.tar.gz 269695 BLAKE2B 10d5f4ad41b382da8e87ac15ea46db0107e532db68bc3103c27ee0122f9e24fbf61ffdf472baa0ce9c69080abeaf71651d5097acc2a57257099c8e82148ed366 SHA512 0032bc0cb021ca2305164e39a71f7814a4a385cc6079057a53daebe1cd42e78dc6a6d35c7652c38805e8ceb30201333aacce819245a638b8a3779e6f74a2b7a6 |
27 |
|
28 |
diff --git a/www-servers/nginx/nginx-1.15.2-r1.ebuild b/www-servers/nginx/nginx-1.15.2-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..32888e842f4 |
31 |
--- /dev/null |
32 |
+++ b/www-servers/nginx/nginx-1.15.2-r1.ebuild |
33 |
@@ -0,0 +1,1081 @@ |
34 |
+# Copyright 1999-2018 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI="6" |
38 |
+ |
39 |
+# Maintainer notes: |
40 |
+# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite |
41 |
+# - any http-module activates the main http-functionality and overrides USE=-http |
42 |
+# - keep the following requirements in mind before adding external modules: |
43 |
+# * alive upstream |
44 |
+# * sane packaging |
45 |
+# * builds cleanly |
46 |
+# * does not need a patch for nginx core |
47 |
+# - TODO: test the google-perftools module (included in vanilla tarball) |
48 |
+ |
49 |
+# prevent perl-module from adding automagic perl DEPENDs |
50 |
+GENTOO_DEPEND_ON_PERL="no" |
51 |
+ |
52 |
+# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) |
53 |
+DEVEL_KIT_MODULE_PV="0.3.0" |
54 |
+DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1" |
55 |
+DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz" |
56 |
+DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" |
57 |
+ |
58 |
+# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) |
59 |
+HTTP_BROTLI_MODULE_PV="0.1.2" |
60 |
+HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" |
61 |
+HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/v${HTTP_BROTLI_MODULE_PV}.tar.gz" |
62 |
+HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_MODULE_PV}" |
63 |
+ |
64 |
+# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) |
65 |
+HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2" |
66 |
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1" |
67 |
+HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz" |
68 |
+HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
69 |
+ |
70 |
+# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license) |
71 |
+HTTP_HEADERS_MORE_MODULE_PV="0.33" |
72 |
+HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" |
73 |
+HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz" |
74 |
+HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}" |
75 |
+ |
76 |
+# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license) |
77 |
+HTTP_CACHE_PURGE_MODULE_PV="2.3" |
78 |
+HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
79 |
+HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" |
80 |
+HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
81 |
+ |
82 |
+# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) |
83 |
+HTTP_SLOWFS_CACHE_MODULE_PV="1.10" |
84 |
+HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
85 |
+HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" |
86 |
+HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
87 |
+ |
88 |
+# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license) |
89 |
+HTTP_FANCYINDEX_MODULE_PV="0.4.3" |
90 |
+HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" |
91 |
+HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" |
92 |
+HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" |
93 |
+ |
94 |
+# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) |
95 |
+HTTP_LUA_MODULE_PV="0.10.13" |
96 |
+HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" |
97 |
+HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz" |
98 |
+HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" |
99 |
+ |
100 |
+# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) |
101 |
+HTTP_AUTH_PAM_MODULE_PV="1.5.1" |
102 |
+HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" |
103 |
+HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" |
104 |
+HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" |
105 |
+ |
106 |
+# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) |
107 |
+HTTP_UPSTREAM_CHECK_MODULE_PV="9aecf15ec379fe98f62355c57b60c0bc83296f04" |
108 |
+HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" |
109 |
+HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" |
110 |
+HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" |
111 |
+ |
112 |
+# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) |
113 |
+HTTP_METRICS_MODULE_PV="0.1.1" |
114 |
+HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" |
115 |
+HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" |
116 |
+HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" |
117 |
+ |
118 |
+# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) |
119 |
+HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" |
120 |
+HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" |
121 |
+HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" |
122 |
+HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" |
123 |
+ |
124 |
+# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) |
125 |
+HTTP_NAXSI_MODULE_PV="0.56" |
126 |
+HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" |
127 |
+HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" |
128 |
+HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" |
129 |
+ |
130 |
+# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) |
131 |
+RTMP_MODULE_PV="1.2.1" |
132 |
+RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}" |
133 |
+RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz" |
134 |
+RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}" |
135 |
+ |
136 |
+# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license) |
137 |
+HTTP_DAV_EXT_MODULE_PV="0.1.0" |
138 |
+HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" |
139 |
+HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" |
140 |
+HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" |
141 |
+ |
142 |
+# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) |
143 |
+HTTP_ECHO_MODULE_PV="0.61" |
144 |
+HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" |
145 |
+HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" |
146 |
+HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" |
147 |
+ |
148 |
+# mod_security for nginx (https://modsecurity.org/, Apache-2.0) |
149 |
+# keep the MODULE_P here consistent with upstream to avoid tarball duplication |
150 |
+HTTP_SECURITY_MODULE_PV="2.9.2" |
151 |
+HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" |
152 |
+HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" |
153 |
+HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" |
154 |
+ |
155 |
+# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) |
156 |
+HTTP_PUSH_STREAM_MODULE_PV="0.5.4" |
157 |
+HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" |
158 |
+HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" |
159 |
+HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" |
160 |
+ |
161 |
+# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) |
162 |
+HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" |
163 |
+HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" |
164 |
+HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" |
165 |
+HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" |
166 |
+ |
167 |
+# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) |
168 |
+HTTP_MOGILEFS_MODULE_PV="1.0.4" |
169 |
+HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" |
170 |
+HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" |
171 |
+HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" |
172 |
+ |
173 |
+# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) |
174 |
+HTTP_MEMC_MODULE_PV="0.19" |
175 |
+HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}" |
176 |
+HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz" |
177 |
+HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}" |
178 |
+ |
179 |
+# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2) |
180 |
+HTTP_LDAP_MODULE_PV="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" |
181 |
+HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" |
182 |
+HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz" |
183 |
+HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" |
184 |
+ |
185 |
+# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) |
186 |
+GEOIP2_MODULE_PV="2.0" |
187 |
+GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" |
188 |
+GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" |
189 |
+GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" |
190 |
+ |
191 |
+# njs-module (https://github.com/nginx/njs, as-is) |
192 |
+NJS_MODULE_PV="0.2.3" |
193 |
+NJS_MODULE_P="njs-${NJS_MODULE_PV}" |
194 |
+NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" |
195 |
+NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}" |
196 |
+ |
197 |
+# We handle deps below ourselves |
198 |
+SSL_DEPS_SKIP=1 |
199 |
+AUTOTOOLS_AUTO_DEPEND="no" |
200 |
+ |
201 |
+inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib |
202 |
+ |
203 |
+DESCRIPTION="Robust, small and high performance http and reverse proxy server" |
204 |
+HOMEPAGE="https://nginx.org" |
205 |
+SRC_URI="https://nginx.org/download/${P}.tar.gz |
206 |
+ ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz |
207 |
+ nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) |
208 |
+ nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) |
209 |
+ nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) |
210 |
+ nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz ) |
211 |
+ nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz ) |
212 |
+ nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz ) |
213 |
+ nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) |
214 |
+ nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) |
215 |
+ nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) |
216 |
+ nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) |
217 |
+ nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) |
218 |
+ nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) |
219 |
+ nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) |
220 |
+ nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) |
221 |
+ nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) |
222 |
+ nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) |
223 |
+ nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) |
224 |
+ nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) |
225 |
+ nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) |
226 |
+ nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) |
227 |
+ nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) |
228 |
+ nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) |
229 |
+ nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) |
230 |
+ nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) |
231 |
+ rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )" |
232 |
+ |
233 |
+LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ |
234 |
+ nginx_modules_http_security? ( Apache-2.0 ) |
235 |
+ nginx_modules_http_push_stream? ( GPL-3 )" |
236 |
+ |
237 |
+SLOT="mainline" |
238 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
239 |
+ |
240 |
+# Package doesn't provide a real test suite |
241 |
+RESTRICT="test" |
242 |
+ |
243 |
+NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif |
244 |
+ fastcgi geo grpc gzip limit_req limit_conn map memcached mirror |
245 |
+ proxy referer rewrite scgi ssi split_clients upstream_hash |
246 |
+ upstream_ip_hash upstream_keepalive upstream_least_conn |
247 |
+ upstream_zone userid uwsgi" |
248 |
+NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip |
249 |
+ gzip_static image_filter mp4 perl random_index realip secure_link |
250 |
+ slice stub_status sub xslt" |
251 |
+NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients |
252 |
+ upstream_hash upstream_least_conn upstream_zone" |
253 |
+NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread" |
254 |
+NGINX_MODULES_MAIL="imap pop3 smtp" |
255 |
+NGINX_MODULES_3RD=" |
256 |
+ http_auth_ldap |
257 |
+ http_auth_pam |
258 |
+ http_brotli |
259 |
+ http_cache_purge |
260 |
+ http_dav_ext |
261 |
+ http_echo |
262 |
+ http_fancyindex |
263 |
+ http_geoip2 |
264 |
+ http_headers_more |
265 |
+ http_javascript |
266 |
+ http_lua |
267 |
+ http_memc |
268 |
+ http_metrics |
269 |
+ http_mogilefs |
270 |
+ http_naxsi |
271 |
+ http_push_stream |
272 |
+ http_security |
273 |
+ http_slowfs_cache |
274 |
+ http_sticky |
275 |
+ http_upload_progress |
276 |
+ http_upstream_check |
277 |
+ http_vhost_traffic_status |
278 |
+ stream_geoip2 |
279 |
+ stream_javascript |
280 |
+" |
281 |
+ |
282 |
+IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +pcre |
283 |
+ pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax" |
284 |
+ |
285 |
+for mod in $NGINX_MODULES_STD; do |
286 |
+ IUSE="${IUSE} +nginx_modules_http_${mod}" |
287 |
+done |
288 |
+ |
289 |
+for mod in $NGINX_MODULES_OPT; do |
290 |
+ IUSE="${IUSE} nginx_modules_http_${mod}" |
291 |
+done |
292 |
+ |
293 |
+for mod in $NGINX_MODULES_STREAM_STD; do |
294 |
+ IUSE="${IUSE} nginx_modules_stream_${mod}" |
295 |
+done |
296 |
+ |
297 |
+for mod in $NGINX_MODULES_STREAM_OPT; do |
298 |
+ IUSE="${IUSE} nginx_modules_stream_${mod}" |
299 |
+done |
300 |
+ |
301 |
+for mod in $NGINX_MODULES_MAIL; do |
302 |
+ IUSE="${IUSE} nginx_modules_mail_${mod}" |
303 |
+done |
304 |
+ |
305 |
+for mod in $NGINX_MODULES_3RD; do |
306 |
+ IUSE="${IUSE} nginx_modules_${mod}" |
307 |
+done |
308 |
+ |
309 |
+# Add so we can warn users updating about config changes |
310 |
+# @TODO: jbergstroem: remove on next release series |
311 |
+IUSE="${IUSE} nginx_modules_http_spdy" |
312 |
+ |
313 |
+CDEPEND=" |
314 |
+ pcre? ( dev-libs/libpcre:= ) |
315 |
+ pcre-jit? ( dev-libs/libpcre:=[jit] ) |
316 |
+ ssl? ( |
317 |
+ !libressl? ( dev-libs/openssl:0= ) |
318 |
+ libressl? ( dev-libs/libressl:= ) |
319 |
+ ) |
320 |
+ http2? ( |
321 |
+ !libressl? ( >=dev-libs/openssl-1.0.1c:0= ) |
322 |
+ libressl? ( dev-libs/libressl:= ) |
323 |
+ ) |
324 |
+ http-cache? ( |
325 |
+ userland_GNU? ( |
326 |
+ !libressl? ( dev-libs/openssl:0= ) |
327 |
+ libressl? ( dev-libs/libressl:= ) |
328 |
+ ) |
329 |
+ ) |
330 |
+ nginx_modules_http_brotli? ( app-arch/brotli:= ) |
331 |
+ nginx_modules_http_geoip? ( dev-libs/geoip ) |
332 |
+ nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) |
333 |
+ nginx_modules_http_gunzip? ( sys-libs/zlib ) |
334 |
+ nginx_modules_http_gzip? ( sys-libs/zlib ) |
335 |
+ nginx_modules_http_gzip_static? ( sys-libs/zlib ) |
336 |
+ nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) |
337 |
+ nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) |
338 |
+ nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) |
339 |
+ nginx_modules_http_secure_link? ( |
340 |
+ userland_GNU? ( |
341 |
+ !libressl? ( dev-libs/openssl:0= ) |
342 |
+ libressl? ( dev-libs/libressl:= ) |
343 |
+ ) |
344 |
+ ) |
345 |
+ nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) |
346 |
+ nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) ) |
347 |
+ nginx_modules_http_auth_pam? ( virtual/pam ) |
348 |
+ nginx_modules_http_metrics? ( dev-libs/yajl:= ) |
349 |
+ nginx_modules_http_dav_ext? ( dev-libs/expat ) |
350 |
+ nginx_modules_http_security? ( |
351 |
+ dev-libs/apr:= |
352 |
+ dev-libs/apr-util:= |
353 |
+ dev-libs/libxml2:= |
354 |
+ net-misc/curl |
355 |
+ www-servers/apache |
356 |
+ ) |
357 |
+ nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] ) |
358 |
+ nginx_modules_stream_geoip? ( dev-libs/geoip ) |
359 |
+ nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" |
360 |
+RDEPEND="${CDEPEND} |
361 |
+ selinux? ( sec-policy/selinux-nginx ) |
362 |
+ !www-servers/nginx:0" |
363 |
+DEPEND="${CDEPEND} |
364 |
+ nginx_modules_http_brotli? ( virtual/pkgconfig ) |
365 |
+ nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} ) |
366 |
+ arm? ( dev-libs/libatomic_ops ) |
367 |
+ libatomic? ( dev-libs/libatomic_ops )" |
368 |
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" |
369 |
+ |
370 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
371 |
+ nginx_modules_http_grpc? ( http2 ) |
372 |
+ nginx_modules_http_lua? ( nginx_modules_http_rewrite ) |
373 |
+ nginx_modules_http_naxsi? ( pcre ) |
374 |
+ nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) |
375 |
+ nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) |
376 |
+ nginx_modules_http_security? ( pcre ) |
377 |
+ nginx_modules_http_push_stream? ( ssl )" |
378 |
+ |
379 |
+pkg_setup() { |
380 |
+ NGINX_HOME="/var/lib/nginx" |
381 |
+ NGINX_HOME_TMP="${NGINX_HOME}/tmp" |
382 |
+ |
383 |
+ ebegin "Creating nginx user and group" |
384 |
+ enewgroup ${PN} |
385 |
+ enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} |
386 |
+ eend $? |
387 |
+ |
388 |
+ if use libatomic; then |
389 |
+ ewarn "GCC 4.1+ features built-in atomic operations." |
390 |
+ ewarn "Using libatomic_ops is only needed if using" |
391 |
+ ewarn "a different compiler or a GCC prior to 4.1" |
392 |
+ fi |
393 |
+ |
394 |
+ if [[ -n $NGINX_ADD_MODULES ]]; then |
395 |
+ ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" |
396 |
+ ewarn "This nginx installation is not supported!" |
397 |
+ ewarn "Make sure you can reproduce the bug without those modules" |
398 |
+ ewarn "_before_ reporting bugs." |
399 |
+ fi |
400 |
+ |
401 |
+ if use !http; then |
402 |
+ ewarn "To actually disable all http-functionality you also have to disable" |
403 |
+ ewarn "all nginx http modules." |
404 |
+ fi |
405 |
+ |
406 |
+ if use nginx_modules_http_mogilefs && use threads; then |
407 |
+ eerror "mogilefs won't compile with threads support." |
408 |
+ eerror "Please disable either flag and try again." |
409 |
+ die "Can't compile mogilefs with threads support" |
410 |
+ fi |
411 |
+} |
412 |
+ |
413 |
+src_prepare() { |
414 |
+ eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" |
415 |
+ eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" |
416 |
+ |
417 |
+ if use nginx_modules_http_brotli; then |
418 |
+ cd "${HTTP_BROTLI_MODULE_WD}" || die |
419 |
+ eapply "${FILESDIR}"/http_brotli-detect-brotli-r1.patch |
420 |
+ cd "${S}" || die |
421 |
+ fi |
422 |
+ |
423 |
+ if use nginx_modules_http_upstream_check; then |
424 |
+ eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch |
425 |
+ fi |
426 |
+ |
427 |
+ if use nginx_modules_http_cache_purge; then |
428 |
+ cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die |
429 |
+ eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch |
430 |
+ cd "${S}" || die |
431 |
+ fi |
432 |
+ |
433 |
+ if use nginx_modules_http_security; then |
434 |
+ cd "${HTTP_SECURITY_MODULE_WD}" || die |
435 |
+ |
436 |
+ eautoreconf |
437 |
+ |
438 |
+ if use luajit ; then |
439 |
+ sed -i \ |
440 |
+ -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \ |
441 |
+ configure || die |
442 |
+ fi |
443 |
+ |
444 |
+ cd "${S}" || die |
445 |
+ fi |
446 |
+ |
447 |
+ if use nginx_modules_http_upload_progress; then |
448 |
+ cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die |
449 |
+ eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.patch |
450 |
+ cd "${S}" || die |
451 |
+ fi |
452 |
+ |
453 |
+ find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die |
454 |
+ # We have config protection, don't rename etc files |
455 |
+ sed -i 's:.default::' auto/install || die |
456 |
+ # remove useless files |
457 |
+ sed -i -e '/koi-/d' -e '/win-/d' auto/install || die |
458 |
+ |
459 |
+ # don't install to /etc/nginx/ if not in use |
460 |
+ local module |
461 |
+ for module in fastcgi scgi uwsgi ; do |
462 |
+ if ! use nginx_modules_http_${module}; then |
463 |
+ sed -i -e "/${module}/d" auto/install || die |
464 |
+ fi |
465 |
+ done |
466 |
+ |
467 |
+ eapply_user |
468 |
+} |
469 |
+ |
470 |
+src_configure() { |
471 |
+ # mod_security needs to generate nginx/modsecurity/config before including it |
472 |
+ if use nginx_modules_http_security; then |
473 |
+ cd "${HTTP_SECURITY_MODULE_WD}" || die |
474 |
+ |
475 |
+ ./configure \ |
476 |
+ --enable-standalone-module \ |
477 |
+ --disable-mlogc \ |
478 |
+ --with-ssdeep=no \ |
479 |
+ $(use_enable pcre-jit) \ |
480 |
+ $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" |
481 |
+ |
482 |
+ cd "${S}" || die |
483 |
+ fi |
484 |
+ |
485 |
+ local myconf=() http_enabled= mail_enabled= stream_enabled= |
486 |
+ |
487 |
+ use aio && myconf+=( --with-file-aio ) |
488 |
+ use debug && myconf+=( --with-debug ) |
489 |
+ use http2 && myconf+=( --with-http_v2_module ) |
490 |
+ use libatomic && myconf+=( --with-libatomic ) |
491 |
+ use pcre && myconf+=( --with-pcre ) |
492 |
+ use pcre-jit && myconf+=( --with-pcre-jit ) |
493 |
+ use threads && myconf+=( --with-threads ) |
494 |
+ |
495 |
+ # HTTP modules |
496 |
+ for mod in $NGINX_MODULES_STD; do |
497 |
+ if use nginx_modules_http_${mod}; then |
498 |
+ http_enabled=1 |
499 |
+ else |
500 |
+ myconf+=( --without-http_${mod}_module ) |
501 |
+ fi |
502 |
+ done |
503 |
+ |
504 |
+ for mod in $NGINX_MODULES_OPT; do |
505 |
+ if use nginx_modules_http_${mod}; then |
506 |
+ http_enabled=1 |
507 |
+ myconf+=( --with-http_${mod}_module ) |
508 |
+ fi |
509 |
+ done |
510 |
+ |
511 |
+ if use nginx_modules_http_fastcgi; then |
512 |
+ myconf+=( --with-http_realip_module ) |
513 |
+ fi |
514 |
+ |
515 |
+ # third-party modules |
516 |
+ if use nginx_modules_http_upload_progress; then |
517 |
+ http_enabled=1 |
518 |
+ myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} ) |
519 |
+ fi |
520 |
+ |
521 |
+ if use nginx_modules_http_headers_more; then |
522 |
+ http_enabled=1 |
523 |
+ myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} ) |
524 |
+ fi |
525 |
+ |
526 |
+ if use nginx_modules_http_cache_purge; then |
527 |
+ http_enabled=1 |
528 |
+ myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} ) |
529 |
+ fi |
530 |
+ |
531 |
+ if use nginx_modules_http_slowfs_cache; then |
532 |
+ http_enabled=1 |
533 |
+ myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} ) |
534 |
+ fi |
535 |
+ |
536 |
+ if use nginx_modules_http_fancyindex; then |
537 |
+ http_enabled=1 |
538 |
+ myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} ) |
539 |
+ fi |
540 |
+ |
541 |
+ if use nginx_modules_http_lua; then |
542 |
+ http_enabled=1 |
543 |
+ if use luajit; then |
544 |
+ export LUAJIT_LIB=$(pkg-config --variable libdir luajit) |
545 |
+ export LUAJIT_INC=$(pkg-config --variable includedir luajit) |
546 |
+ else |
547 |
+ export LUA_LIB=$(pkg-config --variable libdir lua) |
548 |
+ export LUA_INC=$(pkg-config --variable includedir lua) |
549 |
+ fi |
550 |
+ myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} ) |
551 |
+ myconf+=( --add-module=${HTTP_LUA_MODULE_WD} ) |
552 |
+ fi |
553 |
+ |
554 |
+ if use nginx_modules_http_auth_pam; then |
555 |
+ http_enabled=1 |
556 |
+ myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} ) |
557 |
+ fi |
558 |
+ |
559 |
+ if use nginx_modules_http_upstream_check; then |
560 |
+ http_enabled=1 |
561 |
+ myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} ) |
562 |
+ fi |
563 |
+ |
564 |
+ if use nginx_modules_http_metrics; then |
565 |
+ http_enabled=1 |
566 |
+ myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} ) |
567 |
+ fi |
568 |
+ |
569 |
+ if use nginx_modules_http_naxsi ; then |
570 |
+ http_enabled=1 |
571 |
+ myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} ) |
572 |
+ fi |
573 |
+ |
574 |
+ if use rtmp ; then |
575 |
+ http_enabled=1 |
576 |
+ myconf+=( --add-module=${RTMP_MODULE_WD} ) |
577 |
+ fi |
578 |
+ |
579 |
+ if use nginx_modules_http_dav_ext ; then |
580 |
+ http_enabled=1 |
581 |
+ myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} ) |
582 |
+ fi |
583 |
+ |
584 |
+ if use nginx_modules_http_echo ; then |
585 |
+ http_enabled=1 |
586 |
+ myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} ) |
587 |
+ fi |
588 |
+ |
589 |
+ if use nginx_modules_http_security ; then |
590 |
+ http_enabled=1 |
591 |
+ myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity ) |
592 |
+ fi |
593 |
+ |
594 |
+ if use nginx_modules_http_push_stream ; then |
595 |
+ http_enabled=1 |
596 |
+ myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) |
597 |
+ fi |
598 |
+ |
599 |
+ if use nginx_modules_http_sticky ; then |
600 |
+ http_enabled=1 |
601 |
+ myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) |
602 |
+ fi |
603 |
+ |
604 |
+ if use nginx_modules_http_mogilefs ; then |
605 |
+ http_enabled=1 |
606 |
+ myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) |
607 |
+ fi |
608 |
+ |
609 |
+ if use nginx_modules_http_memc ; then |
610 |
+ http_enabled=1 |
611 |
+ myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) |
612 |
+ fi |
613 |
+ |
614 |
+ if use nginx_modules_http_auth_ldap; then |
615 |
+ http_enabled=1 |
616 |
+ myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) |
617 |
+ fi |
618 |
+ |
619 |
+ if use nginx_modules_http_vhost_traffic_status; then |
620 |
+ http_enabled=1 |
621 |
+ myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) |
622 |
+ fi |
623 |
+ |
624 |
+ if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then |
625 |
+ myconf+=( --add-module=${GEOIP2_MODULE_WD} ) |
626 |
+ fi |
627 |
+ |
628 |
+ if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then |
629 |
+ myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) |
630 |
+ fi |
631 |
+ |
632 |
+ if use nginx_modules_http_brotli; then |
633 |
+ http_enabled=1 |
634 |
+ myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) |
635 |
+ fi |
636 |
+ |
637 |
+ if use http || use http-cache || use http2 || use nginx_modules_http_javascript; then |
638 |
+ http_enabled=1 |
639 |
+ fi |
640 |
+ |
641 |
+ if [ $http_enabled ]; then |
642 |
+ use http-cache || myconf+=( --without-http-cache ) |
643 |
+ use ssl && myconf+=( --with-http_ssl_module ) |
644 |
+ else |
645 |
+ myconf+=( --without-http --without-http-cache ) |
646 |
+ fi |
647 |
+ |
648 |
+ # Stream modules |
649 |
+ for mod in $NGINX_MODULES_STREAM_STD; do |
650 |
+ if use nginx_modules_stream_${mod}; then |
651 |
+ stream_enabled=1 |
652 |
+ else |
653 |
+ myconf+=( --without-stream_${mod}_module ) |
654 |
+ fi |
655 |
+ done |
656 |
+ |
657 |
+ for mod in $NGINX_MODULES_STREAM_OPT; do |
658 |
+ if use nginx_modules_stream_${mod}; then |
659 |
+ stream_enabled=1 |
660 |
+ myconf+=( --with-stream_${mod}_module ) |
661 |
+ fi |
662 |
+ done |
663 |
+ |
664 |
+ if use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then |
665 |
+ stream_enabled=1 |
666 |
+ fi |
667 |
+ |
668 |
+ if [ $stream_enabled ]; then |
669 |
+ myconf+=( --with-stream ) |
670 |
+ use ssl && myconf+=( --with-stream_ssl_module ) |
671 |
+ fi |
672 |
+ |
673 |
+ # MAIL modules |
674 |
+ for mod in $NGINX_MODULES_MAIL; do |
675 |
+ if use nginx_modules_mail_${mod}; then |
676 |
+ mail_enabled=1 |
677 |
+ else |
678 |
+ myconf+=( --without-mail_${mod}_module ) |
679 |
+ fi |
680 |
+ done |
681 |
+ |
682 |
+ if [ $mail_enabled ]; then |
683 |
+ myconf+=( --with-mail ) |
684 |
+ use ssl && myconf+=( --with-mail_ssl_module ) |
685 |
+ fi |
686 |
+ |
687 |
+ # custom modules |
688 |
+ for mod in $NGINX_ADD_MODULES; do |
689 |
+ myconf+=( --add-module=${mod} ) |
690 |
+ done |
691 |
+ |
692 |
+ # https://bugs.gentoo.org/286772 |
693 |
+ export LANG=C LC_ALL=C |
694 |
+ tc-export CC |
695 |
+ |
696 |
+ if ! use prefix; then |
697 |
+ myconf+=( --user=${PN} ) |
698 |
+ myconf+=( --group=${PN} ) |
699 |
+ fi |
700 |
+ |
701 |
+ local WITHOUT_IPV6= |
702 |
+ if ! use ipv6; then |
703 |
+ WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" |
704 |
+ fi |
705 |
+ |
706 |
+ if [[ -n "${EXTRA_ECONF}" ]]; then |
707 |
+ myconf+=( ${EXTRA_ECONF} ) |
708 |
+ ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" |
709 |
+ fi |
710 |
+ |
711 |
+ ./configure \ |
712 |
+ --prefix="${EPREFIX}"/usr \ |
713 |
+ --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ |
714 |
+ --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ |
715 |
+ --pid-path="${EPREFIX}"/run/${PN}.pid \ |
716 |
+ --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ |
717 |
+ --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \ |
718 |
+ --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ |
719 |
+ --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ |
720 |
+ --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ |
721 |
+ --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ |
722 |
+ --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ |
723 |
+ --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ |
724 |
+ --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ |
725 |
+ --with-compat \ |
726 |
+ "${myconf[@]}" || die "configure failed" |
727 |
+ |
728 |
+ # A purely cosmetic change that makes nginx -V more readable. This can be |
729 |
+ # good if people outside the gentoo community would troubleshoot and |
730 |
+ # question the users setup. |
731 |
+ sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die |
732 |
+} |
733 |
+ |
734 |
+src_compile() { |
735 |
+ use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" |
736 |
+ |
737 |
+ # https://bugs.gentoo.org/286772 |
738 |
+ export LANG=C LC_ALL=C |
739 |
+ emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" |
740 |
+} |
741 |
+ |
742 |
+src_install() { |
743 |
+ emake DESTDIR="${D%/}" install |
744 |
+ |
745 |
+ cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die |
746 |
+ |
747 |
+ newinitd "${FILESDIR}"/nginx.initd-r4 nginx |
748 |
+ newconfd "${FILESDIR}"/nginx.confd nginx |
749 |
+ |
750 |
+ systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service |
751 |
+ |
752 |
+ doman man/nginx.8 |
753 |
+ dodoc CHANGES* README |
754 |
+ |
755 |
+ # just keepdir. do not copy the default htdocs files (bug #449136) |
756 |
+ keepdir /var/www/localhost |
757 |
+ rm -rf "${D}"usr/html || die |
758 |
+ |
759 |
+ # set up a list of directories to keep |
760 |
+ local keepdir_list="${NGINX_HOME_TMP}"/client |
761 |
+ local module |
762 |
+ for module in proxy fastcgi scgi uwsgi; do |
763 |
+ use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}" |
764 |
+ done |
765 |
+ |
766 |
+ keepdir /var/log/nginx ${keepdir_list} |
767 |
+ |
768 |
+ # this solves a problem with SELinux where nginx doesn't see the directories |
769 |
+ # as root and tries to create them as nginx |
770 |
+ fperms 0750 "${NGINX_HOME_TMP}" |
771 |
+ fowners ${PN}:0 "${NGINX_HOME_TMP}" |
772 |
+ |
773 |
+ fperms 0700 ${keepdir_list} |
774 |
+ fowners ${PN}:${PN} ${keepdir_list} |
775 |
+ |
776 |
+ fperms 0710 /var/log/nginx |
777 |
+ fowners 0:${PN} /var/log/nginx |
778 |
+ |
779 |
+ # logrotate |
780 |
+ insinto /etc/logrotate.d |
781 |
+ newins "${FILESDIR}"/nginx.logrotate-r1 nginx |
782 |
+ |
783 |
+ if use nginx_modules_http_perl; then |
784 |
+ cd "${S}"/objs/src/http/modules/perl/ || die |
785 |
+ emake DESTDIR="${D}" INSTALLDIRS=vendor |
786 |
+ perl_delete_localpod |
787 |
+ cd "${S}" || die |
788 |
+ fi |
789 |
+ |
790 |
+ if use nginx_modules_http_cache_purge; then |
791 |
+ docinto ${HTTP_CACHE_PURGE_MODULE_P} |
792 |
+ dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} |
793 |
+ fi |
794 |
+ |
795 |
+ if use nginx_modules_http_slowfs_cache; then |
796 |
+ docinto ${HTTP_SLOWFS_CACHE_MODULE_P} |
797 |
+ dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} |
798 |
+ fi |
799 |
+ |
800 |
+ if use nginx_modules_http_fancyindex; then |
801 |
+ docinto ${HTTP_FANCYINDEX_MODULE_P} |
802 |
+ dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst |
803 |
+ fi |
804 |
+ |
805 |
+ if use nginx_modules_http_lua; then |
806 |
+ docinto ${HTTP_LUA_MODULE_P} |
807 |
+ dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown |
808 |
+ fi |
809 |
+ |
810 |
+ if use nginx_modules_http_auth_pam; then |
811 |
+ docinto ${HTTP_AUTH_PAM_MODULE_P} |
812 |
+ dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} |
813 |
+ fi |
814 |
+ |
815 |
+ if use nginx_modules_http_upstream_check; then |
816 |
+ docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} |
817 |
+ dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} |
818 |
+ fi |
819 |
+ |
820 |
+ if use nginx_modules_http_naxsi; then |
821 |
+ insinto /etc/nginx |
822 |
+ doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules |
823 |
+ fi |
824 |
+ |
825 |
+ if use rtmp; then |
826 |
+ docinto ${RTMP_MODULE_P} |
827 |
+ dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} |
828 |
+ fi |
829 |
+ |
830 |
+ if use nginx_modules_http_dav_ext; then |
831 |
+ docinto ${HTTP_DAV_EXT_MODULE_P} |
832 |
+ dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst |
833 |
+ fi |
834 |
+ |
835 |
+ if use nginx_modules_http_echo; then |
836 |
+ docinto ${HTTP_ECHO_MODULE_P} |
837 |
+ dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown |
838 |
+ fi |
839 |
+ |
840 |
+ if use nginx_modules_http_security; then |
841 |
+ docinto ${HTTP_SECURITY_MODULE_P} |
842 |
+ dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt} |
843 |
+ fi |
844 |
+ |
845 |
+ if use nginx_modules_http_push_stream; then |
846 |
+ docinto ${HTTP_PUSH_STREAM_MODULE_P} |
847 |
+ dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile} |
848 |
+ fi |
849 |
+ |
850 |
+ if use nginx_modules_http_sticky; then |
851 |
+ docinto ${HTTP_STICKY_MODULE_P} |
852 |
+ dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf} |
853 |
+ fi |
854 |
+ |
855 |
+ if use nginx_modules_http_memc; then |
856 |
+ docinto ${HTTP_MEMC_MODULE_P} |
857 |
+ dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown |
858 |
+ fi |
859 |
+ |
860 |
+ if use nginx_modules_http_auth_ldap; then |
861 |
+ docinto ${HTTP_LDAP_MODULE_P} |
862 |
+ dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf |
863 |
+ fi |
864 |
+} |
865 |
+ |
866 |
+pkg_postinst() { |
867 |
+ if use ssl; then |
868 |
+ if [[ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]]; then |
869 |
+ install_cert /etc/ssl/${PN}/${PN} |
870 |
+ use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem} |
871 |
+ fi |
872 |
+ fi |
873 |
+ |
874 |
+ if use nginx_modules_http_spdy; then |
875 |
+ ewarn "" |
876 |
+ ewarn "In nginx 1.9.5 the spdy module was superseded by http2." |
877 |
+ ewarn "Update your configs and package.use accordingly." |
878 |
+ fi |
879 |
+ |
880 |
+ if use nginx_modules_http_lua; then |
881 |
+ ewarn "" |
882 |
+ ewarn "While you can build lua 3rd party module against ${P}" |
883 |
+ ewarn "the author warns that >=${PN}-1.11.11 is still not an" |
884 |
+ ewarn "officially supported target yet. You are on your own." |
885 |
+ ewarn "Expect runtime failures, memory leaks and other problems!" |
886 |
+ fi |
887 |
+ |
888 |
+ if use nginx_modules_http_lua && use http2; then |
889 |
+ ewarn "" |
890 |
+ ewarn "Lua 3rd party module author warns against using ${P} with" |
891 |
+ ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see https://git.io/OldLsg" |
892 |
+ fi |
893 |
+ |
894 |
+ local _n_permission_layout_checks=0 |
895 |
+ local _has_to_adjust_permissions=0 |
896 |
+ local _has_to_show_permission_warning=0 |
897 |
+ |
898 |
+ # Defaults to 1 to inform people doing a fresh installation |
899 |
+ # that we ship modified {scgi,uwsgi,fastcgi}_params files |
900 |
+ local _has_to_show_httpoxy_mitigation_notice=1 |
901 |
+ |
902 |
+ local _replacing_version= |
903 |
+ for _replacing_version in ${REPLACING_VERSIONS}; do |
904 |
+ _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) |
905 |
+ |
906 |
+ if [[ ${_n_permission_layout_checks} -gt 1 ]]; then |
907 |
+ # Should never happen: |
908 |
+ # Package is abusing slots but doesn't allow multiple parallel installations. |
909 |
+ # If we run into this situation it is unsafe to automatically adjust any |
910 |
+ # permission... |
911 |
+ _has_to_show_permission_warning=1 |
912 |
+ |
913 |
+ ewarn "Replacing multiple ${PN}' versions is unsupported! " \ |
914 |
+ "You will have to adjust permissions on your own." |
915 |
+ |
916 |
+ break |
917 |
+ fi |
918 |
+ |
919 |
+ local _replacing_version_branch=$(get_version_component_range 1-2 "${_replacing_version}") |
920 |
+ debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." |
921 |
+ |
922 |
+ # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? |
923 |
+ # This was before we introduced multiple nginx versions so we |
924 |
+ # do not need to distinguish between stable and mainline |
925 |
+ local _need_to_fix_CVE2013_0337=1 |
926 |
+ |
927 |
+ if version_is_at_least "1.4.1-r2" "${_replacing_version}"; then |
928 |
+ # We are updating an installation which should already be fixed |
929 |
+ _need_to_fix_CVE2013_0337=0 |
930 |
+ debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" |
931 |
+ else |
932 |
+ _has_to_adjust_permissions=1 |
933 |
+ debug-print "Need to adjust permissions to fix CVE-2013-0337!" |
934 |
+ fi |
935 |
+ |
936 |
+ # Do we need to inform about HTTPoxy mitigation? |
937 |
+ # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f |
938 |
+ if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then |
939 |
+ # Updating from <1.10 |
940 |
+ _has_to_show_httpoxy_mitigation_notice=1 |
941 |
+ debug-print "Need to inform about HTTPoxy mitigation!" |
942 |
+ else |
943 |
+ # Updating from >=1.10 |
944 |
+ local _fixed_in_pvr= |
945 |
+ case "${_replacing_version_branch}" in |
946 |
+ "1.10") |
947 |
+ _fixed_in_pvr="1.10.1-r2" |
948 |
+ ;; |
949 |
+ "1.11") |
950 |
+ _fixed_in_pvr="1.11.3-r1" |
951 |
+ ;; |
952 |
+ *) |
953 |
+ # This should be any future branch. |
954 |
+ # If we run this code it is safe to assume that the user has |
955 |
+ # already seen the HTTPoxy mitigation notice because he/she is doing |
956 |
+ # an update from previous version where we have already shown |
957 |
+ # the warning. Otherwise, we wouldn't hit this code path ... |
958 |
+ _fixed_in_pvr= |
959 |
+ esac |
960 |
+ |
961 |
+ if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then |
962 |
+ # We are updating an installation where we already informed |
963 |
+ # that we are mitigating HTTPoxy per default |
964 |
+ _has_to_show_httpoxy_mitigation_notice=0 |
965 |
+ debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" |
966 |
+ else |
967 |
+ _has_to_show_httpoxy_mitigation_notice=1 |
968 |
+ debug-print "Need to inform about HTTPoxy mitigation!" |
969 |
+ fi |
970 |
+ fi |
971 |
+ |
972 |
+ # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? |
973 |
+ # All branches up to 1.11 are affected |
974 |
+ local _need_to_fix_CVE2016_1247=1 |
975 |
+ |
976 |
+ if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then |
977 |
+ # Updating from <1.10 |
978 |
+ _has_to_adjust_permissions=1 |
979 |
+ debug-print "Need to adjust permissions to fix CVE-2016-1247!" |
980 |
+ else |
981 |
+ # Updating from >=1.10 |
982 |
+ local _fixed_in_pvr= |
983 |
+ case "${_replacing_version_branch}" in |
984 |
+ "1.10") |
985 |
+ _fixed_in_pvr="1.10.2-r3" |
986 |
+ ;; |
987 |
+ "1.11") |
988 |
+ _fixed_in_pvr="1.11.6-r1" |
989 |
+ ;; |
990 |
+ *) |
991 |
+ # This should be any future branch. |
992 |
+ # If we run this code it is safe to assume that we have already |
993 |
+ # adjusted permissions or were never affected because user is |
994 |
+ # doing an update from previous version which was safe or did |
995 |
+ # the adjustments. Otherwise, we wouldn't hit this code path ... |
996 |
+ _fixed_in_pvr= |
997 |
+ esac |
998 |
+ |
999 |
+ if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then |
1000 |
+ # We are updating an installation which should already be adjusted |
1001 |
+ # or which was never affected |
1002 |
+ _need_to_fix_CVE2016_1247=0 |
1003 |
+ debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" |
1004 |
+ else |
1005 |
+ _has_to_adjust_permissions=1 |
1006 |
+ debug-print "Need to adjust permissions to fix CVE-2016-1247!" |
1007 |
+ fi |
1008 |
+ fi |
1009 |
+ done |
1010 |
+ |
1011 |
+ if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then |
1012 |
+ # We do not DIE when chmod/chown commands are failing because |
1013 |
+ # package is already merged on user's system at this stage |
1014 |
+ # and we cannot retry without losing the information that |
1015 |
+ # the existing installation needs to adjust permissions. |
1016 |
+ # Instead we are going to a show a big warning ... |
1017 |
+ |
1018 |
+ if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then |
1019 |
+ ewarn "" |
1020 |
+ ewarn "The world-readable bit (if set) has been removed from the" |
1021 |
+ ewarn "following directories to mitigate a security bug" |
1022 |
+ ewarn "(CVE-2013-0337, bug #458726):" |
1023 |
+ ewarn "" |
1024 |
+ ewarn " ${EPREFIX%/}/var/log/nginx" |
1025 |
+ ewarn " ${EPREFIX%/}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" |
1026 |
+ ewarn "" |
1027 |
+ ewarn "Check if this is correct for your setup before restarting nginx!" |
1028 |
+ ewarn "This is a one-time change and will not happen on subsequent updates." |
1029 |
+ ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX%/}${NGINX_HOME_TMP}'" |
1030 |
+ chmod o-rwx \ |
1031 |
+ "${EPREFIX%/}"/var/log/nginx \ |
1032 |
+ "${EPREFIX%/}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ |
1033 |
+ _has_to_show_permission_warning=1 |
1034 |
+ fi |
1035 |
+ |
1036 |
+ if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then |
1037 |
+ ewarn "" |
1038 |
+ ewarn "The permissions on the following directory have been reset in" |
1039 |
+ ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" |
1040 |
+ ewarn "" |
1041 |
+ ewarn " ${EPREFIX%/}/var/log/nginx" |
1042 |
+ ewarn "" |
1043 |
+ ewarn "Check if this is correct for your setup before restarting nginx!" |
1044 |
+ ewarn "Also ensure that no other log directory used by any of your" |
1045 |
+ ewarn "vhost(s) is not writeable for nginx user. Any of your log files" |
1046 |
+ ewarn "used by nginx can be abused to escalate privileges!" |
1047 |
+ ewarn "This is a one-time change and will not happen on subsequent updates." |
1048 |
+ chown 0:nginx "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 |
1049 |
+ chmod 710 "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 |
1050 |
+ fi |
1051 |
+ |
1052 |
+ if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then |
1053 |
+ # Should never happen ... |
1054 |
+ ewarn "" |
1055 |
+ ewarn "*************************************************************" |
1056 |
+ ewarn "*************** W A R N I N G ***************" |
1057 |
+ ewarn "*************************************************************" |
1058 |
+ ewarn "The one-time only attempt to adjust permissions of the" |
1059 |
+ ewarn "existing nginx installation failed. Be aware that we will not" |
1060 |
+ ewarn "try to adjust the same permissions again because now you are" |
1061 |
+ ewarn "using a nginx version where we expect that the permissions" |
1062 |
+ ewarn "are already adjusted or that you know what you are doing and" |
1063 |
+ ewarn "want to keep custom permissions." |
1064 |
+ ewarn "" |
1065 |
+ fi |
1066 |
+ fi |
1067 |
+ |
1068 |
+ # Sanity check for CVE-2016-1247 |
1069 |
+ # Required to warn users who received the warning above and thought |
1070 |
+ # they could fix it by unmerging and re-merging the package or have |
1071 |
+ # unmerged a affected installation on purpose in the past leaving |
1072 |
+ # /var/log/nginx on their system due to keepdir/non-empty folder |
1073 |
+ # and are now installing the package again. |
1074 |
+ local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX%/}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) |
1075 |
+ su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null |
1076 |
+ if [ $? -eq 0 ] ; then |
1077 |
+ # Cleanup -- no reason to die here! |
1078 |
+ rm -f "${_sanity_check_testfile}" |
1079 |
+ |
1080 |
+ ewarn "" |
1081 |
+ ewarn "*************************************************************" |
1082 |
+ ewarn "*************** W A R N I N G ***************" |
1083 |
+ ewarn "*************************************************************" |
1084 |
+ ewarn "Looks like your installation is vulnerable to CVE-2016-1247" |
1085 |
+ ewarn "(bug #605008) because nginx user is able to create files in" |
1086 |
+ ewarn "" |
1087 |
+ ewarn " ${EPREFIX%/}/var/log/nginx" |
1088 |
+ ewarn "" |
1089 |
+ ewarn "Also ensure that no other log directory used by any of your" |
1090 |
+ ewarn "vhost(s) is not writeable for nginx user. Any of your log files" |
1091 |
+ ewarn "used by nginx can be abused to escalate privileges!" |
1092 |
+ fi |
1093 |
+ |
1094 |
+ if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then |
1095 |
+ # HTTPoxy mitigation |
1096 |
+ ewarn "" |
1097 |
+ ewarn "This nginx installation comes with a mitigation for the HTTPoxy" |
1098 |
+ ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" |
1099 |
+ ewarn "the HTTP_PROXY parameter to an empty string per default when you" |
1100 |
+ ewarn "are sourcing one of the default" |
1101 |
+ ewarn "" |
1102 |
+ ewarn " - 'fastcgi_params' or 'fastcgi.conf'" |
1103 |
+ ewarn " - 'scgi_params'" |
1104 |
+ ewarn " - 'uwsgi_params'" |
1105 |
+ ewarn "" |
1106 |
+ ewarn "files in your server block(s)." |
1107 |
+ ewarn "" |
1108 |
+ ewarn "If this is causing any problems for you make sure that you are sourcing the" |
1109 |
+ ewarn "default parameters _before_ you set your own values." |
1110 |
+ ewarn "If you are relying on user-supplied proxy values you have to remove the" |
1111 |
+ ewarn "correlating lines from the file(s) mentioned above." |
1112 |
+ ewarn "" |
1113 |
+ fi |
1114 |
+} |