From d99093fb4bb5652015c06274d64083daa2439e4f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 3 Mar 2021 10:28:17 +0000 Subject: gentoo resync : 03.03.2021 --- www-servers/Manifest.gz | Bin 5041 -> 5040 bytes www-servers/lighttpd/Manifest | 2 +- www-servers/lighttpd/files/conf/mime-types.conf | 127 ++- www-servers/mongrel2/Manifest | 5 +- .../files/mongrel2-1.11.0-fno-common.patch | 31 + .../mongrel2-1.11.0-polarssl-platform-590512.patch | 8 +- www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild | 29 +- www-servers/nginx/Manifest | 3 + www-servers/nginx/nginx-1.19.7.ebuild | 1090 ++++++++++++++++++++ www-servers/tomcat/Manifest | 1 - .../tomcat/files/tomcat-9.0.37-build.xml.patch | 284 ----- 11 files changed, 1261 insertions(+), 319 deletions(-) create mode 100644 www-servers/mongrel2/files/mongrel2-1.11.0-fno-common.patch create mode 100644 www-servers/nginx/nginx-1.19.7.ebuild delete mode 100644 www-servers/tomcat/files/tomcat-9.0.37-build.xml.patch (limited to 'www-servers') diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz index 5aee92af010c..b409f42d7f74 100644 Binary files a/www-servers/Manifest.gz and b/www-servers/Manifest.gz differ diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest index 466cb0d92709..23dd31191181 100644 --- a/www-servers/lighttpd/Manifest +++ b/www-servers/lighttpd/Manifest @@ -1,5 +1,5 @@ AUX conf/lighttpd.conf 8257 BLAKE2B 82090a8c467e3738d1e7bb3a55310040145ab6a0ee7dc0ab45abd9ad657cfacec895727eb34799f3552d0c1c11a6dfbf6fe7cc1fd6e17b610284b7194e02aed0 SHA512 0bfa3d44c28f6893362b4c428d7bdce2a560ba155e349af9ee293510341fee03d484f95e9d967afb87f0a61aa11dd33ef9c633e206146c0af791f2690aed9852 -AUX conf/mime-types.conf 3359 BLAKE2B a95f2ed689e25b45ef058989851763f60e250a6ee888a3409fdf6d96fe348ad7e9f0b92982a636d2fe23de3db27e56a86eaca49f2012ed05e3b00d12990b0e5d SHA512 67b3814958b7688ed9568edf684dfcb843698a438ac78fb00aeb23511d18e360b03aa29397523e642cb59ef572dfcc0d15f8b1b4b0c5751378155a125a737a57 +AUX conf/mime-types.conf 8035 BLAKE2B 4f47860376d6bed610ecacf2c79c3ccbd6ed7a05bce6fe57c93e4dfacc5f85fd4957730470765644c4ee233f9e4c853b5092362cbdcd4ad06d6e641ff53439b3 SHA512 230d86331c39e8819c14583309669e49c0a0dcf52144f9ddc24bcdd8a742364f6efee720c964ffaddb1f88bc64b04a32c5ac13b0d512806f98282e20e2682b6e AUX conf/mod_cgi.conf 749 BLAKE2B dd565d6052d74aea3489f3a011a5913fcbd331b57ca02e71496eecff7c303cd56e8e43cd5a9b33c27463304a2f2218fc7451cb5754200c9ef48eb4104b820547 SHA512 e611b3ed232af4fb8e9b8821a29fbc32acb0a3431c701e5a64afc192abc288cf90582fbbf79085de9426be23d8d42d90da66e6993ab7cf89943ae23d59d681a1 AUX conf/mod_fastcgi.conf 549 BLAKE2B 7bd525db1ace97a826bc4fcc11fc230f16839005da8988b21f54e5d43763a7df82b0d3b2cd5f410074cd87b2c8dbaab91042563bb7878ca0bedc076eafdc5906 SHA512 a9245394cbde327f997932546e2c6ee755da9365ce3a3d4662d2042971a9ec0a5fc36f9cdd7c032d35a6c0c3d02471b4b9b394b2cd349291c4a9827ca06cea4f AUX lighttpd.confd 240 BLAKE2B 8383c102f9e3a373909f26cda9f73d1edf81ef9dae42a48593f6d6f61c1b1060cc324bb773d402307d54c6cca520ddada8016dc5b3f0922ddf75d24934bfc7c4 SHA512 dd722c15230df734d7151bcb9cfc66d6d54aac5dcdca5f50eb33979d3a2443ba3a9ef3d7cb35e6dbd3d39fce09da15ab0029b1399bf1b1e4f4ef20d40f70a416 diff --git a/www-servers/lighttpd/files/conf/mime-types.conf b/www-servers/lighttpd/files/conf/mime-types.conf index 8703d4ced216..3d7880811717 100644 --- a/www-servers/lighttpd/files/conf/mime-types.conf +++ b/www-servers/lighttpd/files/conf/mime-types.conf @@ -5,38 +5,117 @@ # {{{ mime types mimetype.assign = ( - ".svg" => "image/svg+xml", - ".svgz" => "image/svg+xml", ".pdf" => "application/pdf", - ".sig" => "application/pgp-signature", + ".epub" => "application/epub+zip", ".spl" => "application/futuresplash", - ".class" => "application/octet-stream", + ".jar" => "application/java-archive", + ".class" => "application/java-vm", + ".jsonld" => "application/ld+json", + ".json" => "application/json", + ".mdb" => "application/msaccess", + ".doc" => "application/msword", + ".ogg" => "application/ogg", + ".pgp" => "application/pgp-encrypted", + ".sig" => "application/pgp-signature", ".ps" => "application/postscript", + ".eps" => "application/postscript", + ".rar" => "applicaion/rar", + ".rdf" => "application/rdf+xml", + ".rss" => "application/rss+xml", + ".rtf" => "application/rtf", + ".azw" => "application/vnd.amazon.ebook", + ".cbz" => "application/vnd.comicbook+zip", + ".cbr" => "application/vnd.comicbook-rar", + ".exe" => "application/vnd.microsoft.portable-executable", + ".xls" => "application/vnd.ms-excel", + ".ppt" => "application/vnd.ms-powerpoint", + ".docm" => "application/vnd.ms-word.document.macroEnabled.12", + ".odt" => "application/vnd.oasis.opendocument.text", + ".ods" => "application/vnd.oasis.opendocument.spreadsheet", + ".odp" => "application/vnd.oasis.opendocument.presentation", + ".odg" => "application/vnd.oasis.opendocument.graphics", + ".odc" => "application/vnd.oasis.opendocument.chart", + ".odf" => "application/vnd.oasis.opendocument.formula", + ".odi" => "application/vnd.oasis.opendocument.image", + ".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", + ".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ".vsd" => "application/vnd.visio", ".wasm" => "application/wasm", + ".xhtml" => "application/xhtml+xml", + ".zip" => "application/zip", + ".zstd" => "application/zstd", + ".7z" => "application/x-7z-compressed", + ".dmg" => "application/x-apple-diskimage", ".torrent" => "application/x-bittorrent", + ".bz2" => "application/x-bzip", + ".tbz" => "application/x-bzip-compressed-tar", + ".tar.bz2" => "application/x-bzip-compressed-tar", + ".pgn" => "application/x-chess-pgn", + ".deb" => "application/x-debian-package", ".dvi" => "application/x-dvi", + ".mm" => "application/x-freemind", ".gz" => "application/x-gzip", + ".iso" => "application/x-iso9660-image", + ".jnlp" => "application/x-java-jnlp-file", ".pac" => "application/x-ns-proxy-autoconfig", + ".rpm" => "application/x-redhat-package-manager", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", - ".zip" => "application/zip", - ".dmg" => "application/x-apple-diskimage", + ".xz" => "application/x-xz", + ".aac" => "audio/aac", + ".adts" => "audio/aac", + ".ac3" => "audio/ac3", + ".snd" => "audio/basic", + ".mid" => "audio/midi", + ".midi" => "audio/midi", + ".m4a" => "audio/mp4", + ".mp1" => "audio/mpeg", + ".mp2" => "audio/mpeg", ".mp3" => "audio/mpeg", + ".oga" => "audio/ogg", + ".opus" => "audio/ogg", + ".spx" => "audio/ogg", + ".sid" => "audio/prs.sid", + ".mlp" => "audio/vnd.dolby.mlp", + ".dts" => "audio/vnd.dts", + ".dtshd" => "audio/vnd.dts.hd", + ".flac" => "audio/x-flac", + ".mka" => "audio/x-matroska", ".m3u" => "audio/x-mpegurl", + ".mod" => "audio/x-mod", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", - ".ogg" => "application/ogg", ".wav" => "audio/x-wav", + ".otf" => "font/otf", + ".ttf" => "font/ttf", + ".woff" => "font/woff", + ".woff2" => "font/woff2", + ".bmp" => "image/bmp", ".gif" => "image/gif", + ".heic" => "image/heic", + ".heics" => "image/heic-sequence", + ".heif" => "image/heif", + ".heifs" => "image/heif-sequence", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", + ".tif" => "image/tiff", + ".tiff" => "image/tiff", + ".svg" => "image/svg+xml", + ".svgz" => "image/svg+xml", + ".webp" => "image/webp", + ".psd" => "image/vnd.adobe.photoshop", + ".apng" => "image/vnd.mozilla.apng", + ".ico" => "image/x-icon", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", + ".ics" => "text/calendar", ".css" => "text/css", + ".csv" => "text/csv", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", @@ -55,25 +134,37 @@ mimetype.assign = ( ".patch" => "text/plain", ".ebuild" => "text/plain", ".eclass" => "text/plain", - ".rtf" => "application/rtf", - ".bmp" => "image/bmp", - ".tif" => "image/tiff", - ".tiff" => "image/tiff", - ".ico" => "image/x-icon", + ".vcard" => "text/vcard", + ".vcf" => "text/vcard", ".dtd" => "text/xml", ".xml" => "text/xml", + ".vcs" => "text/x-vcalendar", + ".x3db" => "model/x3d+binary", + ".x3dbz" => "model/x3d+binary", + ".x3dv" => "model/x3d+vrml", + ".x3dvz" => "model/x3d+vrml", + ".x3d" => "model/x3d+xml", + ".x3dz" => "model/x3d+xml", + ".ts" => "video/mp2t", + ".m4v" => "video/mp4", + ".mp4" => "video/mp4", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", + ".ogv" => "video/ogg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", + ".webm" => "video/webm", + ".m4u" => "video/vnd.mpegurl", + ".bik" => "video/vnd.radgamettools.bink", + ".bk2" => "video/vnd.radgamettools.bink", + ".smk" => "video/vnd.radgamettools.smacker", + ".flv" => "video/x-flv", + ".mkv" => "video/x-matroska", + ".mk3d" => "video/x-matroska-3d", + ".mng" => "video/x-mng", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", - ".wmv" => "video/x-ms-wmv", - ".bz2" => "application/x-bzip", - ".tbz" => "application/x-bzip-compressed-tar", - ".tar.bz2" => "application/x-bzip-compressed-tar" + ".wmv" => "video/x-ms-wmv" ) # }}} - -# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/mongrel2/Manifest b/www-servers/mongrel2/Manifest index 0a3587fd8b4d..ef0f020a1b6a 100644 --- a/www-servers/mongrel2/Manifest +++ b/www-servers/mongrel2/Manifest @@ -1,5 +1,6 @@ -AUX mongrel2-1.11.0-polarssl-platform-590512.patch 617 BLAKE2B 96493ff66f36c9b8036ef0a131a239a913b7f9fc96647d7b426377d88c6f51951b7fe4c1f0d7996e71f36c9462d61b2196f8fd6755c609be4ae00a1c45574d8c SHA512 176ffc3ebb360fb56ca3774cad71ad0e0fa7f519cb899f5aeed1d9f5beaaf6578f67713a206daebd3b9b56533628cf1620a66ebc607db35f40ba7ad8d11946f4 +AUX mongrel2-1.11.0-fno-common.patch 585 BLAKE2B de37abde0ab62ee986008a7f8d8f50ca32572f73ee589b9d45437ff6d4746cb15abc4726641eac75b688bc8814b7f99d2be206861e8d9e220fbc144af0926674 SHA512 99812f7c1c996a1497f5b58c50181d988755c36d0be7e1b6eac31d34fb0189a1910d0da61ed62105772abda097c581f457012716963c673f79803d3eeed655b3 +AUX mongrel2-1.11.0-polarssl-platform-590512.patch 459 BLAKE2B 63917c58c7c29639d321c5f346273f09289f0a1359d82a238ece01506b85ba242396e2786bef2e8af7ee1c52bf40edd5a6456dcebcb5d9e4f144422c8700135d SHA512 7e7c609d4c2b2820ef1097b96da56c4e250df685af90af19f0a3c863f0b55b7b0f8834199f1d6e94bd04d970189807202429ae5e20f63f86b84419d0e3d7edab AUX systemtls.mak 4506 BLAKE2B 60a448a3f1ed77646003cacb8d5adcf34899532c00fd461a67337f2ded6cc7a6204f72a1b25b3787f692487e502eb313ee0bc7dafb04c902c81d82edfc8fe96b SHA512 9b1fc5bf23d60267d64c08e0f0956deee0c421b03556138f994822abdcb324702bde744559e6629488cb05669b3228078180cb4f30af8fa09c10bc110ce7e3e1 DIST mongrel2-1.11.0.tar.gz 1060770 BLAKE2B cbf27e148385e0f659015bf0fae3e027996ba2a4b3189658503faf7b3083c9356ea61cd7bb0d5516fecedd30f1cde8fc3ed74f5f1221a50442df1e209770b87c SHA512 60ee5036c2ac826a08bb1300969f5ad7ec2bc67c7f47635a3b458a0bad6d7e2fa37183c2708d512632c86101f537a4eb64eeef0775137705898480da70d61e90 -EBUILD mongrel2-1.11.0-r1.ebuild 692 BLAKE2B e1580b2a5cd45234beffa9ab341f6c6b3030fc671186437a952c583eb8924c515aca0f3fd148edcbfa7528021a04aef92bb3e042eb5901d4d82682be35253572 SHA512 421dd70d910b3bcd9a53ec0031a40a2d14c74e3064410d5255eebd556edc8cf6c3134246d4166b6f2a8bc308f2de17428b0738f5bb24245aea73bdb1afb105a4 +EBUILD mongrel2-1.11.0-r1.ebuild 803 BLAKE2B cd5144b8dccfb451fcb1d1778525055cea3a976bf39c9ed77a14d90117d2e9416d5d897e8b36fac07ae6dbcf4cfdc6c895e67bed0f29d54addc9a66183ba2e90 SHA512 59555351b9be616ca5ec4b3a469f3223df91392ec3f158e63b491ad25284e07e683f2e78aee180e106c7637c775380b21137afabb10dd306ba06c3e7a31cfe85 MISC metadata.xml 257 BLAKE2B adec48923f12ab0f7e9fc4595c967d05bb7c5ea8c5540c43b14786be2d16be4beb8f456cf39be77a1bae0ec23e28a9d4243b755c313f4b7ebc5a8e3e0bf25b5b SHA512 a62ddbc194ab32158cdffeb2994a1f86c3e60f64efc1bf17eee73e2897e53d7faf2dfeed90a9a9b2d89208ccd4c9848fbfb3658582ca3ec30764555ba259c3b7 diff --git a/www-servers/mongrel2/files/mongrel2-1.11.0-fno-common.patch b/www-servers/mongrel2/files/mongrel2-1.11.0-fno-common.patch new file mode 100644 index 000000000000..1c95f6b7c2d5 --- /dev/null +++ b/www-servers/mongrel2/files/mongrel2-1.11.0-fno-common.patch @@ -0,0 +1,31 @@ +--- a/src/mongrel2.c ++++ b/src/mongrel2.c +@@ -55,6 +55,7 @@ + #include "logrotate.h" + #include "register.h" + ++extern char *m2program; + extern int RUNNING; + extern uint32_t THE_CURRENT_TIME_IS; + int RELOAD = 0; +--- a/src/unixy.h ++++ b/src/unixy.h +@@ -38,7 +38,7 @@ + #include + #include + +-char *m2program; ++extern char *m2program; + + int Unixy_chroot(bstring path); + +--- a/tools/procer/procer.c ++++ b/tools/procer/procer.c +@@ -9,6 +9,7 @@ + #include + #include + ++extern char *m2program; + extern char **environ; + + static int RUNNING = 1; diff --git a/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch b/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch index 0e5957e551b8..c67dc060c8a4 100644 --- a/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch +++ b/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch @@ -1,6 +1,6 @@ # Fix missing include for newer mbedtls ---- a/src/io.h 2016-08-04 15:55:53.124890328 -0700 -+++ b/src/io.h 2015-12-31 01:25:07.000000000 -0800 +--- a/src/io.h ++++ b/src/io.h @@ -6,6 +6,7 @@ #endif @@ -9,8 +9,8 @@ #include #include #include "server.h" ---- a/src/server.h 2016-08-04 15:54:49.539498093 -0700 -+++ b/src/server.h 2015-12-31 01:25:07.000000000 -0800 +--- a/src/server.h ++++ b/src/server.h @@ -39,6 +39,7 @@ #include "adt/darray.h" #include "host.h" diff --git a/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild b/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild index f651aa267276..5ba0b5486632 100644 --- a/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild +++ b/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild @@ -1,7 +1,9 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + +inherit toolchain-funcs DESCRIPTION="A language agnostic web server focused on web applications" HOMEPAGE="http://mongrel2.org" @@ -10,20 +12,29 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" -DEPEND="net-libs/zeromq +DEPEND=" + dev-db/sqlite:3 >=net-libs/mbedtls-2.1[havege] - dev-db/sqlite:3" + net-libs/zeromq" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-polarssl-platform-590512.patch + "${FILESDIR}"/${P}-fno-common.patch +) + src_prepare() { - cp "${FILESDIR}/systemtls.mak" Makefile || die - eapply "${FILESDIR}/${P}-polarssl-platform-590512.patch" - eapply_user + cp "${FILESDIR}"/systemtls.mak Makefile || die + default +} + +src_configure() { + tc-export CC + default } src_install() { - emake install PREFIX=/usr DESTDIR="${D}" + emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" install dodoc README examples/configs/mongrel2.conf } diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index dc1418f78ccd..17cae117af93 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -16,6 +16,7 @@ DIST nginx-1.19.3.tar.gz 1052581 BLAKE2B 96cbbb4224ca8fcddc67b8fd025acdb31b1a07b DIST nginx-1.19.4.tar.gz 1054974 BLAKE2B 7f6cff700fe4816d724abef427775525956f1be666705e6c5e0034fcf5e43bb0832f036d5230c5b0e8cd4fdbbf80466a9539ed42a84fc7bc9b4a43cb3a5aa60c SHA512 081fdf691d4c4d59391a668f36b4d8b030087c70d4d5e0bc568d41bd7f473b9c1ebbc09ec52d4e7cc68aa9545737e3dac6e653b00dfb1366a063f6463cc30f3f DIST nginx-1.19.5.tar.gz 1055590 BLAKE2B dc838848829553205886f1d538009ecccfd4b0d45bae3268e40eaad6ff1cfd4c4b8f4f93bfcd241e1e17d81c3276298dc047e08f1edabe0a8c941752689c1bb9 SHA512 169bdbbea82127b83c51e818df3dc9056070f0cc56d10257aa7fa7bd6aedc7b70fdfe236ac06bd6442ff4990b36132b054d2654de51a9fe86a19e7cb63edf05c DIST nginx-1.19.6.tar.gz 1055982 BLAKE2B 6d818122b3bdf46b6c9ecb83a00d470b3db0f26f05140340c033d1d0851d679d077ce1853f8d0a1c0140bfdac2764e5702913e87149dccefda2c6f7bf8ac8845 SHA512 1249c56b124a8de71f5d722e53d599f3b0cb14dc0f95b1eb905a6a8019b2d33f8e76874de2a88d49c4c82ee4fa7aabd42e5044a0a110892c23b50f71cb632148 +DIST nginx-1.19.7.tar.gz 1056631 BLAKE2B f7a62a2b7c1a8c91a01e54954323cddc7a948ab5b65f51594549b8b67e50ea954c4cd5b740f538472c6de7c4041b39b22a48beac37083900e6f0a015408316bc SHA512 660f03533581f350bbfe9a519fd0ee59c543c78be98aa5287df20a89653545b29fc98282548eab1741fb1d5c26da140166b6712ee06e498ba518019588f9b747 DIST nginx-auth-ldap-42d195d7a7575ebab1c369ad3fc5d78dc2c2669c.tar.gz 18457 BLAKE2B 22225ca9e5299b20ab5a93a001cac48e446bd86b3a24ac49e716bc975b128890bdb4b0dbbf5730fbaaeadfd958160093c7a6af798dd0e6de27062f149a760333 SHA512 ec59637fda5acac053e815cb1d04b545fc6b765e5ec63d8c2c9c301abad87afaa2698145acac08e9e14c91e1423ebff7aff0cca2b940b19ccccbf4cf53973269 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 @@ -42,6 +43,7 @@ DIST ngx_rtmp-1.2.1.tar.gz 519919 BLAKE2B 744ccb8031eb9653f158f9eceba64fc9c8af7b DIST njs-0.4.3.tar.gz 460997 BLAKE2B 373a4aca51ada84d628ae6b6254c9268b4cec4ac8870f81ba43ff693f20148a9ca862038e57a68c22cbff29ea613785e83778cc708cf1b47103e9f950a198289 SHA512 b3b4294817997a06661f00f53d38e0cde08e022f41b3663f9d17a91b343fb944e21184114f09d89995096faee491187c3ae424407f2855ed0670c0cccf928cd7 DIST njs-0.4.4.tar.gz 486870 BLAKE2B 9390bfe35249ea34b9edd4b7c2360a25c9ecb232e10f35a2324fd8586f5f74e2083d5bd7481c084065d0651ba4fed56958bc2cd1f002d12622238ebc81b9f7c5 SHA512 1bf88d23f99532bb32e96de79e49cc27b60d6231207eb06ea2f6a6884d725f7bbe7b426664aa4c872f7c40549f81489c04c2ae4a7ddd2d03c8cf1d66b9c62c78 DIST njs-0.5.0.tar.gz 505568 BLAKE2B 5dc2a91bffa4eb2364d96e26def0959b111cc8bf88841f581e3c0d43fcb88ba1ea24b24339cb1f51b8290c08dd930dc18a274a7ab6a21ee4ba8b0e6c4f5a1ba0 SHA512 182a64ba519b1a1d29ac71ffe2c9ef8e5a6f9aaf3db9f327ac926114db73b339a424801b558068fc7ae06ae88a4dea0a601c749db4b6f2b579e427181e41d11b +DIST njs-0.5.1.tar.gz 516345 BLAKE2B b861ff1e62eddeb8aabf6908253dba1393a32a04636a082dee979a52d320a7ecb12f961213652886a210ee9569460a3214d823cb5f7c3b025378b7cf6d64659f SHA512 bbc06e57a152a5dc5c71305a4bec80d6d3d6f886a82d6c39d82aa8f52add56029b7f38199f11789648539bcbba2a488dc6e64874fef0222479775708559f4da9 EBUILD nginx-1.18.0-r2.ebuild 40458 BLAKE2B bab6ebfd5a4ef14026cf3149757dcf207dad0245b48a31bcb93a61709bb6a9a656ebb0d8ebcc0f502daab9b7b9a0a7a4dc5d00cb2ececc4606f508d87e8e23f2 SHA512 54651ac56efa4ed927189dbbc2165af8d916097c0e623fcd7427096be4605d093772913511372dd5040ff2c7c9d305d0686ccf713205eff3c3cf41e3fa12a241 EBUILD nginx-1.19.2-r1.ebuild 40460 BLAKE2B 620254271c03d328f5377c23307af52838a8f2eaa8e60a91eed785fdf2c02c8cf3ae349e2b7b04a29024ee14247c001253e234c1551ac2fcb665ab98ca1674a8 SHA512 0a9c9d53cf47520c5f2f04a72b6f64d5399571ce371b31a09d1d81f160ffa88e461b6e335d0ea05428d62612e014f682bfeefeb25d6b05eaf1690c31f822e134 EBUILD nginx-1.19.3.ebuild 40431 BLAKE2B f78ec32446bf5017b58fda56370b72d1b2fc7176f2b4fcec70e4b22a00b124b96eb4d2d28182ecbf13ccd1c6ce43ee7324b36608ae13fdc1fd6d3ca947e0b52b SHA512 6445a587721d55fd09505970db538cbd2cdb9d72820526869a2d910a049b479f01ea968434eb7f2f1c4889f03fcf6921025530a686693a380f381017e40b34fb @@ -50,4 +52,5 @@ EBUILD nginx-1.19.5-r1.ebuild 40431 BLAKE2B cf9bfea11e1845eb2c810c474dde72f27516 EBUILD nginx-1.19.5.ebuild 40431 BLAKE2B f78ec32446bf5017b58fda56370b72d1b2fc7176f2b4fcec70e4b22a00b124b96eb4d2d28182ecbf13ccd1c6ce43ee7324b36608ae13fdc1fd6d3ca947e0b52b SHA512 6445a587721d55fd09505970db538cbd2cdb9d72820526869a2d910a049b479f01ea968434eb7f2f1c4889f03fcf6921025530a686693a380f381017e40b34fb EBUILD nginx-1.19.6-r100.ebuild 40436 BLAKE2B 643795722ca90b1d70f6a0a4917c9166f06802ae13a8a93b10e1a4e3b7eb4410091aba0980365b4d82a8117e625b5fe9c4468e7806769c7717284abaf67ea68c SHA512 9317b221e52c5097062f413c01be6dc3661a55215acba1933601cb0df002abf642413074752a052bf2740110bd754a8f62aae90468e4b7bc0e7ec4409026ffab EBUILD nginx-1.19.6.ebuild 40431 BLAKE2B cf9bfea11e1845eb2c810c474dde72f275166bb55c48cb9658f71a512ede464b953dcc3f3fd9b0e0763190d856a4aa0585414f0bcf91cc5e29dde9e259dab9c7 SHA512 d92bacc4b3d5e97e7b85485507f8483f9f5166b43c4ed95c3e04a50b77aeaf10ce2a4609cf1d25357a88bb4516e5f05b020f37d666a81e1976a689e34ab8e794 +EBUILD nginx-1.19.7.ebuild 40436 BLAKE2B 9c8e3bcf2329c8a8ec88cbd1e3c2a801212195f4b004f23530da65c5893f94e7ec7cdc6e8713ffd4a84061d6b1a98e503c27b521595c2df629c72b4a35ea1acb SHA512 a2b8915f3e8359d21853152494ac033b9ec96c0d675a751f2f9906a71bcd550fea6f725633311b1cfe2262b2dce9bd523f0e59aa6f7f2daff4d14d1be0893c89 MISC metadata.xml 1193 BLAKE2B aeb293cf75ed650c946910222d6396f726dc5ed49f1213e6a5664613d78e3b27616399bc1c9f0a360f5303b16931da7016cdf540b24601afafc3ada4428b33a9 SHA512 a96002bc9845bc465542c753c738899b77ad7a32fac7f5f9a7049336868bc41199e926422e3dc23e47f34656c9aaea255511d2ef91e9d59f48c9cd0b4a3c4903 diff --git a/www-servers/nginx/nginx-1.19.7.ebuild b/www-servers/nginx/nginx-1.19.7.ebuild new file mode 100644 index 000000000000..9b3d0583c9e4 --- /dev/null +++ b/www-servers/nginx/nginx-1.19.7.ebuild @@ -0,0 +1,1090 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Maintainer notes: +# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite +# - any http-module activates the main http-functionality and overrides USE=-http +# - keep the following requirements in mind before adding external modules: +# * alive upstream +# * sane packaging +# * builds cleanly +# * does not need a patch for nginx core +# - TODO: test the google-perftools module (included in vanilla tarball) + +# prevent perl-module from adding automagic perl DEPENDs +GENTOO_DEPEND_ON_PERL="no" + +# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) +DEVEL_KIT_MODULE_PV="0.3.1" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" +DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz" +DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" + +# ngx_brotli (https://github.com/google/ngx_brotli, BSD-2) +HTTP_BROTLI_MODULE_PV="1.0.0rc" +HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" +HTTP_BROTLI_MODULE_URI="https://github.com/google/ngx_brotli/archive/v${HTTP_BROTLI_MODULE_PV}.tar.gz" +HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_MODULE_PV}" + +# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2" +HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1" +HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${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/agentzh/headers-more-nginx-module, BSD license) +HTTP_HEADERS_MORE_MODULE_PV="0.33" +HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" +HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/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.15" +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=( luajit ) + +# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) +HTTP_AUTH_PAM_MODULE_PV="1.5.2" +HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" +HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" +HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" + +# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) +HTTP_UPSTREAM_CHECK_MODULE_PV="9aecf15ec379fe98f62355c57b60c0bc83296f04" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) +HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" +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/${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/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.56" +HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" +HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" +HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" + +# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) +RTMP_MODULE_PV="1.2.1" +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.62" +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}" + +# mod_security for nginx (https://modsecurity.org/, Apache-2.0) +# keep the MODULE_P here consistent with upstream to avoid tarball duplication +HTTP_SECURITY_MODULE_PV="2.9.3" +HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" +HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" +HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" + +# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) +HTTP_PUSH_STREAM_MODULE_PV="0.5.4" +HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" +HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" +HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" + +# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) +HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" +HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" +HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" +HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" + +# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) +HTTP_MOGILEFS_MODULE_PV="1.0.4" +HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" +HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" +HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" + +# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) +HTTP_MEMC_MODULE_PV="0.19" +HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}" +HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz" +HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}" + +# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2) +HTTP_LDAP_MODULE_PV="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" +HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" +HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz" +HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" + +# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) +GEOIP2_MODULE_PV="3.3" +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.5.1" +NJS_MODULE_P="njs-${NJS_MODULE_PV}" +NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" +NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}" + +# We handle deps below ourselves +SSL_DEPS_SKIP=1 +AUTOTOOLS_AUTO_DEPEND="no" + +inherit autotools lua-single ssl-cert toolchain-funcs perl-module flag-o-matic user systemd multilib 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 ) + nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) + nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) + nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) + nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) + nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) + nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) + nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) + nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) + nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) + rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )" + +LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ + nginx_modules_http_security? ( Apache-2.0 ) + nginx_modules_http_push_stream? ( GPL-3 )" + +SLOT="mainline" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" + +# Package doesn't provide a real test suite +RESTRICT="test" + +NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif + fastcgi geo grpc gzip limit_req limit_conn map memcached mirror + proxy referer rewrite scgi ssi split_clients upstream_hash + upstream_ip_hash upstream_keepalive upstream_least_conn + upstream_zone userid uwsgi" +NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip + gzip_static image_filter mp4 perl random_index realip secure_link + slice stub_status sub xslt" +NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients + upstream_hash upstream_least_conn upstream_zone" +NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread" +NGINX_MODULES_MAIL="imap pop3 smtp" +NGINX_MODULES_3RD=" + http_auth_ldap + http_auth_pam + http_brotli + http_cache_purge + http_dav_ext + http_echo + http_fancyindex + http_geoip2 + http_headers_more + http_javascript + http_lua + http_memc + http_metrics + http_mogilefs + http_naxsi + http_push_stream + http_security + http_slowfs_cache + http_sticky + http_upload_progress + http_upstream_check + http_vhost_traffic_status + stream_geoip2 + stream_javascript +" + +IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl +pcre + pcre-jit rtmp selinux ssl threads userland_GNU 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=" + pcre? ( dev-libs/libpcre:= ) + pcre-jit? ( dev-libs/libpcre:=[jit] ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http2? ( + !libressl? ( >=dev-libs/openssl-1.0.1c:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http-cache? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + 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? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + 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/apr:= + dev-libs/apr-util:= + dev-libs/libxml2:= + net-misc/curl + www-servers/apache + ) + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] ) + nginx_modules_stream_geoip? ( dev-libs/geoip ) + nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" +RDEPEND="${CDEPEND} + 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 ) + nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )" +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" + +REQUIRED_USE="pcre-jit? ( pcre ) + nginx_modules_http_fancyindex? ( nginx_modules_http_addition ) + nginx_modules_http_grpc? ( http2 ) + nginx_modules_http_lua? ( + ${LUA_REQUIRED_USE} + nginx_modules_http_rewrite + ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) + nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) + nginx_modules_http_security? ( pcre ) + nginx_modules_http_push_stream? ( ssl )" + +pkg_setup() { + NGINX_HOME="/var/lib/nginx" + NGINX_HOME_TMP="${NGINX_HOME}/tmp" + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} + eend $? + + 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_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_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + eautoreconf + + if use nginx_modules_http_lua; then + sed -i \ + -e "s|^\(LUA_PKGNAMES\)=.*|\1=\"${ELUA}\"|" \ + configure || die + fi + + cd "${S}" || die + fi + + if use nginx_modules_http_upload_progress; then + cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die + eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.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() { + # mod_security needs to generate nginx/modsecurity/config before including it + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + ./configure \ + --enable-standalone-module \ + --disable-mlogc \ + --with-ssdeep=no \ + $(use_enable pcre-jit) \ + $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" + + cd "${S}" || die + fi + + local myconf=() http_enabled= mail_enabled= stream_enabled= + + use aio && myconf+=( --with-file-aio ) + use debug && myconf+=( --with-debug ) + use http2 && myconf+=( --with-http_v2_module ) + use libatomic && myconf+=( --with-libatomic ) + use pcre && myconf+=( --with-pcre ) + 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}/nginx/modsecurity ) + fi + + if use nginx_modules_http_push_stream ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) + fi + + if use nginx_modules_http_sticky ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) + fi + + if use nginx_modules_http_mogilefs ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) + fi + + if use nginx_modules_http_memc ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_ldap; then + http_enabled=1 + myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) + fi + + if use nginx_modules_http_vhost_traffic_status; then + http_enabled=1 + myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) + fi + + if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then + myconf+=( --add-module=${GEOIP2_MODULE_WD} ) + fi + + if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then + myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) + fi + + if use nginx_modules_http_brotli; then + http_enabled=1 + myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) + fi + + if use http || use http-cache || use http2 || use nginx_modules_http_javascript; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=( --without-http-cache ) + use ssl && myconf+=( --with-http_ssl_module ) + else + myconf+=( --without-http --without-http-cache ) + fi + + # Stream modules + for mod in $NGINX_MODULES_STREAM_STD; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + else + myconf+=( --without-stream_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_STREAM_OPT; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + myconf+=( --with-stream_${mod}_module ) + fi + done + + if use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then + stream_enabled=1 + fi + + if [ $stream_enabled ]; then + myconf+=( --with-stream ) + use ssl && myconf+=( --with-stream_ssl_module ) + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=( --without-mail_${mod}_module ) + fi + done + + if [ $mail_enabled ]; then + myconf+=( --with-mail ) + use ssl && myconf+=( --with-mail_ssl_module ) + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=( --add-module=${mod} ) + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export AR CC + + if ! use prefix; then + myconf+=( --user=${PN} ) + myconf+=( --group=${PN} ) + fi + + local WITHOUT_IPV6= + if ! use ipv6; then + WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" + fi + + if [[ -n "${EXTRA_ECONF}" ]]; then + myconf+=( ${EXTRA_ECONF} ) + ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" + fi + + ./configure \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/run/${PN}.pid \ + --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ + --with-cc-opt="-I${EROOT}/usr/include${WITHOUT_IPV6}" \ + --with-ld-opt="-L${EROOT}/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() { + use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" + + # 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-r2 "${ED}"/etc/nginx/nginx.conf || die + + newinitd "${FILESDIR}"/nginx.initd-r4 nginx + newconfd "${FILESDIR}"/nginx.confd nginx + + systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service + + doman man/nginx.8 + dodoc CHANGES* README + + # just keepdir. do not copy the default htdocs files (bug #449136) + keepdir /var/www/localhost + rm -rf "${ED}"/usr/html || die + + # set up a list of directories to keep + local keepdir_list="${NGINX_HOME_TMP}"/client + local module + for module in proxy fastcgi scgi uwsgi; do + use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}" + done + + keepdir /var/log/nginx ${keepdir_list} + + # this solves a problem with SELinux where nginx doesn't see the directories + # as root and tries to create them as nginx + fperms 0750 "${NGINX_HOME_TMP}" + fowners ${PN}:0 "${NGINX_HOME_TMP}" + + fperms 0700 ${keepdir_list} + fowners ${PN}:${PN} ${keepdir_list} + + fperms 0710 /var/log/nginx + fowners 0:${PN} /var/log/nginx + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/nginx.logrotate-r1 nginx + + # Don't create /run + rm -rf "${ED}"/run || die + + if use lua_single_target_luajit; then + pax-mark m "${ED}/usr/sbin/nginx" + fi + + if use nginx_modules_http_perl; then + cd "${S}"/objs/src/http/modules/perl/ || die + emake DESTDIR="${D}" INSTALLDIRS=vendor + perl_delete_localpod + cd "${S}" || die + fi + + if use nginx_modules_http_cache_purge; then + docinto ${HTTP_CACHE_PURGE_MODULE_P} + dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} + fi + + if use nginx_modules_http_slowfs_cache; then + docinto ${HTTP_SLOWFS_CACHE_MODULE_P} + dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} + fi + + if use nginx_modules_http_fancyindex; then + docinto ${HTTP_FANCYINDEX_MODULE_P} + dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst + fi + + if use nginx_modules_http_lua; then + docinto ${HTTP_LUA_MODULE_P} + dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown + fi + + if use nginx_modules_http_auth_pam; then + docinto ${HTTP_AUTH_PAM_MODULE_P} + dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} + fi + + if use nginx_modules_http_upstream_check; then + docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} + dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} + fi + + if use nginx_modules_http_naxsi; then + insinto /etc/nginx + doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules + 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}"/{CHANGES,README.md,authors.txt} + fi + + if use nginx_modules_http_push_stream; then + docinto ${HTTP_PUSH_STREAM_MODULE_P} + dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile} + fi + + if use nginx_modules_http_sticky; then + docinto ${HTTP_STICKY_MODULE_P} + dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf} + fi + + if use nginx_modules_http_memc; then + docinto ${HTTP_MEMC_MODULE_P} + dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown + fi + + if use nginx_modules_http_auth_ldap; then + docinto ${HTTP_LDAP_MODULE_P} + dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf + fi +} + +pkg_postinst() { + if use ssl; then + if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then + install_cert /etc/ssl/${PN}/${PN} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + fi + fi + + if use nginx_modules_http_spdy; then + ewarn "" + ewarn "In nginx 1.9.5 the spdy module was superseded by http2." + ewarn "Update your configs and package.use accordingly." + fi + + if use nginx_modules_http_lua; then + ewarn "" + ewarn "While you can build lua 3rd party module against ${P}" + ewarn "the author warns that >=${PN}-1.11.11 is still not an" + ewarn "officially supported target yet. You are on your own." + ewarn "Expect runtime failures, memory leaks and other problems!" + fi + + if use nginx_modules_http_lua && use http2; then + ewarn "" + ewarn "Lua 3rd party module author warns against using ${P} with" + ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see https://git.io/OldLsg" + fi + + local _n_permission_layout_checks=0 + local _has_to_adjust_permissions=0 + local _has_to_show_permission_warning=0 + + # Defaults to 1 to inform people doing a fresh installation + # that we ship modified {scgi,uwsgi,fastcgi}_params files + local _has_to_show_httpoxy_mitigation_notice=1 + + local _replacing_version= + for _replacing_version in ${REPLACING_VERSIONS}; do + _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) + + if [[ ${_n_permission_layout_checks} -gt 1 ]]; then + # Should never happen: + # Package is abusing slots but doesn't allow multiple parallel installations. + # If we run into this situation it is unsafe to automatically adjust any + # permission... + _has_to_show_permission_warning=1 + + ewarn "Replacing multiple ${PN}' versions is unsupported! " \ + "You will have to adjust permissions on your own." + + break + fi + + local _replacing_version_branch=$(ver_cut 1-2 "${_replacing_version}") + debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." + + # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? + # This was before we introduced multiple nginx versions so we + # do not need to distinguish between stable and mainline + local _need_to_fix_CVE2013_0337=1 + + if ver_test ${_replacing_version} -ge 1.4.1-r2; then + # We are updating an installation which should already be fixed + _need_to_fix_CVE2013_0337=0 + debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" + else + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2013-0337!" + fi + + # Do we need to inform about HTTPoxy mitigation? + # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f + if ver_test ${_replacing_version_branch} -lt 1.10; then + # Updating from <1.10 + _has_to_show_httpoxy_mitigation_notice=1 + debug-print "Need to inform about HTTPoxy mitigation!" + else + # Updating from >=1.10 + local _fixed_in_pvr= + case "${_replacing_version_branch}" in + "1.10") + _fixed_in_pvr="1.10.1-r2" + ;; + "1.11") + _fixed_in_pvr="1.11.3-r1" + ;; + *) + # This should be any future branch. + # If we run this code it is safe to assume that the user has + # already seen the HTTPoxy mitigation notice because he/she is doing + # an update from previous version where we have already shown + # the warning. Otherwise, we wouldn't hit this code path ... + _fixed_in_pvr= + esac + + if [[ -z "${_fixed_in_pvr}" ]] || ver_test ${_replacing_version} -ge ${_fixed_in_pvr}; then + # We are updating an installation where we already informed + # that we are mitigating HTTPoxy per default + _has_to_show_httpoxy_mitigation_notice=0 + debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" + else + _has_to_show_httpoxy_mitigation_notice=1 + debug-print "Need to inform about HTTPoxy mitigation!" + fi + fi + + # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? + # All branches up to 1.11 are affected + local _need_to_fix_CVE2016_1247=1 + + if ver_test ${_replacing_version_branch} -lt 1.10; then + # Updating from <1.10 + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2016-1247!" + else + # Updating from >=1.10 + local _fixed_in_pvr= + case "${_replacing_version_branch}" in + "1.10") + _fixed_in_pvr="1.10.2-r3" + ;; + "1.11") + _fixed_in_pvr="1.11.6-r1" + ;; + *) + # This should be any future branch. + # If we run this code it is safe to assume that we have already + # adjusted permissions or were never affected because user is + # doing an update from previous version which was safe or did + # the adjustments. Otherwise, we wouldn't hit this code path ... + _fixed_in_pvr= + esac + + if [[ -z "${_fixed_in_pvr}" ]] || ver_test ${_replacing_version} -ge ${_fixed_in_pvr}; then + # We are updating an installation which should already be adjusted + # or which was never affected + _need_to_fix_CVE2016_1247=0 + debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" + else + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2016-1247!" + fi + fi + done + + if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then + # We do not DIE when chmod/chown commands are failing because + # package is already merged on user's system at this stage + # and we cannot retry without losing the information that + # the existing installation needs to adjust permissions. + # Instead we are going to a show a big warning ... + + if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then + ewarn "" + ewarn "The world-readable bit (if set) has been removed from the" + ewarn "following directories to mitigate a security bug" + ewarn "(CVE-2013-0337, bug #458726):" + ewarn "" + ewarn " ${EPREFIX}/var/log/nginx" + ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" + ewarn "" + ewarn "Check if this is correct for your setup before restarting nginx!" + ewarn "This is a one-time change and will not happen on subsequent updates." + ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX}${NGINX_HOME_TMP}'" + chmod o-rwx \ + "${EPREFIX}"/var/log/nginx \ + "${EPREFIX}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ + _has_to_show_permission_warning=1 + fi + + if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then + ewarn "" + ewarn "The permissions on the following directory have been reset in" + ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" + ewarn "" + ewarn " ${EPREFIX}/var/log/nginx" + ewarn "" + ewarn "Check if this is correct for your setup before restarting nginx!" + ewarn "Also ensure that no other log directory used by any of your" + ewarn "vhost(s) is not writeable for nginx user. Any of your log files" + ewarn "used by nginx can be abused to escalate privileges!" + ewarn "This is a one-time change and will not happen on subsequent updates." + chown 0:nginx "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1 + chmod 710 "${EPREFIX}"/var/log/nginx || _has_to_show_permission_warning=1 + fi + + if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then + # Should never happen ... + ewarn "" + ewarn "*************************************************************" + ewarn "*************** W A R N I N G ***************" + ewarn "*************************************************************" + ewarn "The one-time only attempt to adjust permissions of the" + ewarn "existing nginx installation failed. Be aware that we will not" + ewarn "try to adjust the same permissions again because now you are" + ewarn "using a nginx version where we expect that the permissions" + ewarn "are already adjusted or that you know what you are doing and" + ewarn "want to keep custom permissions." + ewarn "" + fi + fi + + # Sanity check for CVE-2016-1247 + # Required to warn users who received the warning above and thought + # they could fix it by unmerging and re-merging the package or have + # unmerged a affected installation on purpose in the past leaving + # /var/log/nginx on their system due to keepdir/non-empty folder + # and are now installing the package again. + local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) + su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null + if [ $? -eq 0 ] ; then + # Cleanup -- no reason to die here! + rm -f "${_sanity_check_testfile}" + + ewarn "" + ewarn "*************************************************************" + ewarn "*************** W A R N I N G ***************" + ewarn "*************************************************************" + ewarn "Looks like your installation is vulnerable to CVE-2016-1247" + ewarn "(bug #605008) because nginx user is able to create files in" + ewarn "" + ewarn " ${EPREFIX}/var/log/nginx" + ewarn "" + ewarn "Also ensure that no other log directory used by any of your" + ewarn "vhost(s) is not writeable for nginx user. Any of your log files" + ewarn "used by nginx can be abused to escalate privileges!" + fi + + if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then + # HTTPoxy mitigation + ewarn "" + ewarn "This nginx installation comes with a mitigation for the HTTPoxy" + ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" + ewarn "the HTTP_PROXY parameter to an empty string per default when you" + ewarn "are sourcing one of the default" + ewarn "" + ewarn " - 'fastcgi_params' or 'fastcgi.conf'" + ewarn " - 'scgi_params'" + ewarn " - 'uwsgi_params'" + ewarn "" + ewarn "files in your server block(s)." + ewarn "" + ewarn "If this is causing any problems for you make sure that you are sourcing the" + ewarn "default parameters _before_ you set your own values." + ewarn "If you are relying on user-supplied proxy values you have to remove the" + ewarn "correlating lines from the file(s) mentioned above." + ewarn "" + fi +} diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 2d6030e15a70..ecab87a4980b 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,7 +1,6 @@ AUX tomcat-10.0.2-build.xml.patch 11108 BLAKE2B 9c8db2ed4008def42bcfdcfd99fbaf01df0725738b92245e9138b08dfbead625959afc5f3dbef0cb28e322076efc34a22b751ffe1cf3b8a99db4a507651c6362 SHA512 ed2fbacd4cda8e582dc316e9ff3f14686eb68b5851c2c2a0c3ce779c5394af5161fa40b821bd4fd10e1295ff13ae3adcc03d2f0d42604efe19b57790af648ba8 AUX tomcat-7.0.99-build.xml.patch 5913 BLAKE2B 21316c4ce76bd3e87c2749354cbd455c1322431649b276b59a93f10b97f59d03690f3531c2fd3a8ce67b81969544d498bf04e829407005dbed867067f8970347 SHA512 f8d0cb4ba0effdeea3db4049381efc84513551a1e28551b59a254340a8add306824d1dba344f6eaddc93e8b61fc0b71e1a8d0bcfc860500134cc19072deef30e AUX tomcat-8.5.57-build.xml.patch 10554 BLAKE2B 40df509d8f5e3022a9d384d8d939800062ec383ea000f1224dfd5816a76af12dbde7d36826659707ae7e2a2bf0c19c1e8bc96bec5854bcd2422910530a0530fd SHA512 c1e3b73e2aece5e849219c663a01a31bd2f6355d37b51e18b68d42a05be2a49d173520450ac1aeef7b394fe860135afda225d450b4e98d912fe90231c9d70601 -AUX tomcat-9.0.37-build.xml.patch 11111 BLAKE2B dea5b3226ec9ade17e8e84c1ea00c97bb6154e212f5e43ee93876c60d4ac365e24613d80457b02ab27141a51933d8a758acd8ed2ee7f0224d13c0fb9d18101ae SHA512 3f185c3108a1f6ddccc068fe4b9f45638faba1060ab26237da17521110450d19722f374a86c4122eb59ee7ea53dbec78c9e77d8ba1c36c9e8e8cbbb414e9041c AUX tomcat-9.0.37-fix-build-rewrite.patch 513 BLAKE2B e806ca32771bcad0fbc2f1b3f223af2b17d2caffe6ed034783294650d4ec22c8d9d9d215ade85569f6627508c61b7d469412d582093708b6bb728d6123d65155 SHA512 7aab16d1b52fa88352df849ca051dcaf27f645b1b3edd3df3a7d87385b5068d300105f89c18ba3a0f65818739b85ec847ddd5b28b8b655efbb7b39036099cae2 AUX tomcat-9.0.40-build.xml.patch 11106 BLAKE2B 6aeb5b4055e32dd30c430bb32dad7b89180c94418cb8e9fb9518441b5d636e984a8b502bb2c3e458d0760a726b0dbe16185f0f21a38608d180a497a7fa5e374d SHA512 6d68baca85c028e81ba990e7b11e4b86a5ad1d701a3d0a413f97640388da60d96ed50ea98f0e2ed1cc99d89030cd004214309816d428def6b2d9d51d4d5d0e36 AUX tomcat-9.0.40-insufficient-ecj.patch 1718 BLAKE2B 2a90c57c54c32b7e561c378abe4a0a10a898f80aca13859b0944bb690d59ab7bf1bd69b4c6d21bb253a4463d9e481887783a1769d651bc75437f52ae555341e1 SHA512 cd4e7347a649fec319eba6aae3b6c7aa6146b14a7b9e51f8354ccdbaed29093a8623721acaec7649bec92b98e73b37c2cd36b2a3b9136dc5b25368a0523e9c2a diff --git a/www-servers/tomcat/files/tomcat-9.0.37-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.37-build.xml.patch deleted file mode 100644 index ea902b4b922f..000000000000 --- a/www-servers/tomcat/files/tomcat-9.0.37-build.xml.patch +++ /dev/null @@ -1,284 +0,0 @@ -diff --git a/build.xml b/build.xml -index 8e02cb5..9007e8b 100644 ---- a/build.xml -+++ b/build.xml -@@ -760,6 +760,7 @@ - addOSGi="true" /> - - -+ - -+ - -+ - - - - -- -+ addOSGi="true" /> --> - - - -- -+ - - - -@@ -1201,7 +1204,7 @@ - - - -- -+ - - - -@@ -1244,7 +1247,7 @@ - - - -- -+ - - - - - -- -+ - - - - -+ - - - -+ - - - Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. -@@ -1898,6 +1904,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. - - - -+ - - - -+ - - -+ - - - -@@ -2756,7 +2768,7 @@ skip.installer property in build.properties" /> - - - -+ description="Download components necessary to compile" unless="noget" > - - - -@@ -2811,7 +2823,7 @@ skip.installer property in build.properties" /> - - - -+ description="Download additional components for the tests" unless="noget"> - - - -@@ -2889,7 +2901,7 @@ skip.installer property in build.properties" /> - - - -+ description="Download additional components for a distribution" unless="noget"> - - - -@@ -2944,13 +2956,13 @@ skip.installer property in build.properties" /> - - - -- -+ - - - - -- -+ - - - -@@ -3072,7 +3084,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3089,7 +3101,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3114,7 +3126,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3130,7 +3142,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3154,7 +3166,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3169,7 +3181,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3197,7 +3209,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3208,7 +3220,7 @@ skip.installer property in build.properties" /> - - - -- -+ - - - -@@ -3219,7 +3231,7 @@ skip.installer property in build.properties" /> - - -+ description="Prepares the source tree to be built in Eclipse" unless="noget"> - - - -@@ -3237,7 +3249,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho - - -+ description="Creates project directory .idea for IntelliJ IDEA" unless="noget"> - - - -- cgit v1.2.3