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