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