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/
Date: Wed, 29 Apr 2020 21:14:34
Message-Id: 1588194857.21db0af253b03683cb376c2f245a4ac1c79be1d4.whissi@gentoo
1 commit: 21db0af253b03683cb376c2f245a4ac1c79be1d4
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 29 21:00:53 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 29 21:14:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21db0af2
7
8 www-servers/nginx: drop old
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 www-servers/nginx/Manifest | 1 -
14 www-servers/nginx/nginx-1.17.9-r2.ebuild | 1093 ------------------------------
15 2 files changed, 1094 deletions(-)
16
17 diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
18 index 70170487527..3adbce9a1a6 100644
19 --- a/www-servers/nginx/Manifest
20 +++ b/www-servers/nginx/Manifest
21 @@ -1,7 +1,6 @@
22 DIST modsecurity-2.9.3.tar.gz 4307670 BLAKE2B 337ea15cc8805af7ab43aed8aecf4c72ccc586d0d7e9d9b91f036a61baa70d1ac8b4ad8045a2bb7a13515912a15fba7d3cdb9670ae6730de43b1e44ee90ded6d SHA512 4e1ea5dd8edadf8f630e4fe92a200d3a8e78963fce3128b5975a1e1ecd0e8bf9ceecd9905c95f8c508932ccd837f1d8ae8bb2ba423307718c3c6a4ae9b783ddd
23 DIST nginx-1.16.1.tar.gz 1032630 BLAKE2B 838c5f08b56378dd3ef3940a979eb1449c4ed7ef5b4b112da2531c0996d121ae32ae4e94d3b4ba198fefcdc1b06683e4b0cfa0087db82fcab13bffb5f67f8aa4 SHA512 17e95b43fa47d4fef5e652dea587518e16ab5ec562c9c94355c356440166d4b6a6a41ee520d406e5a34791a327d2e3c46b3f9b105ac9ce07afdd495c49eca437
24 DIST nginx-1.17.10.tar.gz 1039541 BLAKE2B 5e86be6c6aebfd336579269ecfa09eab9ff5c0185e0bd36f993b5ccac4d13f64ef3d10cad4d0ac00c7fb67e3ecb048b7b0f4c74cf5c5376fdc643b5cecee28ac SHA512 0b49169bc49e07733862e09ec5bfa93601ffa57379f98d52a115e511502905baf4cd33b73a03d74416f8c6ffa95ebf4459fc934bd40bfdf54d5b6d35ac4f8756
25 -DIST nginx-1.17.9.tar.gz 1039136 BLAKE2B bc4cb6fa93288f936ee36b86846b9eb864406799bd1cbc14b2e924e30b0490858e573100ea1e6ca506e1353c71176ebaa5e0109e3d5395e9029a41fa899c60ef SHA512 9d6af46bc575763d5d2c279451919a491bdfafb927a8c0783ccc8326a86ed66f9183c900a9844bf31dcde015f36ea6a8e0d3817b77f9b17aebae701c759fe9b6
26 DIST nginx-auth-ldap-42d195d7a7575ebab1c369ad3fc5d78dc2c2669c.tar.gz 18457 BLAKE2B 22225ca9e5299b20ab5a93a001cac48e446bd86b3a24ac49e716bc975b128890bdb4b0dbbf5730fbaaeadfd958160093c7a6af798dd0e6de27062f149a760333 SHA512 ec59637fda5acac053e815cb1d04b545fc6b765e5ec63d8c2c9c301abad87afaa2698145acac08e9e14c91e1423ebff7aff0cca2b940b19ccccbf4cf53973269
27 DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 BLAKE2B d37ef9a15c91abe3c6258e420d1f99fa452f9d9966a0e13102174973314a3bac5413957a5fe632a9dcb1163b3be5df8116e05cc053ee061e19319ec25f341570 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529
28 DIST ngx_brotli-8104036af9cff4b1d34f22d00ba857e2a93a243c.tar.gz 12672 BLAKE2B fa2febfa63b98303f8890c6774de6ccb09475ccd639d3b74493a4ffd97c90febdc22755c5928018bdac24a537bd13cde165f97e5d2b50bebf598c3fb22ec0206 SHA512 169566b8764bb2b82e029f954a99063a9c61e2cbf982861c5f6818b389a5f37bf5389afb1b5627de9bd3f7af7b3c404be0230f943d47ab621c2a2bd825cc8203
29
30 diff --git a/www-servers/nginx/nginx-1.17.9-r2.ebuild b/www-servers/nginx/nginx-1.17.9-r2.ebuild
31 deleted file mode 100644
32 index 6cda406abe2..00000000000
33 --- a/www-servers/nginx/nginx-1.17.9-r2.ebuild
34 +++ /dev/null
35 @@ -1,1093 +0,0 @@
36 -# Copyright 1999-2020 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI="6"
40 -
41 -# Maintainer notes:
42 -# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
43 -# - any http-module activates the main http-functionality and overrides USE=-http
44 -# - keep the following requirements in mind before adding external modules:
45 -# * alive upstream
46 -# * sane packaging
47 -# * builds cleanly
48 -# * does not need a patch for nginx core
49 -# - TODO: test the google-perftools module (included in vanilla tarball)
50 -
51 -# prevent perl-module from adding automagic perl DEPENDs
52 -GENTOO_DEPEND_ON_PERL="no"
53 -
54 -# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
55 -DEVEL_KIT_MODULE_PV="0.3.1"
56 -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
57 -DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
58 -DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
59 -
60 -# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2)
61 -HTTP_BROTLI_MODULE_PV="8104036af9cff4b1d34f22d00ba857e2a93a243c"
62 -HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}"
63 -HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/${HTTP_BROTLI_MODULE_PV}.tar.gz"
64 -HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_MODULE_PV}"
65 -
66 -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
67 -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2"
68 -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
69 -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
70 -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
71 -
72 -# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license)
73 -HTTP_HEADERS_MORE_MODULE_PV="0.33"
74 -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
75 -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
76 -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
77 -
78 -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license)
79 -HTTP_CACHE_PURGE_MODULE_PV="2.3"
80 -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
81 -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
82 -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
83 -
84 -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
85 -HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
86 -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
87 -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
88 -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
89 -
90 -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
91 -HTTP_FANCYINDEX_MODULE_PV="0.4.3"
92 -HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
93 -HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
94 -HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
95 -
96 -# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
97 -HTTP_LUA_MODULE_PV="0.10.15"
98 -HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
99 -HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
100 -HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
101 -
102 -# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
103 -HTTP_AUTH_PAM_MODULE_PV="1.5.1"
104 -HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
105 -HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
106 -HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
107 -
108 -# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
109 -HTTP_UPSTREAM_CHECK_MODULE_PV="9aecf15ec379fe98f62355c57b60c0bc83296f04"
110 -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
111 -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
112 -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
113 -
114 -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
115 -HTTP_METRICS_MODULE_PV="0.1.1"
116 -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
117 -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
118 -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
119 -
120 -# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license)
121 -HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3"
122 -HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}"
123 -HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz"
124 -HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}"
125 -
126 -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
127 -HTTP_NAXSI_MODULE_PV="0.56"
128 -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
129 -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
130 -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
131 -
132 -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license)
133 -RTMP_MODULE_PV="1.2.1"
134 -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
135 -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
136 -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
137 -
138 -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license)
139 -HTTP_DAV_EXT_MODULE_PV="3.0.0"
140 -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
141 -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
142 -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
143 -
144 -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license)
145 -HTTP_ECHO_MODULE_PV="0.62rc1"
146 -HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
147 -HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
148 -HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
149 -
150 -# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
151 -# keep the MODULE_P here consistent with upstream to avoid tarball duplication
152 -HTTP_SECURITY_MODULE_PV="2.9.3"
153 -HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
154 -HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
155 -HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
156 -
157 -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
158 -HTTP_PUSH_STREAM_MODULE_PV="0.5.4"
159 -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
160 -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
161 -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
162 -
163 -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
164 -HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42"
165 -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
166 -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
167 -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42"
168 -
169 -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2)
170 -HTTP_MOGILEFS_MODULE_PV="1.0.4"
171 -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
172 -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
173 -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
174 -
175 -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2)
176 -HTTP_MEMC_MODULE_PV="0.19"
177 -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}"
178 -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz"
179 -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}"
180 -
181 -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2)
182 -HTTP_LDAP_MODULE_PV="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c"
183 -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
184 -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz"
185 -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
186 -
187 -# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2)
188 -GEOIP2_MODULE_PV="3.3"
189 -GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}"
190 -GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz"
191 -GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}"
192 -
193 -# njs-module (https://github.com/nginx/njs, as-is)
194 -NJS_MODULE_PV="0.3.9"
195 -NJS_MODULE_P="njs-${NJS_MODULE_PV}"
196 -NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz"
197 -NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}"
198 -
199 -# We handle deps below ourselves
200 -SSL_DEPS_SKIP=1
201 -AUTOTOOLS_AUTO_DEPEND="no"
202 -
203 -inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib pax-utils
204 -
205 -DESCRIPTION="Robust, small and high performance http and reverse proxy server"
206 -HOMEPAGE="https://nginx.org"
207 -SRC_URI="https://nginx.org/download/${P}.tar.gz
208 - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
209 - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )
210 - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
211 - nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz )
212 - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
213 - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
214 - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
215 - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
216 - nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz )
217 - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
218 - nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz )
219 - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
220 - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
221 - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
222 - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
223 - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
224 - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
225 - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
226 - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
227 - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
228 - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
229 - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
230 - nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz )
231 - nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz )
232 - nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz )
233 - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )"
234 -
235 -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
236 - nginx_modules_http_security? ( Apache-2.0 )
237 - nginx_modules_http_push_stream? ( GPL-3 )"
238 -
239 -SLOT="mainline"
240 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
241 -
242 -# Package doesn't provide a real test suite
243 -RESTRICT="test"
244 -
245 -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
246 - fastcgi geo grpc gzip limit_req limit_conn map memcached mirror
247 - proxy referer rewrite scgi ssi split_clients upstream_hash
248 - upstream_ip_hash upstream_keepalive upstream_least_conn
249 - upstream_zone userid uwsgi"
250 -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip
251 - gzip_static image_filter mp4 perl random_index realip secure_link
252 - slice stub_status sub xslt"
253 -NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients
254 - upstream_hash upstream_least_conn upstream_zone"
255 -NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread"
256 -NGINX_MODULES_MAIL="imap pop3 smtp"
257 -NGINX_MODULES_3RD="
258 - http_auth_ldap
259 - http_auth_pam
260 - http_brotli
261 - http_cache_purge
262 - http_dav_ext
263 - http_echo
264 - http_fancyindex
265 - http_geoip2
266 - http_headers_more
267 - http_javascript
268 - http_lua
269 - http_memc
270 - http_metrics
271 - http_mogilefs
272 - http_naxsi
273 - http_push_stream
274 - http_security
275 - http_slowfs_cache
276 - http_sticky
277 - http_upload_progress
278 - http_upstream_check
279 - http_vhost_traffic_status
280 - stream_geoip2
281 - stream_javascript
282 -"
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_STD; do
296 - IUSE="${IUSE} nginx_modules_stream_${mod}"
297 -done
298 -
299 -for mod in $NGINX_MODULES_STREAM_OPT; do
300 - IUSE="${IUSE} nginx_modules_stream_${mod}"
301 -done
302 -
303 -for mod in $NGINX_MODULES_MAIL; do
304 - IUSE="${IUSE} nginx_modules_mail_${mod}"
305 -done
306 -
307 -for mod in $NGINX_MODULES_3RD; do
308 - IUSE="${IUSE} nginx_modules_${mod}"
309 -done
310 -
311 -# Add so we can warn users updating about config changes
312 -# @TODO: jbergstroem: remove on next release series
313 -IUSE="${IUSE} nginx_modules_http_spdy"
314 -
315 -CDEPEND="
316 - pcre? ( dev-libs/libpcre:= )
317 - pcre-jit? ( dev-libs/libpcre:=[jit] )
318 - ssl? (
319 - !libressl? ( dev-libs/openssl:0= )
320 - libressl? ( dev-libs/libressl:= )
321 - )
322 - http2? (
323 - !libressl? ( >=dev-libs/openssl-1.0.1c:0= )
324 - libressl? ( dev-libs/libressl:= )
325 - )
326 - http-cache? (
327 - userland_GNU? (
328 - !libressl? ( dev-libs/openssl:0= )
329 - libressl? ( dev-libs/libressl:= )
330 - )
331 - )
332 - nginx_modules_http_brotli? ( app-arch/brotli:= )
333 - nginx_modules_http_geoip? ( dev-libs/geoip )
334 - nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= )
335 - nginx_modules_http_gunzip? ( sys-libs/zlib )
336 - nginx_modules_http_gzip? ( sys-libs/zlib )
337 - nginx_modules_http_gzip_static? ( sys-libs/zlib )
338 - nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] )
339 - nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= )
340 - nginx_modules_http_rewrite? ( dev-libs/libpcre:= )
341 - nginx_modules_http_secure_link? (
342 - userland_GNU? (
343 - !libressl? ( dev-libs/openssl:0= )
344 - libressl? ( dev-libs/libressl:= )
345 - )
346 - )
347 - nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt )
348 - nginx_modules_http_lua? ( dev-lang/luajit:2= )
349 - nginx_modules_http_auth_pam? ( sys-libs/pam )
350 - nginx_modules_http_metrics? ( dev-libs/yajl:= )
351 - nginx_modules_http_dav_ext? ( dev-libs/libxml2 )
352 - nginx_modules_http_security? (
353 - dev-libs/apr:=
354 - dev-libs/apr-util:=
355 - dev-libs/libxml2:=
356 - net-misc/curl
357 - www-servers/apache
358 - )
359 - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )
360 - nginx_modules_stream_geoip? ( dev-libs/geoip )
361 - nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )"
362 -RDEPEND="${CDEPEND}
363 - selinux? ( sec-policy/selinux-nginx )
364 - !www-servers/nginx:0"
365 -DEPEND="${CDEPEND}
366 - nginx_modules_http_brotli? ( virtual/pkgconfig )
367 - nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
368 - arm? ( dev-libs/libatomic_ops )
369 - libatomic? ( dev-libs/libatomic_ops )"
370 -PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
371 -
372 -REQUIRED_USE="pcre-jit? ( pcre )
373 - nginx_modules_http_fancyindex? ( nginx_modules_http_addition )
374 - nginx_modules_http_grpc? ( http2 )
375 - nginx_modules_http_lua? (
376 - luajit
377 - nginx_modules_http_rewrite
378 - )
379 - nginx_modules_http_naxsi? ( pcre )
380 - nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt )
381 - nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
382 - nginx_modules_http_security? ( pcre )
383 - nginx_modules_http_push_stream? ( ssl )"
384 -
385 -pkg_setup() {
386 - NGINX_HOME="/var/lib/nginx"
387 - NGINX_HOME_TMP="${NGINX_HOME}/tmp"
388 -
389 - ebegin "Creating nginx user and group"
390 - enewgroup ${PN}
391 - enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN}
392 - eend $?
393 -
394 - if use libatomic; then
395 - ewarn "GCC 4.1+ features built-in atomic operations."
396 - ewarn "Using libatomic_ops is only needed if using"
397 - ewarn "a different compiler or a GCC prior to 4.1"
398 - fi
399 -
400 - if [[ -n $NGINX_ADD_MODULES ]]; then
401 - ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
402 - ewarn "This nginx installation is not supported!"
403 - ewarn "Make sure you can reproduce the bug without those modules"
404 - ewarn "_before_ reporting bugs."
405 - fi
406 -
407 - if use !http; then
408 - ewarn "To actually disable all http-functionality you also have to disable"
409 - ewarn "all nginx http modules."
410 - fi
411 -
412 - if use nginx_modules_http_mogilefs && use threads; then
413 - eerror "mogilefs won't compile with threads support."
414 - eerror "Please disable either flag and try again."
415 - die "Can't compile mogilefs with threads support"
416 - fi
417 -}
418 -
419 -src_prepare() {
420 - eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
421 - eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
422 -
423 - if use nginx_modules_http_auth_pam; then
424 - cd "${HTTP_AUTH_PAM_MODULE_WD}" || die
425 - eapply "${FILESDIR}"/http_auth_pam-1.5.1-adjust-loglevel-for-authentication-failures.patch
426 - cd "${S}" || die
427 - fi
428 -
429 - if use nginx_modules_http_brotli; then
430 - cd "${HTTP_BROTLI_MODULE_WD}" || die
431 - eapply "${FILESDIR}"/http_brotli-detect-brotli-r2.patch
432 - cd "${S}" || die
433 - fi
434 -
435 - if use nginx_modules_http_upstream_check; then
436 - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch
437 - fi
438 -
439 - if use nginx_modules_http_cache_purge; then
440 - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die
441 - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch
442 - cd "${S}" || die
443 - fi
444 -
445 - if use nginx_modules_http_security; then
446 - cd "${HTTP_SECURITY_MODULE_WD}" || die
447 -
448 - eautoreconf
449 -
450 - if use luajit ; then
451 - sed -i \
452 - -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
453 - configure || die
454 - fi
455 -
456 - cd "${S}" || die
457 - fi
458 -
459 - if use nginx_modules_http_upload_progress; then
460 - cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die
461 - eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.patch
462 - cd "${S}" || die
463 - fi
464 -
465 - find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
466 - # We have config protection, don't rename etc files
467 - sed -i 's:.default::' auto/install || die
468 - # remove useless files
469 - sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
470 -
471 - # don't install to /etc/nginx/ if not in use
472 - local module
473 - for module in fastcgi scgi uwsgi ; do
474 - if ! use nginx_modules_http_${module}; then
475 - sed -i -e "/${module}/d" auto/install || die
476 - fi
477 - done
478 -
479 - eapply_user
480 -}
481 -
482 -src_configure() {
483 - # mod_security needs to generate nginx/modsecurity/config before including it
484 - if use nginx_modules_http_security; then
485 - cd "${HTTP_SECURITY_MODULE_WD}" || die
486 -
487 - ./configure \
488 - --enable-standalone-module \
489 - --disable-mlogc \
490 - --with-ssdeep=no \
491 - $(use_enable pcre-jit) \
492 - $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
493 -
494 - cd "${S}" || die
495 - fi
496 -
497 - local myconf=() http_enabled= mail_enabled= stream_enabled=
498 -
499 - use aio && myconf+=( --with-file-aio )
500 - use debug && myconf+=( --with-debug )
501 - use http2 && myconf+=( --with-http_v2_module )
502 - use libatomic && myconf+=( --with-libatomic )
503 - use pcre && myconf+=( --with-pcre )
504 - use pcre-jit && myconf+=( --with-pcre-jit )
505 - use threads && myconf+=( --with-threads )
506 -
507 - # HTTP modules
508 - for mod in $NGINX_MODULES_STD; do
509 - if use nginx_modules_http_${mod}; then
510 - http_enabled=1
511 - else
512 - myconf+=( --without-http_${mod}_module )
513 - fi
514 - done
515 -
516 - for mod in $NGINX_MODULES_OPT; do
517 - if use nginx_modules_http_${mod}; then
518 - http_enabled=1
519 - myconf+=( --with-http_${mod}_module )
520 - fi
521 - done
522 -
523 - if use nginx_modules_http_fastcgi; then
524 - myconf+=( --with-http_realip_module )
525 - fi
526 -
527 - # third-party modules
528 - if use nginx_modules_http_upload_progress; then
529 - http_enabled=1
530 - myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
531 - fi
532 -
533 - if use nginx_modules_http_headers_more; then
534 - http_enabled=1
535 - myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} )
536 - fi
537 -
538 - if use nginx_modules_http_cache_purge; then
539 - http_enabled=1
540 - myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} )
541 - fi
542 -
543 - if use nginx_modules_http_slowfs_cache; then
544 - http_enabled=1
545 - myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} )
546 - fi
547 -
548 - if use nginx_modules_http_fancyindex; then
549 - http_enabled=1
550 - myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} )
551 - fi
552 -
553 - if use nginx_modules_http_lua; then
554 - http_enabled=1
555 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
556 - export LUAJIT_INC=$(pkg-config --variable includedir luajit)
557 - myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} )
558 - myconf+=( --add-module=${HTTP_LUA_MODULE_WD} )
559 - fi
560 -
561 - if use nginx_modules_http_auth_pam; then
562 - http_enabled=1
563 - myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} )
564 - fi
565 -
566 - if use nginx_modules_http_upstream_check; then
567 - http_enabled=1
568 - myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} )
569 - fi
570 -
571 - if use nginx_modules_http_metrics; then
572 - http_enabled=1
573 - myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} )
574 - fi
575 -
576 - if use nginx_modules_http_naxsi ; then
577 - http_enabled=1
578 - myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} )
579 - fi
580 -
581 - if use rtmp ; then
582 - http_enabled=1
583 - myconf+=( --add-module=${RTMP_MODULE_WD} )
584 - fi
585 -
586 - if use nginx_modules_http_dav_ext ; then
587 - http_enabled=1
588 - myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} )
589 - fi
590 -
591 - if use nginx_modules_http_echo ; then
592 - http_enabled=1
593 - myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} )
594 - fi
595 -
596 - if use nginx_modules_http_security ; then
597 - http_enabled=1
598 - myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity )
599 - fi
600 -
601 - if use nginx_modules_http_push_stream ; then
602 - http_enabled=1
603 - myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} )
604 - fi
605 -
606 - if use nginx_modules_http_sticky ; then
607 - http_enabled=1
608 - myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} )
609 - fi
610 -
611 - if use nginx_modules_http_mogilefs ; then
612 - http_enabled=1
613 - myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} )
614 - fi
615 -
616 - if use nginx_modules_http_memc ; then
617 - http_enabled=1
618 - myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} )
619 - fi
620 -
621 - if use nginx_modules_http_auth_ldap; then
622 - http_enabled=1
623 - myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} )
624 - fi
625 -
626 - if use nginx_modules_http_vhost_traffic_status; then
627 - http_enabled=1
628 - myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} )
629 - fi
630 -
631 - if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then
632 - myconf+=( --add-module=${GEOIP2_MODULE_WD} )
633 - fi
634 -
635 - if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then
636 - myconf+=( --add-module="${NJS_MODULE_WD}/nginx" )
637 - fi
638 -
639 - if use nginx_modules_http_brotli; then
640 - http_enabled=1
641 - myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} )
642 - fi
643 -
644 - if use http || use http-cache || use http2 || use nginx_modules_http_javascript; then
645 - http_enabled=1
646 - fi
647 -
648 - if [ $http_enabled ]; then
649 - use http-cache || myconf+=( --without-http-cache )
650 - use ssl && myconf+=( --with-http_ssl_module )
651 - else
652 - myconf+=( --without-http --without-http-cache )
653 - fi
654 -
655 - # Stream modules
656 - for mod in $NGINX_MODULES_STREAM_STD; do
657 - if use nginx_modules_stream_${mod}; then
658 - stream_enabled=1
659 - else
660 - myconf+=( --without-stream_${mod}_module )
661 - fi
662 - done
663 -
664 - for mod in $NGINX_MODULES_STREAM_OPT; do
665 - if use nginx_modules_stream_${mod}; then
666 - stream_enabled=1
667 - myconf+=( --with-stream_${mod}_module )
668 - fi
669 - done
670 -
671 - if use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then
672 - stream_enabled=1
673 - fi
674 -
675 - if [ $stream_enabled ]; then
676 - myconf+=( --with-stream )
677 - use ssl && myconf+=( --with-stream_ssl_module )
678 - fi
679 -
680 - # MAIL modules
681 - for mod in $NGINX_MODULES_MAIL; do
682 - if use nginx_modules_mail_${mod}; then
683 - mail_enabled=1
684 - else
685 - myconf+=( --without-mail_${mod}_module )
686 - fi
687 - done
688 -
689 - if [ $mail_enabled ]; then
690 - myconf+=( --with-mail )
691 - use ssl && myconf+=( --with-mail_ssl_module )
692 - fi
693 -
694 - # custom modules
695 - for mod in $NGINX_ADD_MODULES; do
696 - myconf+=( --add-module=${mod} )
697 - done
698 -
699 - # https://bugs.gentoo.org/286772
700 - export LANG=C LC_ALL=C
701 - tc-export CC
702 -
703 - if ! use prefix; then
704 - myconf+=( --user=${PN} )
705 - myconf+=( --group=${PN} )
706 - fi
707 -
708 - local WITHOUT_IPV6=
709 - if ! use ipv6; then
710 - WITHOUT_IPV6=" -DNGX_HAVE_INET6=0"
711 - fi
712 -
713 - if [[ -n "${EXTRA_ECONF}" ]]; then
714 - myconf+=( ${EXTRA_ECONF} )
715 - ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!"
716 - fi
717 -
718 - ./configure \
719 - --prefix="${EPREFIX}"/usr \
720 - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
721 - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
722 - --pid-path="${EPREFIX}"/run/${PN}.pid \
723 - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
724 - --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \
725 - --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
726 - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
727 - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
728 - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
729 - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
730 - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
731 - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
732 - --with-compat \
733 - "${myconf[@]}" || die "configure failed"
734 -
735 - # A purely cosmetic change that makes nginx -V more readable. This can be
736 - # good if people outside the gentoo community would troubleshoot and
737 - # question the users setup.
738 - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
739 -}
740 -
741 -src_compile() {
742 - use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
743 -
744 - # https://bugs.gentoo.org/286772
745 - export LANG=C LC_ALL=C
746 - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
747 -}
748 -
749 -src_install() {
750 - emake DESTDIR="${D%/}" install
751 -
752 - cp "${FILESDIR}"/nginx.conf-r2 "${ED%/}"/etc/nginx/nginx.conf || die
753 -
754 - newinitd "${FILESDIR}"/nginx.initd-r4 nginx
755 - newconfd "${FILESDIR}"/nginx.confd nginx
756 -
757 - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
758 -
759 - doman man/nginx.8
760 - dodoc CHANGES* README
761 -
762 - # just keepdir. do not copy the default htdocs files (bug #449136)
763 - keepdir /var/www/localhost
764 - rm -rf "${ED%/}"/usr/html || die
765 -
766 - # set up a list of directories to keep
767 - local keepdir_list="${NGINX_HOME_TMP}"/client
768 - local module
769 - for module in proxy fastcgi scgi uwsgi; do
770 - use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
771 - done
772 -
773 - keepdir /var/log/nginx ${keepdir_list}
774 -
775 - # this solves a problem with SELinux where nginx doesn't see the directories
776 - # as root and tries to create them as nginx
777 - fperms 0750 "${NGINX_HOME_TMP}"
778 - fowners ${PN}:0 "${NGINX_HOME_TMP}"
779 -
780 - fperms 0700 ${keepdir_list}
781 - fowners ${PN}:${PN} ${keepdir_list}
782 -
783 - fperms 0710 /var/log/nginx
784 - fowners 0:${PN} /var/log/nginx
785 -
786 - # logrotate
787 - insinto /etc/logrotate.d
788 - newins "${FILESDIR}"/nginx.logrotate-r1 nginx
789 -
790 - # Don't create /run
791 - rm -rf "${ED%/}"/run || die
792 -
793 - if use luajit; then
794 - pax-mark m "${ED%/}/usr/sbin/nginx"
795 - fi
796 -
797 - if use nginx_modules_http_perl; then
798 - cd "${S}"/objs/src/http/modules/perl/ || die
799 - emake DESTDIR="${D}" INSTALLDIRS=vendor
800 - perl_delete_localpod
801 - cd "${S}" || die
802 - fi
803 -
804 - if use nginx_modules_http_cache_purge; then
805 - docinto ${HTTP_CACHE_PURGE_MODULE_P}
806 - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
807 - fi
808 -
809 - if use nginx_modules_http_slowfs_cache; then
810 - docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
811 - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
812 - fi
813 -
814 - if use nginx_modules_http_fancyindex; then
815 - docinto ${HTTP_FANCYINDEX_MODULE_P}
816 - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
817 - fi
818 -
819 - if use nginx_modules_http_lua; then
820 - docinto ${HTTP_LUA_MODULE_P}
821 - dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown
822 - fi
823 -
824 - if use nginx_modules_http_auth_pam; then
825 - docinto ${HTTP_AUTH_PAM_MODULE_P}
826 - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
827 - fi
828 -
829 - if use nginx_modules_http_upstream_check; then
830 - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
831 - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
832 - fi
833 -
834 - if use nginx_modules_http_naxsi; then
835 - insinto /etc/nginx
836 - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
837 - fi
838 -
839 - if use rtmp; then
840 - docinto ${RTMP_MODULE_P}
841 - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
842 - fi
843 -
844 - if use nginx_modules_http_dav_ext; then
845 - docinto ${HTTP_DAV_EXT_MODULE_P}
846 - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst
847 - fi
848 -
849 - if use nginx_modules_http_echo; then
850 - docinto ${HTTP_ECHO_MODULE_P}
851 - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown
852 - fi
853 -
854 - if use nginx_modules_http_security; then
855 - docinto ${HTTP_SECURITY_MODULE_P}
856 - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.md,authors.txt}
857 - fi
858 -
859 - if use nginx_modules_http_push_stream; then
860 - docinto ${HTTP_PUSH_STREAM_MODULE_P}
861 - dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
862 - fi
863 -
864 - if use nginx_modules_http_sticky; then
865 - docinto ${HTTP_STICKY_MODULE_P}
866 - dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
867 - fi
868 -
869 - if use nginx_modules_http_memc; then
870 - docinto ${HTTP_MEMC_MODULE_P}
871 - dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown
872 - fi
873 -
874 - if use nginx_modules_http_auth_ldap; then
875 - docinto ${HTTP_LDAP_MODULE_P}
876 - dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf
877 - fi
878 -}
879 -
880 -pkg_postinst() {
881 - if use ssl; then
882 - if [[ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]]; then
883 - install_cert /etc/ssl/${PN}/${PN}
884 - use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
885 - fi
886 - fi
887 -
888 - if use nginx_modules_http_spdy; then
889 - ewarn ""
890 - ewarn "In nginx 1.9.5 the spdy module was superseded by http2."
891 - ewarn "Update your configs and package.use accordingly."
892 - fi
893 -
894 - if use nginx_modules_http_lua; then
895 - ewarn ""
896 - ewarn "While you can build lua 3rd party module against ${P}"
897 - ewarn "the author warns that >=${PN}-1.11.11 is still not an"
898 - ewarn "officially supported target yet. You are on your own."
899 - ewarn "Expect runtime failures, memory leaks and other problems!"
900 - fi
901 -
902 - if use nginx_modules_http_lua && use http2; then
903 - ewarn ""
904 - ewarn "Lua 3rd party module author warns against using ${P} with"
905 - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see https://git.io/OldLsg"
906 - fi
907 -
908 - local _n_permission_layout_checks=0
909 - local _has_to_adjust_permissions=0
910 - local _has_to_show_permission_warning=0
911 -
912 - # Defaults to 1 to inform people doing a fresh installation
913 - # that we ship modified {scgi,uwsgi,fastcgi}_params files
914 - local _has_to_show_httpoxy_mitigation_notice=1
915 -
916 - local _replacing_version=
917 - for _replacing_version in ${REPLACING_VERSIONS}; do
918 - _n_permission_layout_checks=$((${_n_permission_layout_checks}+1))
919 -
920 - if [[ ${_n_permission_layout_checks} -gt 1 ]]; then
921 - # Should never happen:
922 - # Package is abusing slots but doesn't allow multiple parallel installations.
923 - # If we run into this situation it is unsafe to automatically adjust any
924 - # permission...
925 - _has_to_show_permission_warning=1
926 -
927 - ewarn "Replacing multiple ${PN}' versions is unsupported! " \
928 - "You will have to adjust permissions on your own."
929 -
930 - break
931 - fi
932 -
933 - local _replacing_version_branch=$(get_version_component_range 1-2 "${_replacing_version}")
934 - debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
935 -
936 - # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)?
937 - # This was before we introduced multiple nginx versions so we
938 - # do not need to distinguish between stable and mainline
939 - local _need_to_fix_CVE2013_0337=1
940 -
941 - if version_is_at_least "1.4.1-r2" "${_replacing_version}"; then
942 - # We are updating an installation which should already be fixed
943 - _need_to_fix_CVE2013_0337=0
944 - debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!"
945 - else
946 - _has_to_adjust_permissions=1
947 - debug-print "Need to adjust permissions to fix CVE-2013-0337!"
948 - fi
949 -
950 - # Do we need to inform about HTTPoxy mitigation?
951 - # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f
952 - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then
953 - # Updating from <1.10
954 - _has_to_show_httpoxy_mitigation_notice=1
955 - debug-print "Need to inform about HTTPoxy mitigation!"
956 - else
957 - # Updating from >=1.10
958 - local _fixed_in_pvr=
959 - case "${_replacing_version_branch}" in
960 - "1.10")
961 - _fixed_in_pvr="1.10.1-r2"
962 - ;;
963 - "1.11")
964 - _fixed_in_pvr="1.11.3-r1"
965 - ;;
966 - *)
967 - # This should be any future branch.
968 - # If we run this code it is safe to assume that the user has
969 - # already seen the HTTPoxy mitigation notice because he/she is doing
970 - # an update from previous version where we have already shown
971 - # the warning. Otherwise, we wouldn't hit this code path ...
972 - _fixed_in_pvr=
973 - esac
974 -
975 - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then
976 - # We are updating an installation where we already informed
977 - # that we are mitigating HTTPoxy per default
978 - _has_to_show_httpoxy_mitigation_notice=0
979 - debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!"
980 - else
981 - _has_to_show_httpoxy_mitigation_notice=1
982 - debug-print "Need to inform about HTTPoxy mitigation!"
983 - fi
984 - fi
985 -
986 - # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)?
987 - # All branches up to 1.11 are affected
988 - local _need_to_fix_CVE2016_1247=1
989 -
990 - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then
991 - # Updating from <1.10
992 - _has_to_adjust_permissions=1
993 - debug-print "Need to adjust permissions to fix CVE-2016-1247!"
994 - else
995 - # Updating from >=1.10
996 - local _fixed_in_pvr=
997 - case "${_replacing_version_branch}" in
998 - "1.10")
999 - _fixed_in_pvr="1.10.2-r3"
1000 - ;;
1001 - "1.11")
1002 - _fixed_in_pvr="1.11.6-r1"
1003 - ;;
1004 - *)
1005 - # This should be any future branch.
1006 - # If we run this code it is safe to assume that we have already
1007 - # adjusted permissions or were never affected because user is
1008 - # doing an update from previous version which was safe or did
1009 - # the adjustments. Otherwise, we wouldn't hit this code path ...
1010 - _fixed_in_pvr=
1011 - esac
1012 -
1013 - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then
1014 - # We are updating an installation which should already be adjusted
1015 - # or which was never affected
1016 - _need_to_fix_CVE2016_1247=0
1017 - debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!"
1018 - else
1019 - _has_to_adjust_permissions=1
1020 - debug-print "Need to adjust permissions to fix CVE-2016-1247!"
1021 - fi
1022 - fi
1023 - done
1024 -
1025 - if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then
1026 - # We do not DIE when chmod/chown commands are failing because
1027 - # package is already merged on user's system at this stage
1028 - # and we cannot retry without losing the information that
1029 - # the existing installation needs to adjust permissions.
1030 - # Instead we are going to a show a big warning ...
1031 -
1032 - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then
1033 - ewarn ""
1034 - ewarn "The world-readable bit (if set) has been removed from the"
1035 - ewarn "following directories to mitigate a security bug"
1036 - ewarn "(CVE-2013-0337, bug #458726):"
1037 - ewarn ""
1038 - ewarn " ${EPREFIX}/var/log/nginx"
1039 - ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
1040 - ewarn ""
1041 - ewarn "Check if this is correct for your setup before restarting nginx!"
1042 - ewarn "This is a one-time change and will not happen on subsequent updates."
1043 - ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX}${NGINX_HOME_TMP}'"
1044 - chmod o-rwx \
1045 - "${EPREFIX}"/var/log/nginx \
1046 - "${EPREFIX}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \
1047 - _has_to_show_permission_warning=1
1048 - fi
1049 -
1050 - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then
1051 - ewarn ""
1052 - ewarn "The permissions on the following directory have been reset in"
1053 - ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):"
1054 - ewarn ""
1055 - ewarn " ${EPREFIX}/var/log/nginx"
1056 - ewarn ""
1057 - ewarn "Check if this is correct for your setup before restarting nginx!"
1058 - ewarn "Also ensure that no other log directory used by any of your"
1059 - ewarn "vhost(s) is not writeable for nginx user. Any of your log files"
1060 - ewarn "used by nginx can be abused to escalate privileges!"
1061 - ewarn "This is a one-time change and will not happen on subsequent updates."
1062 - chown 0:nginx "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1
1063 - chmod 710 "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1
1064 - fi
1065 -
1066 - if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then
1067 - # Should never happen ...
1068 - ewarn ""
1069 - ewarn "*************************************************************"
1070 - ewarn "*************** W A R N I N G ***************"
1071 - ewarn "*************************************************************"
1072 - ewarn "The one-time only attempt to adjust permissions of the"
1073 - ewarn "existing nginx installation failed. Be aware that we will not"
1074 - ewarn "try to adjust the same permissions again because now you are"
1075 - ewarn "using a nginx version where we expect that the permissions"
1076 - ewarn "are already adjusted or that you know what you are doing and"
1077 - ewarn "want to keep custom permissions."
1078 - ewarn ""
1079 - fi
1080 - fi
1081 -
1082 - # Sanity check for CVE-2016-1247
1083 - # Required to warn users who received the warning above and thought
1084 - # they could fix it by unmerging and re-merging the package or have
1085 - # unmerged a affected installation on purpose in the past leaving
1086 - # /var/log/nginx on their system due to keepdir/non-empty folder
1087 - # and are now installing the package again.
1088 - local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX)
1089 - su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null
1090 - if [ $? -eq 0 ] ; then
1091 - # Cleanup -- no reason to die here!
1092 - rm -f "${_sanity_check_testfile}"
1093 -
1094 - ewarn ""
1095 - ewarn "*************************************************************"
1096 - ewarn "*************** W A R N I N G ***************"
1097 - ewarn "*************************************************************"
1098 - ewarn "Looks like your installation is vulnerable to CVE-2016-1247"
1099 - ewarn "(bug #605008) because nginx user is able to create files in"
1100 - ewarn ""
1101 - ewarn " ${EPREFIX}/var/log/nginx"
1102 - ewarn ""
1103 - ewarn "Also ensure that no other log directory used by any of your"
1104 - ewarn "vhost(s) is not writeable for nginx user. Any of your log files"
1105 - ewarn "used by nginx can be abused to escalate privileges!"
1106 - fi
1107 -
1108 - if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then
1109 - # HTTPoxy mitigation
1110 - ewarn ""
1111 - ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
1112 - ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting"
1113 - ewarn "the HTTP_PROXY parameter to an empty string per default when you"
1114 - ewarn "are sourcing one of the default"
1115 - ewarn ""
1116 - ewarn " - 'fastcgi_params' or 'fastcgi.conf'"
1117 - ewarn " - 'scgi_params'"
1118 - ewarn " - 'uwsgi_params'"
1119 - ewarn ""
1120 - ewarn "files in your server block(s)."
1121 - ewarn ""
1122 - ewarn "If this is causing any problems for you make sure that you are sourcing the"
1123 - ewarn "default parameters _before_ you set your own values."
1124 - ewarn "If you are relying on user-supplied proxy values you have to remove the"
1125 - ewarn "correlating lines from the file(s) mentioned above."
1126 - ewarn ""
1127 - fi
1128 -}