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