Gentoo Archives: gentoo-commits

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