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