summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2017-01-10 16:33:41 +0100
committerThomas Deutschmann <whissi@gentoo.org>2017-01-10 16:33:57 +0100
commit688c54e5f570cfe816f69f5452817a320427474a (patch)
tree7d73c9e7d62668aa0443470a82c4a80c1d845755
parentnet-p2p/transmission: revision bump (diff)
downloadgentoo-688c54e5f570cfe816f69f5452817a320427474a.tar.gz
gentoo-688c54e5f570cfe816f69f5452817a320427474a.tar.bz2
gentoo-688c54e5f570cfe816f69f5452817a320427474a.zip
www-servers/nginx: Security cleanup (bug #605008)
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--www-servers/nginx/Manifest14
-rw-r--r--www-servers/nginx/files/nginx.initd-r389
-rw-r--r--www-servers/nginx/nginx-1.10.1.ebuild763
-rw-r--r--www-servers/nginx/nginx-1.10.2-r1.ebuild796
-rw-r--r--www-servers/nginx/nginx-1.10.2-r2.ebuild802
-rw-r--r--www-servers/nginx/nginx-1.11.5-r1.ebuild809
-rw-r--r--www-servers/nginx/nginx-1.11.6.ebuild815
7 files changed, 0 insertions, 4088 deletions
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
index 92392fff5f37..40667e855a0f 100644
--- a/www-servers/nginx/Manifest
+++ b/www-servers/nginx/Manifest
@@ -1,37 +1,23 @@
DIST modsecurity-2.9.1.tar.gz 4261212 SHA256 958cc5a7a7430f93fac0fd6f8b9aa92fc1801efce0cda797d6029d44080a9b24 SHA512 374733cbfc26e53d95b78c8f268a4e465d838163e9893fc24e33a9d272b114f1b287147bab6d0289575074cbbd94f48983e23fa59832cbcb32950046cea59269 WHIRLPOOL 5f41bebf032f8a269412d104b7632a06af4d4c495658c9cd1ebf69b82c10ce1bbcb34b9dd159a7b00e57348714a5e93ad3db19701dda51479accd3a9dc79a9cb
-DIST nginx-1.10.1.tar.gz 909077 SHA256 1fd35846566485e03c0e318989561c135c598323ff349c503a6c14826487a801 SHA512 fa1329d40e83340380332dd5e2ed66f08dd59cc7f7582dd0e0193c493353ba550e80dc80e5165c225d70532d4197abc49cc8c760e8ab72e48f630cb57c2803e1 WHIRLPOOL 6942f70c3279a28bd8d664d085dee68bf0d0526c8dcb636f3258c9de598268efc984af72e527efd86889bd13911b38b0bdb2de1e92eef69cabd02f7080f64eb6
DIST nginx-1.10.2.tar.gz 910812 SHA256 1045ac4987a396e2fa5d0011daf8987b612dd2f05181b67507da68cbe7d765c2 SHA512 f2d5a4fbabaf9333bae46461bcbe3dbcc5ff7e8f8c7a5dead3063e3d59c9ec15dc85262a23ca7d693db45a50ec98a70fb216b3da9872ee23d57b6bfaf064876e WHIRLPOOL 7e819f43a68de49d3cceb3e5ec81eef6872859df0abca2be00fb73c8779c2716b6997ea5f8cadb93af195d9f4d07a4404f51e0752dd881628de93a0c0289aea7
-DIST nginx-1.11.5.tar.gz 956517 SHA256 223f8a2345a75f891098cf26ccdf208b293350388f51ce69083674c9432db6f6 SHA512 f41b21b5d8c6b7fe7f8713e96fb6b1c40da49bf64ebb790fb5aa38f036a37b36fcf048ff72c2216552b2f75366b30c5fcdef26312bd4e5515b2476a1cd944b8c WHIRLPOOL fba49ae277ec2114b06eb0fdce87161ac7bd3e0ca90387dc58caf327c5f12056be07eeba677ff37c59e7d759054ec276ce4db647250774c57588619a1803592c
DIST nginx-1.11.6.tar.gz 960331 SHA256 3153abbb518e2d9c032e1b127da3dc0028ad36cd4679e5f3be0b8afa33bc85bd SHA512 1969f527d4554a976d14e82c2297c519a0d0d82a9fbd3cc703ab42a23067c7fcf101ddf16f1abff374c71f37969fd7c58d2a344c57566538b821acc32cd3d979 WHIRLPOOL 67ed24c25b20f6d94f3a0602946f750b4efafd79d3a093a35fdf370a20377abcc2a54c00fcd5e7bc54305515da9234fb2f192c744a7fb59c4bbdee2ba0c0f626
DIST nginx-1.11.8.tar.gz 964918 SHA256 53aef3715d79015314c2dcb18f2b185a0c64368cc01b30bdf0737a215f666b34 SHA512 4bbecf17579022cc925af8808554983c57e4f438edc8f987751413f0a023267a4766edc8321cbbe8a8b675f7e86d8a2cba76bd52236c8d9509b2b301ab349ffa WHIRLPOOL a30ad4cdc0b74e0f860938942caeee961759ceabae8735725a989db29702b366fb285079a992cbc681ec3fd157ef6f8907f6a3eac13a8af302daad94ca867738
DIST nginx-auth-ldap-49a8b4d28fc4a518563c82e0b52821e5f37db1fc.tar.gz 17159 SHA256 3c11c32f05da04f1a4647dc4e35dd8d8aeacd5a2e763ba349feba3dba8663132 SHA512 323abd0ca8e90f5afcaf81a8ff1a8abe3dfcbff3d69f0dd4a1c005fe6436acbf3076c4c57a4df877b3d8e388cbea085d46301bb2df9c0752e2567817ff7cca92 WHIRLPOOL ad65e8182b2634db5fa06055ef7d91c7d8aabd0fa986d8402a4845977354d6edb329621b6f9f96c90ce2d158cff20e42ae50fba06a088a84de3e3f414205dbc2
-DIST nginx-auth-ldap-dbcef31bebb2d54b6120422d0b178bbf78bc48f7.tar.gz 16998 SHA256 35c8f29581823be0f8bdbcf237d7fa5518c45eabe0ab9a695b131d32c8f1c264 SHA512 f47a9a6c5f93daa9260825261d2069bca5fc528221f94fc8ec98462f61774a36bce0238d931f8d0690544fd0144a83f942b6673c8376fe03f7834f8da9666671 WHIRLPOOL 26a2f67e715d13f785932f00e642c0864b5b7059d120f7fe7458017dbe02203f4873d1cfc4f0dd262834465438ad2b00ef4b49295e18a8e246abda6f7694ac70
DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 SHA256 6f9102321d8c68df6d67e9bde145a8de3f45f99f6cb47c08735a86f003234d31 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529 WHIRLPOOL 38abe56e177e22dad68ac7d6570425ecd763d2e891627a75156a6f39bd7edc54f664c3d2f638e1ea57c743dadc6a8c9889be087abbdb4c98b5641c299f7fbc07
-DIST nginx_http_sticky_module_ng-1.2.6.tar.bz2 124089 SHA256 e47b9fd435d7a5a3200f945a9745aaa7b9446495bda76df48f211129f88d6b26 SHA512 2632b04c94f523aa7c9726db182cba11d83e642c2db5798274e67fbef30de95d02e4e95cbfb98bc429d4244d630b5d9617405b43f728ae0117a5c134940c0ded WHIRLPOOL 1b754c02f834c6b4d4930e9c46b8c5accb6c9663718fb9296c92d79bc33206e66e49e4234ca4db9a5afcd42fa23273bdf0e675aa7b38927c4e46a85318c189eb
DIST ngx_devel_kit-0.3.0-r1.tar.gz 66455 SHA256 88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 SHA512 558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 WHIRLPOOL 5f6ed4e6850d2ce7e8c65e0570a7e2c74a1fe360e167644ed405fff682ab178b09c722c99c1df9af552fb816219b9fc04dcdf638b3e4af68c688434cdb33aa59
DIST ngx_http_auth_pam-1.5.1.tar.gz 6863 SHA256 77676842919134af88a7b4bfca4470223e3a00d287d17c0dbdc9a114a685b6e7 SHA512 973b94874d8a58c0df0ac2d31571eafc1e80b11179cba33ec88421a826207fbf7e99b0387e135a1ca48d82daacb78f19a4c21d3a27b49b16dc86b4748bb72261 WHIRLPOOL 4fcaadee859f325c734aa16763702ee40284d1debcfbf5df1cb9aadf2bfc72c1e8d0e5b9d1495f34fc719f4d7fa3e653797fa7917f8fd0437fa2023a1930f667
DIST ngx_http_cache_purge-2.3.tar.gz 12248 SHA256 279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c SHA512 50a31dbf2216a6fae74a186af56dec4600cf55777e76a10ac0075f609e7737135aab063a64f2590dddcd0369ebebd4a523027f3d9ebcca74f7b4355be1c5dcc0 WHIRLPOOL 5451ef3e33044210453995ea916acec679599c0ded5471d464db5003a07e7a06e9690812091148c2af7b50384e52b32e49136eac02e0330724ba2408d893f96c
DIST ngx_http_dav_ext-0.0.3.tar.gz 6260 SHA256 d428a0236c933779cb40ac8c91afb19d5c25a376dc3caab825bfd543e1ee530d SHA512 4763b1c5e417248d80acfacf20bfc5ba3e06675ff08e37703867daef99a400980b536941e4955c259432905bd11ab998bc2e2489a50350413c7bf37e18eafb74 WHIRLPOOL 5adbcea768fbb179249a03fe69304505ec09a1dafac848dd5e3cde96693c6fbcf6cf6c128ca116d02b36c1be0008807d9e86fee5b411e137b18b15a60291f29b
-DIST ngx_http_echo-0.59.tar.gz 52703 SHA256 9b319ad7836202883128d2b9c24ed818082541df57ef7f2065b7557085c603cd SHA512 803c431da00160f62ee98e126d244fb97b2d9dca08137daabf55504f012598f8e2c689841c2e8bfced5f07ce24c46933c49b3feffc09ca0b5f07dc10e34546ee WHIRLPOOL a709ded0dd1af2b6c1c5da6f065834ab7715eb736f36018acf06c2c10389bf896dc4459acbbb479340b9da6f287143cd25fca7df503acea457cf0933ba67e9a1
DIST ngx_http_echo-0.60.tar.gz 52771 SHA256 1077da2229ac7d0a0215e9e6817e297c10697e095010d88f1adbd1add1ce9f4e SHA512 c455bee73cebd0752449472452d15614b9587ddd199263d366484ede890c4d108eacbbeaef31adc9dc7732b56ef2bfc73c0fef3366366db03a8ec3fdc27a985c WHIRLPOOL 8938ac18aae74a5c4806ff3611c243c9bee108ef93fef7b0da284040c2ec2d9a57cb3cad9e3719cb795bbb063176d7afe81b7288ebacf5096d26b16e5ef34da6
-DIST ngx_http_fancyindex-0.4.0.tar.gz 18419 SHA256 152cc2cf082c23cbc7b0fc76f14af4015d3988783016dc9145edebec17c7e230 SHA512 47fd9f405475f96958eb255f9051a9bde1ad8b515356bbaff8f8034ee34ecc17e3574c1d104496c5069c8986e047ca0de386f1b7d2f7317f15be98d69e74b624 WHIRLPOOL 4972eea9f6b8373b4bbcf73c66fe3dc635bc6326f264febc9a5a0fc620d44f1a3d1f98c91c1d2acb6779729a1e188c1f4a8750972266d1e463658529d37fa596
DIST ngx_http_fancyindex-0.4.1.tar.gz 21130 SHA256 2b00d8e0ad2a67152a9cee7b7ee67990c742d501412df912baaf1eee9bb6dc71 SHA512 ce0043ad4a2b638c5d99244d6caaa65ad142cea78884084a9aeca5a9593c68dbe508c9e4dd85dc5722eb63ef386612bffc48d4b6fc1487df244fbcb7a73bffe1 WHIRLPOOL 4a885afbadf64bbd25df6580a099472ae48836d9dddfe1dee6ac6a6f97bfb0cf7120ff10dd69fceca7085fab590bec3a4b4b5be5644f2352375316885ddc3cac
-DIST ngx_http_headers_more-0.30.tar.gz 27793 SHA256 2aad309a9313c21c7c06ee4e71a39c99d4d829e31c8b3e7d76f8c964ea8047f5 SHA512 378f2c4b4fbf580e59c8ad3ef5fcb617e4669b7b506a0ae87e4e0bc920d34e16fe55565e48dd57e7b6c37ae8b407646ca64f5d84a2fbbe2d41d719c7643c1a82 WHIRLPOOL f50bb5c2e23fb63d98904163a873edf947f65e57dc0f73489024243c1d5b04e0677015a075d315585e535e226b8dad659bada563778b8ddf4d060e918fc37ace
-DIST ngx_http_headers_more-0.31.tar.gz 27941 SHA256 b2e8162cce2d24861b1ed5bbb30fc51d5215e3f4bb9d01f53fc344904d5911e7 SHA512 bc6b936dff9989af9eb97864e5e9499748ea8c73b2f49a24ad00d2a90bf77d1d743e6789f7bf3948a7baaaa44b0cc9f48a1c8a52bce9902a13c88e1f6673c6e1 WHIRLPOOL 79dd5ecb8eaabf6d81380888b687a962339c93d6bff14c88156782d5846d1121d33e0851ab27b44fb1b9f2035484093327fb92559e655dbdc6362faddb76b5e2
DIST ngx_http_headers_more-0.32.tar.gz 28033 SHA256 c6d9dab8ea1fc997031007e2e8f47cced01417e203cd88d53a9fe9f6ae138720 SHA512 e42582b45c3111de3940bbeb67ce161aca2d55adcfb00c61c12256fa0e36221d38723013f36edbcf6d1b520f8dfb49d4657df8a956e66d36e68425afad382bd1 WHIRLPOOL 2b95ea8e2933e83082b9dfd7aaa8f57dd38b0ec12fb452a4aa38a215ca76b6572fe35b79c8afe8cf3097bf89ced0e81c33e07ee6913c99966b87b8e610df3121
-DIST ngx_http_lua-0.10.5.tar.gz 579793 SHA256 4f0292c37ab3d7cb980c994825040be1bda2c769cbd800e79c43eb37458347d4 SHA512 a02b8614fdcd063b1087a3114f05402c707343ff3bceabaca1fb98531ba30edea1a525fc45e2f5a49ff155de8d6f9e1155e8870e463476da5703acfd5f8fc3fc WHIRLPOOL 9c72353bc58a98fd3bae68bd9b13228d202167422a429aa4b455f7e280cb617b5c083131e4f372708e602342b24b150437ed8ebae9647a397bae8a88a13b385c
-DIST ngx_http_lua-0.10.6.tar.gz 597217 SHA256 b98c4f648589bbf3e2c3d5fd18664e7a7ef89ac083e96c8e984fa919e7a7c073 SHA512 202aaf39381d151d5f456e5cd61c87b65fa20ece997f7e517a3eb3912af3a153747a674ac004dbcc474728567ff58436cfb408accd5e922d805b1d697c34774c WHIRLPOOL c4fd64114d74afbaba02c3e7bb1c5562281636624a581c6535f6aa310886f766b9cf0e63a8921599c617d411d5ec920e4b08b54588bfac7cf4c24e8ffc13d26b
DIST ngx_http_lua-0.10.7.tar.gz 605171 SHA256 c21c8937dcdd6fc2b6a955f929e3f4d1388610f47180e60126e6dcab06786f77 SHA512 d060a13de4d01d77e6d6cd1635ecbb405330e4326b71b89341c1c128ee4182978a51d53355bc07c350e3c3a7df15325e3df380d9c3a98b2ff7d7efa18fa09b32 WHIRLPOOL 7b64f75aae2ab74f51b3b2d07a59262a2c8ab2b863698b93b1184c003049641b45eded8fa5cc6301887c80d5fc34e9f22365da7765b3d5594ad838dacfceddd7
-DIST ngx_http_naxsi-0.54.tar.gz 163809 SHA256 9cc2c09405bc71f78ef26a8b6d70afcea3fccbe8125df70cb0cfc480133daba5 SHA512 91934bfd41495715269cc6e549d17f6da66f2bdd0c9a6821fa9096b694dd3927109c4aad2f8b327620ae7c34f76a0839ac16669cd8c65081bc01fa7f829c1d43 WHIRLPOOL ef68cfecc9849086527c3590744d3c0d73cec830c6cf1ebca63566a7444438757a85d0c79fa552c4763e0416a615f4cf8d99622e2f36d3713b7072138a82f5a8
DIST ngx_http_naxsi-0.55.1.tar.gz 185997 SHA256 45dd0df7a6b0b6aa9c64eb8c39a8e294d659d87fb18e192cf58f1402f3cdb0a8 SHA512 aebda20e5b78e9111b7bac1e15829258e6b85b80e4ce333e4dba8caead36287b3f0fcb453c51d7c59f07d637fa62f5c6b23aecd3bf6a3c3da4abebf1a6689f14 WHIRLPOOL 36830d10a35b724b7ea15e3884e96e2e4dd84f2b81fc1c7122d3e2e83a1942227321b1a7141d829423788bc52a3e199a95ca2637369e17f84ea16eb0cb2e5e37
DIST ngx_http_push_stream-0.5.2.tar.gz 182008 SHA256 1d07f38acdb8194bd49344b0ba21de101070de9b8731d27a8d22e928850bc199 SHA512 ee8bf9ece652da6aa5a39879298bba70d1842696545259f3f5e302cc61397b35f016364805805f9ab1914fc39ed2f07c015e042155789073e3d1fdc02a0783de WHIRLPOOL d309cecbb1bb5b6c4f64712d44889e3ecca59140d845a31a3f605dc3cc2aa01622b0deadb8f6852baea3c211bebbe6ed7d7868399447ac1249c1b1b740fa3c27
DIST ngx_http_slowfs_cache-1.10.tar.gz 11809 SHA256 1e81453942e5b0877de1f1f06c56ae82918ea9818255cb935bcb673c95a758a1 SHA512 fbc9609a8d6913aeefe535f206b9e53477503f131934ead2ae5a6169e395af2f5fb54778704824d5eeb22a4ef40a11ebbcde580db62a631f70edcc2cfc06b15d WHIRLPOOL a02ed77422c47d9e476f8746186d19d632ddb953635d8d9dd51ff076225a78044286ee7e114478bc02e4b2a422e4fdc207154fc287629dd2cd7c3f9a634dad18
-DIST ngx_http_upload_progress-0.9.1-r1.tar.gz 17166 SHA256 99ec072cca35cd7791e77c40a8ded41a7a8c1111e057be26e55fba2fdf105f43 SHA512 6c1e3776402b6e2cda50d9c48c4b578a85feffe15891c075443f6d9c7b9e2414e0614b50a8f417ddda9faf5f719957c77ade519c88b48caec970fc51fe12f0d1 WHIRLPOOL 12970d0f75ee3f0d8a97c4948b97fca2bd707a93e4e578c0e2ac0d18991986e620dd6b15c2ab5680ff726c0490671e3bc5e1ee6109baf81877d8baa6a5357825
DIST ngx_http_upload_progress-0.9.2-r1.tar.gz 17268 SHA256 b286689355442657650421d8e8398bd4abf9dbbaade65947bb0cb74a349cc497 SHA512 c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c WHIRLPOOL e847603f1445c7e1471a5570e2774a448be880eb71eeb21e27361586bcee9aae31cb0a8a80cd5abfc8d14e2c356fabfa7293e6a4d5f6782d41521a7bdc124066
-DIST ngx_http_upstream_check-0.3.0-10-g10782ea.tar.gz 128297 SHA256 a5003e86908086f8607e76cfc01a56d56654982ab02cec918278c261ff1e8363 SHA512 2407d4375d8b94a808eb9e423615af700537b28fc88d37e790fb2a5ecdb02da94e7d1e271a6a81e8a55f8ce11e7db80fdd6de7feca08469dfaa26d717a1075a3 WHIRLPOOL 6b428940a07a7c18ba19cba07f43f1661484905a025f80fcb44908aeaeab9c8e854d3e104fe0339087a2e9029ad4722366c7d0a0fca7c73d92ece6ff2e494206
DIST ngx_http_upstream_check-0.3.0-10-gf3bdb7b.tar.gz 129060 SHA256 9e0835e8c1550033e74c7eaeebf94d41ab1617cff152dd076da976e0eba30bfc SHA512 5b2ae6d305d24d0c64dc118fd3b0c23f5bf0e9a282e70e8d2c4eb946ed510263b5e845f64ca352784e34708cf9d98804cacf64b6c9efd712a395076dd0ba7c29 WHIRLPOOL 8dab8aa1bf3f7c9adbf2952148d76cc627682876b5e64dc789582b573a4b6fa73910043325fc664784b68966bcb1e8ba9ae6bfa457133bde0d52e39b7d3c09e0
DIST ngx_memc_module-0.17.tar.gz 36369 SHA256 25cbe3ff4931283a681260607bc91ae4a922075345d5770b293c6cd7f1e3bdcc SHA512 e6fdecb4bb629f0882868b78f4b3a2549fce4471efcc4f2c6fdc414435799be6ce41cf056a3170952f8a1f401ee1ca372c97f2d7f79fba79239599755ade8949 WHIRLPOOL 766d84e7a2dfb2a6f069fd846e19d635f4dbd36f78014e97bbd159312d0b38d671b4db989584ca2b5b449046483b5b90d09edbe1c4531b266d8592ad7bad3c3a
DIST ngx_metrics-0.1.1.tar.gz 2964 SHA256 1c62ebb31e3caafad91720962770b0e7a4287f195520cf12471c262ac19b154e SHA512 d36a8fb0104c83b6b564e03b351aa750cab08650264c74d6f786af357bfb7006b531a93270dd961896ea8dafe27e5db8548ede714c5f52c4742876bc73af4b5e WHIRLPOOL 2796f5a97e76dfcc91133240e8e90ba493f0356f781a173d8cacdd09eba64b75ef531db398c0566fda395124700de8c991b771433e376ca0d5898c2ea6f82868
DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 SHA256 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 WHIRLPOOL 64c9b11ad938e6dbe5ba31298f1cd46f6e6bb4ba039c96b1e43bd85919d1606326f74b677f789ecabe0b0f4e0f08ac5aaf8148bf820de65aaa1e9966a28b9f61
DIST ngx_rtmp-1.1.10.tar.gz 519877 SHA256 f9491dd24390b0d5d70dfe3553edf3d14efeb7c7a81b4d4a20c5cfeaefc1141c SHA512 bcc0aee3308af7c61bf01a5530fcf1dae938e6778306f6e3eb5995e6d0529f43d33b7ee2acb813d5a39acc92e4853d207a01e8e41b766a6e0dd07aade60cd98f WHIRLPOOL 655f4dcb02f928698ae14d29e5b7f60ad3fd71c757d67f1930c695a3501054d124a92f7ada7d4e605204f1e73e0779cad0b60102bc98d64764535581db0b1867
-DIST ngx_rtmp-1.1.7.tar.gz 519735 SHA256 7922b0e3d5f3d9c4b275e4908cfb8f5fb1bfb3ac2df77f4c262cda56df21aab3 SHA512 9883462a04683f1e7af175da04b86d259ff6d677864667588fb073143f7130969eb2a5a5a48ddceda7a555b908580f179bdcacb7f0111413d51db5bfe43b396e WHIRLPOOL e9c1fc9c3c965ae7047657f76e0997d5da107aff7dd9e5cf3ddb5a2d8f388efd8439b82923e199dc36def449567b8529e06c80f69c36f42128236ac0be5719d5
diff --git a/www-servers/nginx/files/nginx.initd-r3 b/www-servers/nginx/files/nginx.initd-r3
deleted file mode 100644
index 6e3a824e6bad..000000000000
--- a/www-servers/nginx/files/nginx.initd-r3
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-extra_commands="configtest"
-extra_started_commands="upgrade reload"
-
-description="Robust, small and high performance http and reverse proxy server"
-description_configtest="Run nginx' internal config check."
-description_upgrade="Upgrade the nginx binary without losing connections."
-description_reload="Reload the nginx configuration without losing connections."
-
-nginx_config=${nginx_config:-/etc/nginx/nginx.conf}
-
-command="/usr/sbin/nginx"
-command_args="-c ${nginx_config}"
-pidfile=${pidfile:-/run/nginx.pid}
-user=${user:-nginx}
-group=${group:-nginx}
-
-depend() {
- need net
- use dns logger netmount
-}
-
-start_pre() {
- if [ "${RC_CMD}" != "restart" ]; then
- configtest || return 1
- fi
-}
-
-stop_pre() {
- if [ "${RC_CMD}" = "restart" ]; then
- configtest || return 1
- fi
-}
-
-stop_post() {
- rm -f ${pidfile}
-}
-
-reload() {
- configtest || return 1
- ebegin "Refreshing nginx' configuration"
- kill -HUP `cat ${pidfile}` &>/dev/null
- eend $? "Failed to reload nginx"
-}
-
-upgrade() {
- configtest || return 1
- ebegin "Upgrading nginx"
-
- einfo "Sending USR2 to old binary"
- kill -USR2 `cat ${pidfile}` &>/dev/null
-
- einfo "Sleeping 3 seconds before pid-files checking"
- sleep 3
-
- if [ ! -f ${pidfile}.oldbin ]; then
- eerror "File with old pid not found"
- return 1
- fi
-
- if [ ! -f ${pidfile} ]; then
- eerror "New binary failed to start"
- return 1
- fi
-
- einfo "Sleeping 3 seconds before WINCH"
- sleep 3 ; kill -WINCH `cat ${pidfile}.oldbin`
-
- einfo "Sending QUIT to old binary"
- kill -QUIT `cat ${pidfile}.oldbin`
-
- einfo "Upgrade completed"
- eend $? "Upgrade failed"
-}
-
-configtest() {
- ebegin "Checking nginx' configuration"
- ${command} -c ${nginx_config} -t -q
-
- if [ $? -ne 0 ]; then
- ${command} -c ${nginx_config} -t
- fi
-
- eend $? "failed, please correct errors above"
-}
diff --git a/www-servers/nginx/nginx-1.10.1.ebuild b/www-servers/nginx/nginx-1.10.1.ebuild
deleted file mode 100644
index 6365eb4ed01d..000000000000
--- a/www-servers/nginx/nginx-1.10.1.ebuild
+++ /dev/null
@@ -1,763 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# 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.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
-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}"
-
-# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
-HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1"
-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.30"
-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/, 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.0"
-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.5"
-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}"
-
-# 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.1"
-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="0.3.0-10-g10782ea"
-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/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
-HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-10782eaff51872a8f44e65eed89bbe286004bcb1"
-
-# 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}"
-
-# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
-HTTP_NAXSI_MODULE_PV="0.54"
-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.1.7"
-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="0.0.3"
-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.59"
-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.1"
-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.2"
-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"
-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-c78b7dd79d0d"
-
-# 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.17"
-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="dbcef31bebb2d54b6120422d0b178bbf78bc48f7"
-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}"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-
-inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
-
-DESCRIPTION="Robust, small and high performance http and reverse proxy server"
-HOMEPAGE="http://nginx.org"
-SRC_URI="http://nginx.org/download/${P}.tar.gz
- ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
- nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
- nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
- nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
- nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
- nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
- nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
- nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
- nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
- nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
- nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
- rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
- nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
- nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
- nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
- nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
- nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_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="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
- fastcgi geo gzip limit_req limit_conn map memcached proxy referer
- rewrite scgi ssi split_clients upstream_ip_hash 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="access limit_conn upstream"
-NGINX_MODULES_MAIL="imap pop3 smtp"
-NGINX_MODULES_3RD="
- http_upload_progress
- http_headers_more
- http_cache_purge
- http_slowfs_cache
- http_fancyindex
- http_lua
- http_auth_pam
- http_upstream_check
- http_metrics
- http_naxsi
- http_dav_ext
- http_echo
- http_security
- http_push_stream
- http_sticky
- http_ajp
- http_mogilefs
- http_memc
- http_auth_ldap"
-
-IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +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; 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_geoip? ( dev-libs/geoip )
- 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? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
- nginx_modules_http_auth_pam? ( virtual/pam )
- nginx_modules_http_metrics? ( dev-libs/yajl:= )
- nginx_modules_http_dav_ext? ( dev-libs/expat )
- 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?] )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nginx )
- !www-servers/nginx:mainline"
-DEPEND="${CDEPEND}
- arm? ( dev-libs/libatomic_ops )
- libatomic? ( dev-libs/libatomic_ops )"
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- nginx_modules_http_lua? ( nginx_modules_http_rewrite )
- nginx_modules_http_naxsi? ( pcre )
- nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
- 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
-}
-
-src_prepare() {
- eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
-
- if use nginx_modules_http_upstream_check; then
- eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
- fi
-
- if use nginx_modules_http_lua; then
- sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || 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
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- configure || die
- fi
- ./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"
- fi
-
- cd "${S}" || die
-
- 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 ipv6 && myconf+=( --with-ipv6 )
- 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
- if use luajit; then
- export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
- export LUAJIT_INC=$(pkg-config --variable includedir luajit)
- else
- export LUA_LIB=$(pkg-config --variable libdir lua)
- export LUA_INC=$(pkg-config --variable includedir lua)
- fi
- 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 http || use http-cache || use http2; 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; do
- if use nginx_modules_stream_${mod}; then
- stream_enabled=1
- else
- # Treat stream upstream slightly differently
- if ! use nginx_modules_stream_upstream; then
- myconf+=( --without-stream_upstream_hash_module )
- myconf+=( --without-stream_upstream_least_conn_module )
- myconf+=( --without-stream_upstream_zone_module )
- else
- myconf+=( --without-stream_${mod}_module )
- fi
- fi
- done
-
- 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 CC
-
- if ! use prefix; then
- myconf+=( --user=${PN}" "--group=${PN} )
- 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" \
- --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 \
- "${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-r3 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 "${D}"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 /var/log/nginx ${keepdir_list}
- fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/nginx.logrotate-r1 nginx
-
- 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}"/{Changes,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
- 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.TXT,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 "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 && use http2; then
- ewarn "Lua 3rd party module author warns against using ${P} with"
- ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
- fi
-
- # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
- # existing installations
- local fix_perms=0
-
- for rv in ${REPLACING_VERSIONS} ; do
- version_compare ${rv} 1.4.1-r2
- [[ $? -eq 1 ]] && fix_perms=1
- done
-
- if [[ $fix_perms -eq 1 ]] ; then
- ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
- ewarn "directories the world-readable bit removed (if set):"
- ewarn " ${EPREFIX}/var/log/nginx"
- ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
- 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 ${NGINX_HOME_TMP}"
- chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
- fi
-
- # If the nginx user can't change into or read the dir, display a warning.
- # If su is not available we display the warning nevertheless since we can't check properly
- su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
- if [ $? -ne 0 ] ; then
- ewarn "Please make sure that the nginx user or group has at least"
- ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
- ewarn "Otherwise you end up with empty log files after a logrotate."
- fi
-}
diff --git a/www-servers/nginx/nginx-1.10.2-r1.ebuild b/www-servers/nginx/nginx-1.10.2-r1.ebuild
deleted file mode 100644
index 8690da9c9eb4..000000000000
--- a/www-servers/nginx/nginx-1.10.2-r1.ebuild
+++ /dev/null
@@ -1,796 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# 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.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
-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}"
-
-# 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.31"
-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.1"
-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.6"
-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}"
-
-# 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.1"
-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="0.3.0-10-gf3bdb7b"
-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/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
-HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5"
-
-# 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}"
-
-# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
-HTTP_NAXSI_MODULE_PV="0.55.1"
-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.1.10"
-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="0.0.3"
-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.60"
-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.1"
-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.2"
-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.17"
-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="49a8b4d28fc4a518563c82e0b52821e5f37db1fc"
-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}"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
-
-DESCRIPTION="Robust, small and high performance http and reverse proxy server"
-HOMEPAGE="http://nginx.org"
-SRC_URI="http://nginx.org/download/${P}.tar.gz
- ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
- nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
- nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
- nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
- nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
- nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
- nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
- nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
- nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
- nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
- nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
- rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
- nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
- nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
- nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
- nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
- nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_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="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
- fastcgi geo gzip limit_req limit_conn map memcached proxy referer
- rewrite scgi ssi split_clients upstream_ip_hash 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="access limit_conn upstream"
-NGINX_MODULES_MAIL="imap pop3 smtp"
-NGINX_MODULES_3RD="
- http_upload_progress
- http_headers_more
- http_cache_purge
- http_slowfs_cache
- http_fancyindex
- http_lua
- http_auth_pam
- http_upstream_check
- http_metrics
- http_naxsi
- http_dav_ext
- http_echo
- http_security
- http_push_stream
- http_sticky
- http_mogilefs
- http_memc
- http_auth_ldap"
-
-IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +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; 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_geoip? ( dev-libs/geoip )
- 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? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
- nginx_modules_http_auth_pam? ( virtual/pam )
- nginx_modules_http_metrics? ( dev-libs/yajl:= )
- nginx_modules_http_dav_ext? ( dev-libs/expat )
- 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?] )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nginx )
- !www-servers/nginx:mainline"
-DEPEND="${CDEPEND}
- nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
- arm? ( dev-libs/libatomic_ops )
- libatomic? ( dev-libs/libatomic_ops )"
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- nginx_modules_http_lua? ( nginx_modules_http_rewrite )
- nginx_modules_http_naxsi? ( pcre )
- nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
- 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
-}
-
-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_upstream_check; then
- eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
- fi
-
- if use nginx_modules_http_lua; then
- sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
- fi
-
- if use nginx_modules_http_security; then
- cd "${HTTP_SECURITY_MODULE_WD}" || die
-
- eapply "${FILESDIR}"/http_security-pr_1158.patch
-
- eautoreconf
-
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- 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 ipv6 && myconf+=( --with-ipv6 )
- 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
- if use luajit; then
- export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
- export LUAJIT_INC=$(pkg-config --variable includedir luajit)
- else
- export LUA_LIB=$(pkg-config --variable libdir lua)
- export LUA_INC=$(pkg-config --variable includedir lua)
- fi
- 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 http || use http-cache || use http2; 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; do
- if use nginx_modules_stream_${mod}; then
- stream_enabled=1
- else
- # Treat stream upstream slightly differently
- if ! use nginx_modules_stream_upstream; then
- myconf+=( --without-stream_upstream_hash_module )
- myconf+=( --without-stream_upstream_least_conn_module )
- myconf+=( --without-stream_upstream_zone_module )
- else
- myconf+=( --without-stream_${mod}_module )
- fi
- fi
- done
-
- 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 CC
-
- if ! use prefix; then
- myconf+=( --user=${PN} )
- myconf+=( --group=${PN} )
- 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" \
- --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 \
- "${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-r3 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 "${D}"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 /var/log/nginx ${keepdir_list}
- fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/nginx.logrotate-r1 nginx
-
- 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
- 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.TXT,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 "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 && use http2; then
- ewarn "Lua 3rd party module author warns against using ${P} with"
- ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
- fi
-
- # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
- # existing installations
- local fix_perms=0
-
- for rv in ${REPLACING_VERSIONS}; do
- version_compare ${rv} 1.4.1-r2
- [[ $? -eq 1 ]] && fix_perms=1
- done
-
- if [[ $fix_perms -eq 1 ]] ; then
- ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
- ewarn "directories the world-readable bit removed (if set):"
- ewarn " ${EPREFIX}/var/log/nginx"
- ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
- 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 ${NGINX_HOME_TMP}"
- chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
- fi
-
- # If the nginx user can't change into or read the dir, display a warning.
- # If su is not available we display the warning nevertheless since we can't check properly
- su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
- if [ $? -ne 0 ] ; then
- ewarn "Please make sure that the nginx user or group has at least"
- ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
- ewarn "Otherwise you end up with empty log files after a logrotate."
- fi
-
- # HTTPoxy mitigation
- ewarn ""
- ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
- ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
- ewarn "parameter to an empty string per default when you are sourcing the default"
- ewarn "'fastcgi_params' or 'fastcgi.conf' 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 'fastcgi_params' and or 'fastcgi.conf'."
-}
diff --git a/www-servers/nginx/nginx-1.10.2-r2.ebuild b/www-servers/nginx/nginx-1.10.2-r2.ebuild
deleted file mode 100644
index c71ba25c7408..000000000000
--- a/www-servers/nginx/nginx-1.10.2-r2.ebuild
+++ /dev/null
@@ -1,802 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# 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.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
-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}"
-
-# 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.32"
-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.1"
-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.7"
-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}"
-
-# 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.1"
-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="0.3.0-10-gf3bdb7b"
-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/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
-HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5"
-
-# 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}"
-
-# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
-HTTP_NAXSI_MODULE_PV="0.55.1"
-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.1.10"
-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="0.0.3"
-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.60"
-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.1"
-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.2"
-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.17"
-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="49a8b4d28fc4a518563c82e0b52821e5f37db1fc"
-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}"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
-
-DESCRIPTION="Robust, small and high performance http and reverse proxy server"
-HOMEPAGE="http://nginx.org"
-SRC_URI="http://nginx.org/download/${P}.tar.gz
- ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
- nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
- nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
- nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
- nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
- nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
- nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
- nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
- nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
- nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
- nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
- rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
- nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
- nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
- nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
- nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
- nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_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="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
- fastcgi geo gzip limit_req limit_conn map memcached proxy referer
- rewrite scgi ssi split_clients upstream_ip_hash 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="access limit_conn upstream"
-NGINX_MODULES_MAIL="imap pop3 smtp"
-NGINX_MODULES_3RD="
- http_upload_progress
- http_headers_more
- http_cache_purge
- http_slowfs_cache
- http_fancyindex
- http_lua
- http_auth_pam
- http_upstream_check
- http_metrics
- http_naxsi
- http_dav_ext
- http_echo
- http_security
- http_push_stream
- http_sticky
- http_mogilefs
- http_memc
- http_auth_ldap"
-
-IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +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; 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_geoip? ( dev-libs/geoip )
- 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? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
- nginx_modules_http_auth_pam? ( virtual/pam )
- nginx_modules_http_metrics? ( dev-libs/yajl:= )
- nginx_modules_http_dav_ext? ( dev-libs/expat )
- 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?] )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nginx )
- !www-servers/nginx:mainline"
-DEPEND="${CDEPEND}
- nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
- arm? ( dev-libs/libatomic_ops )
- libatomic? ( dev-libs/libatomic_ops )"
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- nginx_modules_http_lua? ( nginx_modules_http_rewrite )
- nginx_modules_http_naxsi? ( pcre )
- nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
- 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
-}
-
-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_upstream_check; then
- eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
- fi
-
- if use nginx_modules_http_lua; then
- sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
- fi
-
- if use nginx_modules_http_security; then
- cd "${HTTP_SECURITY_MODULE_WD}" || die
-
- eapply "${FILESDIR}"/http_security-pr_1158.patch
-
- eautoreconf
-
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- 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
-
- if use nginx_modules_http_memc; then
- cd "${HTTP_MEMC_MODULE_WD}" || die
- eapply "${FILESDIR}"/http_memc-0.17-issue_26.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 ipv6 && myconf+=( --with-ipv6 )
- 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
- if use luajit; then
- export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
- export LUAJIT_INC=$(pkg-config --variable includedir luajit)
- else
- export LUA_LIB=$(pkg-config --variable libdir lua)
- export LUA_INC=$(pkg-config --variable includedir lua)
- fi
- 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 http || use http-cache || use http2; 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; do
- if use nginx_modules_stream_${mod}; then
- stream_enabled=1
- else
- # Treat stream upstream slightly differently
- if ! use nginx_modules_stream_upstream; then
- myconf+=( --without-stream_upstream_hash_module )
- myconf+=( --without-stream_upstream_least_conn_module )
- myconf+=( --without-stream_upstream_zone_module )
- else
- myconf+=( --without-stream_${mod}_module )
- fi
- fi
- done
-
- 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 CC
-
- if ! use prefix; then
- myconf+=( --user=${PN} )
- myconf+=( --group=${PN} )
- 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" \
- --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 \
- "${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-r3 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 "${D}"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 /var/log/nginx ${keepdir_list}
- fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/nginx.logrotate-r1 nginx
-
- 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
- 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.TXT,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 "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 && use http2; then
- ewarn "Lua 3rd party module author warns against using ${P} with"
- ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
- fi
-
- # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
- # existing installations
- local fix_perms=0
-
- for rv in ${REPLACING_VERSIONS}; do
- version_compare ${rv} 1.4.1-r2
- [[ $? -eq 1 ]] && fix_perms=1
- done
-
- if [[ $fix_perms -eq 1 ]] ; then
- ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
- ewarn "directories the world-readable bit removed (if set):"
- ewarn " ${EPREFIX}/var/log/nginx"
- ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
- 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 ${NGINX_HOME_TMP}"
- chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
- fi
-
- # If the nginx user can't change into or read the dir, display a warning.
- # If su is not available we display the warning nevertheless since we can't check properly
- su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
- if [ $? -ne 0 ] ; then
- ewarn "Please make sure that the nginx user or group has at least"
- ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
- ewarn "Otherwise you end up with empty log files after a logrotate."
- fi
-
- # HTTPoxy mitigation
- ewarn ""
- ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
- ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
- ewarn "parameter to an empty string per default when you are sourcing the default"
- ewarn "'fastcgi_params' or 'fastcgi.conf' 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 'fastcgi_params' and or 'fastcgi.conf'."
-}
diff --git a/www-servers/nginx/nginx-1.11.5-r1.ebuild b/www-servers/nginx/nginx-1.11.5-r1.ebuild
deleted file mode 100644
index 5aae3ae8fd0b..000000000000
--- a/www-servers/nginx/nginx-1.11.5-r1.ebuild
+++ /dev/null
@@ -1,809 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# 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.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
-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}"
-
-# 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.31"
-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.1"
-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.6"
-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}"
-
-# 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.1"
-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="0.3.0-10-gf3bdb7b"
-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/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
-HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5"
-
-# 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}"
-
-# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
-HTTP_NAXSI_MODULE_PV="0.55.1"
-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.1.10"
-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="0.0.3"
-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.60"
-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.1"
-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.2"
-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.17"
-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="49a8b4d28fc4a518563c82e0b52821e5f37db1fc"
-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}"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
-
-DESCRIPTION="Robust, small and high performance http and reverse proxy server"
-HOMEPAGE="http://nginx.org"
-SRC_URI="http://nginx.org/download/${P}.tar.gz
- ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
- nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
- nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
- nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
- nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
- nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
- nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
- nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
- nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
- nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
- nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
- rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
- nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
- nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
- nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
- nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
- nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_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 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
- fastcgi geo gzip limit_req limit_conn map memcached 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_upload_progress
- http_headers_more
- http_cache_purge
- http_slowfs_cache
- http_fancyindex
- http_lua
- http_auth_pam
- http_upstream_check
- http_metrics
- http_naxsi
- http_dav_ext
- http_echo
- http_security
- http_push_stream
- http_sticky
- http_mogilefs
- http_memc
- http_auth_ldap"
-
-IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +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_geoip? ( dev-libs/geoip )
- 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? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
- nginx_modules_http_auth_pam? ( virtual/pam )
- nginx_modules_http_metrics? ( dev-libs/yajl:= )
- nginx_modules_http_dav_ext? ( dev-libs/expat )
- 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?] )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nginx )
- !www-servers/nginx:0"
-DEPEND="${CDEPEND}
- nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
- arm? ( dev-libs/libatomic_ops )
- libatomic? ( dev-libs/libatomic_ops )"
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- nginx_modules_http_lua? ( nginx_modules_http_rewrite )
- nginx_modules_http_naxsi? ( pcre )
- nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
- 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
-}
-
-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_upstream_check; then
- #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch
- eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch
- fi
-
- if use nginx_modules_http_lua; then
- sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
- fi
-
- if use nginx_modules_http_security; then
- cd "${HTTP_SECURITY_MODULE_WD}" || die
-
- eapply "${FILESDIR}"/http_security-pr_1158.patch
-
- eautoreconf
-
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- 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
- if use luajit; then
- export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
- export LUAJIT_INC=$(pkg-config --variable includedir luajit)
- else
- export LUA_LIB=$(pkg-config --variable libdir lua)
- export LUA_INC=$(pkg-config --variable includedir lua)
- fi
- 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 http || use http-cache || use http2; 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 [ $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 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
-
- ./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-r3 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 "${D}"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 /var/log/nginx ${keepdir_list}
- fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/nginx.logrotate-r1 nginx
-
- 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
- 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.TXT,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 "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 && use http2; then
- ewarn "Lua 3rd party module author warns against using ${P} with"
- ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
- fi
-
- # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
- # existing installations
- local fix_perms=0
-
- for rv in ${REPLACING_VERSIONS}; do
- version_compare ${rv} 1.4.1-r2
- [[ $? -eq 1 ]] && fix_perms=1
- done
-
- if [[ $fix_perms -eq 1 ]] ; then
- ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
- ewarn "directories the world-readable bit removed (if set):"
- ewarn " ${EPREFIX}/var/log/nginx"
- ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
- 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 ${NGINX_HOME_TMP}"
- chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
- fi
-
- # If the nginx user can't change into or read the dir, display a warning.
- # If su is not available we display the warning nevertheless since we can't check properly
- su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
- if [ $? -ne 0 ] ; then
- ewarn "Please make sure that the nginx user or group has at least"
- ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
- ewarn "Otherwise you end up with empty log files after a logrotate."
- fi
-
- # HTTPoxy mitigation
- ewarn ""
- ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
- ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
- ewarn "parameter to an empty string per default when you are sourcing the default"
- ewarn "'fastcgi_params' or 'fastcgi.conf' 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 'fastcgi_params' and or 'fastcgi.conf'."
-}
diff --git a/www-servers/nginx/nginx-1.11.6.ebuild b/www-servers/nginx/nginx-1.11.6.ebuild
deleted file mode 100644
index fe14c2a48813..000000000000
--- a/www-servers/nginx/nginx-1.11.6.ebuild
+++ /dev/null
@@ -1,815 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# 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.0"
-DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
-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}"
-
-# 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.32"
-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.1"
-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.7"
-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}"
-
-# 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.1"
-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="0.3.0-10-gf3bdb7b"
-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/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
-HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5"
-
-# 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}"
-
-# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
-HTTP_NAXSI_MODULE_PV="0.55.1"
-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.1.10"
-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="0.0.3"
-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.60"
-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.1"
-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.2"
-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.17"
-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="49a8b4d28fc4a518563c82e0b52821e5f37db1fc"
-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}"
-
-# We handle deps below ourselves
-SSL_DEPS_SKIP=1
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
-
-DESCRIPTION="Robust, small and high performance http and reverse proxy server"
-HOMEPAGE="http://nginx.org"
-SRC_URI="http://nginx.org/download/${P}.tar.gz
- ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
- nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
- nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
- nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
- nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
- nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
- nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
- nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
- nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
- nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
- nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
- rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
- nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
- nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
- nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
- nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
- nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_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 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
- fastcgi geo gzip limit_req limit_conn map memcached 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_upload_progress
- http_headers_more
- http_cache_purge
- http_slowfs_cache
- http_fancyindex
- http_lua
- http_auth_pam
- http_upstream_check
- http_metrics
- http_naxsi
- http_dav_ext
- http_echo
- http_security
- http_push_stream
- http_sticky
- http_mogilefs
- http_memc
- http_auth_ldap"
-
-IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +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_geoip? ( dev-libs/geoip )
- 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? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
- nginx_modules_http_auth_pam? ( virtual/pam )
- nginx_modules_http_metrics? ( dev-libs/yajl:= )
- nginx_modules_http_dav_ext? ( dev-libs/expat )
- 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?] )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nginx )
- !www-servers/nginx:0"
-DEPEND="${CDEPEND}
- nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
- arm? ( dev-libs/libatomic_ops )
- libatomic? ( dev-libs/libatomic_ops )"
-PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
-
-REQUIRED_USE="pcre-jit? ( pcre )
- nginx_modules_http_lua? ( nginx_modules_http_rewrite )
- nginx_modules_http_naxsi? ( pcre )
- nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
- 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
-}
-
-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_upstream_check; then
- #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch
- eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch
- fi
-
- if use nginx_modules_http_lua; then
- sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
- fi
-
- if use nginx_modules_http_security; then
- cd "${HTTP_SECURITY_MODULE_WD}" || die
-
- eapply "${FILESDIR}"/http_security-pr_1158.patch
-
- eautoreconf
-
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- 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
-
- if use nginx_modules_http_memc; then
- cd "${HTTP_MEMC_MODULE_WD}" || die
- eapply "${FILESDIR}"/http_memc-0.17-issue_26.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
- if use luajit; then
- export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
- export LUAJIT_INC=$(pkg-config --variable includedir luajit)
- else
- export LUA_LIB=$(pkg-config --variable libdir lua)
- export LUA_INC=$(pkg-config --variable includedir lua)
- fi
- 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 http || use http-cache || use http2; 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 [ $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 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
-
- ./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-r3 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 "${D}"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 /var/log/nginx ${keepdir_list}
- fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/nginx.logrotate-r1 nginx
-
- 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
- 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.TXT,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 "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 && use http2; then
- ewarn "Lua 3rd party module author warns against using ${P} with"
- ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
- fi
-
- # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
- # existing installations
- local fix_perms=0
-
- for rv in ${REPLACING_VERSIONS}; do
- version_compare ${rv} 1.4.1-r2
- [[ $? -eq 1 ]] && fix_perms=1
- done
-
- if [[ $fix_perms -eq 1 ]] ; then
- ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
- ewarn "directories the world-readable bit removed (if set):"
- ewarn " ${EPREFIX}/var/log/nginx"
- ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
- 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 ${NGINX_HOME_TMP}"
- chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
- fi
-
- # If the nginx user can't change into or read the dir, display a warning.
- # If su is not available we display the warning nevertheless since we can't check properly
- su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
- if [ $? -ne 0 ] ; then
- ewarn "Please make sure that the nginx user or group has at least"
- ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
- ewarn "Otherwise you end up with empty log files after a logrotate."
- fi
-
- # HTTPoxy mitigation
- ewarn ""
- ewarn "This nginx installation comes with a mitigation for the HTTPoxy"
- ewarn "vulnerability for FastCGI applications by setting the HTTP_PROXY FastCGI"
- ewarn "parameter to an empty string per default when you are sourcing the default"
- ewarn "'fastcgi_params' or 'fastcgi.conf' 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 'fastcgi_params' and or 'fastcgi.conf'."
-}