summaryrefslogtreecommitdiff
path: root/www-servers
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-20 14:54:46 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-20 14:54:46 -0500
commit1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0 (patch)
tree18e2e784f9fb0dbc3546537acc42ad51b366d90e /www-servers
parent9f6a581d94412ab1cf4b35c33101f6be0ddc7777 (diff)
downloadbaldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.tar.gz
baldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.tar.xz
baldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.zip
Adding metadata
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/Manifest17
-rw-r--r--www-servers/nginx/files/http_sticky-nginx-1.23.0.patch25
-rw-r--r--www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch31
-rw-r--r--www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch21
-rw-r--r--www-servers/nginx/files/nginx-r1.confd32
-rw-r--r--www-servers/nginx/files/nginx-r1.tmpfiles4
-rw-r--r--www-servers/nginx/files/nginx-r2.logrotate11
-rw-r--r--www-servers/nginx/files/nginx-r2.service13
-rw-r--r--www-servers/nginx/files/nginx-r4.conf39
-rw-r--r--www-servers/nginx/files/nginx-r5.conf40
-rw-r--r--www-servers/nginx/files/nginx-r6.initd91
-rw-r--r--www-servers/nginx/files/nginx.conf-r269
-rw-r--r--www-servers/nginx/files/nginx.conf-r32
-rw-r--r--www-servers/nginx/files/nginx.confd5
-rw-r--r--www-servers/nginx/files/nginx.initd-r44
-rw-r--r--www-servers/nginx/files/nginx.logrotate-r12
-rw-r--r--www-servers/nginx/files/nginx.service-r13
-rw-r--r--www-servers/nginx/files/nginx.tmpfiles2
-rw-r--r--www-servers/nginx/metadata.xml48
-rw-r--r--www-servers/nginx/nginx-1.26.3-r2.ebuild1144
-rw-r--r--www-servers/nginx/nginx-1.27.5-r1.ebuild (renamed from www-servers/nginx/nginx-1.31.0.ebuild)24
-rw-r--r--www-servers/nginx/nginx-1.29.5.ebuild34
-rw-r--r--www-servers/nginx/nginx-1.29.7-r1.ebuild35
-rw-r--r--www-servers/nginx/nginx-1.30.0.ebuild35
-rw-r--r--www-servers/nginx/nginx-1.30.2.ebuild35
-rw-r--r--www-servers/nginx/nginx-1.30.3.ebuild35
-rw-r--r--www-servers/nginx/nginx-1.31.1.ebuild1160
-rw-r--r--www-servers/nginx/nginx-1.31.2.ebuild44
-rw-r--r--www-servers/nginx/nginx-9999.ebuild42
-rw-r--r--www-servers/uwsgi/Manifest3
-rw-r--r--www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch13
-rw-r--r--www-servers/uwsgi/files/uwsgi.initd-r73
-rw-r--r--www-servers/uwsgi/metadata.xml12
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.23-r1.ebuild (renamed from www-servers/uwsgi/uwsgi-2.0.31-r1.ebuild)119
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.27-r1.ebuild (renamed from www-servers/uwsgi/uwsgi-2.0.30.ebuild)141
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.31.ebuild147
36 files changed, 2001 insertions, 1484 deletions
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
index 4abadae2e32b..9e579a1bf3d5 100644
--- a/www-servers/nginx/Manifest
+++ b/www-servers/nginx/Manifest
@@ -1,13 +1,26 @@
DIST modsecurity-nginx-1.0.3.tar.gz 34063 BLAKE2B 859a29eb7f67d53a818578f1008f0d0debbe37c205bb7c6e79594d8b1a6a0d93988880d35f607ef05ef6d73c9aa887baebfd2c54aca894969beeed4bfe576f37 SHA512 20495884c6b3594edf879a19fd7445f2e74a1628789decd146b3c712764b0507e440a84a64aab619461b044f98b8d641913cfad57a6d0002e7061716bdfe84fc
-DIST nginx-1.31.0.tar.gz 1337335 BLAKE2B 6153656eb89739639118351cb7bb2668622a4297a00b45217eee121cb53619660c4b8af6ebe3b67e21c81afa673a0b0e403860190567b2f9d728f5e865553f90 SHA512 b4964c8eaa28093880acb3dca46bc02bb9a7c91ba0a8346a1c2686509d29d0c0748044e6b8bcfffd7bd1f13c15f15ed6b2c15dc10fc003a927ce92134c809167
+DIST nginx-1.26.3.tar.gz 1260179 BLAKE2B 4ef731070e986d98fc1984717dec7fb766ed1a02b196c3ae9a69deea7093d17253b46c06f4eb812a19187be49e42c1a485a54ba3e2e639b5084ef2b0e2287212 SHA512 cd780e495796bf7413e54a6730d11d55127b0ca6563acf5c75eb2698f62cddbbf5ba61820c57b2316c0bb789fcfd17f98a27a84b525ed50f304d1b1043ffa05d
+DIST nginx-1.27.5.tar.gz 1279891 BLAKE2B 6d7fd563d201e8ed985810e418f9981fd0adedf7b40bb3cf8278819a88ecaea148df7df69ff0240cfd028df86d92734e9d20449c2178d3e4b82e78bb0cef3e36 SHA512 5130bc2ec08a962b631ceb741ecb3dc0d84423ca50afb713d9c52c13af1e1bf5e2b0be226936d6dfbc7c2a45b44726ba478a571c6032099bc8ece85fe015ccbc
+DIST nginx-1.29.5.tar.gz 1310203 BLAKE2B 15fd97ce91dcc9b2f882adcafbc6e265e02493bbc0ee0b37b30ac619bc7488a153dafccc1b25cdffa86c5279291345350396984fb6e57a438468424357c31b33 SHA512 721b5f8d5484b4508c3fffc5aa8239212266ad8635ea9e5b2c3d5f0349e0846ab9dd3c1e1409435b30989aa83d4b65113a8ab8854fff725c55b9043f17435235
+DIST nginx-1.29.7.tar.gz 1323485 BLAKE2B 24676ec144681fc82da5c8377b534c42be0f8334af9a3561a56c3b49b3c9e17f91a05553459319e9da4d512fffe8bbba6c6f935cf28e2cfb42773b6e456af856 SHA512 00a39c8e79c98b86f814720c9f1bd87d6ec608c436f6b6dfe18c69e7ac12cb6d04f8717976653b782b59ef5b8dbf3c97c6b577b2e2c33423dd13fbe222ec9e86
+DIST nginx-1.30.0.tar.gz 1324188 BLAKE2B 6a0241e636b087f95a34acc3ddb2c281aacd5e465b2ec02195912acb183a451c2e7124674911b0d54bc02a953adb4942a1965eb371869fb0ddc6313a05b2b572 SHA512 9df502279583ea305e2d7a4cbe67c54cbcdb880f1caf010d582eea8839bda3bc6dd5e244bb79e848a70ad0c9fda9927cb8d9d8c5fc1bc49acc2da9e734543d7c
+DIST nginx-1.30.2.tar.gz 1325247 BLAKE2B 0800ae2326753e2b6d551b03aaad8f2c0fecdce5d34c5497175ff173bcade0dfaf5f24ab3074fcdfe44ef60820e8e901f0461f4c0917cd07b5401424a5f8d64c SHA512 dbba779a15595a77f340795c3a06bf5f846f351a14738f36085b3251f053c6b2946f112640754b8470b541ca45319fb599111cffc06e5cf2ac2384e64d16348c
+DIST nginx-1.30.3.tar.gz 1325830 BLAKE2B b50e47d3ef339f961f08eea4b2a2fe9067d4f346fc0f4659720c751e19fc08d66351f08c9af49e9eeb09e0b4bfa374edc573dbc865a1bcf6e4dd22f4325c54f4 SHA512 13b479cb2e80bbe7e0b977bd762e70b0cb95c7ce5dc80da61ab59fbcf2da19eca266dc82a8ef1a8b8c8c19c22948abd1aa6a3817bf490880ae175f7e2f692495
DIST nginx-1.31.1.tar.gz 1337505 BLAKE2B 855145c876537eac36cdcc1e6e3c83c9e2880769a14c3588a7413ebe2c8b8505c4541835027bd294e40a295611b6a701d4db362a6c2ce4d2ea30c9ae02e620ef SHA512 054f2aa86eff18b0633e80329d8595bf66d937b0bb55a90d4bbb4d64ece90b49429d9a572c31d8d8a4cdd019ffcc2b9fea3c10d2ff87e7005baa47335d9121f1
+DIST nginx-1.31.2.tar.gz 1339618 BLAKE2B b5b692269ee827a9e874a4aad8b3d8a71dad545d354e1732f1001de58727d37b96f441048f7834afea86d709d26b4600a72a60eb3d2574bca06e01ff03d1bba9 SHA512 590fcb78b0abe51c2810fd9cce4618c2871fce9cceda7e1f7e401979df793afd3fd89b26db369e269db62ea7fa73c447f45db4b08747219690f387e319afcdd0
DIST nginx-auth-ldap-42d195d7a7575ebab1c369ad3fc5d78dc2c2669c.tar.gz 18457 BLAKE2B 22225ca9e5299b20ab5a93a001cac48e446bd86b3a24ac49e716bc975b128890bdb4b0dbbf5730fbaaeadfd958160093c7a6af798dd0e6de27062f149a760333 SHA512 ec59637fda5acac053e815cb1d04b545fc6b765e5ec63d8c2c9c301abad87afaa2698145acac08e9e14c91e1423ebff7aff0cca2b940b19ccccbf4cf53973269
DIST nginx-tests-0b5ec15c62ed.tar.gz 282652 BLAKE2B af41397f88f7aa969749c6dd9a77c58d1835bca24fe764dd0af328d621817f5fb89b3f5b5c0fbd1e7db53d51365e9098b020005e27a531649bd8a51a05b3cbb0 SHA512 c376d23c7001c5203428b664c388e97956cdda8365eb7df57db0da5146d0806f5c35cd1352260d6803d55542f46a90da4a604ebf971055caa77dd6106930558e
+DIST nginx-tests-0f72f59c40de9977bd8f3deff5d200e761b8b683.tar.gz 342145 BLAKE2B b89aea07ef6df58e36448dd43c891dbbc850ea378a53c7d945f743e359d2f7dbb626d694bab67459801a476bbacea4cd5a4928cb91ae2766ab6a675f2873e843 SHA512 c88e0384c76eaff380f37bb4210ae3ca5c2557758cdad132eff68e05ed4ef307d987a5d283f0778ee49d3ba76406e5b94e68a9119ca4f7f597188e0fd3c9c0ca
+DIST nginx-tests-2993130953b28ff4d64ea75b5bd35c92c7e510f7.tar.gz 328153 BLAKE2B 1ed978c53adce580be0d77872edcc3f93097d47c447ec4984b775d80437249f896ab3422248218d4316a49d189c6a28c773e9624adef54b7c077739f1f064599 SHA512 30686b78f64f557b6d1a79280cb165c9a818b0e83578d371370099e6f5bb7769bb4842937bfe61a459678e29cf4d680be8ce5a5c63c1b9aa87989be81e6f80df
+DIST nginx-tests-4d1de3f357afeb91865d024b27516d6b67aad86e.tar.gz 349966 BLAKE2B 00c379997252506e7b2c29b8815455ede0b368f89b9e7ea69b090086e565e988542ab34fcef4764ca2d222457a2808e38d38eb3392bc1ddc8b041b388bcc774c SHA512 60a42f953f73bf375ea70105bbe1df9d55eb2230a5d9fd7d5ca1db5b5f6a012c87426b7ab80b6704122cad369c0cfe4f3f3bc148c6763e955bd603db0e33df04
+DIST nginx-tests-56ae49add9286d2e896a22bcfb880c7ea7c3964e.tar.gz 350052 BLAKE2B 572593991c083042304fdddd9deb9a6a7aeeb0d5cab4e2f21d1ca03085c7ee29428943c174e659df2f274f2bcfc32a1855fb05be4f43a8566ad85556029ce6f9 SHA512 603b81407604af1615de31d44dd7f25ae5dfd59dbb19214b1397359e3c36a0e880ed90a08118b4f201dc17b65d36a4f4a054ce868c9f7b06d9bf35cebb7aeeff
+DIST nginx-tests-cf90a22921652731302e8a4dc2a88049c723377d.tar.gz 340698 BLAKE2B e9674d915d51ca79b8c405f5bb7dd3e148473338b2f25799fb51092858385defbd5bf6da150d20280a338f5d838d90966fa23ced7101224a292aec200a53d1c2 SHA512 aa756ac38249fa9dc1c54588ef826146024b7bcf5fe7a2fe1d82a46d55597653c41146ba3e743f954ed8ec7380698ecec31893b4fd7d3942f332304d6afe4c47
DIST nginx-vod-module-1.33.tar.gz 471858 BLAKE2B fa5cb9fd185b30c5c53b25a6f103213b3d04dac5d2d81db72f9749a51548e09e3e17dccc636d748aff8d21c6623484c77fdeb10d70854480759665d140d42e0e SHA512 29ef77f1bbdb2410ff317ebdd7434f31b8ec370ae6b617b92e745e87c11bc820b451181d1d2b57156b414348da14ac448b689b32b17ab418144292eda094512d
DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 BLAKE2B d37ef9a15c91abe3c6258e420d1f99fa452f9d9966a0e13102174973314a3bac5413957a5fe632a9dcb1163b3be5df8116e05cc053ee061e19319ec25f341570 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529
DIST ngx_brotli-1.0.0rc.tar.gz 16207 BLAKE2B 450d0ea693bd98d4a1b615f2cdcaad41ccd28266f6d80beec7fe77fe750ab8c5d1bb55aabe15161b9b6d819d2b4d99a7774f2706f2f6fd084b52a7c7dddbc00c SHA512 05a880d5e48ac83be84498ed41fb4750211b827a9d7541acfd6ef494e5205a6e853d5594bfec3ab4ae668ea3f803e4f4b0ba550c76811971c8e266e42663c56d
DIST ngx_devel_kit-0.3.1.tar.gz 66542 BLAKE2B 8242d884464d99a131a48f599f9d0c2b546610f73f646e7eb0dcfdb98220810d949189cffa721360ddbe3b7b8adc8b678a848b9d1a56db6c62fd4439ecb63d24 SHA512 de1e3349d8dd08e5982279b2219dc8a8006739f0409b8e0f5c50d93434beff1fbafba43e9c5ac85a5fab90afc5c0a7244a340610339c36f82f2cba7233e72de9
DIST ngx_http_auth_pam-1.5.2.tar.gz 7016 BLAKE2B 1efc8d2d12aa09a2b2a36f6f6d0132ac21fcd1720a2843ce598450198e2b7fe902e9ded15a78b66e8a897e811faa872e4e391bf211c795e320c1ccd57607c319 SHA512 b82e401533c44298c41bc9a1caaf3f7850e42da151c06a77a927f817810ebf5ce01c49ca81de42c326345765c784bb55e28fbf0f6a5500626f51e58a216b53c4
+DIST ngx_http_cache_purge-2.3.tar.gz 12248 BLAKE2B f83b267f4c19a9d4af5964522695814c164d200ecd4108bf8f6b5c21388eba8af989bdda646dee18a03174211e8c090a04736bbeb44043cb0e19fbccdc66278e SHA512 50a31dbf2216a6fae74a186af56dec4600cf55777e76a10ac0075f609e7737135aab063a64f2590dddcd0369ebebd4a523027f3d9ebcca74f7b4355be1c5dcc0
DIST ngx_http_cache_purge-2.5.3.tar.gz 17156 BLAKE2B 50aaaa0bb89975cc912845909085b80c6bcc9adf73b619a7a3034ccf19bee64c891dc15310e0e09e1601125ab5809a33a5af18413d8d5717090c631f31174eec SHA512 aebc9b19a3e7dda3b57e6bd6d86a5ab66d25e05cf5c6c99c71234c789700eb9da8e29529b8b2abf3d775ff3c2610e695fc88e647738769f0d3730bcafc3be38b
DIST ngx_http_dav_ext-3.0.0.tar.gz 14558 BLAKE2B 0d370bfe34600d43a540dd19a386aa52ce135b2eae14e4e108a359d5ff3405939130d1c802062c7523057ec35d38322d3fbed8c13deb58ce7a08ebf9e3f106d4 SHA512 d0193ba90f1ef46c4e470630c4394bdf99d94fd2e3bd8be6cb2ba1655ec59944b1269025f032b79dc2c6dad366e54389ef6a6da2ddeb91d535a4027f2162fbde
DIST ngx_http_echo-0.63.tar.gz 53421 BLAKE2B 613d4f265b9bcf9b4a44a18749314075e797dca4b350e6c4bc2e7ddd52edadc52660504ee57d0c859ec0a20f6b2e425727e5ec4b30282e67498010fc8d959baa SHA512 c325ac4e3f3f735739e156d8c7ada503b34475c62533b4830231ff1b42c25cb0c841aae06b3448b589c2ab35da8d211436ed194d6fd062cad925af8152c5e789
@@ -26,4 +39,4 @@ 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.8.7.tar.gz 880217 BLAKE2B 4830398570430c038ab8c8225b1140978ae85dfaa575921bc74b8f0024c1f268348626d9b068a5748c0b54e0beda7eb88852610c14392f2bc0633a173e6b2350 SHA512 6a31d73c458bd5a21d1d1ba3eb4a8922cb3dd9ed900c91a76964203ee1418e4694b017e97272361710da9260412bfc1d4d45290d3488ae87983a0d4a6b0916e8
+DIST njs-0.8.10.tar.gz 942446 BLAKE2B cad84d599f223e143f9e21ec01e40d0aa14a97b6ca2c1e9e2a17cd0806699e1ba04bb03b0840c6bcf0198d38fd3a11adf3f442bf7399fe16933e7ec5fec0672b SHA512 71bcd596383ff501514adcf9baa0fd4d5cd0d3b53b2cdeee7e64b094ba12f6ee0f8fe99849dd8ad71afb6212566253ebdca2b83713d026ddfed3fe7902a5e906
diff --git a/www-servers/nginx/files/http_sticky-nginx-1.23.0.patch b/www-servers/nginx/files/http_sticky-nginx-1.23.0.patch
new file mode 100644
index 000000000000..da6126eacabb
--- /dev/null
+++ b/www-servers/nginx/files/http_sticky-nginx-1.23.0.patch
@@ -0,0 +1,25 @@
+From 105c946c0c1af93099502417784888acf60da540 Mon Sep 17 00:00:00 2001
+From: Younes El-karama <yelkarama@gmail.com>
+Date: Sat, 2 Jul 2022 04:56:12 +0000
+Subject: [PATCH] make it compatible with nginx 1.23
+
+---
+ ngx_http_sticky_module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ngx_http_sticky_module.c b/ngx_http_sticky_module.c
+index c9a0a04..37b5bc3 100644
+--- a/ngx_http_sticky_module.c
++++ b/ngx_http_sticky_module.c
+@@ -204,7 +204,7 @@ static ngx_int_t ngx_http_init_sticky_peer(ngx_http_request_t *r, ngx_http_upstr
+ iphp->request = r;
+
+ /* check weather a cookie is present or not and save it */
+- if (ngx_http_parse_multi_header_lines(&r->headers_in.cookies, &iphp->sticky_conf->cookie_name, &route) != NGX_DECLINED) {
++ if (ngx_http_parse_multi_header_lines(r, r->headers_in.cookie, &iphp->sticky_conf->cookie_name, &route) != NULL) {
+ /* a route cookie has been found. Let's give it a try */
+ ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "[sticky/init_sticky_peer] got cookie route=%V, let's try to find a matching peer", &route);
+
+--
+2.36.1
+
diff --git a/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch b/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch
deleted file mode 100644
index 42cbd779a8cb..000000000000
--- a/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From dd138546b16a01e9c09613d02211373baf1cac02 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@whissi.de>
-Date: Thu, 20 Oct 2016 03:09:37 +0200
-Subject: [PATCH] config: Fix ngx_module_type
-
-Since commit 37182ce2f3b6 the module was not present in static builds
-because due to an invalid "ngx_module_type" the module was not added to
-objs/ngx_modules.c.
-
-This commit will fix the problem by setting the correct module type
-"HTTP_FILTER" [Link 1].
-
-Link 1: https://www.nginx.com/resources/wiki/extending/new_config/#key-ngx_module_type
-Gentoo-Bug: https://bugs.gentoo.org/593450
-Fixes: https://github.com/masterzen/nginx-upload-progress-module/issues/50
----
- config | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config b/config
-index 364af8c..5f4ade1 100644
---- a/config
-+++ b/config
-@@ -1,6 +1,6 @@
- ngx_addon_name=ngx_http_uploadprogress_module
- if test -n "$ngx_module_link"; then
-- ngx_module_type=FILTER
-+ ngx_module_type=HTTP_FILTER
- ngx_module_name=ngx_http_uploadprogress_module
- ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
-
diff --git a/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch b/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch
new file mode 100644
index 000000000000..b3b4cf4b33c4
--- /dev/null
+++ b/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch
@@ -0,0 +1,21 @@
+From f0a5f61d9aad59c23e2c877094a8f17c43bee5b5 Mon Sep 17 00:00:00 2001
+From: freultwah <631910+freultwah@users.noreply.github.com>
+Date: Tue, 23 Aug 2022 18:09:45 +0300
+Subject: [PATCH] Make the module not crash with nginx >1.23.*
+
+---
+ ngx_http_auth_ldap_module.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c
+index 2f4e592..83b481c 100644
+--- a/ngx_http_auth_ldap_module.c
++++ b/ngx_http_auth_ldap_module.c
+@@ -1779,6 +1779,7 @@ ngx_http_auth_ldap_set_realm(ngx_http_request_t *r, ngx_str_t *realm)
+ }
+
+ r->headers_out.www_authenticate->hash = 1;
++ r->headers_out.www_authenticate->next = NULL;
+ r->headers_out.www_authenticate->key.len = sizeof("WWW-Authenticate") - 1;
+ r->headers_out.www_authenticate->key.data = (u_char *) "WWW-Authenticate";
+ r->headers_out.www_authenticate->value = *realm;
diff --git a/www-servers/nginx/files/nginx-r1.confd b/www-servers/nginx/files/nginx-r1.confd
new file mode 100644
index 000000000000..35c0d102d432
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r1.confd
@@ -0,0 +1,32 @@
+# /etc/conf.d/nginx
+
+# Configuration file
+#NGINX_CONFIGFILE="/etc/nginx/nginx.conf"
+
+# User to run nginx as
+# If you should ever change this, make sure this user has
+# execution permission on any of your log directories
+# (/var/log/nginx per default) but do NOT forget other log directories
+# one of your vhost(s) maybe using or logging after logrotation will
+# be broken).
+#NGINX_USER="nginx"
+
+# Group to run nginx as
+# See the note above regarding NGINX_USER.
+#NGINX_GROUP="nginx"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#NGINX_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+#NGINX_TERMTIMEOUT="TERM/60/KILL/5"
+
+# For the 'upgrade' function, this defines the maximum amount of time (in
+# seconds) the script should wait for the new NGINX binary to start before
+# producing an error.
+#NGINX_MAXWAITTIME="3"
diff --git a/www-servers/nginx/files/nginx-r1.tmpfiles b/www-servers/nginx/files/nginx-r1.tmpfiles
new file mode 100644
index 000000000000..eda6d705bbb2
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r1.tmpfiles
@@ -0,0 +1,4 @@
+d /var/cache/nginx 0755 root root
+
+# Clean up the cache only on boot to not break running NGINX
+e! /var/cache/nginx/ - - - 0
diff --git a/www-servers/nginx/files/nginx-r2.logrotate b/www-servers/nginx/files/nginx-r2.logrotate
new file mode 100644
index 000000000000..0e60d7415880
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r2.logrotate
@@ -0,0 +1,11 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+/var/log/nginx/*.log {
+ missingok
+ delaycompress
+ sharedscripts
+ postrotate
+ test -r /run/nginx/nginx.pid && kill -s USR1 "$(cat /run/nginx/nginx.pid)"
+ endscript
+}
diff --git a/www-servers/nginx/files/nginx-r2.service b/www-servers/nginx/files/nginx-r2.service
new file mode 100644
index 000000000000..542afca8a0c2
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r2.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=The NGINX HTTP and reverse proxy server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=forking
+PIDFile=/run/nginx/nginx.pid
+RuntimeDirectory=nginx
+ExecStart=nginx
+ExecReload=kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-servers/nginx/files/nginx-r4.conf b/www-servers/nginx/files/nginx-r4.conf
new file mode 100644
index 000000000000..1144af3d7ceb
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r4.conf
@@ -0,0 +1,39 @@
+user nginx nginx;
+worker_processes auto;
+
+events {
+ # NGINX refuses to start if the 'events' section is not present. Yet,
+ # NGINX does not seem to care whether this section is non-empty.
+}
+
+http {
+ # Maximum hash table size is increased to accommodate for a large
+ # mime.types file that is shipped on Gentoo.
+ types_hash_max_size 4096;
+ include /etc/nginx/mime.types.nginx;
+
+ sendfile on;
+
+ # Example server. Warning: by default, the /var/www/localhost directory is
+ # NOT created; for the following configuration block to work, the
+ # directory must be created manually.
+ server {
+ listen 127.0.0.1;
+ server_name localhost;
+
+ # Substitute the directory below for the one you use.
+ #root /var/www/localhost/htdocs;
+ }
+
+ # SSL server example.
+ #server {
+ #listen 127.0.0.1:443 ssl;
+ #server_name localhost;
+
+ #ssl_certificate /etc/ssl/nginx/nginx.pem;
+ #ssl_certificate_key /etc/ssl/nginx/nginx.key;
+
+ #root /var/www/localhost/htdocs;
+ #}
+
+}
diff --git a/www-servers/nginx/files/nginx-r5.conf b/www-servers/nginx/files/nginx-r5.conf
new file mode 100644
index 000000000000..5c8aae56f380
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r5.conf
@@ -0,0 +1,40 @@
+user nginx nginx;
+worker_processes auto;
+@GENTOO_MODULES_INCLUDE@
+
+events {
+ # NGINX refuses to start if the 'events' section is not present. Yet,
+ # NGINX does not seem to care whether this section is non-empty.
+}
+
+http {
+ # Maximum hash table size is increased to accommodate for a large
+ # mime.types file that is shipped on Gentoo.
+ types_hash_max_size 4096;
+ include mime.types.nginx;
+
+ sendfile on;
+
+ # Example server. Warning: by default, the /var/www/localhost directory is
+ # NOT created; for the following configuration block to work, the
+ # directory must be created manually.
+ server {
+ listen 127.0.0.1;
+ server_name localhost;
+
+ # Substitute the directory below for the one you use.
+ #root /var/www/localhost/htdocs;
+ }
+
+ # SSL server example.
+ #server {
+ #listen 127.0.0.1:443 ssl;
+ #server_name localhost;
+
+ #ssl_certificate /etc/ssl/nginx/nginx.pem;
+ #ssl_certificate_key /etc/ssl/nginx/nginx.key;
+
+ #root /var/www/localhost/htdocs;
+ #}
+
+}
diff --git a/www-servers/nginx/files/nginx-r6.initd b/www-servers/nginx/files/nginx-r6.initd
new file mode 100644
index 000000000000..35c05a9b3bb7
--- /dev/null
+++ b/www-servers/nginx/files/nginx-r6.initd
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="NGINX"
+description="Robust, small and high performance HTTP and reverse proxy server"
+description_configtest="Run NGINX's internal config check."
+description_upgrade="Upgrade the NGINX binary without losing connections."
+description_reload="Reload the NGINX configuration without losing connections."
+
+NGINX_CONFIGFILE=${NGINX_CONFIGFILE:-/etc/nginx/${RC_SVCNAME}.conf}
+NGINX_MAXWAITTIME=${NGINX_MAXWAITTIME:-3}
+
+command="/usr/sbin/nginx"
+start_stop_daemon_args=${NGINX_SSDARGS:-"--wait 1000"}
+pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid"
+user=${NGINX_USER:-nginx}
+group=${NGINX_GROUP:-nginx}
+retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"}
+command_args="-c \"${NGINX_CONFIGFILE}\" -g 'pid ${pidfile};'"
+
+extra_commands="configtest"
+extra_started_commands="upgrade reload"
+
+depend() {
+ use net dns logger netmount
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o 0:0 "/run/${RC_SVCNAME}"
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
+}
+
+reload() {
+ ebegin "Refreshing NGINX's configuration"
+ start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+ eend $? "Failed to reload NGINX's configuration, please correct the errors above"
+}
+
+upgrade() {
+ einfo "Upgrading NGINX"
+ configtest || { eerror "Unable to upgrade NGINX: Configuration check failed";
+ return 1; }
+
+ einfo "Sending USR2 signal to the old binary"
+ start-stop-daemon --signal SIGUSR2 --pidfile "${pidfile}"
+
+ ebegin "Waiting up to ${NGINX_MAXWAITTIME} seconds for NGINX to upgrade"
+ local startdate pidfile_found
+ pidfile_found=0
+ endtime=$(("$(date +%s)" + NGINX_MAXWAITTIME))
+ while [ "$(date +%s)" -le "${endtime}" ]; do
+ if [ -f "${pidfile}" ] && [ -f "${pidfile}.oldbin" ]; then
+ pidfile_found=1
+ break
+ fi
+ sleep 1
+ done
+
+ [ "${pidfile_found}" = 1 ]
+ if ! eend $?; then
+ eerror "NGINX has failed to upgrade in time. This might have been caused either"
+ eerror "by a configuration error, uncaught by the configuration check, or, more"
+ eerror "likely, by NGINX taking more time to load the configuration than is"
+ eerror "allowed by the NGINX_MAXWAITTIME variable"
+ eerror "The maximum waiting time can be adjusted by setting the NGINX_MAXWAITTIME"
+ eerror "variable to a larger value in /etc/conf.d/nginx"
+ return 1
+ fi
+
+ einfo "Sending QUIT signal to the old binary"
+ start-stop-daemon --signal SIGQUIT --pidfile "${pidfile}.oldbin" ||
+ { eerror "The old NGINX binary may not have been stopped properly: Sending QUIT signal failed";
+ return 1; }
+
+ einfo "The upgrade has completed successfuly"
+}
+
+configtest() {
+ ebegin "Checking NGINX's configuration"
+ "${command}" -c "${NGINX_CONFIGFILE}" -t
+ if ! eend $?; then
+ eerror "Configuration check failed, please correct the errors above"
+ return 1
+ fi
+}
diff --git a/www-servers/nginx/files/nginx.conf-r2 b/www-servers/nginx/files/nginx.conf-r2
deleted file mode 100644
index 917c6c1700fb..000000000000
--- a/www-servers/nginx/files/nginx.conf-r2
+++ /dev/null
@@ -1,69 +0,0 @@
-user nginx nginx;
-worker_processes 1;
-
-error_log /var/log/nginx/error_log info;
-
-events {
- worker_connections 1024;
- use epoll;
-}
-
-http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
-
- log_format main
- '$remote_addr - $remote_user [$time_local] '
- '"$request" $status $bytes_sent '
- '"$http_referer" "$http_user_agent" '
- '"$gzip_ratio"';
-
- client_header_timeout 10m;
- client_body_timeout 10m;
- send_timeout 10m;
-
- connection_pool_size 256;
- client_header_buffer_size 1k;
- large_client_header_buffers 4 2k;
- request_pool_size 4k;
-
- gzip off;
-
- output_buffers 1 32k;
- postpone_output 1460;
-
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
-
- keepalive_timeout 75 20;
-
- ignore_invalid_headers on;
-
- index index.html;
-
- server {
- listen 127.0.0.1;
- server_name localhost;
-
- access_log /var/log/nginx/localhost.access_log main;
- error_log /var/log/nginx/localhost.error_log info;
-
- root /var/www/localhost/htdocs;
- }
-
- # SSL example
- #server {
- # listen 127.0.0.1:443;
- # server_name localhost;
-
- # ssl on;
- # ssl_certificate /etc/ssl/nginx/nginx.pem;
- # ssl_certificate_key /etc/ssl/nginx/nginx.key;
-
- # access_log /var/log/nginx/localhost.ssl_access_log main;
- # error_log /var/log/nginx/localhost.ssl_error_log info;
-
- # root /var/www/localhost/htdocs;
- #}
-}
diff --git a/www-servers/nginx/files/nginx.conf-r3 b/www-servers/nginx/files/nginx.conf-r3
index aedaad4f64ef..f851bbf8934e 100644
--- a/www-servers/nginx/files/nginx.conf-r3
+++ b/www-servers/nginx/files/nginx.conf-r3
@@ -67,4 +67,6 @@ http {
# root /var/www/localhost/htdocs;
#}
+
+ include /etc/nginx/*_vhost.conf;
}
diff --git a/www-servers/nginx/files/nginx.confd b/www-servers/nginx/files/nginx.confd
index f4b804375e92..478ad588f4e4 100644
--- a/www-servers/nginx/files/nginx.confd
+++ b/www-servers/nginx/files/nginx.confd
@@ -6,7 +6,7 @@
# PID file
# If you should ever change this, remember to update
# "/etc/logrotate.d/nginx", too.
-#NGINX_PIDFILE="/run/nginx.pid"
+#NGINX_PIDFILE="/run/nginx/nginx.pid"
# User to run nginx as
# If you should ever change this, make sure this user has
@@ -30,3 +30,6 @@
# that the service will be terminated within a given time (60 + 5 seconds
# per default) when you are stopping the service.
#NGINX_TERMTIMEOUT="TERM/60/KILL/5"
+
+# Run master process as user (requires configuration with setcap)
+#command_user="${NGINX_USER:-nginx}"
diff --git a/www-servers/nginx/files/nginx.initd-r4 b/www-servers/nginx/files/nginx.initd-r4
index 31f79baa099b..c9896289975f 100644
--- a/www-servers/nginx/files/nginx.initd-r4
+++ b/www-servers/nginx/files/nginx.initd-r4
@@ -15,7 +15,7 @@ NGINX_CONFIGFILE=${NGINX_CONFIGFILE:-/etc/nginx/nginx.conf}
command="/usr/sbin/nginx"
command_args="-c \"${NGINX_CONFIGFILE}\""
start_stop_daemon_args=${NGINX_SSDARGS:-"--wait 1000"}
-pidfile=${NGINX_PIDFILE:-/run/nginx.pid}
+pidfile=${NGINX_PIDFILE:-/run/nginx/nginx.pid}
user=${NGINX_USER:-nginx}
group=${NGINX_GROUP:-nginx}
retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"}
@@ -26,6 +26,8 @@ depend() {
}
start_pre() {
+ mkdir -m 0775 -p "/run/nginx"
+ chown -R "${user}:${group}" "/run/nginx"
if [ "${RC_CMD}" != "restart" ]; then
configtest || return 1
fi
diff --git a/www-servers/nginx/files/nginx.logrotate-r1 b/www-servers/nginx/files/nginx.logrotate-r1
index bc9d87a09a91..81eca0168ced 100644
--- a/www-servers/nginx/files/nginx.logrotate-r1
+++ b/www-servers/nginx/files/nginx.logrotate-r1
@@ -6,6 +6,6 @@
delaycompress
sharedscripts
postrotate
- test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid`
+ test -r /run/nginx/nginx.pid && kill -USR1 `cat /run/nginx/nginx.pid`
endscript
}
diff --git a/www-servers/nginx/files/nginx.service-r1 b/www-servers/nginx/files/nginx.service-r1
index e160af7625b7..74b023147587 100644
--- a/www-servers/nginx/files/nginx.service-r1
+++ b/www-servers/nginx/files/nginx.service-r1
@@ -4,7 +4,8 @@ After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
-PIDFile=/run/nginx.pid
+PIDFile=/run/nginx/nginx.pid
+RuntimeDirectory=nginx
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecStartPost=/bin/sleep 0.1
diff --git a/www-servers/nginx/files/nginx.tmpfiles b/www-servers/nginx/files/nginx.tmpfiles
new file mode 100644
index 000000000000..af9cdd26973f
--- /dev/null
+++ b/www-servers/nginx/files/nginx.tmpfiles
@@ -0,0 +1,2 @@
+D /var/tmp/nginx 0755 root root
+x /var/tmp/nginx
diff --git a/www-servers/nginx/metadata.xml b/www-servers/nginx/metadata.xml
index 1360cf2548f2..3daca06282e5 100644
--- a/www-servers/nginx/metadata.xml
+++ b/www-servers/nginx/metadata.xml
@@ -1,28 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
+ <maintainer type="person" proxied="yes">
+ <email>zurabid2016@gmail.com</email>
+ <name>Zurab Kvachadze</name>
</maintainer>
- <maintainer type="person">
- <email>whissi@gentoo.org</email>
- <name>Thomas Deutschmann</name>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
</maintainer>
- <upstream>
- <remote-id type="cpe">cpe:/a:nginx:nginx</remote-id>
- <changelog>https://nginx.org/en/CHANGES</changelog>
- </upstream>
+ <longdescription>
+ nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic
+ TCP/UDP proxy server, originally written by Igor Sysoev.
+ </longdescription>
<use>
- <flag name="aio">Enables file AIO support</flag>
- <flag name="http">Enable HTTP core support</flag>
+ <flag name="aio">Enable asynchronous I/O support</flag>
+ <flag name="debug">Enable support for debugging log</flag>
+ <flag name="http">Enable core HTTP support</flag>
+ <flag name="libatomic">
+ Use <pkg>dev-libs/libatomic_ops</pkg> instead of builtin atomic operations
+ </flag>
+ <flag name="mail">Enable POP3/IMAP4/SMTP mail proxy server</flag>
+ <flag name="modules">Enable loadable module support</flag>
+ <flag name="stream">
+ Enable generic TCP/UDP proxying and load balancing
+ </flag>
<flag name="http2">Enable HTTP2 module support</flag>
+ <flag name="http3">Enable HTTP3 module support</flag>
<flag name="http-cache">Enable HTTP cache support</flag>
- <flag name="libatomic">Use libatomic instead of builtin atomic operations</flag>
- <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg> for lua support when building the lua http module.</flag>
+ <flag name="ktls">Enable Kernel TLS offload (kTLS)</flag>
<flag name="pcre-jit">Enable JIT for pcre</flag>
- <flag name="ssl">Enable HTTPS module for http. Enable SSL/TLS support for POP3/IMAP/SMTP for mail.</flag>
+ <flag name="pcre2">Enable support for pcre2</flag>
+ <flag name="ssl">
+ Enable HTTPS module for http. Enable SSL/TLS support for POP3/IMAP/SMTP for mail.
+ </flag>
<flag name="rtmp">NGINX-based Media Streaming Server</flag>
</use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:f5:nginx</remote-id>
+ <doc>https://nginx.org/en/docs/</doc>
+ <changelog>https://nginx.org/en/CHANGES</changelog>
+ <bugs-to>https://github.com/nginx/nginx/issues</bugs-to>
+ </upstream>
<origin>baldeagleos-repo</origin>
</pkgmetadata>
diff --git a/www-servers/nginx/nginx-1.26.3-r2.ebuild b/www-servers/nginx/nginx-1.26.3-r2.ebuild
new file mode 100644
index 000000000000..90a8eb479812
--- /dev/null
+++ b/www-servers/nginx/nginx-1.26.3-r2.ebuild
@@ -0,0 +1,1144 @@
+# Copyright 1999-2025 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
+# - Update NGINX_TESTS_REV to the current available revision and run tests.
+# - 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="0.10.25"
+HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
+HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
+HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
+LUA_COMPAT=( lua5-{1,3,4} 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/liquidm/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}"
+
+# nginx-vod-module (https://github.com/kaltura/nginx-vod-module, AGPL-3+)
+HTTP_VOD_MODULE_PV="1.33"
+HTTP_VOD_MODULE_P="nginx-vod-module-${HTTP_VOD_MODULE_PV}"
+HTTP_VOD_MODULE_URI="https://github.com/kaltura/nginx-vod-module/archive/${HTTP_VOD_MODULE_PV}.tar.gz"
+HTTP_VOD_MODULE_WD="${WORKDIR}/nginx-vod-module-${HTTP_VOD_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.8.10"
+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}"
+
+# nginx-tests (http://hg.nginx.org/nginx-tests, BSD-2)
+NGINX_TESTS_REV="0b5ec15c62ed"
+
+# We handle deps below ourselves
+SSL_DEPS_SKIP=1
+AUTOTOOLS_AUTO_DEPEND="no"
+
+inherit autotools lua-single multiprocessing 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_http_vod? ( ${HTTP_VOD_MODULE_URI} -> ${HTTP_VOD_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 )
+ test? ( https://hg.nginx.org/nginx-tests/archive/${NGINX_TESTS_REV}.tar.gz -> nginx-tests-${NGINX_TESTS_REV}.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="0"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
+
+RESTRICT="!test? ( 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
+ http_vod
+ stream_geoip2
+ stream_javascript
+"
+
+IUSE="aio debug +http +http2 http3 +http-cache ktls libatomic pcre +pcre2 pcre-jit rtmp selinux ssl test 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=
+ )
+ ktls? (
+ >=dev-libs/openssl-3:0=[ktls]
+ )
+ 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? ( virtual/zlib:= )
+ nginx_modules_http_gzip? ( virtual/zlib:= )
+ nginx_modules_http_gzip_static? ( virtual/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_http_vod? ( media-video/ffmpeg:0= )
+ 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:mainline"
+DEPEND="${CDEPEND}
+ arm? ( dev-libs/libatomic_ops )
+ libatomic? ( dev-libs/libatomic_ops )"
+BDEPEND="
+ nginx_modules_http_brotli? ( virtual/pkgconfig )
+ test? (
+ dev-lang/perl
+ dev-perl/Cache-Memcached
+ dev-perl/Cache-Memcached-Fast
+ dev-perl/CryptX
+ dev-perl/FCGI
+ dev-perl/GD
+ dev-perl/Net-SSLeay
+ )"
+# Unpackaged perl modules which would be used by tests
+# Protocol::WebSocket
+# SCGI
+
+# Uwsgi doesn't start in tests
+# www-servers/uwsgi
+
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
+
+REQUIRED_USE="pcre-jit? ( pcre )
+ ktls? ( ssl )
+ 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 )
+ nginx_modules_http_vod? ( threads )"
+
+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_javascript; then
+ cd "${NJS_MODULE_WD}" || die
+ sed -e 's/-Werror//g' -i auto/cc || die
+ 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
+
+ if use nginx_modules_http_security ; then
+ cd "${HTTP_SECURITY_MODULE_WD}" || die
+ eapply "${FILESDIR}/http_security-nginx-1.26.2.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 http3 && myconf+=( --with-http_v3_module )
+ use ktls && myconf+=( --with-openssl-opt=enable-ktls )
+ 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 http3 || use nginx_modules_http_javascript; then
+ http_enabled=1
+ fi
+
+ if use nginx_modules_http_vod; then
+ http_enabled=1
+ myconf+=( --add-module=${HTTP_VOD_MODULE_WD} )
+ 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}/${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
+ insinto /etc/nginx
+ newins - 00-config.lua_vhost.conf <<-EOF
+ lua_package_path "/etc/nginx/?.lua;;";
+ EOF
+ insinto /etc/nginx/resty
+ touch "${ED}"/etc/nginx/resty/core.lua
+ 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
+
+ if use nginx_modules_http_vod; then
+ docinto ${HTTP_VOD_MODULE_P}
+ dodoc "${HTTP_VOD_MODULE_WD}"/{CHANGELOG,README}.md
+ fi
+}
+
+src_test() {
+ pushd "${WORKDIR}"/nginx-tests-"${NGINX_TESTS_REV}" > /dev/null || die
+
+ # FIXME: unsure why uwsgi fails to start
+ rm uwsgi*.t || die
+
+ local -x TEST_NGINX_BINARY="${S}/objs/nginx"
+ local -x TEST_NGINX_VERBOSE=1
+
+ prove -v -j $(makeopts_jobs) . || die
+ popd > /dev/null || die
+}
+
+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.31.0.ebuild b/www-servers/nginx/nginx-1.27.5-r1.ebuild
index 0b6f415eeadb..a5ac25de4edd 100644
--- a/www-servers/nginx/nginx-1.31.0.ebuild
+++ b/www-servers/nginx/nginx-1.27.5-r1.ebuild
@@ -1,5 +1,6 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
# Maintainer notes:
@@ -165,7 +166,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.8.7"
+NJS_MODULE_PV="0.8.10"
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}"
@@ -219,7 +220,7 @@ LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
nginx_modules_http_push_stream? ( GPL-3 )"
SLOT="mainline"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
fastcgi geo grpc gzip limit_req limit_conn map memcached mirror
@@ -302,38 +303,31 @@ CDEPEND="
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=
-
)
ktls? (
>=dev-libs/openssl-3:0=[ktls]
-
)
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_gunzip? ( virtual/zlib:= )
+ nginx_modules_http_gzip? ( virtual/zlib:= )
+ nginx_modules_http_gzip_static? ( virtual/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_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_dav_ext? ( dev-libs/libxml2:= )
nginx_modules_http_security? ( dev-libs/modsecurity:= )
nginx_modules_http_auth_ldap? ( net-nds/openldap:=[ssl?] )
nginx_modules_http_vod? ( media-video/ffmpeg:0= )
diff --git a/www-servers/nginx/nginx-1.29.5.ebuild b/www-servers/nginx/nginx-1.29.5.ebuild
new file mode 100644
index 000000000000..568efe79ce15
--- /dev/null
+++ b/www-servers/nginx/nginx-1.29.5.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=mainline
+NGINX_TESTS_COMMIT=2993130953b28ff4d64ea75b5bd35c92c7e510f7
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r4.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+
+inherit nginx
+
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
diff --git a/www-servers/nginx/nginx-1.29.7-r1.ebuild b/www-servers/nginx/nginx-1.29.7-r1.ebuild
new file mode 100644
index 000000000000..bba0e71122bf
--- /dev/null
+++ b/www-servers/nginx/nginx-1.29.7-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=mainline
+NGINX_TESTS_COMMIT=cf90a22921652731302e8a4dc2a88049c723377d
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
diff --git a/www-servers/nginx/nginx-1.30.0.ebuild b/www-servers/nginx/nginx-1.30.0.ebuild
new file mode 100644
index 000000000000..1e34b4185370
--- /dev/null
+++ b/www-servers/nginx/nginx-1.30.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=stable
+NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
diff --git a/www-servers/nginx/nginx-1.30.2.ebuild b/www-servers/nginx/nginx-1.30.2.ebuild
new file mode 100644
index 000000000000..0f000bf923cf
--- /dev/null
+++ b/www-servers/nginx/nginx-1.30.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=stable
+NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
diff --git a/www-servers/nginx/nginx-1.30.3.ebuild b/www-servers/nginx/nginx-1.30.3.ebuild
new file mode 100644
index 000000000000..0f000bf923cf
--- /dev/null
+++ b/www-servers/nginx/nginx-1.30.3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=stable
+NGINX_TESTS_COMMIT=0f72f59c40de9977bd8f3deff5d200e761b8b683
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
diff --git a/www-servers/nginx/nginx-1.31.1.ebuild b/www-servers/nginx/nginx-1.31.1.ebuild
index 0b6f415eeadb..7011a2a9e475 100644
--- a/www-servers/nginx/nginx-1.31.1.ebuild
+++ b/www-servers/nginx/nginx-1.31.1.ebuild
@@ -1,1138 +1,44 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 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
-# - Update NGINX_TESTS_REV to the current available revision and run tests.
-# - 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 (https://github.com/nginx-modules/ngx_cache_purge, BSD-2 license)
-HTTP_CACHE_PURGE_MODULE_PV="2.5.3"
-HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
-HTTP_CACHE_PURGE_MODULE_URI="https://github.com/nginx-modules/ngx_cache_purge/archive/refs/tags/${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="0.10.25"
-HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
-HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
-HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
-LUA_COMPAT=( lua5-{1,3,4} 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/liquidm/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}"
-
-# nginx-vod-module (https://github.com/kaltura/nginx-vod-module, AGPL-3+)
-HTTP_VOD_MODULE_PV="1.33"
-HTTP_VOD_MODULE_P="nginx-vod-module-${HTTP_VOD_MODULE_PV}"
-HTTP_VOD_MODULE_URI="https://github.com/kaltura/nginx-vod-module/archive/${HTTP_VOD_MODULE_PV}.tar.gz"
-HTTP_VOD_MODULE_WD="${WORKDIR}/nginx-vod-module-${HTTP_VOD_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.8.7"
-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}"
-
-# nginx-tests (http://hg.nginx.org/nginx-tests, BSD-2)
-NGINX_TESTS_REV="0b5ec15c62ed"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools lua-single multiprocessing 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_http_vod? ( ${HTTP_VOD_MODULE_URI} -> ${HTTP_VOD_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 )
- test? ( https://hg.nginx.org/nginx-tests/archive/${NGINX_TESTS_REV}.tar.gz -> nginx-tests-${NGINX_TESTS_REV}.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 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
-
-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
- http_vod
- stream_geoip2
- stream_javascript
-"
-
-RESTRICT="!test? ( test )"
-
-IUSE="aio debug +http +http2 http3 +http-cache ktls libatomic pcre +pcre2 pcre-jit rtmp selinux ssl test 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=
-
- )
- ktls? (
- >=dev-libs/openssl-3:0=[ktls]
-
- )
- 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_http_vod? ( media-video/ffmpeg:0= )
- 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 )
- test? (
- dev-lang/perl
- dev-perl/Cache-Memcached
- dev-perl/Cache-Memcached-Fast
- dev-perl/CryptX
- dev-perl/FCGI
- dev-perl/GD
- dev-perl/Net-SSLeay
- )"
-# Unpackaged perl modules which would be used by tests
-# Protocol::WebSocket
-# SCGI
-
-# Uwsgi doesn't start in tests
-# www-servers/uwsgi
-
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- ktls? ( ssl )
- 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 )
- nginx_modules_http_vod? ( threads )"
-
-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
+EAPI=8
- 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
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=mainline
+NGINX_TESTS_COMMIT=4d1de3f357afeb91865d024b27516d6b67aad86e
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
- if use !http; then
- ewarn "To actually disable all http-functionality you also have to disable"
- ewarn "all nginx http modules."
- fi
+inherit nginx
- 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
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
- use nginx_modules_http_lua && lua-single_pkg_setup
-}
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
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_javascript; then
- cd "${NJS_MODULE_WD}" || die
- sed -e 's/-Werror//g' -i auto/cc || die
- 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_upload_progress; then
- cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die
- eapply "${FILESDIR}"/http_uploadprogress-nginx-1.23.0.patch
- cd "${S}" || die
- fi
-
- if use nginx_modules_http_security ; then
- cd "${HTTP_SECURITY_MODULE_WD}" || die
- eapply "${FILESDIR}/http_security-nginx-1.26.2.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 http3 && myconf+=( --with-http_v3_module )
- use ktls && myconf+=( --with-openssl-opt=enable-ktls )
- 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 http3 || use nginx_modules_http_javascript; then
- http_enabled=1
- fi
-
- if use nginx_modules_http_vod; then
- http_enabled=1
- myconf+=( --add-module=${HTTP_VOD_MODULE_WD} )
- 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}/${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.md
-
- # 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}
- 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
-
- if use nginx_modules_http_vod; then
- docinto ${HTTP_VOD_MODULE_P}
- dodoc "${HTTP_VOD_MODULE_WD}"/{CHANGELOG,README}.md
- fi
-}
-
-src_test() {
- pushd "${WORKDIR}"/nginx-tests-"${NGINX_TESTS_REV}" > /dev/null || die
-
- # FIXME: unsure why uwsgi fails to start
- rm uwsgi*.t || die
-
- local -x TEST_NGINX_BINARY="${S}/objs/nginx"
- local -x TEST_NGINX_VERBOSE=1
-
- prove -v -j $(makeopts_jobs) . || die
- popd > /dev/null || die
-}
-
-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
+ nginx_src_prepare
- 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 ""
+ if use test ; then
+ # Fails with network-sandbox (bug #976129)
+ rm "${NGX_TESTS_S}"/tunnel_next_upstream.t || die
fi
}
diff --git a/www-servers/nginx/nginx-1.31.2.ebuild b/www-servers/nginx/nginx-1.31.2.ebuild
new file mode 100644
index 000000000000..a575ab7a0f1a
--- /dev/null
+++ b/www-servers/nginx/nginx-1.31.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=mainline
+NGINX_TESTS_COMMIT=56ae49add9286d2e896a22bcfb880c7ea7c3964e
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
+
+src_prepare() {
+ nginx_src_prepare
+
+ if use test ; then
+ # Fails with network-sandbox (bug #976129)
+ rm "${NGX_TESTS_S}"/tunnel_next_upstream.t || die
+ fi
+}
diff --git a/www-servers/nginx/nginx-9999.ebuild b/www-servers/nginx/nginx-9999.ebuild
new file mode 100644
index 000000000000..08d8dd04e49f
--- /dev/null
+++ b/www-servers/nginx/nginx-9999.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NGINX_SUBSYSTEMS=(+http stream mail)
+NGINX_MODULES=(
+ +http_{charset,gzip,ssi,userid,access,auth_basic,mirror,autoindex,geo,map}
+ +http_{split_clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,grpc}
+ +http_{memcached,limit_conn,limit_req,empty_gif,browser,upstream_hash}
+ +http_{upstream_ip_hash,upstream_least_conn,upstream_random}
+ +http_{upstream_keepalive,upstream_zone}
+ http_{ssl,v2,v3,realip,addition,xslt,image_filter,geoip,sub,dav,flv,mp4}
+ http_{gunzip,gzip_static,auth_request,random_index,secure_link,degradation}
+ http_{slice,stub_status,perl}
+ +mail_{pop3,imap,smtp}
+ mail_ssl
+ +stream_{limit_conn,access,geo,map,split_clients,return,pass,set}
+ +stream_{upstream_hash,upstream_least_conn,upstream_random,upstream_zone}
+ stream_{ssl,realip,geoip,ssl_preread}
+)
+NGINX_UPDATE_STREAM=live
+NGINX_TESTS_COMMIT=live
+NGINX_MISC_FILES=(
+ nginx-{r2.logrotate,r2.service,r5.conf,r6.initd,r1.confd,r1.tmpfiles}
+)
+NGINX_SUPPORT_MODULE_STUBS=1
+
+inherit nginx
+
+PATCHES=(
+ "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+)
+
+src_prepare() {
+ nginx_src_prepare
+
+ if use test ; then
+ # Fails with network-sandbox (bug #976129)
+ rm "${NGX_TESTS_S}"/tunnel_next_upstream.t || die
+ fi
+}
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 523ab37920d9..bcf1b93dcfc0 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,2 +1,3 @@
-DIST uwsgi-2.0.30.tar.gz 822232 BLAKE2B ae25862e6a9ffa9b0c2ba2f50aef18971ab74f9bc929e8a39b48ec5b87fdf5ec1b61a5ad9eec91a9f45cc9033b92525d272162a6e098eb1a1852789995a6a6af SHA512 a8ff667e55956285427d440cf40c552ad6628c192e3b4d0a3d8d5f96aec09c18466feb64f4b305d84194a7d5e2bb15a49a1d6b807af538e474e72867ceb7f644
+DIST uwsgi-2.0.23.tar.gz 810116 BLAKE2B be4353ac71a5282233b0a996e74e49bff66f4c460eb2640058c7028cfeae41214661785de78cdd4aa35415bcc4595e1e340ba48db87bee413754b13d8b24a7d8 SHA512 4060dd66f8c6309497b52a961c36a58fe2b3b3afc7e11b97cfa464757c614d1d44ccc561b18500a394b5d95e5660eae48759003a30ec07379a6f079f63f3899b
+DIST uwsgi-2.0.27.tar.gz 815302 BLAKE2B 6e1aab8a896405f0ab87fdb33bb14117cfd8473da61008e3ecf6b0d2664e7fd29acc12ba322c40772f015adb99ba79c3edcb40b87051fba918c162740d53f241 SHA512 78de6b8aa401ca5e27204cc68dec540617407dc9a0dad2c785a7eadc449889aad4eb516d4d8d257dc46e5b91b6c2d85be5953b19e0897375a7f0fecaa298d066
DIST uwsgi-2.0.31.tar.gz 822440 BLAKE2B dd2d8b7d3b2293fb2f4ae587862b107238e5b8b4fbd9953a5de52b41329f3895609fe98f8476603d1f5e3f209d490cc5fa46a43cfb7d2b046c22bbddf55236b2 SHA512 d4d327f36455438e165298cb5a7d483c951f4acd3d834b46ceeda105bd3664792ead226b02e06db62e92c210544778119bf75a55d9d4f30f8fba896c7de51e6d
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/files/uwsgi.initd-r7 b/www-servers/uwsgi/files/uwsgi.initd-r7
index 64dfc7a736ff..a6b99edf1b38 100644
--- a/www-servers/uwsgi/files/uwsgi.initd-r7
+++ b/www-servers/uwsgi/files/uwsgi.initd-r7
@@ -128,7 +128,8 @@ stop() {
else
ebegin "Stopping uWSGI application ${PROGNAME}"
fi
- start-stop-daemon --stop --signal QUIT --pidfile "${PIDFILE}"
+ # retry should be set higher than uwsgi worker-reload-mercy (default 60)
+ start-stop-daemon --stop --signal QUIT --retry 90 --pidfile "${PIDFILE}"
eend $?
}
diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml
index a4f8a469061b..6ae7d74c206a 100644
--- a/www-servers/uwsgi/metadata.xml
+++ b/www-servers/uwsgi/metadata.xml
@@ -1,22 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
- <maintainer type="person">
- <email>ultrabug@gentoo.org</email>
- </maintainer>
- <upstream>
- <remote-id type="cpe">cpe:/a:unbit:uwsgi</remote-id>
- </upstream>
<use>
<flag name="embedded">Embed plugins instead of building them as real plugins. When disabling this USE flag make sure you specify all used plugins in your uWSGI configuration. Note: Language plugins will always be built as real plugins.</flag>
<flag name="go">Build the gccgo plugin to run Go applications.</flag>
<flag name="json">Support json as a configuration file format.</flag>
- <flag name="python-asyncio">Use the EXPERIMENTAL asyncio (tulip) for python3.4 async request dispatching and as LoopEngine (see http://uwsgi-docs.readthedocs.org/en/latest/asyncio.html).</flag>
- <flag name="python-gevent">Use <pkg>dev-python/gevent</pkg> for async request dispatching and as LoopEngine (see http://projects.unbit.it/uwsgi/wiki/Gevent).</flag>
<flag name="routing">Enable routing support</flag>
<flag name="yaml">Support yaml as a configuration file format.</flag>
<flag name="yajl">Use <pkg>dev-libs/yajl</pkg> instead of <pkg>dev-libs/jansson</pkg> for parsing JSON configuration files (if USe=json is set)</flag>
diff --git a/www-servers/uwsgi/uwsgi-2.0.31-r1.ebuild b/www-servers/uwsgi/uwsgi-2.0.23-r1.ebuild
index 9b73a7b003c4..50d39f2cedc4 100644
--- a/www-servers/uwsgi/uwsgi-2.0.31-r1.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.23-r1.ebuild
@@ -1,48 +1,58 @@
-# Copyright 2021-2025 Liguros Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
+# Check the upstream uwsgi-2.0 branch, not master, for backports
+
LUA_COMPAT=( lua5-{1,3,4} luajit )
-PYTHON_COMPAT=( python3_{10..14} )
+PYTHON_COMPAT=( python3_{11..12} )
PYTHON_REQ_USE="threads(+)"
RUBY_OPTIONAL="yes"
-USE_RUBY="ruby30 ruby31 ruby32 ruby33"
+USE_RUBY="ruby31 ruby32"
PHP_EXT_INI="no"
PHP_EXT_NAME="dummy"
PHP_EXT_OPTIONAL_USE="php"
-USE_PHP="php8-0 php8-1 php8-2" # deps must be registered separately below
+USE_PHP="php8-2" # deps must be registered separately below
+
+POSTGRES_COMPAT=( 13 14 15 )
MY_P="${P/_/-}"
-inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng
+inherit lua-single multiprocessing pax-utils php-ext-source-r3 postgres python-r1 ruby-ng
DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="https://projects.unbit.it/uwsgi/"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux"
+KEYWORDS="amd64 arm arm64 x86"
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool
+UWSGI_PLUGINS_STD=(
+ ping cache carbon nagios rpc rrdtool
http ugreen signal syslog rsyslog
router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics}
{core,fast,raw,ssl}router
redislog mongodblog log{file,socket}
spooler cheaper_busyness symcall
transformation_{chunked,gzip,offload,tofile}
- zergpool )
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
+ zergpool
+)
+UWSGI_PLUGINS_OPT=(
+ alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter
geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam
rados router_{access,radius,spnego,xmldir}
sqlite ssi stats_pusher_statsd
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix )
+ systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix
+)
LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process
-LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby )
+LANG_SUPPORT_EXTENDED=( go lua php python ruby )
# plugins to be ignored (for now):
# cheaper_backlog2: example plugin
@@ -60,27 +70,32 @@ for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}
for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done
IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}"
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
uwsgi_plugins_logcrypto? ( ssl )
uwsgi_plugins_sslrouter? ( ssl )
routing? ( pcre )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_REQ_USE} )
uwsgi_plugins_emperor_zeromq? ( zeromq )
uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter )
uwsgi_plugins_router_xmldir? ( xml !expat )
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
- python-asyncio? ( python )
- python-gevent? ( python )
- expat? ( xml )"
+ expat? ( xml )
+"
-# util-linux is required for libuuid when requesting zeromq support
+# Dependency notes:
+# - util-linux is required for libuuid when requesting zeromq support
+# - sys-devel/gcc[go] is needed for libgo.so
+#
# Order:
# 1. Unconditional
# 2. General features
# 3. Plugins
# 4. Language/app support
CDEPEND="
- sys-libs/zlib
+ virtual/zlib:=
virtual/libcrypt:=
caps? ( sys-libs/libcap )
json? (
@@ -88,12 +103,9 @@ CDEPEND="
yajl? ( dev-libs/yajl )
)
pcre? ( dev-libs/libpcre:3 )
- ssl? (
- dev-libs/openssl:0=
-
- )
+ ssl? ( dev-libs/openssl:= )
xml? (
- !expat? ( dev-libs/libxml2 )
+ !expat? ( dev-libs/libxml2:= )
expat? ( dev-libs/expat )
)
yaml? ( dev-libs/libyaml )
@@ -104,7 +116,7 @@ CDEPEND="
uwsgi_plugins_alarm_curl? ( net-misc/curl )
uwsgi_plugins_alarm_xmpp? ( net-libs/gloox )
uwsgi_plugins_curl_cron? ( net-misc/curl )
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_DEP} )
uwsgi_plugins_geoip? ( dev-libs/geoip )
uwsgi_plugins_ldap? ( net-nds/openldap:= )
uwsgi_plugins_pam? ( sys-libs/pam )
@@ -113,21 +125,16 @@ CDEPEND="
uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers )
uwsgi_plugins_router_spnego? ( virtual/krb5 )
uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
- uwsgi_plugins_webdav? ( dev-libs/libxml2 )
+ uwsgi_plugins_webdav? ( dev-libs/libxml2:= )
uwsgi_plugins_xslt? ( dev-libs/libxslt )
go? ( sys-devel/gcc:=[go] )
lua? ( ${LUA_DEPS} )
mono? ( dev-lang/mono:= )
perl? ( dev-lang/perl:= )
php? (
- net-libs/libnsl
- php_targets_php8-0? ( dev-lang/php:8.0[embed] )
- php_targets_php8-1? ( dev-lang/php:8.1[embed] )
php_targets_php8-2? ( dev-lang/php:8.2[embed] )
)
python? ( ${PYTHON_DEPS} )
- python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )
- python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] )
ruby? ( $(ruby_implementations_depend) )
"
DEPEND="${CDEPEND}"
@@ -136,19 +143,24 @@ RDEPEND="
selinux? ( sec-policy/selinux-uwsgi )
uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )
"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
-src_unpack() {
- echo ${PYTHON_USEDEP}
- default
-}
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.21-libphp-version.patch
+)
pkg_setup() {
python_setup
use lua && lua-single_pkg_setup
use ruby && ruby-ng_pkg_setup
+ use uwsgi_plugins_emperor_pg && postgres_pkg_setup
+}
+
+src_unpack() {
+ default
}
src_prepare() {
@@ -172,6 +184,7 @@ src_configure() {
local json="false"
local xml="false"
+ local p
for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do
use uwsgi_plugins_${p} && embedded_plugins+=("${p}")
done
@@ -230,10 +243,8 @@ src_configure() {
fi
if use uwsgi_plugins_emperor_pg ; then
- PGPV="$(best_version dev-db/postgresql)"
- PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})"
sed -i \
- -e "s|pg_config|pg_config${PGSLOT/.}|" \
+ -e "s|pg_config|${PG_CONFIG}|" \
plugins/emperor_pg/uwsgiplugin.py || die "sed failed"
fi
}
@@ -241,9 +252,9 @@ src_configure() {
each_ruby_compile() {
cd "${WORKDIR}/${MY_P}" || die "sed failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
}
python_compile_plugins() {
@@ -263,21 +274,23 @@ python_install_symlinks() {
src_compile() {
mkdir -p "${T}/plugins" || die
- CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+ export CPUCOUNT="$(makeopts_jobs)"
+
+ ${EPYTHON} uwsgiconfig.py --build gentoo || die "building uwsgi failed"
if use go ; then
- python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
fi
if use lua ; then
# setting the name for the pkg-config file to lua, since that is the name
# provided by the wrapper from Lua eclasses
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
+ UWSGICONFIG_LUAPC="lua" ${EPYTHON} uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
fi
if use php ; then
for s in $(php_get_slots); do
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
+ UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" ${EPYTHON} uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
done
fi
@@ -304,6 +317,7 @@ src_install() {
use perl && dosym uwsgi /usr/bin/uwsgi_psgi
if use php ; then
+ local s
for s in $(php_get_slots); do
dosym uwsgi /usr/bin/uwsgi_${s/.}
done
@@ -349,16 +363,7 @@ pkg_postinst() {
elog " "
elog " '--plugins ${EPYV}' for ${EPYTHON}"
- if use python-asyncio ; then
- if [[ ${EPYV} == python34 ]] ; then
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
- else
- elog " (asyncio is only supported in python3.4)"
- fi
- fi
- if use python-gevent ; then
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}"
- fi
+ elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
}
use python && python_foreach_impl python_pkg_postinst
diff --git a/www-servers/uwsgi/uwsgi-2.0.30.ebuild b/www-servers/uwsgi/uwsgi-2.0.27-r1.ebuild
index 519257474173..1d4c1b1826b1 100644
--- a/www-servers/uwsgi/uwsgi-2.0.30.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.27-r1.ebuild
@@ -1,48 +1,59 @@
-# Copyright 2021-2025 Liguros Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
+# Check the upstream uwsgi-2.0 branch, not master, for backports
+
LUA_COMPAT=( lua5-{1,3,4} luajit )
-PYTHON_COMPAT=( python3_{9,10,11,12,13} )
+PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="threads(+)"
RUBY_OPTIONAL="yes"
-USE_RUBY="ruby30 ruby31 ruby32 ruby33"
+USE_RUBY="ruby31 ruby32"
PHP_EXT_INI="no"
PHP_EXT_NAME="dummy"
PHP_EXT_OPTIONAL_USE="php"
-USE_PHP="php8-0 php8-1 php8-2" # deps must be registered separately below
+USE_PHP="php8-2" # deps must be registered separately below
+
+POSTGRES_COMPAT=( 13 14 15 16 17 )
MY_P="${P/_/-}"
-inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng
+inherit flag-o-matic lua-single multiprocessing pax-utils php-ext-source-r3
+inherit postgres python-r1 ruby-ng
DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="https://projects.unbit.it/uwsgi/"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 x86"
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool
+UWSGI_PLUGINS_STD=(
+ ping cache carbon nagios rpc rrdtool
http ugreen signal syslog rsyslog
router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics}
{core,fast,raw,ssl}router
redislog mongodblog log{file,socket}
spooler cheaper_busyness symcall
transformation_{chunked,gzip,offload,tofile}
- zergpool )
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
+ zergpool
+)
+UWSGI_PLUGINS_OPT=(
+ alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter
geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam
rados router_{access,radius,spnego,xmldir}
sqlite ssi stats_pusher_statsd
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix )
+ systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix
+)
LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process
-LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby )
+LANG_SUPPORT_EXTENDED=( go lua php python ruby )
# plugins to be ignored (for now):
# cheaper_backlog2: example plugin
@@ -60,40 +71,42 @@ for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}
for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done
IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}"
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
uwsgi_plugins_logcrypto? ( ssl )
uwsgi_plugins_sslrouter? ( ssl )
routing? ( pcre )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_REQ_USE} )
uwsgi_plugins_emperor_zeromq? ( zeromq )
uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter )
uwsgi_plugins_router_xmldir? ( xml !expat )
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
- python-asyncio? ( python )
- python-gevent? ( python )
- expat? ( xml )"
+ expat? ( xml )
+"
-# util-linux is required for libuuid when requesting zeromq support
+# Dependency notes:
+# - util-linux is required for libuuid when requesting zeromq support
+# - sys-devel/gcc[go] is needed for libgo.so
+#
# Order:
# 1. Unconditional
# 2. General features
# 3. Plugins
# 4. Language/app support
CDEPEND="
- sys-libs/zlib
+ virtual/zlib:=
virtual/libcrypt:=
caps? ( sys-libs/libcap )
json? (
!yajl? ( dev-libs/jansson:= )
yajl? ( dev-libs/yajl )
)
- pcre? ( dev-libs/libpcre:3 )
- ssl? (
- dev-libs/openssl:0=
-
- )
+ pcre? ( dev-libs/libpcre2 )
+ ssl? ( dev-libs/openssl:= )
xml? (
- !expat? ( dev-libs/libxml2 )
+ !expat? ( dev-libs/libxml2:= )
expat? ( dev-libs/expat )
)
yaml? ( dev-libs/libyaml )
@@ -104,7 +117,7 @@ CDEPEND="
uwsgi_plugins_alarm_curl? ( net-misc/curl )
uwsgi_plugins_alarm_xmpp? ( net-libs/gloox )
uwsgi_plugins_curl_cron? ( net-misc/curl )
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_DEP} )
uwsgi_plugins_geoip? ( dev-libs/geoip )
uwsgi_plugins_ldap? ( net-nds/openldap:= )
uwsgi_plugins_pam? ( sys-libs/pam )
@@ -113,21 +126,16 @@ CDEPEND="
uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers )
uwsgi_plugins_router_spnego? ( virtual/krb5 )
uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
- uwsgi_plugins_webdav? ( dev-libs/libxml2 )
+ uwsgi_plugins_webdav? ( dev-libs/libxml2:= )
uwsgi_plugins_xslt? ( dev-libs/libxslt )
go? ( sys-devel/gcc:=[go] )
lua? ( ${LUA_DEPS} )
mono? ( dev-lang/mono:= )
perl? ( dev-lang/perl:= )
php? (
- net-libs/libnsl
- php_targets_php8-0? ( dev-lang/php:8.0[embed] )
- php_targets_php8-1? ( dev-lang/php:8.1[embed] )
php_targets_php8-2? ( dev-lang/php:8.2[embed] )
)
python? ( ${PYTHON_DEPS} )
- python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )
- python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] )
ruby? ( $(ruby_implementations_depend) )
"
DEPEND="${CDEPEND}"
@@ -136,19 +144,20 @@ RDEPEND="
selinux? ( sec-policy/selinux-uwsgi )
uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )
"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-src_unpack() {
- echo ${PYTHON_USEDEP}
- default
-}
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
pkg_setup() {
python_setup
use lua && lua-single_pkg_setup
use ruby && ruby-ng_pkg_setup
+ use uwsgi_plugins_emperor_pg && postgres_pkg_setup
+}
+
+src_unpack() {
+ default
}
src_prepare() {
@@ -172,6 +181,7 @@ src_configure() {
local json="false"
local xml="false"
+ local p
for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do
use uwsgi_plugins_${p} && embedded_plugins+=("${p}")
done
@@ -203,6 +213,9 @@ src_configure() {
fi
use jemalloc && malloc_impl="jemalloc"
+ # Incompatible w/ C23 prototypes
+ append-cflags -std=gnu17
+
# prepare the buildconf for gentoo
cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die
sed -i \
@@ -211,6 +224,7 @@ src_configure() {
-e "s|VAR_JSON|${json}|" \
-e "s|VAR_SSL|$(usex ssl true false)|" \
-e "s|VAR_PCRE|$(usex pcre true false)|" \
+ -e "s|VAR_PCRE2|$(usex pcre true false)|" \
-e "s|VAR_ZMQ|$(usex zeromq true false)|" \
-e "s|VAR_ROUTING|$(usex routing true false)|" \
-e "s|VAR_DEBUG|$(usex debug true false)|" \
@@ -230,10 +244,8 @@ src_configure() {
fi
if use uwsgi_plugins_emperor_pg ; then
- PGPV="$(best_version dev-db/postgresql)"
- PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})"
sed -i \
- -e "s|pg_config|pg_config${PGSLOT/.}|" \
+ -e "s|pg_config|${PG_CONFIG}|" \
plugins/emperor_pg/uwsgiplugin.py || die "sed failed"
fi
}
@@ -241,9 +253,9 @@ src_configure() {
each_ruby_compile() {
cd "${WORKDIR}/${MY_P}" || die "sed failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
}
python_compile_plugins() {
@@ -252,21 +264,8 @@ python_compile_plugins() {
EPYV=${EPYTHON/.}
PYV=${EPYV/python}
- ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
-
- if use python-asyncio ; then
- if [[ "${PYV}" != "27" ]] ; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
- fi
- fi
-
- if use python-gevent ; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed"
- fi
-
- if use python-gevent || use python-asyncio; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed"
- fi
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
}
python_install_symlinks() {
@@ -276,21 +275,23 @@ python_install_symlinks() {
src_compile() {
mkdir -p "${T}/plugins" || die
- CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+ export CPUCOUNT="$(makeopts_jobs)"
+
+ ${EPYTHON} uwsgiconfig.py --build gentoo || die "building uwsgi failed"
if use go ; then
- python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
fi
if use lua ; then
# setting the name for the pkg-config file to lua, since that is the name
# provided by the wrapper from Lua eclasses
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
+ UWSGICONFIG_LUAPC="lua" ${EPYTHON} uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
fi
if use php ; then
for s in $(php_get_slots); do
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
+ UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" ${EPYTHON} uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
done
fi
@@ -317,6 +318,7 @@ src_install() {
use perl && dosym uwsgi /usr/bin/uwsgi_psgi
if use php ; then
+ local s
for s in $(php_get_slots); do
dosym uwsgi /usr/bin/uwsgi_${s/.}
done
@@ -362,16 +364,7 @@ pkg_postinst() {
elog " "
elog " '--plugins ${EPYV}' for ${EPYTHON}"
- if use python-asyncio ; then
- if [[ ${EPYV} == python34 ]] ; then
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
- else
- elog " (asyncio is only supported in python3.4)"
- fi
- fi
- if use python-gevent ; then
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}"
- fi
+ elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
}
use python && python_foreach_impl python_pkg_postinst
diff --git a/www-servers/uwsgi/uwsgi-2.0.31.ebuild b/www-servers/uwsgi/uwsgi-2.0.31.ebuild
index 9cf58727b1fe..2e3ce3c05254 100644
--- a/www-servers/uwsgi/uwsgi-2.0.31.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.31.ebuild
@@ -1,48 +1,59 @@
-# Copyright 2021-2025 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
+# Check the upstream uwsgi-2.0 branch, not master, for backports
+
LUA_COMPAT=( lua5-{1,3,4} luajit )
-PYTHON_COMPAT=( python3_{10..14} )
+PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="threads(+)"
RUBY_OPTIONAL="yes"
-USE_RUBY="ruby30 ruby31 ruby32 ruby33"
+USE_RUBY="ruby32 ruby33 ruby34"
PHP_EXT_INI="no"
PHP_EXT_NAME="dummy"
PHP_EXT_OPTIONAL_USE="php"
-USE_PHP="php8-0 php8-1 php8-2" # deps must be registered separately below
+USE_PHP="php8-2 php8-3 php8-4 php8-5" # deps must be registered separately below
+
+POSTGRES_COMPAT=( 13 14 15 16 17 )
MY_P="${P/_/-}"
-inherit flag-o-matic lua-single pax-utils php-ext-source-r3 python-r1 ruby-ng
+inherit lua-single multiprocessing pax-utils php-ext-source-r3
+inherit postgres python-r1 ruby-ng
DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="https://projects.unbit.it/uwsgi/"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 x86"
-UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool
+UWSGI_PLUGINS_STD=(
+ ping cache carbon nagios rpc rrdtool
http ugreen signal syslog rsyslog
router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics}
{core,fast,raw,ssl}router
redislog mongodblog log{file,socket}
spooler cheaper_busyness symcall
transformation_{chunked,gzip,offload,tofile}
- zergpool )
-UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
+ zergpool
+)
+UWSGI_PLUGINS_OPT=(
+ alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter
geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam
rados router_{access,radius,spnego,xmldir}
sqlite ssi stats_pusher_statsd
- systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix )
+ systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix
+)
LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process
-LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby )
+LANG_SUPPORT_EXTENDED=( go lua php python ruby )
# plugins to be ignored (for now):
# cheaper_backlog2: example plugin
@@ -54,46 +65,48 @@ LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio python-gevent ruby )
# *java*: TODO
# v8: TODO
# matheval: TODO
-IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq"
+IUSE="apache2 +caps debug +embedded expat json +pcre +routing selinux +ssl +xml yajl yaml zeromq"
for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done
for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done
IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}"
-REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
uwsgi_plugins_logcrypto? ( ssl )
uwsgi_plugins_sslrouter? ( ssl )
routing? ( pcre )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_REQ_USE} )
uwsgi_plugins_emperor_zeromq? ( zeromq )
uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter )
uwsgi_plugins_router_xmldir? ( xml !expat )
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
- python-asyncio? ( python )
- python-gevent? ( python )
- expat? ( xml )"
+ expat? ( xml )
+"
-# util-linux is required for libuuid when requesting zeromq support
+# Dependency notes:
+# - util-linux is required for libuuid when requesting zeromq support
+# - sys-devel/gcc[go] is needed for libgo.so
+#
# Order:
# 1. Unconditional
# 2. General features
# 3. Plugins
# 4. Language/app support
CDEPEND="
- sys-libs/zlib
+ virtual/zlib:=
virtual/libcrypt:=
caps? ( sys-libs/libcap )
json? (
!yajl? ( dev-libs/jansson:= )
yajl? ( dev-libs/yajl )
)
- pcre? ( dev-libs/libpcre:3 )
- ssl? (
- dev-libs/openssl:0=
-
- )
+ pcre? ( dev-libs/libpcre2 )
+ ssl? ( dev-libs/openssl:= )
xml? (
- !expat? ( dev-libs/libxml2 )
+ !expat? ( dev-libs/libxml2:= )
expat? ( dev-libs/expat )
)
yaml? ( dev-libs/libyaml )
@@ -104,7 +117,7 @@ CDEPEND="
uwsgi_plugins_alarm_curl? ( net-misc/curl )
uwsgi_plugins_alarm_xmpp? ( net-libs/gloox )
uwsgi_plugins_curl_cron? ( net-misc/curl )
- uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_DEP} )
uwsgi_plugins_geoip? ( dev-libs/geoip )
uwsgi_plugins_ldap? ( net-nds/openldap:= )
uwsgi_plugins_pam? ( sys-libs/pam )
@@ -113,21 +126,19 @@ CDEPEND="
uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers )
uwsgi_plugins_router_spnego? ( virtual/krb5 )
uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
- uwsgi_plugins_webdav? ( dev-libs/libxml2 )
+ uwsgi_plugins_webdav? ( dev-libs/libxml2:= )
uwsgi_plugins_xslt? ( dev-libs/libxslt )
go? ( sys-devel/gcc:=[go] )
lua? ( ${LUA_DEPS} )
mono? ( dev-lang/mono:= )
perl? ( dev-lang/perl:= )
php? (
- net-libs/libnsl
- php_targets_php8-0? ( dev-lang/php:8.0[embed] )
- php_targets_php8-1? ( dev-lang/php:8.1[embed] )
php_targets_php8-2? ( dev-lang/php:8.2[embed] )
+ php_targets_php8-3? ( dev-lang/php:8.3[embed] )
+ php_targets_php8-4? ( dev-lang/php:8.4[embed] )
+ php_targets_php8-5? ( dev-lang/php:8.5[embed] )
)
python? ( ${PYTHON_DEPS} )
- python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )
- python-gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] )
ruby? ( $(ruby_implementations_depend) )
"
DEPEND="${CDEPEND}"
@@ -136,19 +147,20 @@ RDEPEND="
selinux? ( sec-policy/selinux-uwsgi )
uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )
"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-src_unpack() {
- echo ${PYTHON_USEDEP}
- default
-}
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
pkg_setup() {
python_setup
use lua && lua-single_pkg_setup
use ruby && ruby-ng_pkg_setup
+ use uwsgi_plugins_emperor_pg && postgres_pkg_setup
+}
+
+src_unpack() {
+ default
}
src_prepare() {
@@ -172,6 +184,7 @@ src_configure() {
local json="false"
local xml="false"
+ local p
for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do
use uwsgi_plugins_${p} && embedded_plugins+=("${p}")
done
@@ -201,7 +214,6 @@ src_configure() {
if use json; then
use yajl && json="yajl" || json="jansson"
fi
- use jemalloc && malloc_impl="jemalloc"
# prepare the buildconf for gentoo
cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die
@@ -211,6 +223,7 @@ src_configure() {
-e "s|VAR_JSON|${json}|" \
-e "s|VAR_SSL|$(usex ssl true false)|" \
-e "s|VAR_PCRE|$(usex pcre true false)|" \
+ -e "s|VAR_PCRE2|$(usex pcre true false)|" \
-e "s|VAR_ZMQ|$(usex zeromq true false)|" \
-e "s|VAR_ROUTING|$(usex routing true false)|" \
-e "s|VAR_DEBUG|$(usex debug true false)|" \
@@ -230,10 +243,8 @@ src_configure() {
fi
if use uwsgi_plugins_emperor_pg ; then
- PGPV="$(best_version dev-db/postgresql)"
- PGSLOT="$(ver_cut 1-2 ${PGPV##dev-db/postgresql-})"
sed -i \
- -e "s|pg_config|pg_config${PGSLOT/.}|" \
+ -e "s|pg_config|${PG_CONFIG}|" \
plugins/emperor_pg/uwsgiplugin.py || die "sed failed"
fi
}
@@ -241,9 +252,9 @@ src_configure() {
each_ruby_compile() {
cd "${WORKDIR}/${MY_P}" || die "sed failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
- UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" ${EPYTHON} uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
}
python_compile_plugins() {
@@ -252,21 +263,8 @@ python_compile_plugins() {
EPYV=${EPYTHON/.}
PYV=${EPYV/python}
- ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
-
- if use python-asyncio ; then
- if [[ "${PYV}" != "27" ]] ; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
- fi
- fi
-
- if use python-gevent ; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed"
- fi
-
- if use python-gevent || use python-asyncio; then
- ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed"
- fi
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
}
python_install_symlinks() {
@@ -276,21 +274,24 @@ python_install_symlinks() {
src_compile() {
mkdir -p "${T}/plugins" || die
- CPUCOUNT=1 python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+ export CPUCOUNT="$(makeopts_jobs)"
+
+ ${EPYTHON} uwsgiconfig.py --build gentoo || die "building uwsgi failed"
if use go ; then
- python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
fi
if use lua ; then
# setting the name for the pkg-config file to lua, since that is the name
# provided by the wrapper from Lua eclasses
- UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
+ UWSGICONFIG_LUAPC="lua" ${EPYTHON} uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
fi
if use php ; then
+ local s
for s in $(php_get_slots); do
- UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
+ UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" ${EPYTHON} uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
done
fi
@@ -317,6 +318,7 @@ src_install() {
use perl && dosym uwsgi /usr/bin/uwsgi_psgi
if use php ; then
+ local s
for s in $(php_get_slots); do
dosym uwsgi /usr/bin/uwsgi_${s/.}
done
@@ -349,6 +351,7 @@ pkg_postinst() {
use perl && elog " '--plugins psgi' for perl"
if use php ; then
+ local s
for s in $(php_get_slots); do
elog " '--plugins ${s/.}' for ${s}"
done
@@ -362,21 +365,13 @@ pkg_postinst() {
elog " "
elog " '--plugins ${EPYV}' for ${EPYTHON}"
- if use python-asyncio ; then
- if [[ ${EPYV} == python34 ]] ; then
- elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
- else
- elog " (asyncio is only supported in python3.4)"
- fi
- fi
- if use python-gevent ; then
- elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}"
- fi
+ elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
}
use python && python_foreach_impl python_pkg_postinst
if use ruby ; then
+ local ruby
for ruby in $(ruby_get_use_implementations) ; do
elog " '--plugins rack_${ruby/.}' for ${ruby}"
elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers"