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