Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx/files/, www-servers/nginx/
Date: Wed, 12 Oct 2016 19:48:30
Message-Id: 1476301688.d2b1f12c9d19386a8c4e14a5940661b06bb126da.whissi@gentoo
1 commit: d2b1f12c9d19386a8c4e14a5940661b06bb126da
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 12 19:47:33 2016 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 12 19:48:08 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2b1f12c
7
8 www-servers/nginx: Drop old
9
10 Package-Manager: portage-2.3.2
11
12 www-servers/nginx/Manifest | 2 -
13 ....11.3-fix-build-without-stream_ssl_module.patch | 30 -
14 www-servers/nginx/nginx-1.10.1-r2.ebuild | 768 --------------------
15 www-servers/nginx/nginx-1.11.3-r1.ebuild | 782 ---------------------
16 www-servers/nginx/nginx-1.11.3-r2.ebuild | 782 ---------------------
17 5 files changed, 2364 deletions(-)
18
19 diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
20 index 6053301..af7423c 100644
21 --- a/www-servers/nginx/Manifest
22 +++ b/www-servers/nginx/Manifest
23 @@ -1,6 +1,5 @@
24 DIST modsecurity-2.9.1.tar.gz 4261212 SHA256 958cc5a7a7430f93fac0fd6f8b9aa92fc1801efce0cda797d6029d44080a9b24 SHA512 374733cbfc26e53d95b78c8f268a4e465d838163e9893fc24e33a9d272b114f1b287147bab6d0289575074cbbd94f48983e23fa59832cbcb32950046cea59269 WHIRLPOOL 5f41bebf032f8a269412d104b7632a06af4d4c495658c9cd1ebf69b82c10ce1bbcb34b9dd159a7b00e57348714a5e93ad3db19701dda51479accd3a9dc79a9cb
25 DIST nginx-1.10.1.tar.gz 909077 SHA256 1fd35846566485e03c0e318989561c135c598323ff349c503a6c14826487a801 SHA512 fa1329d40e83340380332dd5e2ed66f08dd59cc7f7582dd0e0193c493353ba550e80dc80e5165c225d70532d4197abc49cc8c760e8ab72e48f630cb57c2803e1 WHIRLPOOL 6942f70c3279a28bd8d664d085dee68bf0d0526c8dcb636f3258c9de598268efc984af72e527efd86889bd13911b38b0bdb2de1e92eef69cabd02f7080f64eb6
26 -DIST nginx-1.11.3.tar.gz 938045 SHA256 4a667f40f9f3917069db1dea1f2d5baa612f1fa19378aadf71502e846a424610 SHA512 b983aca61335facf5778675b80fc28341ec9cfee2190319ed130b9c5d5ceff8133677f4609ecafd5a782daa5962e41bb6cb6a857380bbbe9cee67cd0ab2026d4 WHIRLPOOL f197bc4f5e1ed234b26d625db5bf665a24c09da316e3cae3c0f394f0b4db116acad5db15add7fd92b5fe1428f95449538584f57272f8bad89b912fb38fbb2c7d
27 DIST nginx-1.11.4.tar.gz 949793 SHA256 06221c1f43f643bc6bfe5b2c26d19e09f2588d5cde6c65bdb77dfcce7c026b3b SHA512 c6a03c440a274576434aa74932b3fa7cd49174d9e2d8c6e480838637f33f158e31b6f25cac97e158f386bb92f62ff9636c2d3ac1a552e27a860eb9448e2f3f94 WHIRLPOOL 53c371cb34bc55f28d0a0915e08a4fdeffcfcbc8571628db086e0a75627c926693f2faba8608f0c444bc79df244b7f321e6017eda0eb7710d2ccb6f25aac8b75
28 DIST nginx-1.11.5.tar.gz 956517 SHA256 223f8a2345a75f891098cf26ccdf208b293350388f51ce69083674c9432db6f6 SHA512 f41b21b5d8c6b7fe7f8713e96fb6b1c40da49bf64ebb790fb5aa38f036a37b36fcf048ff72c2216552b2f75366b30c5fcdef26312bd4e5515b2476a1cd944b8c WHIRLPOOL fba49ae277ec2114b06eb0fdce87161ac7bd3e0ca90387dc58caf327c5f12056be07eeba677ff37c59e7d759054ec276ce4db647250774c57588619a1803592c
29 DIST nginx-auth-ldap-49a8b4d28fc4a518563c82e0b52821e5f37db1fc.tar.gz 17159 SHA256 3c11c32f05da04f1a4647dc4e35dd8d8aeacd5a2e763ba349feba3dba8663132 SHA512 323abd0ca8e90f5afcaf81a8ff1a8abe3dfcbff3d69f0dd4a1c005fe6436acbf3076c4c57a4df877b3d8e388cbea085d46301bb2df9c0752e2567817ff7cca92 WHIRLPOOL ad65e8182b2634db5fa06055ef7d91c7d8aabd0fa986d8402a4845977354d6edb329621b6f9f96c90ce2d158cff20e42ae50fba06a088a84de3e3f414205dbc2
30 @@ -32,5 +31,4 @@ DIST ngx_metrics-0.1.1.tar.gz 2964 SHA256 1c62ebb31e3caafad91720962770b0e7a4287f
31 DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 SHA256 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 WHIRLPOOL 64c9b11ad938e6dbe5ba31298f1cd46f6e6bb4ba039c96b1e43bd85919d1606326f74b677f789ecabe0b0f4e0f08ac5aaf8148bf820de65aaa1e9966a28b9f61
32 DIST ngx_rtmp-1.1.10.tar.gz 519877 SHA256 f9491dd24390b0d5d70dfe3553edf3d14efeb7c7a81b4d4a20c5cfeaefc1141c SHA512 bcc0aee3308af7c61bf01a5530fcf1dae938e6778306f6e3eb5995e6d0529f43d33b7ee2acb813d5a39acc92e4853d207a01e8e41b766a6e0dd07aade60cd98f WHIRLPOOL 655f4dcb02f928698ae14d29e5b7f60ad3fd71c757d67f1930c695a3501054d124a92f7ada7d4e605204f1e73e0779cad0b60102bc98d64764535581db0b1867
33 DIST ngx_rtmp-1.1.7.tar.gz 519735 SHA256 7922b0e3d5f3d9c4b275e4908cfb8f5fb1bfb3ac2df77f4c262cda56df21aab3 SHA512 9883462a04683f1e7af175da04b86d259ff6d677864667588fb073143f7130969eb2a5a5a48ddceda7a555b908580f179bdcacb7f0111413d51db5bfe43b396e WHIRLPOOL e9c1fc9c3c965ae7047657f76e0997d5da107aff7dd9e5cf3ddb5a2d8f388efd8439b82923e199dc36def449567b8529e06c80f69c36f42128236ac0be5719d5
34 -DIST ngx_rtmp-1.1.8.tar.gz 519647 SHA256 de5866111a5b18c9dfb1c10f3a0e84b56af77f7005a41807368f7769b8a50965 SHA512 554249b1b8bb70952a0585dcc5c55c70daa63f2eba5ef35f8b1a4932fdfd6c95b0a48739857ba8dcab08ff1e91d048f3dc43bf65250890fd7a679cdabfed880a WHIRLPOOL a8cd4361419fbae97f199d788078c62ffc442158d0338aa677e5d6d21fb27a336da85e901ee6463ff6b33201092575237d5b6f20a1d80d924ac6591cbb75c9d7
35 DIST ngx_rtmp-1.1.9.tar.gz 519807 SHA256 46d914e3ba1f4c2353c1ef01a7423305255cb78226c84fac419586f849b7ea55 SHA512 888c268eb0371649e9bf971462e20472f819946f49ef5e50af97d0590a03df6d37c1fa8016eb7ea81faa0c212c429618d399102f513b029c66226d48e444f70c WHIRLPOOL 94fc496b059549a56338cd51e0bbf9a3b11b10640e1ef83e1e7cdb2845dfecde012e0951003665e02bff4ef45870b78e399d4194997cb082647dbcd638cc9716
36
37 diff --git a/www-servers/nginx/files/nginx-1.11.3-fix-build-without-stream_ssl_module.patch b/www-servers/nginx/files/nginx-1.11.3-fix-build-without-stream_ssl_module.patch
38 deleted file mode 100644
39 index 6163730..00000000
40 --- a/www-servers/nginx/files/nginx-1.11.3-fix-build-without-stream_ssl_module.patch
41 +++ /dev/null
42 @@ -1,30 +0,0 @@
43 -
44 -# HG changeset patch
45 -# User Vladimir Homutov <vl@×××××.com>
46 -# Date 1469550852 -10800
47 -# Node ID d43ee392e825186545d81e683b88cc58ef8479bc
48 -# Parent 0b4249f975eba48c17b69c5e225fd12b470c0184
49 -Stream: fixed build without stream_ssl_module (ticket #1032).
50 -
51 -diff -r 0b4249f975eb -r d43ee392e825 src/stream/ngx_stream_proxy_module.c
52 ---- a/src/stream/ngx_stream_proxy_module.c Tue Jul 26 19:07:18 2016 +0300
53 -+++ b/src/stream/ngx_stream_proxy_module.c Tue Jul 26 19:34:12 2016 +0300
54 -@@ -538,7 +538,7 @@
55 - return;
56 - }
57 -
58 --#if (NGX_HTTP_SSL)
59 -+#if (NGX_STREAM_SSL)
60 - u->ssl_name = uscf->host;
61 - #endif
62 -
63 -@@ -1157,7 +1157,7 @@
64 - u = s->upstream;
65 - ur = u->resolved;
66 -
67 -- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, s->connection->log, 0,
68 -+ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
69 - "stream upstream resolve");
70 -
71 - if (ctx->state) {
72 -
73
74 diff --git a/www-servers/nginx/nginx-1.10.1-r2.ebuild b/www-servers/nginx/nginx-1.10.1-r2.ebuild
75 deleted file mode 100644
76 index a320bc8..00000000
77 --- a/www-servers/nginx/nginx-1.10.1-r2.ebuild
78 +++ /dev/null
79 @@ -1,768 +0,0 @@
80 -# Copyright 1999-2016 Gentoo Foundation
81 -# Distributed under the terms of the GNU General Public License v2
82 -# $Id$
83 -
84 -EAPI=6
85 -
86 -# Maintainer notes:
87 -# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
88 -# - any http-module activates the main http-functionality and overrides USE=-http
89 -# - keep the following requirements in mind before adding external modules:
90 -# * alive upstream
91 -# * sane packaging
92 -# * builds cleanly
93 -# * does not need a patch for nginx core
94 -# - TODO: test the google-perftools module (included in vanilla tarball)
95 -
96 -# prevent perl-module from adding automagic perl DEPENDs
97 -GENTOO_DEPEND_ON_PERL="no"
98 -
99 -# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
100 -DEVEL_KIT_MODULE_PV="0.3.0"
101 -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
102 -DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
103 -DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
104 -
105 -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
106 -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1"
107 -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
108 -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
109 -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
110 -
111 -# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license)
112 -HTTP_HEADERS_MORE_MODULE_PV="0.30"
113 -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
114 -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
115 -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
116 -
117 -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
118 -HTTP_CACHE_PURGE_MODULE_PV="2.3"
119 -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
120 -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
121 -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
122 -
123 -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
124 -HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
125 -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
126 -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
127 -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
128 -
129 -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
130 -HTTP_FANCYINDEX_MODULE_PV="0.4.0"
131 -HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
132 -HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
133 -HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
134 -
135 -# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
136 -HTTP_LUA_MODULE_PV="0.10.5"
137 -HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
138 -HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
139 -HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
140 -
141 -# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
142 -HTTP_AUTH_PAM_MODULE_PV="1.5.1"
143 -HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
144 -HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
145 -HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
146 -
147 -# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
148 -HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0-10-g10782ea"
149 -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
150 -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
151 -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-10782eaff51872a8f44e65eed89bbe286004bcb1"
152 -
153 -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
154 -HTTP_METRICS_MODULE_PV="0.1.1"
155 -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
156 -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
157 -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
158 -
159 -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
160 -HTTP_NAXSI_MODULE_PV="0.54"
161 -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
162 -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
163 -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
164 -
165 -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license)
166 -RTMP_MODULE_PV="1.1.8"
167 -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
168 -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
169 -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
170 -
171 -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license)
172 -HTTP_DAV_EXT_MODULE_PV="0.0.3"
173 -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
174 -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
175 -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
176 -
177 -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license)
178 -HTTP_ECHO_MODULE_PV="0.59"
179 -HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
180 -HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
181 -HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
182 -
183 -# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
184 -# keep the MODULE_P here consistent with upstream to avoid tarball duplication
185 -HTTP_SECURITY_MODULE_PV="2.9.1"
186 -HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
187 -HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
188 -HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
189 -
190 -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
191 -HTTP_PUSH_STREAM_MODULE_PV="0.5.2"
192 -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
193 -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
194 -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
195 -
196 -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
197 -HTTP_STICKY_MODULE_PV="1.2.6"
198 -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
199 -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
200 -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-c78b7dd79d0d"
201 -
202 -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2)
203 -HTTP_MOGILEFS_MODULE_PV="1.0.4"
204 -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
205 -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
206 -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
207 -
208 -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2)
209 -HTTP_MEMC_MODULE_PV="0.17"
210 -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}"
211 -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz"
212 -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}"
213 -
214 -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2)
215 -HTTP_LDAP_MODULE_PV="dbcef31bebb2d54b6120422d0b178bbf78bc48f7"
216 -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
217 -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz"
218 -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
219 -
220 -# We handle deps below ourselves
221 -SSL_DEPS_SKIP=1
222 -
223 -inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
224 -
225 -DESCRIPTION="Robust, small and high performance http and reverse proxy server"
226 -HOMEPAGE="http://nginx.org"
227 -SRC_URI="http://nginx.org/download/${P}.tar.gz
228 - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
229 - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
230 - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
231 - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
232 - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
233 - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
234 - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
235 - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
236 - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
237 - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
238 - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
239 - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )
240 - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
241 - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
242 - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
243 - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
244 - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
245 - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
246 - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
247 - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )"
248 -
249 -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
250 - nginx_modules_http_security? ( Apache-2.0 )
251 - nginx_modules_http_push_stream? ( GPL-3 )"
252 -
253 -SLOT="0"
254 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
255 -
256 -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
257 - fastcgi geo gzip limit_req limit_conn map memcached proxy referer
258 - rewrite scgi ssi split_clients upstream_ip_hash userid uwsgi"
259 -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip
260 - gzip_static image_filter mp4 perl random_index realip secure_link
261 - slice stub_status sub xslt"
262 -NGINX_MODULES_STREAM="access limit_conn upstream"
263 -NGINX_MODULES_MAIL="imap pop3 smtp"
264 -NGINX_MODULES_3RD="
265 - http_upload_progress
266 - http_headers_more
267 - http_cache_purge
268 - http_slowfs_cache
269 - http_fancyindex
270 - http_lua
271 - http_auth_pam
272 - http_upstream_check
273 - http_metrics
274 - http_naxsi
275 - http_dav_ext
276 - http_echo
277 - http_security
278 - http_push_stream
279 - http_sticky
280 - http_mogilefs
281 - http_memc
282 - http_auth_ldap"
283 -
284 -IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +pcre
285 - pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax"
286 -
287 -for mod in $NGINX_MODULES_STD; do
288 - IUSE="${IUSE} +nginx_modules_http_${mod}"
289 -done
290 -
291 -for mod in $NGINX_MODULES_OPT; do
292 - IUSE="${IUSE} nginx_modules_http_${mod}"
293 -done
294 -
295 -for mod in $NGINX_MODULES_STREAM; do
296 - IUSE="${IUSE} nginx_modules_stream_${mod}"
297 -done
298 -
299 -for mod in $NGINX_MODULES_MAIL; do
300 - IUSE="${IUSE} nginx_modules_mail_${mod}"
301 -done
302 -
303 -for mod in $NGINX_MODULES_3RD; do
304 - IUSE="${IUSE} nginx_modules_${mod}"
305 -done
306 -
307 -# Add so we can warn users updating about config changes
308 -# @TODO: jbergstroem: remove on next release series
309 -IUSE="${IUSE} nginx_modules_http_spdy"
310 -
311 -CDEPEND="
312 - pcre? ( >=dev-libs/libpcre-4.2 )
313 - pcre-jit? ( >=dev-libs/libpcre-8.20[jit] )
314 - ssl? (
315 - !libressl? ( dev-libs/openssl:0= )
316 - libressl? ( dev-libs/libressl:= )
317 - )
318 - http2? (
319 - !libressl? ( >=dev-libs/openssl-1.0.1c:0= )
320 - libressl? ( dev-libs/libressl:= )
321 - )
322 - http-cache? (
323 - userland_GNU? (
324 - !libressl? ( dev-libs/openssl:0= )
325 - libressl? ( dev-libs/libressl:= )
326 - )
327 - )
328 - nginx_modules_http_geoip? ( dev-libs/geoip )
329 - nginx_modules_http_gunzip? ( sys-libs/zlib )
330 - nginx_modules_http_gzip? ( sys-libs/zlib )
331 - nginx_modules_http_gzip_static? ( sys-libs/zlib )
332 - nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
333 - nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
334 - nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
335 - nginx_modules_http_secure_link? (
336 - userland_GNU? (
337 - !libressl? ( dev-libs/openssl:0= )
338 - libressl? ( dev-libs/libressl:= )
339 - )
340 - )
341 - nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
342 - nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
343 - nginx_modules_http_auth_pam? ( virtual/pam )
344 - nginx_modules_http_metrics? ( dev-libs/yajl )
345 - nginx_modules_http_dav_ext? ( dev-libs/expat )
346 - nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )
347 - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )"
348 -RDEPEND="${CDEPEND}
349 - selinux? ( sec-policy/selinux-nginx )
350 - !www-servers/nginx:mainline"
351 -DEPEND="${CDEPEND}
352 - arm? ( dev-libs/libatomic_ops )
353 - libatomic? ( dev-libs/libatomic_ops )"
354 -PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
355 -
356 -REQUIRED_USE="pcre-jit? ( pcre )
357 - nginx_modules_http_lua? ( nginx_modules_http_rewrite )
358 - nginx_modules_http_naxsi? ( pcre )
359 - nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
360 - nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
361 - nginx_modules_http_security? ( pcre )
362 - nginx_modules_http_push_stream? ( ssl )"
363 -
364 -pkg_setup() {
365 - NGINX_HOME="/var/lib/nginx"
366 - NGINX_HOME_TMP="${NGINX_HOME}/tmp"
367 -
368 - ebegin "Creating nginx user and group"
369 - enewgroup ${PN}
370 - enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN}
371 - eend $?
372 -
373 - if use libatomic; then
374 - ewarn "GCC 4.1+ features built-in atomic operations."
375 - ewarn "Using libatomic_ops is only needed if using"
376 - ewarn "a different compiler or a GCC prior to 4.1"
377 - fi
378 -
379 - if [[ -n $NGINX_ADD_MODULES ]]; then
380 - ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
381 - ewarn "This nginx installation is not supported!"
382 - ewarn "Make sure you can reproduce the bug without those modules"
383 - ewarn "_before_ reporting bugs."
384 - fi
385 -
386 - if use !http; then
387 - ewarn "To actually disable all http-functionality you also have to disable"
388 - ewarn "all nginx http modules."
389 - fi
390 -
391 - if use nginx_modules_http_mogilefs && use threads; then
392 - eerror "mogilefs won't compile with threads support."
393 - eerror "Please disable either flag and try again."
394 - die "Can't compile mogilefs with threads support"
395 - fi
396 -}
397 -
398 -src_prepare() {
399 - eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
400 - eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
401 -
402 - if use nginx_modules_http_upstream_check; then
403 - eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
404 - fi
405 -
406 - if use nginx_modules_http_lua; then
407 - sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
408 - fi
409 -
410 - find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
411 - # We have config protection, don't rename etc files
412 - sed -i 's:.default::' auto/install || die
413 - # remove useless files
414 - sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
415 -
416 - # don't install to /etc/nginx/ if not in use
417 - local module
418 - for module in fastcgi scgi uwsgi ; do
419 - if ! use nginx_modules_http_${module}; then
420 - sed -i -e "/${module}/d" auto/install || die
421 - fi
422 - done
423 -
424 - eapply_user
425 -}
426 -
427 -src_configure() {
428 - # mod_security needs to generate nginx/modsecurity/config before including it
429 - if use nginx_modules_http_security; then
430 - cd "${HTTP_SECURITY_MODULE_WD}" || die
431 - if use luajit ; then
432 - sed -i \
433 - -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
434 - configure || die
435 - fi
436 - ./configure \
437 - --enable-standalone-module \
438 - $(use_enable pcre-jit) \
439 - $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
440 - fi
441 -
442 - cd "${S}" || die
443 -
444 - local myconf=() http_enabled= mail_enabled= stream_enabled=
445 -
446 - use aio && myconf+=( --with-file-aio )
447 - use debug && myconf+=( --with-debug )
448 - use http2 && myconf+=( --with-http_v2_module )
449 - use ipv6 && myconf+=( --with-ipv6 )
450 - use libatomic && myconf+=( --with-libatomic )
451 - use pcre && myconf+=( --with-pcre )
452 - use pcre-jit && myconf+=( --with-pcre-jit )
453 - use threads && myconf+=( --with-threads )
454 -
455 - # HTTP modules
456 - for mod in $NGINX_MODULES_STD; do
457 - if use nginx_modules_http_${mod}; then
458 - http_enabled=1
459 - else
460 - myconf+=( --without-http_${mod}_module )
461 - fi
462 - done
463 -
464 - for mod in $NGINX_MODULES_OPT; do
465 - if use nginx_modules_http_${mod}; then
466 - http_enabled=1
467 - myconf+=( --with-http_${mod}_module )
468 - fi
469 - done
470 -
471 - if use nginx_modules_http_fastcgi; then
472 - myconf+=( --with-http_realip_module )
473 - fi
474 -
475 - # third-party modules
476 - if use nginx_modules_http_upload_progress; then
477 - http_enabled=1
478 - myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
479 - fi
480 -
481 - if use nginx_modules_http_headers_more; then
482 - http_enabled=1
483 - myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} )
484 - fi
485 -
486 - if use nginx_modules_http_cache_purge; then
487 - http_enabled=1
488 - myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} )
489 - fi
490 -
491 - if use nginx_modules_http_slowfs_cache; then
492 - http_enabled=1
493 - myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} )
494 - fi
495 -
496 - if use nginx_modules_http_fancyindex; then
497 - http_enabled=1
498 - myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} )
499 - fi
500 -
501 - if use nginx_modules_http_lua; then
502 - http_enabled=1
503 - if use luajit; then
504 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
505 - export LUAJIT_INC=$(pkg-config --variable includedir luajit)
506 - else
507 - export LUA_LIB=$(pkg-config --variable libdir lua)
508 - export LUA_INC=$(pkg-config --variable includedir lua)
509 - fi
510 - myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} )
511 - myconf+=( --add-module=${HTTP_LUA_MODULE_WD} )
512 - fi
513 -
514 - if use nginx_modules_http_auth_pam; then
515 - http_enabled=1
516 - myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} )
517 - fi
518 -
519 - if use nginx_modules_http_upstream_check; then
520 - http_enabled=1
521 - myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} )
522 - fi
523 -
524 - if use nginx_modules_http_metrics; then
525 - http_enabled=1
526 - myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} )
527 - fi
528 -
529 - if use nginx_modules_http_naxsi ; then
530 - http_enabled=1
531 - myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} )
532 - fi
533 -
534 - if use rtmp ; then
535 - http_enabled=1
536 - myconf+=( --add-module=${RTMP_MODULE_WD} )
537 - fi
538 -
539 - if use nginx_modules_http_dav_ext ; then
540 - http_enabled=1
541 - myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} )
542 - fi
543 -
544 - if use nginx_modules_http_echo ; then
545 - http_enabled=1
546 - myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} )
547 - fi
548 -
549 - if use nginx_modules_http_security ; then
550 - http_enabled=1
551 - myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity )
552 - fi
553 -
554 - if use nginx_modules_http_push_stream ; then
555 - http_enabled=1
556 - myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} )
557 - fi
558 -
559 - if use nginx_modules_http_sticky ; then
560 - http_enabled=1
561 - myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} )
562 - fi
563 -
564 - if use nginx_modules_http_mogilefs ; then
565 - http_enabled=1
566 - myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} )
567 - fi
568 -
569 - if use nginx_modules_http_memc ; then
570 - http_enabled=1
571 - myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} )
572 - fi
573 -
574 - if use nginx_modules_http_auth_ldap; then
575 - http_enabled=1
576 - myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} )
577 - fi
578 -
579 - if use http || use http-cache || use http2; then
580 - http_enabled=1
581 - fi
582 -
583 - if [ $http_enabled ]; then
584 - use http-cache || myconf+=( --without-http-cache )
585 - use ssl && myconf+=( --with-http_ssl_module )
586 - else
587 - myconf+=( --without-http --without-http-cache )
588 - fi
589 -
590 - # Stream modules
591 - for mod in $NGINX_MODULES_STREAM; do
592 - if use nginx_modules_stream_${mod}; then
593 - stream_enabled=1
594 - else
595 - # Treat stream upstream slightly differently
596 - if ! use nginx_modules_stream_upstream; then
597 - myconf+=( --without-stream_upstream_hash_module )
598 - myconf+=( --without-stream_upstream_least_conn_module )
599 - myconf+=( --without-stream_upstream_zone_module )
600 - else
601 - myconf+=( --without-stream_${mod}_module )
602 - fi
603 - fi
604 - done
605 -
606 - if [ $stream_enabled ]; then
607 - myconf+=( --with-stream )
608 - use ssl && myconf+=( --with-stream_ssl_module )
609 - fi
610 -
611 - # MAIL modules
612 - for mod in $NGINX_MODULES_MAIL; do
613 - if use nginx_modules_mail_${mod}; then
614 - mail_enabled=1
615 - else
616 - myconf+=( --without-mail_${mod}_module )
617 - fi
618 - done
619 -
620 - if [ $mail_enabled ]; then
621 - myconf+=( --with-mail )
622 - use ssl && myconf+=( --with-mail_ssl_module )
623 - fi
624 -
625 - # custom modules
626 - for mod in $NGINX_ADD_MODULES; do
627 - myconf+=( --add-module=${mod} )
628 - done
629 -
630 - # https://bugs.gentoo.org/286772
631 - export LANG=C LC_ALL=C
632 - tc-export CC
633 -
634 - if ! use prefix; then
635 - myconf+=( --user=${PN} )
636 - myconf+=( --group=${PN} )
637 - fi
638 -
639 - ./configure \
640 - --prefix="${EPREFIX}"/usr \
641 - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
642 - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
643 - --pid-path="${EPREFIX}"/run/${PN}.pid \
644 - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
645 - --with-cc-opt="-I${EROOT}usr/include" \
646 - --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
647 - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
648 - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
649 - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
650 - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
651 - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
652 - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
653 - "${myconf[@]}" || die "configure failed"
654 -
655 - # A purely cosmetic change that makes nginx -V more readable. This can be
656 - # good if people outside the gentoo community would troubleshoot and
657 - # question the users setup.
658 - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
659 -}
660 -
661 -src_compile() {
662 - use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
663 -
664 - # https://bugs.gentoo.org/286772
665 - export LANG=C LC_ALL=C
666 - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
667 -}
668 -
669 -src_install() {
670 - emake DESTDIR="${D%/}" install
671 -
672 - cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die
673 -
674 - newinitd "${FILESDIR}"/nginx.initd-r3 nginx
675 -
676 - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
677 -
678 - doman man/nginx.8
679 - dodoc CHANGES* README
680 -
681 - # just keepdir. do not copy the default htdocs files (bug #449136)
682 - keepdir /var/www/localhost
683 - rm -rf "${D}"usr/html || die
684 -
685 - # set up a list of directories to keep
686 - local keepdir_list="${NGINX_HOME_TMP}"/client
687 - local module
688 - for module in proxy fastcgi scgi uwsgi; do
689 - use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
690 - done
691 -
692 - keepdir /var/log/nginx ${keepdir_list}
693 -
694 - # this solves a problem with SELinux where nginx doesn't see the directories
695 - # as root and tries to create them as nginx
696 - fperms 0750 "${NGINX_HOME_TMP}"
697 - fowners ${PN}:0 "${NGINX_HOME_TMP}"
698 -
699 - fperms 0700 /var/log/nginx ${keepdir_list}
700 - fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
701 -
702 - # logrotate
703 - insinto /etc/logrotate.d
704 - newins "${FILESDIR}"/nginx.logrotate-r1 nginx
705 -
706 - if use nginx_modules_http_perl; then
707 - cd "${S}"/objs/src/http/modules/perl/ || die
708 - emake DESTDIR="${D}" INSTALLDIRS=vendor
709 - perl_delete_localpod
710 - cd "${S}" || die
711 - fi
712 -
713 - if use nginx_modules_http_cache_purge; then
714 - docinto ${HTTP_CACHE_PURGE_MODULE_P}
715 - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
716 - fi
717 -
718 - if use nginx_modules_http_slowfs_cache; then
719 - docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
720 - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
721 - fi
722 -
723 - if use nginx_modules_http_fancyindex; then
724 - docinto ${HTTP_FANCYINDEX_MODULE_P}
725 - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
726 - fi
727 -
728 - if use nginx_modules_http_lua; then
729 - docinto ${HTTP_LUA_MODULE_P}
730 - dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown}
731 - fi
732 -
733 - if use nginx_modules_http_auth_pam; then
734 - docinto ${HTTP_AUTH_PAM_MODULE_P}
735 - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
736 - fi
737 -
738 - if use nginx_modules_http_upstream_check; then
739 - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
740 - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
741 - fi
742 -
743 - if use nginx_modules_http_naxsi; then
744 - insinto /etc/nginx
745 - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
746 - fi
747 -
748 - if use rtmp; then
749 - docinto ${RTMP_MODULE_P}
750 - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
751 - fi
752 -
753 - if use nginx_modules_http_dav_ext; then
754 - docinto ${HTTP_DAV_EXT_MODULE_P}
755 - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README
756 - fi
757 -
758 - if use nginx_modules_http_echo; then
759 - docinto ${HTTP_ECHO_MODULE_P}
760 - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown
761 - fi
762 -
763 - if use nginx_modules_http_security; then
764 - docinto ${HTTP_SECURITY_MODULE_P}
765 - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt}
766 - fi
767 -
768 - if use nginx_modules_http_push_stream; then
769 - docinto ${HTTP_PUSH_STREAM_MODULE_P}
770 - dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
771 - fi
772 -
773 - if use nginx_modules_http_sticky; then
774 - docinto ${HTTP_STICKY_MODULE_P}
775 - dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
776 - fi
777 -
778 - if use nginx_modules_http_memc; then
779 - docinto ${HTTP_MEMC_MODULE_P}
780 - dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown
781 - fi
782 -
783 - if use nginx_modules_http_auth_ldap; then
784 - docinto ${HTTP_LDAP_MODULE_P}
785 - dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf
786 - fi
787 -}
788 -
789 -pkg_postinst() {
790 - if use ssl; then
791 - if [ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]; then
792 - install_cert /etc/ssl/${PN}/${PN}
793 - use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
794 - fi
795 - fi
796 -
797 - if use nginx_modules_http_spdy; then
798 - ewarn "In nginx 1.9.5 the spdy module was superseded by http2."
799 - ewarn "Update your configs and package.use accordingly."
800 - fi
801 -
802 - if use nginx_modules_http_lua && use http2; then
803 - ewarn "Lua 3rd party module author warns against using ${P} with"
804 - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
805 - fi
806 -
807 - # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
808 - # existing installations
809 - local fix_perms=0
810 -
811 - for rv in ${REPLACING_VERSIONS} ; do
812 - version_compare ${rv} 1.4.1-r2
813 - [[ $? -eq 1 ]] && fix_perms=1
814 - done
815 -
816 - if [[ $fix_perms -eq 1 ]] ; then
817 - ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
818 - ewarn "directories the world-readable bit removed (if set):"
819 - ewarn " ${EPREFIX}/var/log/nginx"
820 - ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
821 - ewarn "Check if this is correct for your setup before restarting nginx!"
822 - ewarn "This is a one-time change and will not happen on subsequent updates."
823 - ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}"
824 - chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
825 - fi
826 -
827 - # If the nginx user can't change into or read the dir, display a warning.
828 - # If su is not available we display the warning nevertheless since we can't check properly
829 - su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
830 - if [ $? -ne 0 ] ; then
831 - ewarn "Please make sure that the nginx user or group has at least"
832 - ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
833 - ewarn "Otherwise you end up with empty log files after a logrotate."
834 - fi
835 -
836 - # HTTPoxy mitigation
837 - ewarn ""
838 - ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
839 - ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
840 - ewarn "parameter to an empty string per default when you are sourcing the default"
841 - ewarn "'fastcgi_params' or 'fastcgi.conf' in your server block(s)."
842 - ewarn ""
843 - ewarn "If this is causing any problems for you make sure that you are sourcing the"
844 - ewarn "default parameters _before_ you set your own values."
845 - ewarn "If you are relying on user-supplied proxy values you have to remove the"
846 - ewarn "correlating lines from 'fastcgi_params' and or 'fastcgi.conf'."
847 -}
848
849 diff --git a/www-servers/nginx/nginx-1.11.3-r1.ebuild b/www-servers/nginx/nginx-1.11.3-r1.ebuild
850 deleted file mode 100644
851 index 1e280aa..00000000
852 --- a/www-servers/nginx/nginx-1.11.3-r1.ebuild
853 +++ /dev/null
854 @@ -1,782 +0,0 @@
855 -# Copyright 1999-2016 Gentoo Foundation
856 -# Distributed under the terms of the GNU General Public License v2
857 -# $Id$
858 -
859 -EAPI=6
860 -
861 -# Maintainer notes:
862 -# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
863 -# - any http-module activates the main http-functionality and overrides USE=-http
864 -# - keep the following requirements in mind before adding external modules:
865 -# * alive upstream
866 -# * sane packaging
867 -# * builds cleanly
868 -# * does not need a patch for nginx core
869 -# - TODO: test the google-perftools module (included in vanilla tarball)
870 -
871 -# prevent perl-module from adding automagic perl DEPENDs
872 -GENTOO_DEPEND_ON_PERL="no"
873 -
874 -# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
875 -DEVEL_KIT_MODULE_PV="0.3.0"
876 -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
877 -DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
878 -DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
879 -
880 -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
881 -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1"
882 -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
883 -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
884 -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
885 -
886 -# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license)
887 -HTTP_HEADERS_MORE_MODULE_PV="0.30"
888 -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
889 -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
890 -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
891 -
892 -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
893 -HTTP_CACHE_PURGE_MODULE_PV="2.3"
894 -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
895 -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
896 -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
897 -
898 -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
899 -HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
900 -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
901 -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
902 -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
903 -
904 -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
905 -HTTP_FANCYINDEX_MODULE_PV="0.4.0"
906 -HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
907 -HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
908 -HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
909 -
910 -# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
911 -HTTP_LUA_MODULE_PV="0.10.5"
912 -HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
913 -HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
914 -HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
915 -
916 -# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
917 -HTTP_AUTH_PAM_MODULE_PV="1.5.1"
918 -HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
919 -HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
920 -HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
921 -
922 -# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
923 -HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0-10-g10782ea"
924 -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
925 -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
926 -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-10782eaff51872a8f44e65eed89bbe286004bcb1"
927 -
928 -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
929 -HTTP_METRICS_MODULE_PV="0.1.1"
930 -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
931 -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
932 -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
933 -
934 -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
935 -HTTP_NAXSI_MODULE_PV="0.54"
936 -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
937 -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
938 -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
939 -
940 -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license)
941 -RTMP_MODULE_PV="1.1.8"
942 -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
943 -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
944 -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
945 -
946 -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license)
947 -HTTP_DAV_EXT_MODULE_PV="0.0.3"
948 -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
949 -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
950 -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
951 -
952 -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license)
953 -HTTP_ECHO_MODULE_PV="0.59"
954 -HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
955 -HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
956 -HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
957 -
958 -# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
959 -# keep the MODULE_P here consistent with upstream to avoid tarball duplication
960 -HTTP_SECURITY_MODULE_PV="2.9.1"
961 -HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
962 -HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
963 -HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
964 -
965 -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
966 -HTTP_PUSH_STREAM_MODULE_PV="0.5.2"
967 -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
968 -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
969 -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
970 -
971 -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
972 -HTTP_STICKY_MODULE_PV="1.2.6"
973 -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
974 -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
975 -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-c78b7dd79d0d"
976 -
977 -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2)
978 -HTTP_MOGILEFS_MODULE_PV="1.0.4"
979 -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
980 -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
981 -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
982 -
983 -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2)
984 -HTTP_MEMC_MODULE_PV="0.17"
985 -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}"
986 -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz"
987 -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}"
988 -
989 -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2)
990 -HTTP_LDAP_MODULE_PV="dbcef31bebb2d54b6120422d0b178bbf78bc48f7"
991 -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
992 -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz"
993 -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
994 -
995 -# We handle deps below ourselves
996 -SSL_DEPS_SKIP=1
997 -
998 -inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
999 -
1000 -DESCRIPTION="Robust, small and high performance http and reverse proxy server"
1001 -HOMEPAGE="http://nginx.org"
1002 -SRC_URI="http://nginx.org/download/${P}.tar.gz
1003 - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
1004 - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
1005 - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
1006 - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
1007 - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
1008 - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
1009 - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
1010 - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
1011 - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
1012 - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
1013 - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
1014 - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )
1015 - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
1016 - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
1017 - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
1018 - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
1019 - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
1020 - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
1021 - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
1022 - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )"
1023 -
1024 -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
1025 - nginx_modules_http_security? ( Apache-2.0 )
1026 - nginx_modules_http_push_stream? ( GPL-3 )"
1027 -
1028 -SLOT="mainline"
1029 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
1030 -
1031 -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
1032 - fastcgi geo gzip limit_req limit_conn map memcached proxy referer
1033 - rewrite scgi ssi split_clients upstream_hash upstream_ip_hash
1034 - upstream_keepalive upstream_least_conn upstream_zone userid uwsgi"
1035 -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip
1036 - gzip_static image_filter mp4 perl random_index realip secure_link
1037 - slice stub_status sub xslt"
1038 -NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients
1039 - upstream_hash upstream_least_conn upstream_zone"
1040 -NGINX_MODULES_STREAM_OPT="geoip"
1041 -NGINX_MODULES_MAIL="imap pop3 smtp"
1042 -NGINX_MODULES_3RD="
1043 - http_upload_progress
1044 - http_headers_more
1045 - http_cache_purge
1046 - http_slowfs_cache
1047 - http_fancyindex
1048 - http_lua
1049 - http_auth_pam
1050 - http_upstream_check
1051 - http_metrics
1052 - http_naxsi
1053 - http_dav_ext
1054 - http_echo
1055 - http_security
1056 - http_push_stream
1057 - http_sticky
1058 - http_mogilefs
1059 - http_memc
1060 - http_auth_ldap"
1061 -
1062 -IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +pcre
1063 - pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax"
1064 -
1065 -for mod in $NGINX_MODULES_STD; do
1066 - IUSE="${IUSE} +nginx_modules_http_${mod}"
1067 -done
1068 -
1069 -for mod in $NGINX_MODULES_OPT; do
1070 - IUSE="${IUSE} nginx_modules_http_${mod}"
1071 -done
1072 -
1073 -for mod in $NGINX_MODULES_STREAM_STD; do
1074 - IUSE="${IUSE} nginx_modules_stream_${mod}"
1075 -done
1076 -
1077 -for mod in $NGINX_MODULES_STREAM_OPT; do
1078 - IUSE="${IUSE} nginx_modules_stream_${mod}"
1079 -done
1080 -
1081 -for mod in $NGINX_MODULES_MAIL; do
1082 - IUSE="${IUSE} nginx_modules_mail_${mod}"
1083 -done
1084 -
1085 -for mod in $NGINX_MODULES_3RD; do
1086 - IUSE="${IUSE} nginx_modules_${mod}"
1087 -done
1088 -
1089 -# Add so we can warn users updating about config changes
1090 -# @TODO: jbergstroem: remove on next release series
1091 -IUSE="${IUSE} nginx_modules_http_spdy"
1092 -
1093 -CDEPEND="
1094 - pcre? ( >=dev-libs/libpcre-4.2 )
1095 - pcre-jit? ( >=dev-libs/libpcre-8.20[jit] )
1096 - ssl? (
1097 - !libressl? ( dev-libs/openssl:0= )
1098 - libressl? ( dev-libs/libressl:= )
1099 - )
1100 - http2? (
1101 - !libressl? ( >=dev-libs/openssl-1.0.1c:0= )
1102 - libressl? ( dev-libs/libressl:= )
1103 - )
1104 - http-cache? (
1105 - userland_GNU? (
1106 - !libressl? ( dev-libs/openssl:0= )
1107 - libressl? ( dev-libs/libressl:= )
1108 - )
1109 - )
1110 - nginx_modules_http_geoip? ( dev-libs/geoip )
1111 - nginx_modules_http_gunzip? ( sys-libs/zlib )
1112 - nginx_modules_http_gzip? ( sys-libs/zlib )
1113 - nginx_modules_http_gzip_static? ( sys-libs/zlib )
1114 - nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
1115 - nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
1116 - nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
1117 - nginx_modules_http_secure_link? (
1118 - userland_GNU? (
1119 - !libressl? ( dev-libs/openssl:0= )
1120 - libressl? ( dev-libs/libressl:= )
1121 - )
1122 - )
1123 - nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
1124 - nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
1125 - nginx_modules_http_auth_pam? ( virtual/pam )
1126 - nginx_modules_http_metrics? ( dev-libs/yajl )
1127 - nginx_modules_http_dav_ext? ( dev-libs/expat )
1128 - nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )
1129 - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )"
1130 -RDEPEND="${CDEPEND}
1131 - selinux? ( sec-policy/selinux-nginx )
1132 - !www-servers/nginx:0"
1133 -DEPEND="${CDEPEND}
1134 - arm? ( dev-libs/libatomic_ops )
1135 - libatomic? ( dev-libs/libatomic_ops )"
1136 -PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
1137 -
1138 -REQUIRED_USE="pcre-jit? ( pcre )
1139 - nginx_modules_http_lua? ( nginx_modules_http_rewrite )
1140 - nginx_modules_http_naxsi? ( pcre )
1141 - nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
1142 - nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
1143 - nginx_modules_http_security? ( pcre )
1144 - nginx_modules_http_push_stream? ( ssl )"
1145 -
1146 -pkg_setup() {
1147 - NGINX_HOME="/var/lib/nginx"
1148 - NGINX_HOME_TMP="${NGINX_HOME}/tmp"
1149 -
1150 - ebegin "Creating nginx user and group"
1151 - enewgroup ${PN}
1152 - enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN}
1153 - eend $?
1154 -
1155 - if use libatomic; then
1156 - ewarn "GCC 4.1+ features built-in atomic operations."
1157 - ewarn "Using libatomic_ops is only needed if using"
1158 - ewarn "a different compiler or a GCC prior to 4.1"
1159 - fi
1160 -
1161 - if [[ -n $NGINX_ADD_MODULES ]]; then
1162 - ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
1163 - ewarn "This nginx installation is not supported!"
1164 - ewarn "Make sure you can reproduce the bug without those modules"
1165 - ewarn "_before_ reporting bugs."
1166 - fi
1167 -
1168 - if use !http; then
1169 - ewarn "To actually disable all http-functionality you also have to disable"
1170 - ewarn "all nginx http modules."
1171 - fi
1172 -
1173 - if use nginx_modules_http_mogilefs && use threads; then
1174 - eerror "mogilefs won't compile with threads support."
1175 - eerror "Please disable either flag and try again."
1176 - die "Can't compile mogilefs with threads support"
1177 - fi
1178 -}
1179 -
1180 -src_prepare() {
1181 - eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
1182 - eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
1183 - eapply "${FILESDIR}/${PN}-1.11.3-fix-build-without-stream_ssl_module.patch"
1184 -
1185 - if use nginx_modules_http_sticky; then
1186 - cd "${HTTP_STICKY_MODULE_WD}" || die
1187 - eapply "${FILESDIR}"/http-sticky-nginx-1.11.2.patch
1188 - cd "${S}" || die
1189 - fi
1190 -
1191 - if use nginx_modules_http_upstream_check; then
1192 - eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
1193 - fi
1194 -
1195 - if use nginx_modules_http_lua; then
1196 - sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
1197 - fi
1198 -
1199 - find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
1200 - # We have config protection, don't rename etc files
1201 - sed -i 's:.default::' auto/install || die
1202 - # remove useless files
1203 - sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
1204 -
1205 - # don't install to /etc/nginx/ if not in use
1206 - local module
1207 - for module in fastcgi scgi uwsgi ; do
1208 - if ! use nginx_modules_http_${module}; then
1209 - sed -i -e "/${module}/d" auto/install || die
1210 - fi
1211 - done
1212 -
1213 - eapply_user
1214 -}
1215 -
1216 -src_configure() {
1217 - # mod_security needs to generate nginx/modsecurity/config before including it
1218 - if use nginx_modules_http_security; then
1219 - cd "${HTTP_SECURITY_MODULE_WD}" || die
1220 - if use luajit ; then
1221 - sed -i \
1222 - -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
1223 - configure || die
1224 - fi
1225 - ./configure \
1226 - --enable-standalone-module \
1227 - $(use_enable pcre-jit) \
1228 - $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
1229 - fi
1230 -
1231 - cd "${S}" || die
1232 -
1233 - local myconf=() http_enabled= mail_enabled= stream_enabled=
1234 -
1235 - use aio && myconf+=( --with-file-aio )
1236 - use debug && myconf+=( --with-debug )
1237 - use http2 && myconf+=( --with-http_v2_module )
1238 - use ipv6 && myconf+=( --with-ipv6 )
1239 - use libatomic && myconf+=( --with-libatomic )
1240 - use pcre && myconf+=( --with-pcre )
1241 - use pcre-jit && myconf+=( --with-pcre-jit )
1242 - use threads && myconf+=( --with-threads )
1243 -
1244 - # HTTP modules
1245 - for mod in $NGINX_MODULES_STD; do
1246 - if use nginx_modules_http_${mod}; then
1247 - http_enabled=1
1248 - else
1249 - myconf+=( --without-http_${mod}_module )
1250 - fi
1251 - done
1252 -
1253 - for mod in $NGINX_MODULES_OPT; do
1254 - if use nginx_modules_http_${mod}; then
1255 - http_enabled=1
1256 - myconf+=( --with-http_${mod}_module )
1257 - fi
1258 - done
1259 -
1260 - if use nginx_modules_http_fastcgi; then
1261 - myconf+=( --with-http_realip_module )
1262 - fi
1263 -
1264 - # third-party modules
1265 - if use nginx_modules_http_upload_progress; then
1266 - http_enabled=1
1267 - myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
1268 - fi
1269 -
1270 - if use nginx_modules_http_headers_more; then
1271 - http_enabled=1
1272 - myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} )
1273 - fi
1274 -
1275 - if use nginx_modules_http_cache_purge; then
1276 - http_enabled=1
1277 - myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} )
1278 - fi
1279 -
1280 - if use nginx_modules_http_slowfs_cache; then
1281 - http_enabled=1
1282 - myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} )
1283 - fi
1284 -
1285 - if use nginx_modules_http_fancyindex; then
1286 - http_enabled=1
1287 - myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} )
1288 - fi
1289 -
1290 - if use nginx_modules_http_lua; then
1291 - http_enabled=1
1292 - if use luajit; then
1293 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
1294 - export LUAJIT_INC=$(pkg-config --variable includedir luajit)
1295 - else
1296 - export LUA_LIB=$(pkg-config --variable libdir lua)
1297 - export LUA_INC=$(pkg-config --variable includedir lua)
1298 - fi
1299 - myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} )
1300 - myconf+=( --add-module=${HTTP_LUA_MODULE_WD} )
1301 - fi
1302 -
1303 - if use nginx_modules_http_auth_pam; then
1304 - http_enabled=1
1305 - myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} )
1306 - fi
1307 -
1308 - if use nginx_modules_http_upstream_check; then
1309 - http_enabled=1
1310 - myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} )
1311 - fi
1312 -
1313 - if use nginx_modules_http_metrics; then
1314 - http_enabled=1
1315 - myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} )
1316 - fi
1317 -
1318 - if use nginx_modules_http_naxsi ; then
1319 - http_enabled=1
1320 - myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} )
1321 - fi
1322 -
1323 - if use rtmp ; then
1324 - http_enabled=1
1325 - myconf+=( --add-module=${RTMP_MODULE_WD} )
1326 - fi
1327 -
1328 - if use nginx_modules_http_dav_ext ; then
1329 - http_enabled=1
1330 - myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} )
1331 - fi
1332 -
1333 - if use nginx_modules_http_echo ; then
1334 - http_enabled=1
1335 - myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} )
1336 - fi
1337 -
1338 - if use nginx_modules_http_security ; then
1339 - http_enabled=1
1340 - myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity )
1341 - fi
1342 -
1343 - if use nginx_modules_http_push_stream ; then
1344 - http_enabled=1
1345 - myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} )
1346 - fi
1347 -
1348 - if use nginx_modules_http_sticky ; then
1349 - http_enabled=1
1350 - myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} )
1351 - fi
1352 -
1353 - if use nginx_modules_http_mogilefs ; then
1354 - http_enabled=1
1355 - myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} )
1356 - fi
1357 -
1358 - if use nginx_modules_http_memc ; then
1359 - http_enabled=1
1360 - myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} )
1361 - fi
1362 -
1363 - if use nginx_modules_http_auth_ldap; then
1364 - http_enabled=1
1365 - myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} )
1366 - fi
1367 -
1368 - if use http || use http-cache || use http2; then
1369 - http_enabled=1
1370 - fi
1371 -
1372 - if [ $http_enabled ]; then
1373 - use http-cache || myconf+=( --without-http-cache )
1374 - use ssl && myconf+=( --with-http_ssl_module )
1375 - else
1376 - myconf+=( --without-http --without-http-cache )
1377 - fi
1378 -
1379 - # Stream modules
1380 - for mod in $NGINX_MODULES_STREAM_STD; do
1381 - if use nginx_modules_stream_${mod}; then
1382 - stream_enabled=1
1383 - else
1384 - myconf+=( --without-stream_${mod}_module )
1385 - fi
1386 - done
1387 -
1388 - for mod in $NGINX_MODULES_STREAM_OPT; do
1389 - if use nginx_modules_stream_${mod}; then
1390 - stream_enabled=1
1391 - myconf+=( --with-stream_${mod}_module )
1392 - fi
1393 - done
1394 -
1395 - if [ $stream_enabled ]; then
1396 - myconf+=( --with-stream )
1397 - use ssl && myconf+=( --with-stream_ssl_module )
1398 - fi
1399 -
1400 - # MAIL modules
1401 - for mod in $NGINX_MODULES_MAIL; do
1402 - if use nginx_modules_mail_${mod}; then
1403 - mail_enabled=1
1404 - else
1405 - myconf+=( --without-mail_${mod}_module )
1406 - fi
1407 - done
1408 -
1409 - if [ $mail_enabled ]; then
1410 - myconf+=( --with-mail )
1411 - use ssl && myconf+=( --with-mail_ssl_module )
1412 - fi
1413 -
1414 - # custom modules
1415 - for mod in $NGINX_ADD_MODULES; do
1416 - myconf+=( --add-module=${mod} )
1417 - done
1418 -
1419 - # https://bugs.gentoo.org/286772
1420 - export LANG=C LC_ALL=C
1421 - tc-export CC
1422 -
1423 - if ! use prefix; then
1424 - myconf+=( --user=${PN} )
1425 - myconf+=( --group=${PN} )
1426 - fi
1427 -
1428 - ./configure \
1429 - --prefix="${EPREFIX}"/usr \
1430 - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
1431 - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
1432 - --pid-path="${EPREFIX}"/run/${PN}.pid \
1433 - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
1434 - --with-cc-opt="-I${EROOT}usr/include" \
1435 - --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
1436 - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
1437 - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
1438 - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
1439 - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
1440 - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
1441 - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
1442 - "${myconf[@]}" || die "configure failed"
1443 -
1444 - # A purely cosmetic change that makes nginx -V more readable. This can be
1445 - # good if people outside the gentoo community would troubleshoot and
1446 - # question the users setup.
1447 - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
1448 -}
1449 -
1450 -src_compile() {
1451 - use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
1452 -
1453 - # https://bugs.gentoo.org/286772
1454 - export LANG=C LC_ALL=C
1455 - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
1456 -}
1457 -
1458 -src_install() {
1459 - emake DESTDIR="${D%/}" install
1460 -
1461 - cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die
1462 -
1463 - newinitd "${FILESDIR}"/nginx.initd-r3 nginx
1464 -
1465 - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
1466 -
1467 - doman man/nginx.8
1468 - dodoc CHANGES* README
1469 -
1470 - # just keepdir. do not copy the default htdocs files (bug #449136)
1471 - keepdir /var/www/localhost
1472 - rm -rf "${D}"usr/html || die
1473 -
1474 - # set up a list of directories to keep
1475 - local keepdir_list="${NGINX_HOME_TMP}"/client
1476 - local module
1477 - for module in proxy fastcgi scgi uwsgi; do
1478 - use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
1479 - done
1480 -
1481 - keepdir /var/log/nginx ${keepdir_list}
1482 -
1483 - # this solves a problem with SELinux where nginx doesn't see the directories
1484 - # as root and tries to create them as nginx
1485 - fperms 0750 "${NGINX_HOME_TMP}"
1486 - fowners ${PN}:0 "${NGINX_HOME_TMP}"
1487 -
1488 - fperms 0700 /var/log/nginx ${keepdir_list}
1489 - fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
1490 -
1491 - # logrotate
1492 - insinto /etc/logrotate.d
1493 - newins "${FILESDIR}"/nginx.logrotate-r1 nginx
1494 -
1495 - if use nginx_modules_http_perl; then
1496 - cd "${S}"/objs/src/http/modules/perl/ || die
1497 - emake DESTDIR="${D}" INSTALLDIRS=vendor
1498 - perl_delete_localpod
1499 - cd "${S}" || die
1500 - fi
1501 -
1502 - if use nginx_modules_http_cache_purge; then
1503 - docinto ${HTTP_CACHE_PURGE_MODULE_P}
1504 - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
1505 - fi
1506 -
1507 - if use nginx_modules_http_slowfs_cache; then
1508 - docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
1509 - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
1510 - fi
1511 -
1512 - if use nginx_modules_http_fancyindex; then
1513 - docinto ${HTTP_FANCYINDEX_MODULE_P}
1514 - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
1515 - fi
1516 -
1517 - if use nginx_modules_http_lua; then
1518 - docinto ${HTTP_LUA_MODULE_P}
1519 - dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown}
1520 - fi
1521 -
1522 - if use nginx_modules_http_auth_pam; then
1523 - docinto ${HTTP_AUTH_PAM_MODULE_P}
1524 - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
1525 - fi
1526 -
1527 - if use nginx_modules_http_upstream_check; then
1528 - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
1529 - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
1530 - fi
1531 -
1532 - if use nginx_modules_http_naxsi; then
1533 - insinto /etc/nginx
1534 - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
1535 - fi
1536 -
1537 - if use rtmp; then
1538 - docinto ${RTMP_MODULE_P}
1539 - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
1540 - fi
1541 -
1542 - if use nginx_modules_http_dav_ext; then
1543 - docinto ${HTTP_DAV_EXT_MODULE_P}
1544 - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README
1545 - fi
1546 -
1547 - if use nginx_modules_http_echo; then
1548 - docinto ${HTTP_ECHO_MODULE_P}
1549 - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown
1550 - fi
1551 -
1552 - if use nginx_modules_http_security; then
1553 - docinto ${HTTP_SECURITY_MODULE_P}
1554 - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt}
1555 - fi
1556 -
1557 - if use nginx_modules_http_push_stream; then
1558 - docinto ${HTTP_PUSH_STREAM_MODULE_P}
1559 - dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
1560 - fi
1561 -
1562 - if use nginx_modules_http_sticky; then
1563 - docinto ${HTTP_STICKY_MODULE_P}
1564 - dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
1565 - fi
1566 -
1567 - if use nginx_modules_http_memc; then
1568 - docinto ${HTTP_MEMC_MODULE_P}
1569 - dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown
1570 - fi
1571 -
1572 - if use nginx_modules_http_auth_ldap; then
1573 - docinto ${HTTP_LDAP_MODULE_P}
1574 - dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf
1575 - fi
1576 -}
1577 -
1578 -pkg_postinst() {
1579 - if use ssl; then
1580 - if [[ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]]; then
1581 - install_cert /etc/ssl/${PN}/${PN}
1582 - use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
1583 - fi
1584 - fi
1585 -
1586 - if use nginx_modules_http_spdy; then
1587 - ewarn "In nginx 1.9.5 the spdy module was superseded by http2."
1588 - ewarn "Update your configs and package.use accordingly."
1589 - fi
1590 -
1591 - if use nginx_modules_http_lua && use http2; then
1592 - ewarn "Lua 3rd party module author warns against using ${P} with"
1593 - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
1594 - fi
1595 -
1596 - # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
1597 - # existing installations
1598 - local fix_perms=0
1599 -
1600 - for rv in ${REPLACING_VERSIONS}; do
1601 - version_compare ${rv} 1.4.1-r2
1602 - [[ $? -eq 1 ]] && fix_perms=1
1603 - done
1604 -
1605 - if [[ $fix_perms -eq 1 ]] ; then
1606 - ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
1607 - ewarn "directories the world-readable bit removed (if set):"
1608 - ewarn " ${EPREFIX}/var/log/nginx"
1609 - ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
1610 - ewarn "Check if this is correct for your setup before restarting nginx!"
1611 - ewarn "This is a one-time change and will not happen on subsequent updates."
1612 - ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}"
1613 - chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
1614 - fi
1615 -
1616 - # If the nginx user can't change into or read the dir, display a warning.
1617 - # If su is not available we display the warning nevertheless since we can't check properly
1618 - su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
1619 - if [ $? -ne 0 ] ; then
1620 - ewarn "Please make sure that the nginx user or group has at least"
1621 - ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
1622 - ewarn "Otherwise you end up with empty log files after a logrotate."
1623 - fi
1624 -
1625 - # HTTPoxy mitigation
1626 - ewarn ""
1627 - ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
1628 - ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
1629 - ewarn "parameter to an empty string per default when you are sourcing the default"
1630 - ewarn "'fastcgi_params' or 'fastcgi.conf' in your server block(s)."
1631 - ewarn ""
1632 - ewarn "If this is causing any problems for you make sure that you are sourcing the"
1633 - ewarn "default parameters _before_ you set your own values."
1634 - ewarn "If you are relying on user-supplied proxy values you have to remove the"
1635 - ewarn "correlating lines from 'fastcgi_params' and or 'fastcgi.conf'."
1636 -}
1637
1638 diff --git a/www-servers/nginx/nginx-1.11.3-r2.ebuild b/www-servers/nginx/nginx-1.11.3-r2.ebuild
1639 deleted file mode 100644
1640 index 883918d..00000000
1641 --- a/www-servers/nginx/nginx-1.11.3-r2.ebuild
1642 +++ /dev/null
1643 @@ -1,782 +0,0 @@
1644 -# Copyright 1999-2016 Gentoo Foundation
1645 -# Distributed under the terms of the GNU General Public License v2
1646 -# $Id$
1647 -
1648 -EAPI=6
1649 -
1650 -# Maintainer notes:
1651 -# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
1652 -# - any http-module activates the main http-functionality and overrides USE=-http
1653 -# - keep the following requirements in mind before adding external modules:
1654 -# * alive upstream
1655 -# * sane packaging
1656 -# * builds cleanly
1657 -# * does not need a patch for nginx core
1658 -# - TODO: test the google-perftools module (included in vanilla tarball)
1659 -
1660 -# prevent perl-module from adding automagic perl DEPENDs
1661 -GENTOO_DEPEND_ON_PERL="no"
1662 -
1663 -# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
1664 -DEVEL_KIT_MODULE_PV="0.3.0"
1665 -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
1666 -DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
1667 -DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
1668 -
1669 -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
1670 -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2"
1671 -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
1672 -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
1673 -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
1674 -
1675 -# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license)
1676 -HTTP_HEADERS_MORE_MODULE_PV="0.31"
1677 -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
1678 -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
1679 -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
1680 -
1681 -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license)
1682 -HTTP_CACHE_PURGE_MODULE_PV="2.3"
1683 -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
1684 -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
1685 -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
1686 -
1687 -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
1688 -HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
1689 -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
1690 -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
1691 -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
1692 -
1693 -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
1694 -HTTP_FANCYINDEX_MODULE_PV="0.4.1"
1695 -HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
1696 -HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
1697 -HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
1698 -
1699 -# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
1700 -HTTP_LUA_MODULE_PV="0.10.6"
1701 -HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
1702 -HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
1703 -HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
1704 -
1705 -# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
1706 -HTTP_AUTH_PAM_MODULE_PV="1.5.1"
1707 -HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
1708 -HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
1709 -HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
1710 -
1711 -# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
1712 -HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0-10-g10782ea"
1713 -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
1714 -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
1715 -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-10782eaff51872a8f44e65eed89bbe286004bcb1"
1716 -
1717 -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
1718 -HTTP_METRICS_MODULE_PV="0.1.1"
1719 -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
1720 -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
1721 -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
1722 -
1723 -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
1724 -HTTP_NAXSI_MODULE_PV="0.54"
1725 -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
1726 -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
1727 -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
1728 -
1729 -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license)
1730 -RTMP_MODULE_PV="1.1.9"
1731 -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
1732 -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
1733 -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
1734 -
1735 -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license)
1736 -HTTP_DAV_EXT_MODULE_PV="0.0.3"
1737 -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
1738 -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
1739 -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
1740 -
1741 -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license)
1742 -HTTP_ECHO_MODULE_PV="0.60"
1743 -HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
1744 -HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
1745 -HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
1746 -
1747 -# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
1748 -# keep the MODULE_P here consistent with upstream to avoid tarball duplication
1749 -HTTP_SECURITY_MODULE_PV="2.9.1"
1750 -HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
1751 -HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
1752 -HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
1753 -
1754 -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
1755 -HTTP_PUSH_STREAM_MODULE_PV="0.5.2"
1756 -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
1757 -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
1758 -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
1759 -
1760 -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
1761 -HTTP_STICKY_MODULE_PV="1.2.6"
1762 -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
1763 -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
1764 -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-c78b7dd79d0d"
1765 -
1766 -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2)
1767 -HTTP_MOGILEFS_MODULE_PV="1.0.4"
1768 -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
1769 -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
1770 -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
1771 -
1772 -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2)
1773 -HTTP_MEMC_MODULE_PV="0.17"
1774 -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}"
1775 -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz"
1776 -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}"
1777 -
1778 -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2)
1779 -HTTP_LDAP_MODULE_PV="dbcef31bebb2d54b6120422d0b178bbf78bc48f7"
1780 -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
1781 -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz"
1782 -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
1783 -
1784 -# We handle deps below ourselves
1785 -SSL_DEPS_SKIP=1
1786 -
1787 -inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
1788 -
1789 -DESCRIPTION="Robust, small and high performance http and reverse proxy server"
1790 -HOMEPAGE="http://nginx.org"
1791 -SRC_URI="http://nginx.org/download/${P}.tar.gz
1792 - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
1793 - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
1794 - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
1795 - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
1796 - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
1797 - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
1798 - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
1799 - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
1800 - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
1801 - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
1802 - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
1803 - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )
1804 - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
1805 - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
1806 - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
1807 - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
1808 - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
1809 - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
1810 - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
1811 - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )"
1812 -
1813 -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
1814 - nginx_modules_http_security? ( Apache-2.0 )
1815 - nginx_modules_http_push_stream? ( GPL-3 )"
1816 -
1817 -SLOT="mainline"
1818 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
1819 -
1820 -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
1821 - fastcgi geo gzip limit_req limit_conn map memcached proxy referer
1822 - rewrite scgi ssi split_clients upstream_hash upstream_ip_hash
1823 - upstream_keepalive upstream_least_conn upstream_zone userid uwsgi"
1824 -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip
1825 - gzip_static image_filter mp4 perl random_index realip secure_link
1826 - slice stub_status sub xslt"
1827 -NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients
1828 - upstream_hash upstream_least_conn upstream_zone"
1829 -NGINX_MODULES_STREAM_OPT="geoip"
1830 -NGINX_MODULES_MAIL="imap pop3 smtp"
1831 -NGINX_MODULES_3RD="
1832 - http_upload_progress
1833 - http_headers_more
1834 - http_cache_purge
1835 - http_slowfs_cache
1836 - http_fancyindex
1837 - http_lua
1838 - http_auth_pam
1839 - http_upstream_check
1840 - http_metrics
1841 - http_naxsi
1842 - http_dav_ext
1843 - http_echo
1844 - http_security
1845 - http_push_stream
1846 - http_sticky
1847 - http_mogilefs
1848 - http_memc
1849 - http_auth_ldap"
1850 -
1851 -IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +pcre
1852 - pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax"
1853 -
1854 -for mod in $NGINX_MODULES_STD; do
1855 - IUSE="${IUSE} +nginx_modules_http_${mod}"
1856 -done
1857 -
1858 -for mod in $NGINX_MODULES_OPT; do
1859 - IUSE="${IUSE} nginx_modules_http_${mod}"
1860 -done
1861 -
1862 -for mod in $NGINX_MODULES_STREAM_STD; do
1863 - IUSE="${IUSE} nginx_modules_stream_${mod}"
1864 -done
1865 -
1866 -for mod in $NGINX_MODULES_STREAM_OPT; do
1867 - IUSE="${IUSE} nginx_modules_stream_${mod}"
1868 -done
1869 -
1870 -for mod in $NGINX_MODULES_MAIL; do
1871 - IUSE="${IUSE} nginx_modules_mail_${mod}"
1872 -done
1873 -
1874 -for mod in $NGINX_MODULES_3RD; do
1875 - IUSE="${IUSE} nginx_modules_${mod}"
1876 -done
1877 -
1878 -# Add so we can warn users updating about config changes
1879 -# @TODO: jbergstroem: remove on next release series
1880 -IUSE="${IUSE} nginx_modules_http_spdy"
1881 -
1882 -CDEPEND="
1883 - pcre? ( >=dev-libs/libpcre-4.2 )
1884 - pcre-jit? ( >=dev-libs/libpcre-8.20[jit] )
1885 - ssl? (
1886 - !libressl? ( dev-libs/openssl:0= )
1887 - libressl? ( dev-libs/libressl:= )
1888 - )
1889 - http2? (
1890 - !libressl? ( >=dev-libs/openssl-1.0.1c:0= )
1891 - libressl? ( dev-libs/libressl:= )
1892 - )
1893 - http-cache? (
1894 - userland_GNU? (
1895 - !libressl? ( dev-libs/openssl:0= )
1896 - libressl? ( dev-libs/libressl:= )
1897 - )
1898 - )
1899 - nginx_modules_http_geoip? ( dev-libs/geoip )
1900 - nginx_modules_http_gunzip? ( sys-libs/zlib )
1901 - nginx_modules_http_gzip? ( sys-libs/zlib )
1902 - nginx_modules_http_gzip_static? ( sys-libs/zlib )
1903 - nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
1904 - nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
1905 - nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
1906 - nginx_modules_http_secure_link? (
1907 - userland_GNU? (
1908 - !libressl? ( dev-libs/openssl:0= )
1909 - libressl? ( dev-libs/libressl:= )
1910 - )
1911 - )
1912 - nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
1913 - nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
1914 - nginx_modules_http_auth_pam? ( virtual/pam )
1915 - nginx_modules_http_metrics? ( dev-libs/yajl )
1916 - nginx_modules_http_dav_ext? ( dev-libs/expat )
1917 - nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )
1918 - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )"
1919 -RDEPEND="${CDEPEND}
1920 - selinux? ( sec-policy/selinux-nginx )
1921 - !www-servers/nginx:0"
1922 -DEPEND="${CDEPEND}
1923 - arm? ( dev-libs/libatomic_ops )
1924 - libatomic? ( dev-libs/libatomic_ops )"
1925 -PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
1926 -
1927 -REQUIRED_USE="pcre-jit? ( pcre )
1928 - nginx_modules_http_lua? ( nginx_modules_http_rewrite )
1929 - nginx_modules_http_naxsi? ( pcre )
1930 - nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
1931 - nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
1932 - nginx_modules_http_security? ( pcre )
1933 - nginx_modules_http_push_stream? ( ssl )"
1934 -
1935 -pkg_setup() {
1936 - NGINX_HOME="/var/lib/nginx"
1937 - NGINX_HOME_TMP="${NGINX_HOME}/tmp"
1938 -
1939 - ebegin "Creating nginx user and group"
1940 - enewgroup ${PN}
1941 - enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN}
1942 - eend $?
1943 -
1944 - if use libatomic; then
1945 - ewarn "GCC 4.1+ features built-in atomic operations."
1946 - ewarn "Using libatomic_ops is only needed if using"
1947 - ewarn "a different compiler or a GCC prior to 4.1"
1948 - fi
1949 -
1950 - if [[ -n $NGINX_ADD_MODULES ]]; then
1951 - ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
1952 - ewarn "This nginx installation is not supported!"
1953 - ewarn "Make sure you can reproduce the bug without those modules"
1954 - ewarn "_before_ reporting bugs."
1955 - fi
1956 -
1957 - if use !http; then
1958 - ewarn "To actually disable all http-functionality you also have to disable"
1959 - ewarn "all nginx http modules."
1960 - fi
1961 -
1962 - if use nginx_modules_http_mogilefs && use threads; then
1963 - eerror "mogilefs won't compile with threads support."
1964 - eerror "Please disable either flag and try again."
1965 - die "Can't compile mogilefs with threads support"
1966 - fi
1967 -}
1968 -
1969 -src_prepare() {
1970 - eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
1971 - eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
1972 - eapply "${FILESDIR}/${PN}-1.11.3-fix-build-without-stream_ssl_module.patch"
1973 -
1974 - if use nginx_modules_http_sticky; then
1975 - cd "${HTTP_STICKY_MODULE_WD}" || die
1976 - eapply "${FILESDIR}"/http-sticky-nginx-1.11.2.patch
1977 - cd "${S}" || die
1978 - fi
1979 -
1980 - if use nginx_modules_http_upstream_check; then
1981 - eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
1982 - fi
1983 -
1984 - if use nginx_modules_http_lua; then
1985 - sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
1986 - fi
1987 -
1988 - find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
1989 - # We have config protection, don't rename etc files
1990 - sed -i 's:.default::' auto/install || die
1991 - # remove useless files
1992 - sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
1993 -
1994 - # don't install to /etc/nginx/ if not in use
1995 - local module
1996 - for module in fastcgi scgi uwsgi ; do
1997 - if ! use nginx_modules_http_${module}; then
1998 - sed -i -e "/${module}/d" auto/install || die
1999 - fi
2000 - done
2001 -
2002 - eapply_user
2003 -}
2004 -
2005 -src_configure() {
2006 - # mod_security needs to generate nginx/modsecurity/config before including it
2007 - if use nginx_modules_http_security; then
2008 - cd "${HTTP_SECURITY_MODULE_WD}" || die
2009 - if use luajit ; then
2010 - sed -i \
2011 - -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
2012 - configure || die
2013 - fi
2014 - ./configure \
2015 - --enable-standalone-module \
2016 - $(use_enable pcre-jit) \
2017 - $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
2018 - fi
2019 -
2020 - cd "${S}" || die
2021 -
2022 - local myconf=() http_enabled= mail_enabled= stream_enabled=
2023 -
2024 - use aio && myconf+=( --with-file-aio )
2025 - use debug && myconf+=( --with-debug )
2026 - use http2 && myconf+=( --with-http_v2_module )
2027 - use ipv6 && myconf+=( --with-ipv6 )
2028 - use libatomic && myconf+=( --with-libatomic )
2029 - use pcre && myconf+=( --with-pcre )
2030 - use pcre-jit && myconf+=( --with-pcre-jit )
2031 - use threads && myconf+=( --with-threads )
2032 -
2033 - # HTTP modules
2034 - for mod in $NGINX_MODULES_STD; do
2035 - if use nginx_modules_http_${mod}; then
2036 - http_enabled=1
2037 - else
2038 - myconf+=( --without-http_${mod}_module )
2039 - fi
2040 - done
2041 -
2042 - for mod in $NGINX_MODULES_OPT; do
2043 - if use nginx_modules_http_${mod}; then
2044 - http_enabled=1
2045 - myconf+=( --with-http_${mod}_module )
2046 - fi
2047 - done
2048 -
2049 - if use nginx_modules_http_fastcgi; then
2050 - myconf+=( --with-http_realip_module )
2051 - fi
2052 -
2053 - # third-party modules
2054 - if use nginx_modules_http_upload_progress; then
2055 - http_enabled=1
2056 - myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
2057 - fi
2058 -
2059 - if use nginx_modules_http_headers_more; then
2060 - http_enabled=1
2061 - myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} )
2062 - fi
2063 -
2064 - if use nginx_modules_http_cache_purge; then
2065 - http_enabled=1
2066 - myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} )
2067 - fi
2068 -
2069 - if use nginx_modules_http_slowfs_cache; then
2070 - http_enabled=1
2071 - myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} )
2072 - fi
2073 -
2074 - if use nginx_modules_http_fancyindex; then
2075 - http_enabled=1
2076 - myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} )
2077 - fi
2078 -
2079 - if use nginx_modules_http_lua; then
2080 - http_enabled=1
2081 - if use luajit; then
2082 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
2083 - export LUAJIT_INC=$(pkg-config --variable includedir luajit)
2084 - else
2085 - export LUA_LIB=$(pkg-config --variable libdir lua)
2086 - export LUA_INC=$(pkg-config --variable includedir lua)
2087 - fi
2088 - myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} )
2089 - myconf+=( --add-module=${HTTP_LUA_MODULE_WD} )
2090 - fi
2091 -
2092 - if use nginx_modules_http_auth_pam; then
2093 - http_enabled=1
2094 - myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} )
2095 - fi
2096 -
2097 - if use nginx_modules_http_upstream_check; then
2098 - http_enabled=1
2099 - myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} )
2100 - fi
2101 -
2102 - if use nginx_modules_http_metrics; then
2103 - http_enabled=1
2104 - myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} )
2105 - fi
2106 -
2107 - if use nginx_modules_http_naxsi ; then
2108 - http_enabled=1
2109 - myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} )
2110 - fi
2111 -
2112 - if use rtmp ; then
2113 - http_enabled=1
2114 - myconf+=( --add-module=${RTMP_MODULE_WD} )
2115 - fi
2116 -
2117 - if use nginx_modules_http_dav_ext ; then
2118 - http_enabled=1
2119 - myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} )
2120 - fi
2121 -
2122 - if use nginx_modules_http_echo ; then
2123 - http_enabled=1
2124 - myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} )
2125 - fi
2126 -
2127 - if use nginx_modules_http_security ; then
2128 - http_enabled=1
2129 - myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity )
2130 - fi
2131 -
2132 - if use nginx_modules_http_push_stream ; then
2133 - http_enabled=1
2134 - myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} )
2135 - fi
2136 -
2137 - if use nginx_modules_http_sticky ; then
2138 - http_enabled=1
2139 - myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} )
2140 - fi
2141 -
2142 - if use nginx_modules_http_mogilefs ; then
2143 - http_enabled=1
2144 - myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} )
2145 - fi
2146 -
2147 - if use nginx_modules_http_memc ; then
2148 - http_enabled=1
2149 - myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} )
2150 - fi
2151 -
2152 - if use nginx_modules_http_auth_ldap; then
2153 - http_enabled=1
2154 - myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} )
2155 - fi
2156 -
2157 - if use http || use http-cache || use http2; then
2158 - http_enabled=1
2159 - fi
2160 -
2161 - if [ $http_enabled ]; then
2162 - use http-cache || myconf+=( --without-http-cache )
2163 - use ssl && myconf+=( --with-http_ssl_module )
2164 - else
2165 - myconf+=( --without-http --without-http-cache )
2166 - fi
2167 -
2168 - # Stream modules
2169 - for mod in $NGINX_MODULES_STREAM_STD; do
2170 - if use nginx_modules_stream_${mod}; then
2171 - stream_enabled=1
2172 - else
2173 - myconf+=( --without-stream_${mod}_module )
2174 - fi
2175 - done
2176 -
2177 - for mod in $NGINX_MODULES_STREAM_OPT; do
2178 - if use nginx_modules_stream_${mod}; then
2179 - stream_enabled=1
2180 - myconf+=( --with-stream_${mod}_module )
2181 - fi
2182 - done
2183 -
2184 - if [ $stream_enabled ]; then
2185 - myconf+=( --with-stream )
2186 - use ssl && myconf+=( --with-stream_ssl_module )
2187 - fi
2188 -
2189 - # MAIL modules
2190 - for mod in $NGINX_MODULES_MAIL; do
2191 - if use nginx_modules_mail_${mod}; then
2192 - mail_enabled=1
2193 - else
2194 - myconf+=( --without-mail_${mod}_module )
2195 - fi
2196 - done
2197 -
2198 - if [ $mail_enabled ]; then
2199 - myconf+=( --with-mail )
2200 - use ssl && myconf+=( --with-mail_ssl_module )
2201 - fi
2202 -
2203 - # custom modules
2204 - for mod in $NGINX_ADD_MODULES; do
2205 - myconf+=( --add-module=${mod} )
2206 - done
2207 -
2208 - # https://bugs.gentoo.org/286772
2209 - export LANG=C LC_ALL=C
2210 - tc-export CC
2211 -
2212 - if ! use prefix; then
2213 - myconf+=( --user=${PN} )
2214 - myconf+=( --group=${PN} )
2215 - fi
2216 -
2217 - ./configure \
2218 - --prefix="${EPREFIX}"/usr \
2219 - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
2220 - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
2221 - --pid-path="${EPREFIX}"/run/${PN}.pid \
2222 - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
2223 - --with-cc-opt="-I${EROOT}usr/include" \
2224 - --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
2225 - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
2226 - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
2227 - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
2228 - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
2229 - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
2230 - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
2231 - "${myconf[@]}" || die "configure failed"
2232 -
2233 - # A purely cosmetic change that makes nginx -V more readable. This can be
2234 - # good if people outside the gentoo community would troubleshoot and
2235 - # question the users setup.
2236 - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
2237 -}
2238 -
2239 -src_compile() {
2240 - use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
2241 -
2242 - # https://bugs.gentoo.org/286772
2243 - export LANG=C LC_ALL=C
2244 - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
2245 -}
2246 -
2247 -src_install() {
2248 - emake DESTDIR="${D%/}" install
2249 -
2250 - cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die
2251 -
2252 - newinitd "${FILESDIR}"/nginx.initd-r3 nginx
2253 -
2254 - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
2255 -
2256 - doman man/nginx.8
2257 - dodoc CHANGES* README
2258 -
2259 - # just keepdir. do not copy the default htdocs files (bug #449136)
2260 - keepdir /var/www/localhost
2261 - rm -rf "${D}"usr/html || die
2262 -
2263 - # set up a list of directories to keep
2264 - local keepdir_list="${NGINX_HOME_TMP}"/client
2265 - local module
2266 - for module in proxy fastcgi scgi uwsgi; do
2267 - use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
2268 - done
2269 -
2270 - keepdir /var/log/nginx ${keepdir_list}
2271 -
2272 - # this solves a problem with SELinux where nginx doesn't see the directories
2273 - # as root and tries to create them as nginx
2274 - fperms 0750 "${NGINX_HOME_TMP}"
2275 - fowners ${PN}:0 "${NGINX_HOME_TMP}"
2276 -
2277 - fperms 0700 /var/log/nginx ${keepdir_list}
2278 - fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
2279 -
2280 - # logrotate
2281 - insinto /etc/logrotate.d
2282 - newins "${FILESDIR}"/nginx.logrotate-r1 nginx
2283 -
2284 - if use nginx_modules_http_perl; then
2285 - cd "${S}"/objs/src/http/modules/perl/ || die
2286 - emake DESTDIR="${D}" INSTALLDIRS=vendor
2287 - perl_delete_localpod
2288 - cd "${S}" || die
2289 - fi
2290 -
2291 - if use nginx_modules_http_cache_purge; then
2292 - docinto ${HTTP_CACHE_PURGE_MODULE_P}
2293 - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
2294 - fi
2295 -
2296 - if use nginx_modules_http_slowfs_cache; then
2297 - docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
2298 - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
2299 - fi
2300 -
2301 - if use nginx_modules_http_fancyindex; then
2302 - docinto ${HTTP_FANCYINDEX_MODULE_P}
2303 - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
2304 - fi
2305 -
2306 - if use nginx_modules_http_lua; then
2307 - docinto ${HTTP_LUA_MODULE_P}
2308 - dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown
2309 - fi
2310 -
2311 - if use nginx_modules_http_auth_pam; then
2312 - docinto ${HTTP_AUTH_PAM_MODULE_P}
2313 - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
2314 - fi
2315 -
2316 - if use nginx_modules_http_upstream_check; then
2317 - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
2318 - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
2319 - fi
2320 -
2321 - if use nginx_modules_http_naxsi; then
2322 - insinto /etc/nginx
2323 - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
2324 - fi
2325 -
2326 - if use rtmp; then
2327 - docinto ${RTMP_MODULE_P}
2328 - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
2329 - fi
2330 -
2331 - if use nginx_modules_http_dav_ext; then
2332 - docinto ${HTTP_DAV_EXT_MODULE_P}
2333 - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README
2334 - fi
2335 -
2336 - if use nginx_modules_http_echo; then
2337 - docinto ${HTTP_ECHO_MODULE_P}
2338 - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown
2339 - fi
2340 -
2341 - if use nginx_modules_http_security; then
2342 - docinto ${HTTP_SECURITY_MODULE_P}
2343 - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt}
2344 - fi
2345 -
2346 - if use nginx_modules_http_push_stream; then
2347 - docinto ${HTTP_PUSH_STREAM_MODULE_P}
2348 - dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
2349 - fi
2350 -
2351 - if use nginx_modules_http_sticky; then
2352 - docinto ${HTTP_STICKY_MODULE_P}
2353 - dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
2354 - fi
2355 -
2356 - if use nginx_modules_http_memc; then
2357 - docinto ${HTTP_MEMC_MODULE_P}
2358 - dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown
2359 - fi
2360 -
2361 - if use nginx_modules_http_auth_ldap; then
2362 - docinto ${HTTP_LDAP_MODULE_P}
2363 - dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf
2364 - fi
2365 -}
2366 -
2367 -pkg_postinst() {
2368 - if use ssl; then
2369 - if [[ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]]; then
2370 - install_cert /etc/ssl/${PN}/${PN}
2371 - use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
2372 - fi
2373 - fi
2374 -
2375 - if use nginx_modules_http_spdy; then
2376 - ewarn "In nginx 1.9.5 the spdy module was superseded by http2."
2377 - ewarn "Update your configs and package.use accordingly."
2378 - fi
2379 -
2380 - if use nginx_modules_http_lua && use http2; then
2381 - ewarn "Lua 3rd party module author warns against using ${P} with"
2382 - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
2383 - fi
2384 -
2385 - # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
2386 - # existing installations
2387 - local fix_perms=0
2388 -
2389 - for rv in ${REPLACING_VERSIONS}; do
2390 - version_compare ${rv} 1.4.1-r2
2391 - [[ $? -eq 1 ]] && fix_perms=1
2392 - done
2393 -
2394 - if [[ $fix_perms -eq 1 ]] ; then
2395 - ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
2396 - ewarn "directories the world-readable bit removed (if set):"
2397 - ewarn " ${EPREFIX}/var/log/nginx"
2398 - ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
2399 - ewarn "Check if this is correct for your setup before restarting nginx!"
2400 - ewarn "This is a one-time change and will not happen on subsequent updates."
2401 - ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}"
2402 - chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
2403 - fi
2404 -
2405 - # If the nginx user can't change into or read the dir, display a warning.
2406 - # If su is not available we display the warning nevertheless since we can't check properly
2407 - su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
2408 - if [ $? -ne 0 ] ; then
2409 - ewarn "Please make sure that the nginx user or group has at least"
2410 - ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
2411 - ewarn "Otherwise you end up with empty log files after a logrotate."
2412 - fi
2413 -
2414 - # HTTPoxy mitigation
2415 - ewarn ""
2416 - ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
2417 - ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
2418 - ewarn "parameter to an empty string per default when you are sourcing the default"
2419 - ewarn "'fastcgi_params' or 'fastcgi.conf' in your server block(s)."
2420 - ewarn ""
2421 - ewarn "If this is causing any problems for you make sure that you are sourcing the"
2422 - ewarn "default parameters _before_ you set your own values."
2423 - ewarn "If you are relying on user-supplied proxy values you have to remove the"
2424 - ewarn "correlating lines from 'fastcgi_params' and or 'fastcgi.conf'."
2425 -}