diff options
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/Manifest.gz | bin | 4550 -> 4539 bytes | |||
-rw-r--r-- | www-servers/h2o/Manifest | 3 | ||||
-rw-r--r-- | www-servers/h2o/files/h2o-2.2-libressl.patch | 54 | ||||
-rw-r--r-- | www-servers/h2o/h2o-2.2.6-r1.ebuild | 1 | ||||
-rw-r--r-- | www-servers/nginx/Manifest | 5 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.23.2-r3.ebuild | 1066 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.24.0-r1.ebuild (renamed from www-servers/nginx/nginx-1.24.0.ebuild) | 2 | ||||
-rw-r--r-- | www-servers/puma/Manifest | 1 | ||||
-rw-r--r-- | www-servers/puma/files/puma-5.6.4-logwriter-test.patch | 14 | ||||
-rw-r--r-- | www-servers/uwsgi/Manifest | 3 | ||||
-rw-r--r-- | www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch | 13 | ||||
-rw-r--r-- | www-servers/uwsgi/uwsgi-2.0.21.ebuild | 1 |
12 files changed, 76 insertions, 1087 deletions
diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz Binary files differindex 7350598ecacd..55463ad645c8 100644 --- a/www-servers/Manifest.gz +++ b/www-servers/Manifest.gz diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest index be5bc20ecc0f..ef88eb3f90fc 100644 --- a/www-servers/h2o/Manifest +++ b/www-servers/h2o/Manifest @@ -1,3 +1,4 @@ +AUX h2o-2.2-libressl.patch 2098 BLAKE2B 18bd0375a4c44ab7d744899cfaaa983ec2d494a9d58f5d358fb2157fc3b919a977a216e22c26aaa9908d8addda27871832f97093bffd4b4faf10e9d95ae51a6d SHA512 0970aa90e07c762ba586f7d071dc5b4183336adb2602c95dcff568124a9bd737aefc9ecc812f6b006edc6e4c4f9cbc664e6af96c7d6f09681f65e8eac552ac7a AUX h2o-2.2-mruby.patch 2034 BLAKE2B 78ab2c8080c017ae03b33366aed553e8d47581bc04b274adc7a7e18bc79ddb5a95266ce13824a8286d9b52d4432b0895598301bd07aa42b1d7e4cbb4d46d98a9 SHA512 724186190756292ce9589a5aae28fd9ae089e377beccb1a2a6562d3d764777dec820413f31d820f61691a529dbdac0dcb55b2e395e46629b2656496bea9c182a AUX h2o-2.2-ruby30.patch 2452 BLAKE2B c94318a2493a6e121da571b81cd641021dea43fec30f3d9acf791e697d7daa194d2c4b8120a9281028cbb01a47b8b3ccddb6364f5e0a2004ad4a7d127276e1e1 SHA512 b44c64d5ede422a18df63dac5c9129bbc21b59179b657af09c2a6cc246247d17fee8ad1ecf4d2aec55df855bdfefcc102d07b21d8002023474df5627c9de961d AUX h2o-2.3-mruby.patch 3312 BLAKE2B 987e09948ea80ca09759081f9abf84f90af0ae0593f5fe067404c5c55b066f7cdb4912431e253a3771094c62bf129059d002f6204876169a34b04a040c82341d SHA512 931ac8c43e25e6ee3c4fb5f76eae33415938eefce2220cc30edaa2f43b71fb3d8664c81cd83c718123ca3b5c5611d3719bf520d7536965ed3e38f50bd34e4cae @@ -6,6 +7,6 @@ AUX h2o.initd 845 BLAKE2B f420962962517051c695f00e11a3b6edb899a672d0984db3d68b88 AUX h2o.logrotate 230 BLAKE2B 44eeaf3b0e60104d4f87c7110815a30f907a6fd676e75a2068fb9cddd8192d3e75729aaeabc89d6430eef7c075b21271918fd65b086de188f7df0c6ceb332141 SHA512 88d36e272c52c5df765d8ebac8f2acca378c8b096af7fa8eda68e1ec5597cba6096286f0ab634f128329148e65980128f0612e90a185de781c5d109653e096dd AUX h2o.service 364 BLAKE2B 9995cde4d79e5998624a2cadfc6ec3e954d4609458cc267628c2fbcb44dccd78277bddc032a784a00445c6b399fafc1ee629920355bf7aa84d26b1010bd103b0 SHA512 475b1e7b616eae335e094451532b0de5aa9cf9abc4999aaa44a9a35c43def4fb060ee5e728409bc33960f8ad3a81e6f549783906ac7ebad5b72cb7422ffb96a2 DIST h2o-2.2.6.tar.gz 16257760 BLAKE2B 8474751ca9832ddae2022710654ca58a93ebf9ca01afe934950209b04357b7548b05c598c49fe92684b2910fd6309d6fc3923a0b01cdeeb4b0dc65b08842255f SHA512 f2f28905c01782a0432c9dfdb2f21054e0a4741ac4c5f26802d4b439d0172840aa215aba5dc7c9af62275dcc24de105674a3819384dc38246e43ce3e8263eb20 -EBUILD h2o-2.2.6-r1.ebuild 2209 BLAKE2B 26ea16a880e4bb5e80b9ed211258db230a12f9c1a5aa26281edfa406d8ae27056aa162a6a6b76ad455462dabc579c1a8fd09e072b7049be000ccda6eac04d449 SHA512 a491788f600a7b6d55ec0476b9d4e0927c9f52ff6b478bb0baf4f2c20666ec53068a64c5ef6bcdc53336dd65d764be33898a9d6f055c162bc792e508a290936d +EBUILD h2o-2.2.6-r1.ebuild 2257 BLAKE2B 0cbdbc6bb0fc88ae941e78a6c6e6f34f89fa29708d1bb25055bce6495ec546625ff7fda74ebb7d6f4920403a42bb291b7affff8d5ce9d632358efe26a7ce1c9a SHA512 66173eb7f54d5b41e035a7d39dcdaaf15291fee7c25021607ed2adadc882b3c3ac01f6552422af9f62b4d65d850cd419b4e07a6acaa569db7c2f7bf4200472ca EBUILD h2o-9999.ebuild 2122 BLAKE2B 1353a3a7bd8a0bd6b52e875fffd6c480540c97a3c39d77ee0af5c2b7624f1b23d391e84e38bd9da0c3a497bfe207312f9282bf592b8c93991d56e1f78215d3fa SHA512 88e6945fee76033780c9c542cd09b8246e92dcca9d75d186fe189b5b04eefac84a22a1196a6960d001774a921589ea97ce1ee3fd37a913b5b940e080a201eddb MISC metadata.xml 665 BLAKE2B 8f3b7754ea54384656357283be7c0e35516579a4f0c8c9e727bef5189390d20de61c43d2c42bc1bcdc311c2670dee5c20a50b2f9354cb1986f8681f3acf86d02 SHA512 10abcf052f63ceba53b5c95a8ff79970c19fc8a094345806cd7fc461a10b1d94ec7b48925709e2fc9980fcd3630731b577e2d879981c240d9dd96cd840bb376c diff --git a/www-servers/h2o/files/h2o-2.2-libressl.patch b/www-servers/h2o/files/h2o-2.2-libressl.patch new file mode 100644 index 000000000000..59aca8df8550 --- /dev/null +++ b/www-servers/h2o/files/h2o-2.2-libressl.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/903001 +https://github.com/h2o/neverbleed/pull/51 +https://github.com/h2o/neverbleed/commit/e1005c16e11b2ca358c86df2a4226632a2992d55 +https://github.com/h2o/h2o/pull/3214 +https://github.com/h2o/h2o/commit/83f89f2fe7c5399b88386a940b2a675742478aca +https://github.com/h2o/h2o/pull/2062 +https://github.com/h2o/h2o/commit/e61e9c8296e894a479268d041985e65433c17e67 + +From 81494ee75e8f533c9fbf841d0dfe83f8eeba7bbd Mon Sep 17 00:00:00 2001 +From: Kazuho Oku <kazuhooku@gmail.com> +Date: Mon, 13 Mar 2023 18:56:12 +0900 +Subject: [PATCH] libressl 3.5 and above have opaque RSA struct + +--- + deps/neverbleed/neverbleed.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/neverbleed.c b/neverbleed.c +index d7cd979..74d7aa3 100644 +--- a/deps/neverbleed/neverbleed.c ++++ b/deps/neverbleed/neverbleed.c +@@ -45,7 +45,7 @@ + #endif + #include "neverbleed.h" + +-#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1010000fL) ++#if defined(LIBRESSL_VERSION_NUMBER) ? LIBRESSL_VERSION_NUMBER >= 0x3050000fL : OPENSSL_VERSION_NUMBER >= 0x1010000fL + #define OPENSSL_1_1_API 1 + #else + #define OPENSSL_1_1_API 0 +Silence compiler warning. The get_session_cb has had const since LibreSSL 2.8. + +From b408b9e015627394003a04577dd7ee7e870d1797 Mon Sep 17 00:00:00 2001 +From: David Carlier <devnexen@gmail.com> +Date: Thu, 30 May 2019 15:05:44 +0100 +Subject: [PATCH] LibreSSL little build warning fix proposal + +--- + lib/common/socket.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/common/socket.c b/lib/common/socket.c +index 172b75026f..45c18591b7 100644 +--- a/lib/common/socket.c ++++ b/lib/common/socket.c +@@ -946,7 +946,7 @@ static void create_ossl(h2o_socket_t *sock) + } + + static SSL_SESSION *on_async_resumption_get(SSL *ssl, +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) ++#if !defined(LIBRESSL_VERSION_NUMBER) ? OPENSSL_VERSION_NUMBER >= 0x1010000fL : LIBRESSL_VERSION_NUMBER > 0x2070000f + const + #endif + unsigned char *data, diff --git a/www-servers/h2o/h2o-2.2.6-r1.ebuild b/www-servers/h2o/h2o-2.2.6-r1.ebuild index 01434dbf32a5..4e38eec82228 100644 --- a/www-servers/h2o/h2o-2.2.6-r1.ebuild +++ b/www-servers/h2o/h2o-2.2.6-r1.ebuild @@ -39,6 +39,7 @@ BDEPEND="libh2o? ( virtual/pkgconfig ) )" PATCHES=( + "${FILESDIR}"/${PN}-2.2-libressl.patch #903001 "${FILESDIR}"/${PN}-2.2-mruby.patch "${FILESDIR}"/${PN}-2.2-ruby30.patch ) diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index 27708cdf8ddf..5fefea414da7 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -12,7 +12,6 @@ AUX nginx.initd-r4 2192 BLAKE2B b482b9cc473a1df06764d60c7ce5c99a3f680778028bf440 AUX nginx.logrotate-r1 257 BLAKE2B d62c57377efd5259b6c776861d921b6e4ea026387157d618abd9e578f2e432ac0cf653a0f3842a0620d405759216bdc17afd50b33aaec3ad0c6757dfac3e34d8 SHA512 4892fc1700817c9a459a531df0320fe606a51be7f8b4e3ddf5852fe33def70dbff36fcefd2fce247c6846d6315ea92f3421eb21299a162d082b85fa27572cd95 AUX nginx.service-r1 356 BLAKE2B 05d89efcc73b70a26655f306f1e074e61c81063cb4e949161efbe95dc375e63807233f38c9af6723801e8f653cfad08f62fbec225b061d1179b7d05fe761afc4 SHA512 e51f4e88abe10555afe79d4d029651a4de42a5dc1dddaf951f13c021453da00e0c56a3fa2129d08fcd090909a54564e76887c93fdf72952021f5a2b09f6097eb DIST modsecurity-nginx-1.0.3.tar.gz 34063 BLAKE2B 859a29eb7f67d53a818578f1008f0d0debbe37c205bb7c6e79594d8b1a6a0d93988880d35f607ef05ef6d73c9aa887baebfd2c54aca894969beeed4bfe576f37 SHA512 20495884c6b3594edf879a19fd7445f2e74a1628789decd146b3c712764b0507e440a84a64aab619461b044f98b8d641913cfad57a6d0002e7061716bdfe84fc -DIST nginx-1.23.2.tar.gz 1108243 BLAKE2B 0a6a556afe93c4326247e879e3bb2ad377cd734a572f471b52c91b1b2901a243a848cd74fea587bda5afa0ee91dec9635b5d2a468cb95abc7f361c42a32c9598 SHA512 4a5413c0ec251c02fb73dfb4d351045f857a36d45ebb7ae2c29f4a4f320a6543d0a049b147b08318de0b7b0406773c329dbf43bf98bb088f76e506ea532cd8ef DIST nginx-1.23.3.tar.gz 1108958 BLAKE2B 5b8980f54e3f662ec6b4f8f0a50305c91081aaba881ef94f3c60e5fced8a79710ff09aae3abda3dce7dbcd460b1a46b1d3c0007d5dc76fbec5c4c2ad91ae7aa7 SHA512 da5f473ac213f8947f40f0a69820bf981157432fe9d29cf71fe30225dadd05f5814309034f0411ea15fb70bece8ceefc0cb0b2588096c1a9496c2a36fa425d9f DIST nginx-1.23.4.tar.gz 1112403 BLAKE2B fe9e4256cf092394a485f121d73f3561c0f1f3a72eaf7a279f23ca88d3cc92ae8498b895687dca582f681e621cc99906e86c7c08a3d2dfd73a203af67ce34d4a SHA512 542a53cae32bf5c7d4d09a4940793e603e0b3c7a8a4ca2bcec84e64bc298fcf0e58297338d1ae0cd28889c4a3e359f3f48532b0addaf7d223f796ed81c3054e8 DIST nginx-1.24.0.tar.gz 1112471 BLAKE2B 7f671c57666dec822bff72fcf0e4eec35ecf981b8f1e489827f9bbbf9179036f61c9fdc7e497c076ccaeb35b9ba3dfe7684e4fc91ee9cae52601f68859bb034d SHA512 1114e37de5664a8109c99cfb2faa1f42ff8ac63c932bcf3780d645e5ed32c0b2ac446f80305b4465994c8f9430604968e176ae464fd80f632d1cb2c8f6007ff3 @@ -39,9 +38,9 @@ DIST ngx_memc_module-0.19.tar.gz 34654 BLAKE2B 536384c264d88535179634d459d3a47b1 DIST ngx_metrics-0.1.1.tar.gz 2964 BLAKE2B 95d71ea26c949c345b83e353bd66a20df18cc8b2b93f692615a1b39c1f327393647f80e7a27e6929799a6e7e3469b61e1cd72f7821f7a820da4dd7cd9a96d85c SHA512 d36a8fb0104c83b6b564e03b351aa750cab08650264c74d6f786af357bfb7006b531a93270dd961896ea8dafe27e5db8548ede714c5f52c4742876bc73af4b5e DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 BLAKE2B e0729b66554c8890727190a624d4c9aef6499dfc2e301541a9bfc15690caf6d3155c8a4b8f7a1555a7655b47aa0cd1b797aeb8ba82efa92ab80808218a0bdcff SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 DIST ngx_rtmp-1.2.2.tar.gz 519934 BLAKE2B 8745816b879f506720955d6c7e5e8af036e88b3601a680071ffb255a3ec31d69e132b5cc8b493202fa985eb30b8529428f683b5154a0054c0ee990d3185c7abf SHA512 3f8c803221854c4b1a06aadc6313fbfec74bd7179c0ee51d4365b26ffa8875881a6e1e48f777a9c9efbb9170ab7478a82920d5448a2c2df485503d37bb03ab81 +DIST njs-0.7.12.tar.gz 662554 BLAKE2B 3e925dbbd5e664fc083b3147b6fa353744ab45b50cb2d3feb3f1cf5a4c024440c24b7af08e8a285db7b8e4b48efc776a8a1cb78c6d7ff79d011e127a61e09f6c SHA512 a65a6c6aa3fbd499536284f8d8610f61b87112156885e6c3b1f73872df22195af897766f266b4569098a70e1680aef66594da17d13519f16687b4e43dce49062 DIST njs-0.7.8.tar.gz 613161 BLAKE2B f6b10be576119f418cdbe052a0c82b847d1b43278f4f0764ac7a9c7309162bf48fd60b40542b97e43fa925c87817b19785ffc6c83fa0611ca73256932e8481cb SHA512 086ddb2e5189a8853598870b795bfa788e9e75da9d2502541a49314e8149d7c279acca0709c4c517db26611a416dc5fb989be807cf1697c7411aded1bd5b8237 -EBUILD nginx-1.23.2-r3.ebuild 40462 BLAKE2B fa567a68adeeecd7f8fc1b1f8f2c0fc9717ecb6e7925b1a8466801adf8ad9ec9a15d222784042455c9ae0995ea3f9dcd2dc55d5bfa24957bd1883668539d9d5e SHA512 0148cc685da8ef69bd24beac14450a7bb75133cfe9ccbab77642e1278d131b00080463bf0654c33668da3c1440b6ed448f584bf541c36475a15a3991c2c71d26 EBUILD nginx-1.23.3.ebuild 40461 BLAKE2B 7a6c11e2893e65d21149c5abf6f062aaffcea8d285f88ffbfbce5603c86d9c0ed6d2cb8f7c0304357836fcca4dd36c6b89cd772d2faf2d9a6c9d432086414961 SHA512 0d993b9d066a000382250cf81bb28b6ee5de60bc87e96e7953e4db8ed84c2d220b5c8c6ad5028db82f6ed221ce43da72fe4785eec07c3f4675659a45a9538980 EBUILD nginx-1.23.4.ebuild 40465 BLAKE2B 8e085ffcae73c70815bbff1e8ab130f216151d26382bcbec2a47fb1164b5ff2d6ae79f1752ff47ebc6a4015db2d2bfcbb28a8a50468c333d6533e407babf2d42 SHA512 84c693c89795831eda35b9faf21ed23817754649c72e2cb217651f5f8098b8adf138bb97763db3638aecb5eff1c66ceca65ee7e7789b3267c0330d2e19582261 -EBUILD nginx-1.24.0.ebuild 40465 BLAKE2B ba7ca9b20d0a448f8f18059be2ff32090397e779a0a2e803d0b45acd27d25e9a469b28c8d19aeb9640b9d8b5c15110502aa2334e67393c222f8a20aebdb2fd0b SHA512 9c1bc760256fca5974dd5e7659292b61d18b629b407a91d052b829dd4f6a70d97a9cfa7c4cc2d0607d34fc8757bd7f75d700bdcdbd1954848a8cf17c1459f43e +EBUILD nginx-1.24.0-r1.ebuild 40466 BLAKE2B e828ddb072ee1579258b7f2e0810c56377ace1cfcb21ed4f3b45d96bcfa3ba4679241acf97345f9644e31a68b008e740b4d97770388e4db90c1c521879c11d83 SHA512 7fa23b36d328790e2f752db5a172f7f6f40668d3c3b6b866d4730e980b4dd35fba9b02b27bec25d20876a30ab2334c1580199597debd616c00e635752f078b05 MISC metadata.xml 1012 BLAKE2B 5fe75eb9105a998668cfebf02c6976784f4ef3332edd0b6c21a23a5ffb0838b4ae8bc9e52f5157b43c3c0d060825ac46bccabc94bcf8b59447311e0f9ac94f29 SHA512 0d243d1d5271d05d51a46b5825fe32ac5283211434672e99e7314c57f5d1f1f88f48c189fffcdb12747c8d33c9dafe0c8df12376cbbec2912732da0ed6de0642 diff --git a/www-servers/nginx/nginx-1.23.2-r3.ebuild b/www-servers/nginx/nginx-1.23.2-r3.ebuild deleted file mode 100644 index aa888a8de5e1..000000000000 --- a/www-servers/nginx/nginx-1.23.2-r3.ebuild +++ /dev/null @@ -1,1066 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainer notes: -# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite -# - any http-module activates the main http-functionality and overrides USE=-http -# - keep the following requirements in mind before adding external modules: -# * alive upstream -# * sane packaging -# * builds cleanly -# * does not need a patch for nginx core -# - TODO: test the google-perftools module (included in vanilla tarball) - -# prevent perl-module from adding automagic perl DEPENDs -GENTOO_DEPEND_ON_PERL="no" - -# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) -DEVEL_KIT_MODULE_PV="0.3.1" -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" -DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz" -DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" - -# ngx_brotli (https://github.com/google/ngx_brotli, BSD-2) -HTTP_BROTLI_MODULE_PV="1.0.0rc" -HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" -HTTP_BROTLI_MODULE_URI="https://github.com/google/ngx_brotli/archive/v${HTTP_BROTLI_MODULE_PV}.tar.gz" -HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_MODULE_PV}" - -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) -HTTP_UPLOAD_PROGRESS_MODULE_PV="68b3ab3b64a0cee7f785d161401c8be357bbed12" -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz" -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" - -# http_headers_more (https://github.com/openresty/headers-more-nginx-module, BSD license) -HTTP_HEADERS_MORE_MODULE_PV="0.34" -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/openresty/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz" -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}" - -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license) -HTTP_CACHE_PURGE_MODULE_PV="2.3" -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" - -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) -HTTP_SLOWFS_CACHE_MODULE_PV="1.10" -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" - -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license) -HTTP_FANCYINDEX_MODULE_PV="0.4.4" -HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" -HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" -HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" - -# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) -HTTP_LUA_MODULE_PV="b6d167cf1a93c0c885c28db5a439f2404874cb26" -HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" -HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/${HTTP_LUA_MODULE_PV}.tar.gz" -HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" -LUA_COMPAT=( luajit ) - -# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) -HTTP_AUTH_PAM_MODULE_PV="1.5.2" -HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" -HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" -HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" - -# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) -HTTP_UPSTREAM_CHECK_MODULE_PV="9aecf15ec379fe98f62355c57b60c0bc83296f04" -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" - -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) -HTTP_METRICS_MODULE_PV="0.1.1" -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" - -# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) -HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="0.2.1" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/v${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" - -# naxsi-core (https://github.com/wargio/naxsi, GPL-3) -HTTP_NAXSI_MODULE_PV="4140b2ded624eb36f04c783c460379b9403012d0" -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" -HTTP_NAXSI_MODULE_URI="https://github.com/wargio/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" -HTTP_NAXSI_LIBINJECTION_MODULE_PV="49904c42a6e68dc8f16c022c693e897e4010a06c" -HTTP_NAXSI_LIBINJECTION_MODULE_P="ngx_http_naxsi_libinjection-${HTTP_NAXSI_LIBINJECTION_MODULE_PV}" -HTTP_NAXSI_LIBINJECTION_MODULE_URI="https://github.com/libinjection/libinjection/archive/${HTTP_NAXSI_LIBINJECTION_MODULE_PV}.tar.gz" - -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) -RTMP_MODULE_PV="1.2.2" -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}" -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz" -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}" - -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license) -HTTP_DAV_EXT_MODULE_PV="3.0.0" -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" - -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) -HTTP_ECHO_MODULE_PV="0.63" -HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" -HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" -HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" - -# modsecurity for nginx (https://github.com/SpiderLabs/ModSecurity-nginx, https://github.com/SpiderLabs/ModSecurity, Apache-2.0) -HTTP_SECURITY_MODULE_PV="1.0.3" -HTTP_SECURITY_MODULE_P="modsecurity-nginx-${HTTP_SECURITY_MODULE_PV}" -HTTP_SECURITY_MODULE_URI="https://github.com/SpiderLabs/ModSecurity-nginx/archive/refs/tags/v${HTTP_SECURITY_MODULE_PV}.tar.gz" -HTTP_SECURITY_MODULE_WD="${WORKDIR}/ModSecurity-nginx-${HTTP_SECURITY_MODULE_PV}" - -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) -HTTP_PUSH_STREAM_MODULE_PV="8c02220d484d7848bc8e3a6d9b1c616987e86f66" -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" - -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) -HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" - -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) -HTTP_MOGILEFS_MODULE_PV="1.0.4" -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" - -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) -HTTP_MEMC_MODULE_PV="0.19" -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}" -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz" -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}" - -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2) -HTTP_LDAP_MODULE_PV="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz" -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" - -# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) -GEOIP2_MODULE_PV="3.4" -GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" -GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" -GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" - -# njs-module (https://github.com/nginx/njs, as-is) -NJS_MODULE_PV="0.7.8" -NJS_MODULE_P="njs-${NJS_MODULE_PV}" -NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" -NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}" - -# We handle deps below ourselves -SSL_DEPS_SKIP=1 -AUTOTOOLS_AUTO_DEPEND="no" - -inherit autotools lua-single ssl-cert toolchain-funcs perl-module systemd pax-utils - -DESCRIPTION="Robust, small and high performance http and reverse proxy server" -HOMEPAGE="https://nginx.org" -SRC_URI="https://nginx.org/download/${P}.tar.gz - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) - nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz ) - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz ) - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz ) - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) - nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) - nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) - nginx_modules_http_naxsi? ( - ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz - ${HTTP_NAXSI_LIBINJECTION_MODULE_URI} -> ${HTTP_NAXSI_LIBINJECTION_MODULE_P}.tar.gz - ) - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) - nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) - nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )" - -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ - nginx_modules_http_security? ( Apache-2.0 ) - nginx_modules_http_push_stream? ( GPL-3 )" - -SLOT="mainline" -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux" - -# Package doesn't provide a real test suite -RESTRICT="test" - -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif - fastcgi geo grpc gzip limit_req limit_conn map memcached mirror - proxy referer rewrite scgi ssi split_clients upstream_hash - upstream_ip_hash upstream_keepalive upstream_least_conn - upstream_zone userid uwsgi" -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip - gzip_static image_filter mp4 perl random_index realip secure_link - slice stub_status sub xslt" -NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients - upstream_hash upstream_least_conn upstream_zone" -NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread" -NGINX_MODULES_MAIL="imap pop3 smtp" -NGINX_MODULES_3RD=" - http_auth_ldap - http_auth_pam - http_brotli - http_cache_purge - http_dav_ext - http_echo - http_fancyindex - http_geoip2 - http_headers_more - http_javascript - http_lua - http_memc - http_metrics - http_mogilefs - http_naxsi - http_push_stream - http_security - http_slowfs_cache - http_sticky - http_upload_progress - http_upstream_check - http_vhost_traffic_status - stream_geoip2 - stream_javascript -" - -IUSE="aio debug +http +http2 +http-cache libatomic pcre +pcre2 pcre-jit rtmp selinux ssl threads vim-syntax" - -for mod in $NGINX_MODULES_STD; do - IUSE="${IUSE} +nginx_modules_http_${mod}" -done - -for mod in $NGINX_MODULES_OPT; do - IUSE="${IUSE} nginx_modules_http_${mod}" -done - -for mod in $NGINX_MODULES_STREAM_STD; do - IUSE="${IUSE} nginx_modules_stream_${mod}" -done - -for mod in $NGINX_MODULES_STREAM_OPT; do - IUSE="${IUSE} nginx_modules_stream_${mod}" -done - -for mod in $NGINX_MODULES_MAIL; do - IUSE="${IUSE} nginx_modules_mail_${mod}" -done - -for mod in $NGINX_MODULES_3RD; do - IUSE="${IUSE} nginx_modules_${mod}" -done - -# Add so we can warn users updating about config changes -# @TODO: jbergstroem: remove on next release series -IUSE="${IUSE} nginx_modules_http_spdy" - -CDEPEND=" - acct-group/nginx - acct-user/nginx - virtual/libcrypt:= - pcre? ( dev-libs/libpcre:= ) - pcre2? ( dev-libs/libpcre2:= ) - pcre-jit? ( dev-libs/libpcre:=[jit] ) - ssl? ( - dev-libs/openssl:0= - ) - http2? ( - >=dev-libs/openssl-1.0.1c:0= - ) - http-cache? ( - dev-libs/openssl:0= - ) - nginx_modules_http_brotli? ( app-arch/brotli:= ) - nginx_modules_http_geoip? ( dev-libs/geoip ) - nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) - nginx_modules_http_gunzip? ( sys-libs/zlib ) - nginx_modules_http_gzip? ( sys-libs/zlib ) - nginx_modules_http_gzip_static? ( sys-libs/zlib ) - nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) - nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) - nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) - nginx_modules_http_secure_link? ( dev-libs/openssl:0= ) - nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) - nginx_modules_http_lua? ( ${LUA_DEPS} ) - nginx_modules_http_auth_pam? ( sys-libs/pam ) - nginx_modules_http_metrics? ( dev-libs/yajl:= ) - nginx_modules_http_dav_ext? ( dev-libs/libxml2 ) - nginx_modules_http_security? ( dev-libs/modsecurity ) - nginx_modules_http_auth_ldap? ( net-nds/openldap:=[ssl?] ) - nginx_modules_stream_geoip? ( dev-libs/geoip ) - nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" -RDEPEND="${CDEPEND} - app-misc/mime-types[nginx] - selinux? ( sec-policy/selinux-nginx ) - !www-servers/nginx:0" -DEPEND="${CDEPEND} - arm? ( dev-libs/libatomic_ops ) - libatomic? ( dev-libs/libatomic_ops )" -BDEPEND="nginx_modules_http_brotli? ( virtual/pkgconfig )" -PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" - -REQUIRED_USE="pcre-jit? ( pcre ) - nginx_modules_http_fancyindex? ( nginx_modules_http_addition ) - nginx_modules_http_grpc? ( http2 ) - nginx_modules_http_lua? ( - ${LUA_REQUIRED_USE} - nginx_modules_http_rewrite - pcre - !pcre2 - ) - nginx_modules_http_naxsi? ( nginx_modules_http_rewrite pcre ) - nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) - nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) - nginx_modules_http_security? ( pcre ) - nginx_modules_http_push_stream? ( ssl )" - -pkg_setup() { - NGINX_HOME="/var/lib/nginx" - NGINX_HOME_TMP="${NGINX_HOME}/tmp" - - if use libatomic; then - ewarn "GCC 4.1+ features built-in atomic operations." - ewarn "Using libatomic_ops is only needed if using" - ewarn "a different compiler or a GCC prior to 4.1" - fi - - if [[ -n $NGINX_ADD_MODULES ]]; then - ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" - ewarn "This nginx installation is not supported!" - ewarn "Make sure you can reproduce the bug without those modules" - ewarn "_before_ reporting bugs." - fi - - if use !http; then - ewarn "To actually disable all http-functionality you also have to disable" - ewarn "all nginx http modules." - fi - - if use nginx_modules_http_mogilefs && use threads; then - eerror "mogilefs won't compile with threads support." - eerror "Please disable either flag and try again." - die "Can't compile mogilefs with threads support" - fi - - use nginx_modules_http_lua && lua-single_pkg_setup -} - -src_prepare() { - eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" - eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" - - if use nginx_modules_http_auth_ldap; then - cd "${HTTP_LDAP_MODULE_WD}" || die - eapply "${FILESDIR}/${PN}-1.23.2-mod_auth_ldap-fix.patch" - cd "${S}" || die - fi - - if use nginx_modules_http_sticky; then - cd "${HTTP_STICKY_MODULE_WD}" || die - eapply "${FILESDIR}"/http_sticky-nginx-1.23.0.patch - cd "${S}" || die - fi - - if use nginx_modules_http_naxsi; then - cd "${HTTP_NAXSI_MODULE_WD}" || die - rm -r libinjection || die - mv ../../libinjection-${HTTP_NAXSI_LIBINJECTION_MODULE_PV} libinjection || die - cd "${S}" || die - fi - - if use nginx_modules_http_brotli; then - cd "${HTTP_BROTLI_MODULE_WD}" || die - eapply "${FILESDIR}"/http_brotli-detect-brotli-r3.patch - cd "${S}" || die - fi - - if use nginx_modules_http_upstream_check; then - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch - fi - - if use nginx_modules_http_cache_purge; then - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch - cd "${S}" || die - fi - - if use nginx_modules_http_upload_progress; then - cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die - eapply "${FILESDIR}"/http_uploadprogress-nginx-1.23.0.patch - cd "${S}" || die - fi - - find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die - # We have config protection, don't rename etc files - sed -i 's:.default::' auto/install || die - # remove useless files - sed -i -e '/koi-/d' -e '/win-/d' auto/install || die - - # don't install to /etc/nginx/ if not in use - local module - for module in fastcgi scgi uwsgi ; do - if ! use nginx_modules_http_${module}; then - sed -i -e "/${module}/d" auto/install || die - fi - done - - eapply_user -} - -src_configure() { - local myconf=() http_enabled= mail_enabled= stream_enabled= - - use aio && myconf+=( --with-file-aio ) - use debug && myconf+=( --with-debug ) - use http2 && myconf+=( --with-http_v2_module ) - use libatomic && myconf+=( --with-libatomic ) - use pcre && myconf+=( --with-pcre --without-pcre2 ) - use pcre-jit && myconf+=( --with-pcre-jit ) - use threads && myconf+=( --with-threads ) - - # HTTP modules - for mod in $NGINX_MODULES_STD; do - if use nginx_modules_http_${mod}; then - http_enabled=1 - else - myconf+=( --without-http_${mod}_module ) - fi - done - - for mod in $NGINX_MODULES_OPT; do - if use nginx_modules_http_${mod}; then - http_enabled=1 - myconf+=( --with-http_${mod}_module ) - fi - done - - if use nginx_modules_http_fastcgi; then - myconf+=( --with-http_realip_module ) - fi - - # third-party modules - if use nginx_modules_http_upload_progress; then - http_enabled=1 - myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} ) - fi - - if use nginx_modules_http_headers_more; then - http_enabled=1 - myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} ) - fi - - if use nginx_modules_http_cache_purge; then - http_enabled=1 - myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} ) - fi - - if use nginx_modules_http_slowfs_cache; then - http_enabled=1 - myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} ) - fi - - if use nginx_modules_http_fancyindex; then - http_enabled=1 - myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} ) - fi - - if use nginx_modules_http_lua; then - http_enabled=1 - export LUAJIT_LIB=$(dirname $(lua_get_shared_lib)) - export LUAJIT_INC=$(lua_get_include_dir) - myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} ) - myconf+=( --add-module=${HTTP_LUA_MODULE_WD} ) - fi - - if use nginx_modules_http_auth_pam; then - http_enabled=1 - myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} ) - fi - - if use nginx_modules_http_upstream_check; then - http_enabled=1 - myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} ) - fi - - if use nginx_modules_http_metrics; then - http_enabled=1 - myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} ) - fi - - if use nginx_modules_http_naxsi ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} ) - fi - - if use rtmp ; then - http_enabled=1 - myconf+=( --add-module=${RTMP_MODULE_WD} ) - fi - - if use nginx_modules_http_dav_ext ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} ) - fi - - if use nginx_modules_http_echo ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} ) - fi - - if use nginx_modules_http_security ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD} ) - fi - - if use nginx_modules_http_push_stream ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) - fi - - if use nginx_modules_http_sticky ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) - fi - - if use nginx_modules_http_mogilefs ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) - fi - - if use nginx_modules_http_memc ; then - http_enabled=1 - myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) - fi - - if use nginx_modules_http_auth_ldap; then - http_enabled=1 - myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) - fi - - if use nginx_modules_http_vhost_traffic_status; then - http_enabled=1 - myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) - fi - - if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then - myconf+=( --add-module=${GEOIP2_MODULE_WD} ) - fi - - if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then - myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) - fi - - if use nginx_modules_http_brotli; then - http_enabled=1 - myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) - fi - - if use http || use http-cache || use http2 || use nginx_modules_http_javascript; then - http_enabled=1 - fi - - if [ $http_enabled ]; then - use http-cache || myconf+=( --without-http-cache ) - use ssl && myconf+=( --with-http_ssl_module ) - else - myconf+=( --without-http --without-http-cache ) - fi - - # Stream modules - for mod in $NGINX_MODULES_STREAM_STD; do - if use nginx_modules_stream_${mod}; then - stream_enabled=1 - else - myconf+=( --without-stream_${mod}_module ) - fi - done - - for mod in $NGINX_MODULES_STREAM_OPT; do - if use nginx_modules_stream_${mod}; then - stream_enabled=1 - myconf+=( --with-stream_${mod}_module ) - fi - done - - if use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then - stream_enabled=1 - fi - - if [ $stream_enabled ]; then - myconf+=( --with-stream ) - use ssl && myconf+=( --with-stream_ssl_module ) - fi - - # MAIL modules - for mod in $NGINX_MODULES_MAIL; do - if use nginx_modules_mail_${mod}; then - mail_enabled=1 - else - myconf+=( --without-mail_${mod}_module ) - fi - done - - if [ $mail_enabled ]; then - myconf+=( --with-mail ) - use ssl && myconf+=( --with-mail_ssl_module ) - fi - - # custom modules - for mod in $NGINX_ADD_MODULES; do - myconf+=( --add-module=${mod} ) - done - - # https://bugs.gentoo.org/286772 - export LANG=C LC_ALL=C - tc-export AR CC - - if ! use prefix; then - myconf+=( --user=${PN} ) - myconf+=( --group=${PN} ) - fi - - if [[ -n "${EXTRA_ECONF}" ]]; then - myconf+=( ${EXTRA_ECONF} ) - ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" - fi - - ./configure \ - --prefix="${EPREFIX}"/usr \ - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ - --pid-path="${EPREFIX}"/run/${PN}.pid \ - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ - --with-cc-opt="-I${ESYSROOT}/usr/include" \ - --with-ld-opt="-L${ESYSROOT}/usr/$(get_libdir)" \ - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ - --with-compat \ - "${myconf[@]}" || die "configure failed" - - # A purely cosmetic change that makes nginx -V more readable. This can be - # good if people outside the gentoo community would troubleshoot and - # question the users setup. - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die -} - -src_compile() { - # https://bugs.gentoo.org/286772 - export LANG=C LC_ALL=C - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" -} - -src_install() { - emake DESTDIR="${D}" install - - cp "${FILESDIR}"/nginx.conf-r3 "${ED}"/etc/nginx/nginx.conf || die - - newinitd "${FILESDIR}"/nginx.initd-r4 nginx - newconfd "${FILESDIR}"/nginx.confd nginx - - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service - - doman man/nginx.8 - dodoc CHANGES* README - - # just keepdir. do not copy the default htdocs files (bug #449136) - keepdir /var/www/localhost - rm -rf "${ED}"/usr/html || die - - # set up a list of directories to keep - local keepdir_list="${NGINX_HOME_TMP}"/client - local module - for module in proxy fastcgi scgi uwsgi; do - use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}" - done - - keepdir /var/log/nginx ${keepdir_list} - - # this solves a problem with SELinux where nginx doesn't see the directories - # as root and tries to create them as nginx - fperms 0750 "${NGINX_HOME_TMP}" - fowners ${PN}:0 "${NGINX_HOME_TMP}" - - fperms 0700 ${keepdir_list} - fowners ${PN}:${PN} ${keepdir_list} - - fperms 0710 /var/log/nginx - fowners 0:${PN} /var/log/nginx - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}"/nginx.logrotate-r1 nginx - - # Don't create /run - rm -rf "${ED}"/run || die - - if use lua_single_target_luajit; then - pax-mark m "${ED}/usr/sbin/nginx" - fi - - if use nginx_modules_http_perl; then - cd "${S}"/objs/src/http/modules/perl/ || die - emake DESTDIR="${D}" INSTALLDIRS=vendor - perl_delete_localpod - cd "${S}" || die - fi - - if use nginx_modules_http_cache_purge; then - docinto ${HTTP_CACHE_PURGE_MODULE_P} - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} - fi - - if use nginx_modules_http_slowfs_cache; then - docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} - fi - - if use nginx_modules_http_fancyindex; then - docinto ${HTTP_FANCYINDEX_MODULE_P} - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_lua; then - docinto ${HTTP_LUA_MODULE_P} - dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_auth_pam; then - docinto ${HTTP_AUTH_PAM_MODULE_P} - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} - fi - - if use nginx_modules_http_upstream_check; then - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} - fi - - if use nginx_modules_http_naxsi; then - insinto /etc/nginx/naxsi - doins "${HTTP_NAXSI_MODULE_WD}"/../distros/nginx/* - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_rules/naxsi_core.rules - doins -r "${HTTP_NAXSI_MODULE_WD}"/../naxsi_rules/blocking - doins -r "${HTTP_NAXSI_MODULE_WD}"/../naxsi_rules/whitelists - fi - - if use rtmp; then - docinto ${RTMP_MODULE_P} - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} - fi - - if use nginx_modules_http_dav_ext; then - docinto ${HTTP_DAV_EXT_MODULE_P} - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_echo; then - docinto ${HTTP_ECHO_MODULE_P} - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_security; then - docinto ${HTTP_SECURITY_MODULE_P} - dodoc "${HTTP_SECURITY_MODULE_WD}"/{AUTHORS,CHANGES,README.md} - fi - - if use nginx_modules_http_push_stream; then - docinto ${HTTP_PUSH_STREAM_MODULE_P} - dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile} - fi - - if use nginx_modules_http_sticky; then - docinto ${HTTP_STICKY_MODULE_P} - dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf} - fi - - if use nginx_modules_http_memc; then - docinto ${HTTP_MEMC_MODULE_P} - dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_auth_ldap; then - docinto ${HTTP_LDAP_MODULE_P} - dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf - fi -} - -pkg_postinst() { - if use ssl; then - if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then - install_cert /etc/ssl/${PN}/${PN} - use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} - fi - fi - - if use nginx_modules_http_spdy; then - ewarn "" - ewarn "In nginx 1.9.5 the spdy module was superseded by http2." - ewarn "Update your configs and package.use accordingly." - fi - - if use nginx_modules_http_lua; then - ewarn "" - ewarn "While you can build lua 3rd party module against ${P}" - ewarn "the author warns that >=${PN}-1.11.11 is still not an" - ewarn "officially supported target yet. You are on your own." - ewarn "Expect runtime failures, memory leaks and other problems!" - fi - - if use nginx_modules_http_lua && use http2; then - ewarn "" - ewarn "Lua 3rd party module author warns against using ${P} with" - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see https://git.io/OldLsg" - fi - - local _n_permission_layout_checks=0 - local _has_to_adjust_permissions=0 - local _has_to_show_permission_warning=0 - - # Defaults to 1 to inform people doing a fresh installation - # that we ship modified {scgi,uwsgi,fastcgi}_params files - local _has_to_show_httpoxy_mitigation_notice=1 - - local _replacing_version= - for _replacing_version in ${REPLACING_VERSIONS}; do - _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) - - if [[ ${_n_permission_layout_checks} -gt 1 ]]; then - # Should never happen: - # Package is abusing slots but doesn't allow multiple parallel installations. - # If we run into this situation it is unsafe to automatically adjust any - # permission... - _has_to_show_permission_warning=1 - - ewarn "Replacing multiple ${PN}' versions is unsupported! " \ - "You will have to adjust permissions on your own." - - break - fi - - local _replacing_version_branch=$(ver_cut 1-2 "${_replacing_version}") - debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." - - # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? - # This was before we introduced multiple nginx versions so we - # do not need to distinguish between stable and mainline - local _need_to_fix_CVE2013_0337=1 - - if ver_test ${_replacing_version} -ge 1.4.1-r2; then - # We are updating an installation which should already be fixed - _need_to_fix_CVE2013_0337=0 - debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2013-0337!" - fi - - # Do we need to inform about HTTPoxy mitigation? - # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f - if ver_test ${_replacing_version_branch} -lt 1.10; then - # Updating from <1.10 - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.1-r2" - ;; - "1.11") - _fixed_in_pvr="1.11.3-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that the user has - # already seen the HTTPoxy mitigation notice because he/she is doing - # an update from previous version where we have already shown - # the warning. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || ver_test ${_replacing_version} -ge ${_fixed_in_pvr}; then - # We are updating an installation where we already informed - # that we are mitigating HTTPoxy per default - _has_to_show_httpoxy_mitigation_notice=0 - debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" - else - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - fi - fi - - # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? - # All branches up to 1.11 are affected - local _need_to_fix_CVE2016_1247=1 - - if ver_test ${_replacing_version_branch} -lt 1.10; then - # Updating from <1.10 - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.2-r3" - ;; - "1.11") - _fixed_in_pvr="1.11.6-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that we have already - # adjusted permissions or were never affected because user is - # doing an update from previous version which was safe or did - # the adjustments. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || ver_test ${_replacing_version} -ge ${_fixed_in_pvr}; then - # We are updating an installation which should already be adjusted - # or which was never affected - _need_to_fix_CVE2016_1247=0 - debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - fi - fi - done - - if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then - # We do not DIE when chmod/chown commands are failing because - # package is already merged on user's system at this stage - # and we cannot retry without losing the information that - # the existing installation needs to adjust permissions. - # Instead we are going to a show a big warning ... - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then - ewarn "" - ewarn "The world-readable bit (if set) has been removed from the" - ewarn "following directories to mitigate a security bug" - ewarn "(CVE-2013-0337, bug #458726):" - ewarn "" - ewarn " ${EPREFIX}/var/log/nginx" - ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "This is a one-time change and will not happen on subsequent updates." - ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX}${NGINX_HOME_TMP}'" - chmod o-rwx \ - "${EPREFIX}"/var/log/nginx \ - "${EPREFIX}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ - _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then - ewarn "" - ewarn "The permissions on the following directory have been reset in" - ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" - ewarn "" - ewarn " ${EPREFIX}/var/log/nginx" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - ewarn "This is a one-time change and will not happen on subsequent updates." - chown 0:nginx "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1 - chmod 710 "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then - # Should never happen ... - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "The one-time only attempt to adjust permissions of the" - ewarn "existing nginx installation failed. Be aware that we will not" - ewarn "try to adjust the same permissions again because now you are" - ewarn "using a nginx version where we expect that the permissions" - ewarn "are already adjusted or that you know what you are doing and" - ewarn "want to keep custom permissions." - ewarn "" - fi - fi - - # Sanity check for CVE-2016-1247 - # Required to warn users who received the warning above and thought - # they could fix it by unmerging and re-merging the package or have - # unmerged a affected installation on purpose in the past leaving - # /var/log/nginx on their system due to keepdir/non-empty folder - # and are now installing the package again. - local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) - su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null - if [ $? -eq 0 ] ; then - # Cleanup -- no reason to die here! - rm -f "${_sanity_check_testfile}" - - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "Looks like your installation is vulnerable to CVE-2016-1247" - ewarn "(bug #605008) because nginx user is able to create files in" - ewarn "" - ewarn " ${EPREFIX}/var/log/nginx" - ewarn "" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - fi - - if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then - # HTTPoxy mitigation - ewarn "" - ewarn "This nginx installation comes with a mitigation for the HTTPoxy" - ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" - ewarn "the HTTP_PROXY parameter to an empty string per default when you" - ewarn "are sourcing one of the default" - ewarn "" - ewarn " - 'fastcgi_params' or 'fastcgi.conf'" - ewarn " - 'scgi_params'" - ewarn " - 'uwsgi_params'" - ewarn "" - ewarn "files in your server block(s)." - ewarn "" - ewarn "If this is causing any problems for you make sure that you are sourcing the" - ewarn "default parameters _before_ you set your own values." - ewarn "If you are relying on user-supplied proxy values you have to remove the" - ewarn "correlating lines from the file(s) mentioned above." - ewarn "" - fi -} diff --git a/www-servers/nginx/nginx-1.24.0.ebuild b/www-servers/nginx/nginx-1.24.0-r1.ebuild index 5611fa3c44c7..8957d37bc64d 100644 --- a/www-servers/nginx/nginx-1.24.0.ebuild +++ b/www-servers/nginx/nginx-1.24.0-r1.ebuild @@ -159,7 +159,7 @@ GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOI GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" # njs-module (https://github.com/nginx/njs, as-is) -NJS_MODULE_PV="0.7.8" +NJS_MODULE_PV="0.7.12" NJS_MODULE_P="njs-${NJS_MODULE_PV}" NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}" diff --git a/www-servers/puma/Manifest b/www-servers/puma/Manifest index 1d520f9a10d4..1c0fef16ebeb 100644 --- a/www-servers/puma/Manifest +++ b/www-servers/puma/Manifest @@ -1,4 +1,3 @@ -AUX puma-5.6.4-logwriter-test.patch 528 BLAKE2B de30ccfa68916ef4ea3d460eb96d2b28711e619792848a0fd065eab836c88f03f4ecde8699773f963b745f595dda65df00772f0dcb096102612852687112833c SHA512 d24cb26fd89ec916ceea08eeb75dbcef89fda6babe7cd9a4f3a7f143c0e53dee4ad582a656cc002c054e89c960fd6b41f367ae490442ca1c6b69e6c3d1b8d0b7 DIST puma-5.6.5.tar.gz 314953 BLAKE2B 2aca92ff3d32995be8f05b626c2299c07f8665f345a6830f3ec3a3a561dbeb41d68d65851cef9c33a56d1d508c9adf2ebb254ca5c1d4dd8fbc896d6d6d2b440a SHA512 0ad41f3372732bdea6594a20b116ec4fc03a8a1d2ff807b3c315e7769aef4e5361ff775975575125002fbfc83315e6906fa8691ce666161bd8beee8c469289d8 DIST puma-6.0.2.tar.gz 348269 BLAKE2B b0bf0efe179e78259b7b9f5ed8b2a701829ae4619edff00975a7a7e21eefd6560d051957d47fc2f5a4ba10cc2c8bcc863d4340f640054b8f081a7aa7fdbf8ede SHA512 9202ff3767a5944558a34904e58db3c0c0dd9e68df1ebcc76f31fbccea90edcd0f2d60360bd7bbd517eb965be4b1a99faf31ed0a0c36a41c13e8b0573c40f530 DIST puma-6.1.0.tar.gz 355394 BLAKE2B 664bd24be4afde93c7fb3c6b407f0fd943bcebd86ec183d6f6d965c194f1b111d460b044eb64bcbaaff743a2d24031f786fb340a9e4ae624f324c2b70273723d SHA512 642755f565d6f1f2baebac041112dad238ca2b815f85c5653cf913c0c007e9971212581036f48fa9bdcfe98b28261843ab80306ed693274c77849bce012125f3 diff --git a/www-servers/puma/files/puma-5.6.4-logwriter-test.patch b/www-servers/puma/files/puma-5.6.4-logwriter-test.patch deleted file mode 100644 index 75086f76f027..000000000000 --- a/www-servers/puma/files/puma-5.6.4-logwriter-test.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/test/test_request_invalid.rb.orig 2022-03-31 08:02:24.833118111 +0200 -+++ b/test/test_request_invalid.rb 2022-03-31 08:02:41.897215442 +0200 -@@ -35,9 +35,8 @@ - [200, {}, [body]] - } - -- @log_writer = Puma::LogWriter.strings -- events = Puma::Events.new -- @server = Puma::Server.new app, @log_writer, events -+ events = Puma::Events.new($stdout, $stderr) -+ @server = Puma::Server.new app, events - @port = (@server.add_tcp_listener @host, 0).addr[1] - @server.run - sleep 0.15 if Puma.jruby? diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index ca011c062c1b..31d314514510 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -2,6 +2,7 @@ AUX gentoo.buildconf 490 BLAKE2B 320b0471c0c76ab6c8ada7b034f612fc20398eb60e1edc3 AUX uwsgi-2.0.19.1-py310-fix-2.patch 731 BLAKE2B 401b03e888b8a081cddf34ab16197fd728cfbfb5c877206c0b1f65f1b1e5ef335fa3d45bf1e7786b555fc4dbbe1a9b0fd29a4bcce0be70e605bf20ca2f0e3c3c SHA512 303b25095db88a1e84a9b212c0381f8e6025f2b9bc1913882b7e376fce300575c10ceb7666fbb9622536950ee0a0c2496fca5aea20f532d7e2f3fb299e17bbbb AUX uwsgi-2.0.19.1-py310-fix.patch 1457 BLAKE2B 35859fabde74604a67d0fe71dbf2889465ffc4a3de7ded343c44e9accbb49daa6d45992b7b824e6fc6c0be1a84884e13ed31cc2846ccafc659ef3be06d703f62 SHA512 42fa8fd537385dcb2cf088291d249c584cce2965c4131e45ee58c7cb6d0789b5f84bc9473925700bd55a5f75667cbc361130684c28d44b597e8e66246a63b2d2 AUX uwsgi-2.0.19.1-pynode-compile.patch 3950 BLAKE2B 4ec0f5357b7b99f3365ddfbc8643ecd8c96eb227ccc8bee78948170a00d4bce89cdaeeff3de5d2be25c428e5a7e4da220d023daff8b783deea421dc0bc67e972 SHA512 de076448c43195de0ca7fd198787de60bf29d3966ff3f6c8f0b2bacc6d29a50e4b622aeba6de56489ecae808648b099cb6bfa5322aa1d30c31d607debd6f9c6b +AUX uwsgi-2.0.21-libphp-version.patch 399 BLAKE2B 274a099c3745533c4817f10d3d10524237cc05cfecf965c88251169b684969c55ea0340f6389cd54ed59bec070b2c1d2f20445a5f70f0124109774ec7c33f3a7 SHA512 7f11c6544bae789ec9cf08d3ca3c84a083a23b0da69cf4c577e5e13f7a1635a59e4f81a7005262d85c88ac97465ce08dd6a12f81a917d0aa81bc925fc7bfd05a AUX uwsgi-2.0.21-php82.patch 1457 BLAKE2B 89a31c86050fe1c94f1077e534d75f32d191f2b6402f72488f6fa50960b9ed44b1a39f80c05d2b5bbaf387e6cb8434951fd5092b70bad1f329ce43c87c5e13c1 SHA512 35b7e0f62cf18093aa1dcb8dda6158b3f2ab73c600d95fff048ded51ae91d442620c615c60597f67133f615998331e50e4ae592c7fdf66292f8efa4932cab867 AUX uwsgi-2.0.21-python-unicode.patch 978 BLAKE2B 8014a39e6f29e38bb88cb5fe517c8656c80cd9aaed20ecb5ab56f526355f9b3616a5ac19635abb4514613b1e5c198364f8ab339292a8f282e1bd3f15ffd35a5a SHA512 9da61901ec176423bc14db8c58fac19305c2c5a4dc68f42d858376e65ca7399ddc6fe0665c3bd1f2ba379b6dd60a39d496a4b52c61c7dcf7d48ae47cddf555df AUX uwsgi.confd-r4 1849 BLAKE2B 80afdf7a5ebc520d887061aba9f7cd64b1bca06d3da478d8d1090a8b9cba973ac2d3dbcbc2ceb980415e98317bc55b07a9a7e6641fac593dc4dd5466bd8d67c9 SHA512 041d1bd694fad6f7c5e28944aab6d7ba53b3c7fc990ce6b7c2d97b9f3d6650c46dda8069e545c252a7400e1d825c8e46d7393a289757b1bd665e64241ca3789a @@ -9,5 +10,5 @@ AUX uwsgi.initd-r7 3746 BLAKE2B a56c5f4e32ccb415fab10f357e2a7404179285e656d9f886 DIST uwsgi-2.0.19.1.tar.gz 804398 BLAKE2B 73fc19990866eb1058a742b34a817b3bd87e00c838da055bece2bff5e13c161f53c642866ed591aa4afeb23ef924205502f2cb0a4cf9d303b5b63fb9a53f57e2 SHA512 34b55f7c7a77dc0b0dab34d1a9ca9a4cba8a9261969656c88435e7f32fe8a0c5654e1562706775f77e2f60c4ad0f5c6055257a23ab7d387c1579639e054807b5 DIST uwsgi-2.0.21.tar.gz 808494 BLAKE2B 3c5fc3ce3a6a7f8f915bb302c0b775a75227f859dd2b141034e8b1aa5cb867b447ed532b3e8b537db80acc908fc26121b752e35ebc0bf9a542678843fd02ff54 SHA512 36a9c1b87a4c3d08482b9045d2227f56b006acb53f38ddf1b510880ae5fc24c0177a077338ec8af3ef0b8f8e220bc4fc7f8311dab8066e13cbcbb616f736c795 EBUILD uwsgi-2.0.19.1-r109.ebuild 11213 BLAKE2B 0355b1cf1d3db7d56dc8964bee2e1dc1018a79cc9cd6b907f667d6d6050f302d112a4e78cb1350c846ea3d2e956e23b43eadfb9ddc736c8435f9b997fb651821 SHA512 0b316e49f3dad87c8ea82124269e46c114e66b7ec1d5fe5d1599588e78f672860a2d8d7f09df8ad6f1db1114bd43ec7c0acef2d0c12eab58960119f355ec6dfb -EBUILD uwsgi-2.0.21.ebuild 11342 BLAKE2B 8ca664b3fa19687c0e8222c80d4898e19ec9e5e9535f69c537f3c0d3cb7e99ca6295859f175b1a509cb639c15c4be64a59f796579d5fb13a1d3a3b1b372f2219 SHA512 6a6e4f1d1363b6f3d17546719828b6f9e5dc8b636f2eceb33c2d693bca20a25b7e406fa6a485fb69b35829ff3097913cd0789511744304b2da8ebe5b7a615f4c +EBUILD uwsgi-2.0.21.ebuild 11383 BLAKE2B aa4e3668c1d48c729efdd22b472e8f9f83cfe8899aeb61fffcd80744321757f9913f474619b5bd6fdb48551657673e04871e9aeeaf7600ad4c0ffd29b655c721 SHA512 95312f9fa96b7eca315ee331bde91d69822e1694d6ea874a7045a1b743a57f479dd2cc0420df799f7807c52f006b9333204e1fa5f7b12315388d8f12bee57c37 MISC metadata.xml 1245 BLAKE2B 3254a0e0211101ad9c353f6247424bb44df9ddb56bb152414b9fac2b515fe163e5163d2119bc040da1676b4d941afedf4a331a19e4cdbf794a7816d012abd328 SHA512 4e3dc2b9c9d7386ed6f132da703af971789c73af567f5333faca65e3194567ead794a84c28b5382eadb149ae4dcc7847e07bc02e3d84391b3b6cccc11e08e232 diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch new file mode 100644 index 000000000000..8b0276c3cb89 --- /dev/null +++ b/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/904664 +--- a/plugins/php/uwsgiplugin.py ++++ b/plugins/php/uwsgiplugin.py +@@ -14,6 +14,9 @@ + + php_version = os.popen(PHPPATH + ' --version').read().rstrip().split('.')[0] + ++if php_version == '8' : ++ php_version = '' ++ + CFLAGS = [os.popen(PHPPATH + ' --includes').read().rstrip(), '-Wno-sign-compare'] + LDFLAGS = os.popen(PHPPATH + ' --ldflags').read().rstrip().split() + diff --git a/www-servers/uwsgi/uwsgi-2.0.21.ebuild b/www-servers/uwsgi/uwsgi-2.0.21.ebuild index 6283e0d78a3e..e141c804fb8a 100644 --- a/www-servers/uwsgi/uwsgi-2.0.21.ebuild +++ b/www-servers/uwsgi/uwsgi-2.0.21.ebuild @@ -152,6 +152,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${P}-php82.patch "${FILESDIR}"/${P}-python-unicode.patch + "${FILESDIR}"/${P}-libphp-version.patch ) pkg_setup() { |