diff options
Diffstat (limited to 'www-servers')
26 files changed, 608 insertions, 2240 deletions
diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz Binary files differindex b983d0bf280f..6261814d5aa6 100644 --- a/www-servers/Manifest.gz +++ b/www-servers/Manifest.gz diff --git a/www-servers/apache/Manifest b/www-servers/apache/Manifest index d42eb1794729..c071e92b6048 100644 --- a/www-servers/apache/Manifest +++ b/www-servers/apache/Manifest @@ -1,18 +1,19 @@ AUX 41_mod_http2.conf 189 BLAKE2B 70f006ead657b250bb4c30a332484baf698541d44d922453bae6133e2458a7009035156f47c1dbba42bd6830ab5bef8c56d151821b0b56e9b41ef9b3db885411 SHA512 3d56a24ea98bc3188e5d6f8e2e0148e4b718e04f23452e77750bca984c44fc7c3acd4521a945b4c415284d0a5dac0f7e846bb60daf70fe61ce2632e8fa201ed6 AUX apache-2.4.33-libressl-compatibility.patch 4026 BLAKE2B 6220ac8de57df3146b51d1fc23cbeae1f5e9a2db5e2dd0e5ac16c40939b1396b658de97e6ec4fa12b1932deb3e13147f57446ae8e89f2da10e4e233833bf1152 SHA512 582a3f8b9839e4f4d9d368634b8d499f73d9f06ce171061435aa82331d93d32819f69d887115d07b88b216628bcdcee583df8cf6d27cde815711adc355b330a7 +AUX apache-2.4.34-suexec_parallel_install.patch 578 BLAKE2B f0d89b8f2d29017d653db1cf562a476db6e841d132588b895c48db35fedc1a3a5c21bd4f0d3fc877138d05001802353411cb608fa4daa4c8cc2d8cd1fe14f6ca SHA512 8e07c444eb0e1130bdd73540da7bd2ea4e9d261f4d3700e8183cd49ec309f667a93aeea9afb70a83e8f1e4d92e982b45ad29ac2c00c2760271129a4dfdc0381b AUX apache.conf 55 BLAKE2B 05ab58ac12e51c7aa548a71a2da43bbf80e53ef8ebe7d143f698b118621f2af1498a1362e7f30b82dc12a96485652cb0c34248c290f6a1aab6a3f378d9843c2a SHA512 3a53beb7a283d17c14383f16ad14c0602681ac1b193cce8f5aca50ae9d9af3a71054ce4a9ab11cbcb72fe913459e1b306fd54660154e66afe10272f8c0f149f3 AUX apache2.2-hardened.service 970 BLAKE2B 77bf52cd0e5793aa81ad2b16267c1339e10fc4875704add053fd9ec67db60d2e175cb7a271c8d36b5e675a9cddd431062a6c31730510a921357b472383b502e4 SHA512 c206e7103d592dcf4f2d62979a20f7ab3cc7ce357ffe3c06ae8137064c812b9727e01a53fd602a0a55a64ed609664061de680ff42329381db787e2dae9310c48 AUX apache2.2.service 716 BLAKE2B 0006b5f5eee85bf4bae7b1b49944cedb057df974b7ed6e74cee21eed109846d91537c997241554ee4ff7b8d0534dcc54fc435f6a1e9d1f07817091f93f986500 SHA512 5f736c803772077598248bbb41f76dff396dfd2f11a60d1ba929a619275efb8c1b4c0dab78cbcdf83b9ec94db67b958b3333b01f67d71eb3b2e07dba4bca2a7c DIST gentoo-apache-2.2.34-20170918.tar.bz2 64390 BLAKE2B d3f6d85192706d7c49a38cc36e816b3ae531f8c0d42111c33ec32ed39900d36d8a2a85a5d1b5afca22331137f04fb24fb424a42a21caa7eb4f6906fa39cb8224 SHA512 10b42e50dcc196f60bcaefe90c382d62a61339dd8a56e899d6afb6998be4acdd376e2c3509791f22a0acf99d06add497e32703b6d523f640306a6db5e05f358a -DIST gentoo-apache-2.4.18-r1-20160303.tar.bz2 24505 BLAKE2B 504deabe5ee9e2b32f44e8ea6cde6f01e7f26643ca05eb0aaf860ab6440d821566f83b5c9aacb2201382f9326974c7dddea4f4289d9da5857762611f424f0395 SHA512 68f0c4de38ae05c45839fe692cbb7de641e331ca133b8aaaf69f3659dec15833cda95e6e074edb3a5b6b6d59b3fc5a4ee3589fff810707fe27417a25cd8a4c4d DIST gentoo-apache-2.4.27-20170918.tar.bz2 24850 BLAKE2B a832c2c7a575e167b72214f325cb85922c49969ea8cc4b5821ce97b1d4028ab56852bf416cb32c99f2b2b356545b6fea0af0fa4f6e13bf001393b468357cbcfb SHA512 c58a9a0b171188ff163f6b45c47f243797d4050cf461ba1a642115350285879005be6496cee2031bffaccc0d8beda4c27de87afa2ded17cbe559f792eb7c00e8 DIST gentoo-apache-2.4.33-r1-20180529.tar.bz2 24856 BLAKE2B 4754336f4302d1e7133481516f2000b91a73cd4c60222a7460dde93aa76b71e503b869f9720760b91c6fc4b4fa87d8feb60d33203669d9d19726b71f953b9eda SHA512 a555da6e9b4fa4bfb761ad42b010abc68ef84f312dbf302385ed8ac52ba0b48c5a33020d5c1300bec303ac22a740108b4abd71fe3887c8486bb25cc7dd79c142 +DIST gentoo-apache-2.4.34-20180716.tar.bz2 24773 BLAKE2B 6ff3b711e16a0156f8c5da4c5ee830a6e3d55b1f29c44a81be26decf6611e2680c84ec7779372bc0de775f3aff90fdaec48f5bc7253c8c9317c1308b60bf10e3 SHA512 4b96c2c7cad0aeef070584b64396360acb2ec24139a5af4755fc36b1f3cd2b82b213ebbfc45035f61c49b59ba40870930227b42e0b60042fd1147f34ba5df574 DIST httpd-2.2.34.tar.bz2 5779739 BLAKE2B 8cdd41fb5d1880da4a1cfef252b4682f613b938594057ea4c9665d3881a50b298fb7339c1ceb3dafc215aa927048f99d500f2d29c125016d5766954be9b632b4 SHA512 e6dac5865a48533c025fe17523ee74d68c3a23f9512c9441b78a140e33cfb6835573eb049b0ad424eb5c5ca78a1915778c54e8a409da95fbdd3890cb99e08240 DIST httpd-2.4.27.tar.bz2 6527394 BLAKE2B 50a650eb2edd121dac860ff555273290010d7e85bf4d5fbe3683f82e1928dde99ebfabc42186436f5052a66555a73d8b797b114c76c123faa31b9f51575d0bbb SHA512 7e7e8070715b74cb6890096a74e194f4c6a49c14bda685b1ad832e84312f1ac4316ea03a430e679502bfd8e1853aefa544ee002a20d0f7e994b9a590c74bc42c -DIST httpd-2.4.29.tar.bz2 6567926 BLAKE2B 01a83212941abad548f73fc144f9731ff51e0ed8f975e76cb994247601f7c2f89a3f862e011638afb77988eda0ef2b543634fb6bc45b583e9bdba2c30e565731 SHA512 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a DIST httpd-2.4.33.tar.bz2 6934765 BLAKE2B 4ff266b85358e3100c8064c84c89db0235e6f46bb4b308e6b3bf642a9c0815eb6a731ee12e3d8ea2bf31a5d5e6621152452f1e8a9625755689f552f2473b1955 SHA512 e74b2b3346d67be45a8bc8a7cbb8eabf5c403a5cfe5797a976f94a539529843fbcdf03b9ca0548816b2cf37f4ce0eb301f8d5af25b1270fdf8dd9f5bf0585269 +DIST httpd-2.4.34.tar.bz2 6942969 BLAKE2B 02ecb9980f48bef7ac915077598560353e0682001bdaa99410b7faad459c4581f8d0878b4840e38e570b1872d549d58743260cb3030c145ae93bef97fc692cc4 SHA512 2bc09213f08a4722e305929fbac5f5060c7a8444704494894bb9b61f17e4d20bb6e3d663bb93fc5b2030b04a43fb12373d260cc291422b210b299725aaf3b5c8 EBUILD apache-2.2.34.ebuild 2976 BLAKE2B 8816d1f547ba7e8de670ef0f45cde40748fc5d611e1060f0c76a8b35ce9771a493f89f2277afcd90ac36fc6f4f684be1e19913d2d3a2ecd78e63e9f4f0d97470 SHA512 32b49f813a80f28b50a2170878d3b204c51db243bbd117b60b8aff63627b42d2cb76e87282ad9053ac1513f0faf8489a60edc7dec0c8087f12650a74d3a533b7 EBUILD apache-2.4.27-r1.ebuild 7737 BLAKE2B 6e459c6d091a5d91d1179cde68fa1b34bb4faf04d3c66b8b0a759311e6b03102485fc4758a65437c5c9bd12f63e3afdd50730c196f3e5785c3c6aa25fb2cf2c5 SHA512 bd2df8d64f22fd28af9e2225492de2d3dc2d8172220f14f495841fec587aeb39c02d4d7021d4f96430f9821922baa84a78a7b8470f56d5c5305bd124d763afd2 -EBUILD apache-2.4.29-r1.ebuild 7878 BLAKE2B 3798d1ac5cc708adef4561d647cfb14cccdf83485c4701e42f4498c556dd6004d8176acb1d46c4b0088fa0b44e421577119dd88f982a71489260465c86423743 SHA512 abc125622dd7b362819639893b463db80a960390b2ab16fc859506f22026094a540ddc646df50d99a636708c944db982a0594bc6c1d8806bc2e983a29ca8fa84 EBUILD apache-2.4.33-r1.ebuild 8285 BLAKE2B 380d88d720559b28dc0d3b999e1ac233fb8da49f07bb2bd91f8f4214b1012da6428b44d9324b42c1ee0c52280bd2171e0a04b9eda3b57ad1f913a3a1f016811f SHA512 9ede39ce930d909ed942dfa22462f3c50e4b83eb1a23646a2f702dc4081233ac6944ad135f813d0a94563267e29730ba73ca6a29a834a8f269379f559f49683d -MISC metadata.xml 3682 BLAKE2B aa3bc5eae781b31eb423f51fcb7d56dbcd228bb0b0514863e11271a5256e916705907bf4c60fdb64e98f3fede628c2f49f83c10f64bbc778b4ab350944f00812 SHA512 4b4b07871cce8b85654659627d420456527289c3d5d6b64a6551d7bc9332d362004ad97009b0144e1d9bd63f0909a6de0100d553f51934d6695c048914b25c8e +EBUILD apache-2.4.34-r1.ebuild 8162 BLAKE2B 1cd1ca3041c0babb4cebf4f7dbdcadae27be95b4eb94c7d08795ba40d39fa4e37cf41c84cc7c9105439d6dfcdd8d841ac1370c560bef554df3f9d20f07fecf9b SHA512 71f8cd66955b8f2305144647cf2ddd4f2722adf3805a3b394082e95fd3ebd13c8eec4aa388b4d4a7f385598e0a0aac52f0fe11e4cc4c453d8749f26c6e617833 +MISC metadata.xml 3852 BLAKE2B 66dc78cb1191b40322dde247b302d5987c10348a0d3b639b3479563b7584df67806e3774d46bf967b5115209b05bdd6e29c1a199b5ff250fd3e140d299e36a8c SHA512 7c3f98caa25850b8321ce7809da866a712f0b7c787b5cfad29ed9a3129bf0c685e57f16b239566bd4c377fde724f20bf49d83881fa805168efde28484d1ddf7f diff --git a/www-servers/apache/apache-2.4.29-r1.ebuild b/www-servers/apache/apache-2.4.34-r1.ebuild index 1d97a24d6da8..cf545f229ee8 100644 --- a/www-servers/apache/apache-2.4.29-r1.ebuild +++ b/www-servers/apache/apache-2.4.34-r1.ebuild @@ -4,9 +4,9 @@ EAPI=6 # latest gentoo apache files -GENTOO_PATCHSTAMP="20160303" +GENTOO_PATCHSTAMP="20180716" GENTOO_DEVELOPER="polynomial-c" -GENTOO_PATCHNAME="gentoo-apache-2.4.18-r1" +GENTOO_PATCHNAME="gentoo-apache-2.4.34" # IUSE/USE_EXPAND magic IUSE_MPMS_FORK="prefork" @@ -36,7 +36,7 @@ authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex brotli cache cache_disk cache_socache cern_meta charset_lite cgi cgid dav dav_fs dav_lock dbd deflate dir dumpio env expires ext_filter file_cache filter headers http2 ident imagemap include info lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness -lbmethod_heartbeat log_config log_forensic logio macro mime mime_magic negotiation +lbmethod_heartbeat log_config log_forensic logio macro md mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_html proxy_http proxy_scgi proxy_fcgi proxy_wstunnel rewrite ratelimit remoteip reqtimeout setenvif slotmem_shm speling socache_shmcb status substitute unique_id userdir usertrack @@ -65,6 +65,7 @@ MODULE_DEPENDS=" logio:log_config cache_disk:cache cache_socache:cache + md:watchdog mime_magic:mime proxy_ajp:proxy proxy_balancer:proxy @@ -94,6 +95,7 @@ MODULE_DEFINES=" http2:HTTP2 info:INFO ldap:LDAP + md:SSL proxy:PROXY proxy_ajp:PROXY proxy_balancer:PROXY @@ -120,7 +122,7 @@ MODULE_CRITICAL=" mime unixd " -inherit eutils apache-2 systemd toolchain-funcs +inherit apache-2 systemd toolchain-funcs DESCRIPTION="The Apache Web Server" HOMEPAGE="https://httpd.apache.org/" @@ -128,15 +130,28 @@ HOMEPAGE="https://httpd.apache.org/" # some helper scripts are Apache-1.1, thus both are here LICENSE="Apache-2.0 Apache-1.1" SLOT="2" -KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris" + +# Enable http2 by default (bug #563452) +# FIXME: Move to apache-2.eclass once this has reached stable. +IUSE="${IUSE/apache2_modules_http2/+apache2_modules_http2}" +# New suexec options (since 2.4.34) +IUSE="${IUSE} +suexec-caps suexec-syslog" CDEPEND="apache2_modules_brotli? ( >=app-arch/brotli-0.6.0:= ) - apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 )" + apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 ) + apache2_modules_md? ( >=dev-libs/jansson-2.10 )" -DEPEND+="${CDEPEND}" +DEPEND+="${CDEPEND} + suexec? ( suexec-caps? ( sys-libs/libcap ) )" RDEPEND+="${CDEPEND}" -REQUIRED_USE="apache2_modules_http2? ( ssl )" +REQUIRED_USE="apache2_modules_http2? ( ssl ) + apache2_modules_md? ( ssl )" + +PATCHES=( + "${FILESDIR}/${PN}-2.4.34-suexec_parallel_install.patch" #661358 +) pkg_setup() { # dependend critical modules which are not allowed in global scope due @@ -169,26 +184,22 @@ src_compile() { src_install() { apache-2_src_install - for i in /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm}; do - rm "${ED}"/$i || die "Failed to prune apache-tools bits" - done - for i in /usr/share/man/man8/{rotatelogs.8,htcacheclean.8}; do - rm "${ED}"/$i || die "Failed to prune apache-tools bits" - done - for i in /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1}; do - rm "${ED}"/$i || die "Failed to prune apache-tools bits" - done - for i in /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs}; do - rm "${ED}/"$i || die "Failed to prune apache-tools bits" + local i + local apache_tools_prune_list=( + /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm} + /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs} + /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1} + /usr/share/man/man8/{rotatelogs.8,htcacheclean.8} + ) + for i in ${apache_tools_prune_list[@]} ; do + rm "${ED%/}"/$i || die "Failed to prune apache-tools bits" done # install apxs in /usr/bin (bug #502384) and put a symlink into the # old location until all ebuilds and eclasses have been modified to # use the new location. - local apxs="/usr/bin/apxs" - cp "${S}"/support/apxs "${ED%/}/${apxs}" || die "Failed to install apxs" - ln -s ../bin/apxs "${ED%/}/usr/sbin/apxs" || die - chmod 0755 "${ED%/}${apxs}" || die + dobin support/apxs + dosym ../bin/apxs /usr/sbin/apxs # Note: wait for mod_systemd to be included in some forthcoming release, # Then apache2.4.service can be used and systemd support controlled @@ -201,12 +212,16 @@ src_install() { # Install http2 module config insinto /etc/apache2/modules.d doins "${FILESDIR}"/41_mod_http2.conf + + # Fix path to apache libdir + sed "s|@LIBDIR@|$(get_libdir)|" -i "${ED%/}"/usr/sbin/apache2ctl || die } pkg_postinst() { apache-2_pkg_postinst || die "apache-2_pkg_postinst failed" # warnings that default config might not work out of the box - for mod in $MODULE_CRITICAL; do + local mod cmod + for mod in ${MODULE_CRITICAL} ; do if ! use "apache2_modules_${mod}"; then echo ewarn "Warning: Critical module not installed!" @@ -214,7 +229,7 @@ pkg_postinst() { ewarn "are highly recomended but might not be in the base profile yet." ewarn "Default config for ssl needs module 'socache_shmcb'." ewarn "Enabling the following flags is highly recommended:" - for cmod in $MODULE_CRITICAL; do + for cmod in ${MODULE_CRITICAL} ; do use "apache2_modules_${cmod}" || \ ewarn "+ apache2_modules_${cmod}" done diff --git a/www-servers/apache/files/apache-2.4.34-suexec_parallel_install.patch b/www-servers/apache/files/apache-2.4.34-suexec_parallel_install.patch new file mode 100644 index 000000000000..d5543f7004be --- /dev/null +++ b/www-servers/apache/files/apache-2.4.34-suexec_parallel_install.patch @@ -0,0 +1,19 @@ +https://bugs.gentoo.org/661358 + +--- httpd-2.4.34/Makefile.in ++++ httpd-2.4.34/Makefile.in +@@ -277,12 +277,12 @@ + $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \ + fi + +-install-suexec-setuid: ++install-suexec-setuid: install-suexec-binary + @if test -f $(builddir)/support/suexec; then \ + chmod 4755 $(DESTDIR)$(sbindir)/suexec; \ + fi + +-install-suexec-caps: ++install-suexec-caps: install-suexec-binary + @if test -f $(builddir)/support/suexec; then \ + setcap 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \ + fi diff --git a/www-servers/apache/metadata.xml b/www-servers/apache/metadata.xml index 293e43d3f29a..af77bdc266ca 100644 --- a/www-servers/apache/metadata.xml +++ b/www-servers/apache/metadata.xml @@ -13,6 +13,8 @@ </longdescription> <use> <flag name="suexec">Install suexec with apache</flag> + <flag name="suexec-caps">Install suexec with capabilities instead of SUID</flag> + <flag name="suexec-syslog">Log suexec to syslog instead of to a separate file</flag> <flag name="static">Link in apache2 modules statically rather then plugins</flag> <flag name="apache2_modules_access_compat">Group authorizations based on host (name or IP address). Available as a compatibility module with previous versions.</flag> <flag name="apache2_modules_authn_core">Provides core authentication capabilities common to all authentication providers (functionality provided by authn_alias in previous versions).</flag> diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest index cf7e5bc6662b..0507115684d1 100644 --- a/www-servers/h2o/Manifest +++ b/www-servers/h2o/Manifest @@ -1,11 +1,10 @@ -AUX h2o-2.2-mruby.patch 2532 BLAKE2B dc12356bb1e4685ee88a8a1aae1d70d6555225413649b252840dc5a572fced7f818b8439b8480ec2a1b2bf9a0ddf62670f21ee1b7f42f2b877e711cf3a22048a SHA512 9c3b5d3bb18bba55019a305346211e1784c83c6c21dfb1c086169e49afd423f7be71e0cbc05703199423bc56e892b9e653e9df43e861208033fb7766ab2a59d5 -AUX h2o-2.2.4-libressl.patch 1946 BLAKE2B 6acaf45e7db2faf4fa09aa2214f6389e7f5b421c9bae8ae10dd35569d609839c2d9a7e8ca1c7057b37812d7b444406c86fae496084665e57d0688c76cf095b68 SHA512 63558d53fe52deaa54976fe33346708ed9b3c59588930ef463ae9d9f89747acc66038d3105dec1b72051715ba523323a6cb7c4bdbb445d521f23d9682ca4717f -AUX h2o-2.3-mruby.patch 2993 BLAKE2B 5da06fa53d67a201e468b56aa78136edea305bc79d9d645da5a12ca54a4d633e821312e0bde382ed07229ee173ab02df8bcba592e076a8b39a199a8a7e185393 SHA512 de2e98103cea6337f68d31c8600de37ff5cf8163df824a19d1879c0a60e603773d4e9a42b926b94156ad0743e67ce630e73e9e81e86dc192d51656f595d26790 +AUX h2o-2.2-mruby.patch 2034 BLAKE2B 78ab2c8080c017ae03b33366aed553e8d47581bc04b274adc7a7e18bc79ddb5a95266ce13824a8286d9b52d4432b0895598301bd07aa42b1d7e4cbb4d46d98a9 SHA512 724186190756292ce9589a5aae28fd9ae089e377beccb1a2a6562d3d764777dec820413f31d820f61691a529dbdac0dcb55b2e395e46629b2656496bea9c182a +AUX h2o-2.3-mruby.patch 2726 BLAKE2B 686cfbf806093b579b0641cfb887d7a6835ac2a3ed058d8d3a35d6e41219ab53c8484ad63ea6b2b00957ba5553d8f47318a93c6a2c56ab63895a750cf50b2323 SHA512 077f54f4e4435c64dfe7ba470d1ab42ac4a3cb1411af397e40f57253a0a3732bc7ae5a6f2023d58e15bd2a130a71142d940ffe5a356360d723cf777bdf8dfb9f AUX h2o.conf 350 BLAKE2B 948c90451fd76cb55f3b42eaa9ddc01564b2bd2c46437649fb639d6cee89c5adfac780e533c13793133e6798d847c1c87c631979162af9a1b7c5caebb8963b3b SHA512 b2ba08c3bcd15c3c7631913dc64006870487773f952421aec624f82dcbe836137a2b8357cbd0b8e26626f9c6f108c8aee46beb61e8649fe78fac0e31ef585b6e AUX h2o.initd 845 BLAKE2B f420962962517051c695f00e11a3b6edb899a672d0984db3d68b88545064767e7059cd9b3ec60b7cb70469b403e0927dbaea4e9f7b7a00979b4f036f945585d5 SHA512 9fdfde2857d97937939b1dd591b94f26f77b6fd6061d385c807738be508f1df740acf36c38ca95c22a36f13caed5d537b6fc1f6cceaf1beda8f8f48ef452c177 AUX h2o.logrotate 230 BLAKE2B 44eeaf3b0e60104d4f87c7110815a30f907a6fd676e75a2068fb9cddd8192d3e75729aaeabc89d6430eef7c075b21271918fd65b086de188f7df0c6ceb332141 SHA512 88d36e272c52c5df765d8ebac8f2acca378c8b096af7fa8eda68e1ec5597cba6096286f0ab634f128329148e65980128f0612e90a185de781c5d109653e096dd AUX h2o.service 364 BLAKE2B 9995cde4d79e5998624a2cadfc6ec3e954d4609458cc267628c2fbcb44dccd78277bddc032a784a00445c6b399fafc1ee629920355bf7aa84d26b1010bd103b0 SHA512 475b1e7b616eae335e094451532b0de5aa9cf9abc4999aaa44a9a35c43def4fb060ee5e728409bc33960f8ad3a81e6f549783906ac7ebad5b72cb7422ffb96a2 DIST h2o-2.2.5.tar.gz 16257295 BLAKE2B 3c13796eaf9a0aca29bbff7c35fb36d0b5ef47da91f39f71614a89f2d4fea5b1ebbc8f4e3e50bf37a02a84c0fcd96d5ac0be20c83add274157af966134b2d185 SHA512 24b07140d24fbb7796038aab44f44be5ffabc6f2841954273e2ad9f1a864e5482051dd7abfa6446297a46b6868763114695fa4f123ee3175bdac53b4c1868bc2 -EBUILD h2o-2.2.5.ebuild 2102 BLAKE2B 991f1077b60f0127b846bee2b35e929d99286844ece16a26bcaa4a665537d53d0766850ffaf87f57ae528d70df52f2e09eb1603439a4f6b18fe7b73018626b28 SHA512 26f87505e1f23e1a9da6f55b830cf6a0564c33f331102bcb0e6692e1619baa9ba536a628a3517cd8e21374695d68791c25f2689465a828388f9d3911f2e91f3b -EBUILD h2o-9999.ebuild 2071 BLAKE2B 5c242fe70d411b615fa99a746d5566ade617bece72c5ed8ac84a4b5f3afbcf9f107aba51c4f2a9febdfa5ca99ebf6ae0cb7007204f5a85dc441206b388d98f1a SHA512 42fdc9a672a79bd4e4bb9bd523b041910e550252b2f53cd410503783d5b9b607e51eee13b9b1df58baf36b37cc1533e2d21607339e80c4435490b6f391422351 +EBUILD h2o-2.2.5.ebuild 2133 BLAKE2B 26b07cc8e281fab0d559b3277769f78572486aeaae5fe226cab59721cda70c8c3a7a452ca7ef254098768d4ddc433c74ba2b1010b53a7494aa2f3b441f50b55f SHA512 80ae68c5b04a51a4550eff3d0e25898eee3e643bed54d12e149d1643c75b850fc8505a55a20a979b264ae0d017716d72aa9be47b4aff6967c4413eb3e2fc49cd +EBUILD h2o-9999.ebuild 2102 BLAKE2B a8c2566677bda5a24891f616301fe6384b0a7d96baf8ac073a6b22121abe33dfff124945209acfe03da6561f703092be90ccd06f0c606c8833ca9bd49d7aa146 SHA512 e57abf5cb72bbc96420866cb70721ceebe6114a878d717fc0e0a77fe508fcf03edbe1714b2bc6c63eff0f9f7de5a3604fd6d4f12c0e6e46e8b84ff95c5ba7d2e MISC metadata.xml 610 BLAKE2B ada180731f691d3937d481e71f704b3ad47212114b170420f58e82e4163e4ca388c4f88c1b0760de4fa87e839b5485855f4a23f5fc57f305bd14dcd4b2c54405 SHA512 91c163c3d59c8797d6fac98c20c6bb888cf547e4c6d71090d0556e49b46ec23a44ffc116230621262aaaf0e9cd9aabc1c0b250b7d8e435c42ec01fae5a0d913b diff --git a/www-servers/h2o/files/h2o-2.2-mruby.patch b/www-servers/h2o/files/h2o-2.2-mruby.patch index e542ba8b64db..92e7a8e7f1d7 100644 --- a/www-servers/h2o/files/h2o-2.2-mruby.patch +++ b/www-servers/h2o/files/h2o-2.2-mruby.patch @@ -1,23 +1,26 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -157,6 +157,16 @@ +@@ -157,6 +157,19 @@ SET(WSLAY_LIBRARIES -lwslay) ENDIF (NOT WSLAY_FOUND) +IF (PKG_CONFIG_FOUND) -+ PKG_CHECK_MODULES(ONIG oniguruma) ++ PKG_CHECK_MODULES(ONIG onigmo) ++ IF (NOT ONIG_FOUND) ++ PKG_CHECK_MODULES(ONIG oniguruma) ++ ENDIF (NOT ONIG_FOUND) + IF (ONIG_FOUND) + LINK_DIRECTORIES(${ONIG_LIBRARY_DIRS}) + ENDIF (ONIG_FOUND) +ENDIF (PKG_CONFIG_FOUND) -+IF (NOT ONIG_FOUND AND WITH_RUBY) -+ MESSAGE(FATAL_ERROR "Oniguruma not found") -+ENDIF (NOT ONIG_FOUND AND WITH_RUBY) ++IF (NOT ONIG_FOUND AND WITH_MRUBY) ++ MESSAGE(FATAL_ERROR "Onigmo/Oniguruma not found") ++ENDIF (NOT ONIG_FOUND AND WITH_MRUBY) + IF (ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) LINK_DIRECTORIES(${ZLIB_LIBRARY_DIRS}) -@@ -460,7 +470,7 @@ +@@ -460,7 +473,7 @@ ELSE () SET(MRUBY_TOOLCHAIN "gcc") ENDIF () @@ -26,7 +29,7 @@ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby) LIST(APPEND STANDALONE_SOURCE_FILES lib/handler/mruby.c -@@ -491,7 +501,7 @@ +@@ -491,7 +504,7 @@ # note: the paths need to be determined before libmruby.flags.mak is generated TARGET_LINK_LIBRARIES(h2o "${CMAKE_CURRENT_BINARY_DIR}/mruby/host/lib/libmruby.a" @@ -35,19 +38,6 @@ "m") ADD_DEPENDENCIES(h2o mruby) ENDIF (WITH_MRUBY) ---- a/deps/mruby-onig-regexp/mrbgem.rake -+++ b/deps/mruby-onig-regexp/mrbgem.rake -@@ -101,9 +101,7 @@ - cc.defines += ['HAVE_ONIGMO_H'] - end - -- if spec.respond_to? :search_package and spec.search_package 'onigmo' -- spec.cc.defines += ['HAVE_ONIGMO_H'] -- elsif spec.respond_to? :search_package and spec.search_package 'oniguruma' -+ if spec.respond_to? :search_package and spec.search_package 'oniguruma' - spec.cc.defines += ['HAVE_ONIGURUMA_H'] - elsif build.cc.respond_to? :search_header_path and build.cc.search_header_path 'oniguruma.h' - spec.linker.libraries << 'onig' --- a/misc/mruby_config.rb +++ b/misc/mruby_config.rb @@ -15,13 +15,7 @@ diff --git a/www-servers/h2o/files/h2o-2.2.4-libressl.patch b/www-servers/h2o/files/h2o-2.2.4-libressl.patch deleted file mode 100644 index 3849dd0e2b68..000000000000 --- a/www-servers/h2o/files/h2o-2.2.4-libressl.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- a/include/h2o/openssl_backport.h -+++ b/include/h2o/openssl_backport.h -@@ -25,7 +25,7 @@ - #include <stdlib.h> - - /* backports for OpenSSL 1.0.2 */ --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) - - #define BIO_get_data(bio) ((bio)->ptr) - #define BIO_set_data(bio, p) ((bio)->ptr = (p)) -@@ -57,7 +58,7 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) - #endif - - /* backports for OpenSSL 1.0.1 and LibreSSL */ --#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) - - #define SSL_is_server(ssl) ((ssl)->server) - ---- a/deps/neverbleed/neverbleed.c -+++ b/deps/neverbleed/neverbleed.c -@@ -547,7 +547,7 @@ static int sign_stub(struct expbuf_t *buf) - return 0; - } - --#if !OPENSSL_1_1_API -+#if !OPENSSL_1_1_API && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL) - - static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) - { - ---- a/deps/picotls/lib/openssl.c -+++ b/deps/picotls/lib/openssl.c -@@ -41,13 +41,15 @@ - #include "picotls.h" - #include "picotls/openssl.h" - --#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) --#define OPENSSL_1_0_API 1 -+#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L -+#define OPENSSL_1_1_API 1 -+#elif defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL -+#define OPENSSL_1_1_API 1 - #else --#define OPENSSL_1_0_API 0 -+#define OPENSSL_1_1_API 0 - #endif - --#if OPENSSL_1_0_API -+#if !OPENSSL_1_1_API - - #define EVP_PKEY_up_ref(p) CRYPTO_add(&(p)->references, 1, CRYPTO_LOCK_EVP_PKEY) - #define X509_STORE_up_ref(p) CRYPTO_add(&(p)->references, 1, CRYPTO_LOCK_X509_STORE) diff --git a/www-servers/h2o/files/h2o-2.3-mruby.patch b/www-servers/h2o/files/h2o-2.3-mruby.patch index a0ad25eba279..3db3ebae8806 100644 --- a/www-servers/h2o/files/h2o-2.3-mruby.patch +++ b/www-servers/h2o/files/h2o-2.3-mruby.patch @@ -1,23 +1,26 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -174,6 +174,16 @@ +@@ -174,6 +174,19 @@ SET(WSLAY_LIBRARIES -lwslay) ENDIF (NOT WSLAY_FOUND) +IF (PKG_CONFIG_FOUND) -+ PKG_CHECK_MODULES(ONIG oniguruma) ++ PKG_CHECK_MODULES(ONIG onigmo) ++ IF (NOT ONIG_FOUND) ++ PKG_CHECK_MODULES(ONIG oniguruma) ++ ENDIF (NOT ONIG_FOUND) + IF (ONIG_FOUND) + LINK_DIRECTORIES(${ONIG_LIBRARY_DIRS}) + ENDIF (ONIG_FOUND) +ENDIF (PKG_CONFIG_FOUND) -+IF (NOT ONIG_FOUND AND WITH_RUBY) -+ MESSAGE(FATAL_ERROR "Oniguruma not found") -+ENDIF (NOT ONIG_FOUND AND WITH_RUBY) ++IF (NOT ONIG_FOUND AND WITH_MRUBY) ++ MESSAGE(FATAL_ERROR "Onigmo/Oniguruma not found") ++ENDIF (NOT ONIG_FOUND AND WITH_MRUBY) + IF (ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) LINK_DIRECTORIES(${ZLIB_LIBRARY_DIRS}) -@@ -533,7 +543,7 @@ +@@ -533,7 +546,7 @@ ELSE () SET(MRUBY_TOOLCHAIN "gcc") ENDIF () @@ -26,7 +29,7 @@ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby) LIST(APPEND STANDALONE_SOURCE_FILES lib/handler/mruby.c -@@ -560,7 +570,7 @@ +@@ -560,7 +573,7 @@ # note: the paths need to be determined before libmruby.flags.mak is generated TARGET_LINK_LIBRARIES(h2o "${CMAKE_CURRENT_BINARY_DIR}/mruby/host/lib/libmruby.a" @@ -37,23 +40,17 @@ ENDIF (WITH_MRUBY) --- a/deps/mruby-onig-regexp/mrbgem.rake +++ b/deps/mruby-onig-regexp/mrbgem.rake -@@ -101,15 +101,9 @@ - file "#{dir}/src/mruby_onig_regexp.c" => [:mruby_onig_regexp_with_compile_option, oniguruma_lib] - end +@@ -103,10 +103,8 @@ -- if spec.respond_to? :search_package and spec.search_package 'onigmo' -- spec.cc.defines += ['HAVE_ONIGMO_H'] + if spec.respond_to? :search_package and spec.search_package 'onigmo' + spec.cc.defines += ['HAVE_ONIGMO_H'] - spec.linker.libraries << 'onig' -- elsif spec.respond_to? :search_package and spec.search_package 'oniguruma' -+ if spec.respond_to? :search_package and spec.search_package 'oniguruma' - spec.cc.defines += ['HAVE_ONIGURUMA_H'] - spec.linker.libraries << 'onig' -- elsif build.cc.respond_to? :search_header_path and build.cc.search_header_path 'onigmo.h' -- spec.cc.defines += ['HAVE_ONIGMO_H'] -- spec.linker.libraries << 'onigmo' - elsif build.cc.respond_to? :search_header_path and build.cc.search_header_path 'oniguruma.h' + elsif spec.respond_to? :search_package and spec.search_package 'oniguruma' spec.cc.defines += ['HAVE_ONIGURUMA_H'] - spec.linker.libraries << 'onig' +- spec.linker.libraries << 'onig' + elsif build.cc.respond_to? :search_header_path and build.cc.search_header_path 'onigmo.h' + spec.cc.defines += ['HAVE_ONIGMO_H'] + spec.linker.libraries << 'onigmo' --- a/misc/mruby_config.rb +++ b/misc/mruby_config.rb @@ -15,13 +15,7 @@ diff --git a/www-servers/h2o/h2o-2.2.5.ebuild b/www-servers/h2o/h2o-2.2.5.ebuild index 91c20bba627a..3d4d736c3e88 100644 --- a/www-servers/h2o/h2o-2.2.5.ebuild +++ b/www-servers/h2o/h2o-2.2.5.ebuild @@ -24,7 +24,10 @@ RDEPEND="dev-lang/perl DEPEND="${RDEPEND} mruby? ( ${RUBY_DEPS} - dev-libs/oniguruma + || ( + dev-libs/onigmo + dev-libs/oniguruma + ) sys-devel/bison virtual/pkgconfig )" diff --git a/www-servers/h2o/h2o-9999.ebuild b/www-servers/h2o/h2o-9999.ebuild index e1d9604c4b44..b43017863ba8 100644 --- a/www-servers/h2o/h2o-9999.ebuild +++ b/www-servers/h2o/h2o-9999.ebuild @@ -24,7 +24,10 @@ RDEPEND="dev-lang/perl DEPEND="${RDEPEND} mruby? ( ${RUBY_DEPS} - dev-libs/oniguruma + || ( + dev-libs/onigmo + dev-libs/oniguruma + ) sys-devel/bison virtual/pkgconfig )" diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest index 16074142be90..82c7b27bace7 100644 --- a/www-servers/lighttpd/Manifest +++ b/www-servers/lighttpd/Manifest @@ -13,4 +13,4 @@ DIST lighttpd-1.4.49.tar.xz 710964 BLAKE2B 112ceb36b45f51c7d5526caba27d2b2aa57ec EBUILD lighttpd-1.4.45-r1.ebuild 5944 BLAKE2B 629426653d2552bcf32d9e8f003b847d30c6692e81625eb1d772929bc4353db4995e8a82241ce645ebb9d9ca3be1482a1d789db4d296e90af0ee771548334966 SHA512 33632d1ab6fd7bb019b1fe8613a931b12e21a7ca79ea486e96c55cbd9529f2c551efcd91f6dc48c663b25087d557a765b729a1bfb93ccbf0ec4d32d4933732b6 EBUILD lighttpd-1.4.49.ebuild 6324 BLAKE2B be7447a25ce7653d34b744bd5c21aaa653847591ea06616996c7703c22f50481102edd9f0f7b0e6bff42019832efc99c9345760f2cd8b8e50399eba02f64c0ae SHA512 d25bf67fcaf6c28009d45aedf338f93a9848da443c70b745d6e4aa000b547b0d9b53f80d2a430c8b99742dc4988505537916905276d3cfc583f995b0f3e751b3 EBUILD lighttpd-9999.ebuild 5950 BLAKE2B f32cb4e5ddf22af2b698aaf17fb33f16862d13e28025984d0468e769af84acff9f2981e69526c139d9192964d57b8b95200edcfb756725855481fc31fbbf73be SHA512 50d096574b0f05c207eca9c18b7b70324c923bbbafe7d42c56770cae8eea3793f46e39c1a9be497fd35dba4844c83a8342c38afcfa4aa4c60ea7f0eb72856e69 -MISC metadata.xml 1165 BLAKE2B c30ad1b686464b6fe7a03b8974b5e74a3ce83644b9509d8c22df81a2b4b8894f7499c0923c11fabeb3124bff27393c5b20fae8014d93e19fe0191f365001d9aa SHA512 c4561396821150f7637246e17680e3c1ae7f3522206c731af66885950c1b2c90405b31d1a066b9c017ea003d37decc647a4676802f7684eae9a62e958d74e32d +MISC metadata.xml 1054 BLAKE2B caf21b255e5eb1fc5300edf62d928b933540613492333abd65dc2c0ae89f5a22c18467ff4ab90b2b0582b4f1eff9bad21eeca91bca9c034377280c9ec022b1f9 SHA512 a773d9b8da2f118b148943c4f78662f26aaea5def18abc37ba39bb539fb31449beb04b8e9f1a09ce893ae07aaea2e2fabb42bcba47c5e9100db1f1ef3bf9ea82 diff --git a/www-servers/lighttpd/metadata.xml b/www-servers/lighttpd/metadata.xml index 592c03d4a050..b9965f6b8b9c 100644 --- a/www-servers/lighttpd/metadata.xml +++ b/www-servers/lighttpd/metadata.xml @@ -2,10 +2,6 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>hwoarang@gentoo.org</email> - <name>Markos Chandras</name> - </maintainer> - <maintainer type="person"> <email>zlogene@gentoo.org</email> <name>Mikle Kolyada</name> </maintainer> diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest new file mode 100644 index 000000000000..b6756bb084f9 --- /dev/null +++ b/www-servers/nginx-unit/Manifest @@ -0,0 +1,4 @@ +AUX nginx-unit.initd 291 BLAKE2B a4ce1b0269de3d991bfdf30b6183418d32e2c94d21ca0ab154b9f44521895227057cad1fd2ca72015a4c25c90250cc31a6aa2f637caaa564eee7769a48b4d355 SHA512 89db5f2116d11ff8e741b23e41692585ee7e2446fb6d214666af913a1fec9a2f6d300512cb8d3b6a83795e714d6f17403e22dc12fd9c76b0551c14b71b6fd998 +DIST nginx-unit-1.3.tar.gz 401670 BLAKE2B 34a0ed9631c7061d1c71f8335103b0e266ef6f949afeb8cef283a7b5dd6c9f0a4835f20fdedd091af6950cd0897cb1ab48dea9f475e1b75a2872da7ac0090d10 SHA512 63a47b920bfdae7a7e034d616f520b27b46151a299cf5854373f7f8472043de0ffc98f9d62317c46e637857e0ef24668ded99be6e058315acf25b4e1c7f1ed09 +EBUILD nginx-unit-1.3.ebuild 937 BLAKE2B 09d8c3e3e8e0d0737f94bb1b483479fdce591f3a60a8ac5dab65d94e361e04b6bc1099f6c78432af93469c21c995a0bbde85d916c143ccf92ed0124d3e835913 SHA512 498a05d21d8593c0d640fadabee04245dc7c2c49050c314a1366ae4edd52a268b6a5745aa9d7eecbd0383706cac6c02b7838e0c517206b55b6ddeed849cb9340 +MISC metadata.xml 787 BLAKE2B a88efd7d7a5fe988156edf4775a7d5aca875957d507ae2e95a014b6f1bbbea7c9d66e2081525c3a495bcc88e8541d8d7e3a09bf5426847065c488920c442ed3e SHA512 793dc1852eb308056c81240a596302d647ccf96aae0f2585dc0e68e2cd4dd9444dbb9e65454c640e78377d83a9261dcb343a0082f0cefcfb4f9b5d1259ade15f diff --git a/www-servers/nginx-unit/files/nginx-unit.initd b/www-servers/nginx-unit/files/nginx-unit.initd new file mode 100755 index 000000000000..23720abcc1e1 --- /dev/null +++ b/www-servers/nginx-unit/files/nginx-unit.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/unitd" +pidfile="/run/nginx-unit.pid" + +depend() { + use dns logger netmount +} + +start_pre() { + checkpath -d /var/lib/nginx-unit -o root:root 0770 +} diff --git a/www-servers/nginx-unit/metadata.xml b/www-servers/nginx-unit/metadata.xml new file mode 100644 index 000000000000..7660440b3f51 --- /dev/null +++ b/www-servers/nginx-unit/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@seichter.de</email> + <name>Ralph Seichter</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + NGINX Unit is a dynamic web and application server, designed to run + applications in multiple languages. Unit is lightweight, polyglot, and + dynamically configured via API. The design of the server allows + reconfiguration of specific application parameters as needed by the + engineering or operations. + </longdescription> + <upstream> + <remote-id type="github">nginx/unit</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/nginx-unit/nginx-unit-1.3.ebuild b/www-servers/nginx-unit/nginx-unit-1.3.ebuild new file mode 100644 index 000000000000..da3e472ba88a --- /dev/null +++ b/www-servers/nginx-unit/nginx-unit-1.3.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A dynamic web and application server" +HOMEPAGE="https://unit.nginx.org" +SRC_URI="https://unit.nginx.org/download/unit-${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="perl python" +REQUIRED_USE="|| ( ${IUSE} )" +DEPEND="perl? ( dev-lang/perl:= ) + python? ( dev-lang/python:= )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/unit-${PV}" + +src_configure() { + ./configure \ + --prefix=/usr \ + --log=/var/log/${PN} \ + --state=/var/lib/${PN} \ + --pid=/run/${PN}.pid \ + --control=unix:/run/${PN}.sock || die "Core configuration failed" + for flag in ${IUSE} ; do + if use ${flag} ; then + ./configure ${flag} || die "Module configuration failed: ${flag}" + fi + done +} + +src_install() { + default + keepdir /var/lib/${PN} + fperms 0770 /var/lib/${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} +} diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index 2fd9f6c0b8eb..11bd30e3696d 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -10,12 +10,9 @@ AUX nginx.initd-r4 2192 BLAKE2B b482b9cc473a1df06764d60c7ce5c99a3f680778028bf440 AUX nginx.logrotate-r1 257 BLAKE2B d62c57377efd5259b6c776861d921b6e4ea026387157d618abd9e578f2e432ac0cf653a0f3842a0620d405759216bdc17afd50b33aaec3ad0c6757dfac3e34d8 SHA512 4892fc1700817c9a459a531df0320fe606a51be7f8b4e3ddf5852fe33def70dbff36fcefd2fce247c6846d6315ea92f3421eb21299a162d082b85fa27572cd95 AUX nginx.service-r1 327 BLAKE2B 081c72f7f7b98e30b2b45aeb8b1e4ead935c5b9a558fcfc7c18c20a2c0f18711272e91f4688c04c7f0eb833be8f7daff2f7d01bd1a04981f03ed54a07fe1148c SHA512 9b6bcf74df2f74ae6a2c255ebf2d826ea92ed9921b9995da6c9a0c5656e2863a2fe5293ef8a656fbd36298602cc88ffc5d7acfbbf143c23a78c9689d61b05df9 DIST modsecurity-2.9.2.tar.gz 4298993 BLAKE2B 32a92148f0e1a1166cf888b8172fc55340c5712c9b770583703c74db450e77226629640c9db03f32e9f28397e6488669d06a89e4d31cb5ab5fff26b30ad843e0 SHA512 69c87ef6f7b6411f4803eb25af32969a1da59722121257c2edf345a3f5a4ab9ae8a49c886cbbfc722c5bda91c6d6ea55232f968c0a0407d7d7b3af53dc862c21 -DIST nginx-1.12.2.tar.gz 981687 BLAKE2B cca2d2b2267fee6feac7e91a5aaec229251e829203b02c207a6a89644fd6b1f2003d75225fadde9fdfc8dda444dc53c7ff0033a1e15a0f25019c878fc716d83f SHA512 3faa2043e237a7e1d15cc5661ac9d002a965220a78c25a863be9f19e01007347e53f776b61c229f6bd3d916cc1ccf92de260811f7b8092ec1b747fba7c0061f7 DIST nginx-1.14.0.tar.gz 1016272 BLAKE2B 37d292955dc5f03f6b3b05fd434807ba1033fab73494866e8bacb99df1d595a7665b3722e9bb7227a119cabfea79be08a14e589565cedb78693fc3990cee4466 SHA512 40f086c9f741727e6f55802b6c3a66f081f7c49c38646dc1491aa3e3c35bae12b65ea6594386609fc849bcd99a60d7cd8ecb3f8d519e0e9ab8db01d653e930e9 -DIST nginx-1.15.0.tar.gz 1020675 BLAKE2B b8151877d06f96276fc8186dc8c32b8f1479e27c7f6bdba9158b1d945661891e14c39d2ab3ff8991b3906c5fffe721ab4014d709895a6e3f5bc22b687ea3c536 SHA512 7dbdf437d8d546059a8a03aa9c8d2be98dba7306e2daa49611c16f1e56413a25d4c622da13a815e8075a10f4a0cd744167deaeb971c0a69189940a7a05fa32df DIST nginx-1.15.1.tar.gz 1024086 BLAKE2B 411f566f53fcae62a8b539ac3809d75dc7eaae763c757818931a666e9ed9d2f2b266a7691f58d2ab62bb97d930dfc40f2dc96d199d9a066329ccbcd82d4d2200 SHA512 bdb15791cd599d72a93d85772f8d35d83a76bab10fdfd76929173f81ed1dbad125addc305a6308c0f3d71efb836bc715acf48940047ec17fd48cf37e05b56d17 DIST nginx-auth-ldap-42d195d7a7575ebab1c369ad3fc5d78dc2c2669c.tar.gz 18457 BLAKE2B 22225ca9e5299b20ab5a93a001cac48e446bd86b3a24ac49e716bc975b128890bdb4b0dbbf5730fbaaeadfd958160093c7a6af798dd0e6de27062f149a760333 SHA512 ec59637fda5acac053e815cb1d04b545fc6b765e5ec63d8c2c9c301abad87afaa2698145acac08e9e14c91e1423ebff7aff0cca2b940b19ccccbf4cf53973269 -DIST nginx-auth-ldap-49a8b4d28fc4a518563c82e0b52821e5f37db1fc.tar.gz 17159 BLAKE2B f2209c8b5eb5616a362f2b532245167a5940faad6d66d98a94b3bf2d1e33a73492d42c60a9ddad347a592362a002ff38273a5d1f61f663984a09e14a3fe35e0f SHA512 323abd0ca8e90f5afcaf81a8ff1a8abe3dfcbff3d69f0dd4a1c005fe6436acbf3076c4c57a4df877b3d8e388cbea085d46301bb2df9c0752e2567817ff7cca92 DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 BLAKE2B d37ef9a15c91abe3c6258e420d1f99fa452f9d9966a0e13102174973314a3bac5413957a5fe632a9dcb1163b3be5df8116e05cc053ee061e19319ec25f341570 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529 DIST ngx_brotli-0.1.2.tar.gz 12668 BLAKE2B 904d3f28dcf9f2d5a8eefa2ab8ff991e34624897a9932e351ec4cea05f2b0dbee34ea495de2d546510a556fb10041b388be963f28fecfcd7dc8638f950b36fd0 SHA512 661b4ce5cc678600e5df6be7588b0f0d5d914df9a6788c994cebfa25e211720b9e7d2c08fc34eb6a84743ae2929920ebf2888075e122ac23816ab7c0f3ef4b76 DIST ngx_devel_kit-0.3.0-r1.tar.gz 66455 BLAKE2B e4e987a85b2283ba540b4b894382e65dac7fbca23e233b1031b38828908088370cdb1a9bded4d4ee1ceb1c2e1d506dc2b6f4ba5f6ee94248e863def5a1c8dd1a SHA512 558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 @@ -23,32 +20,21 @@ DIST ngx_http_auth_pam-1.5.1.tar.gz 6863 BLAKE2B 00807cc3db8f6c007c968b8a30d7f60 DIST ngx_http_cache_purge-2.3.tar.gz 12248 BLAKE2B f83b267f4c19a9d4af5964522695814c164d200ecd4108bf8f6b5c21388eba8af989bdda646dee18a03174211e8c090a04736bbeb44043cb0e19fbccdc66278e SHA512 50a31dbf2216a6fae74a186af56dec4600cf55777e76a10ac0075f609e7737135aab063a64f2590dddcd0369ebebd4a523027f3d9ebcca74f7b4355be1c5dcc0 DIST ngx_http_dav_ext-0.1.0.tar.gz 6614 BLAKE2B 3951b573e80e8f02199680fb1ba23baa9ed0845002bf5c78fec291f3a2c01017bcf90f969e924d2e1e03db2aef364af6eaa19398478dfc22fc5bdd57508a9cbd SHA512 47b1686b483640a7fdcbf8081aae2e9f83fb0072ef0940b1cd7f8ddf4932317740b38f0dd4a8f3dd8da074c11c70038ac6758c0feafd3851331acdc85f3e0ee1 DIST ngx_http_echo-0.61.tar.gz 53155 BLAKE2B 72565b5d79598b5dcd1c10fa0f718e749894ca5f1232d5aae60c61e268b5904af35fdcd35afcf72de93852af9e0ca58805d77cbc37919fba9012158b5545baab SHA512 c90b81a4e85a8e9beeb5ff591dc91adb25fa4e0b6cb47086b577e5fa36db2368442dd011187675e358781956c364b949bc4d920ca2b534481b21c9987d2a9a3b -DIST ngx_http_fancyindex-0.4.2.tar.gz 22047 BLAKE2B ce2cd4bffd7ec4cd0688ca79002b4cef70bb242a7c10dbc1a590786330eac628ee080b7bf9087a791ccb0e2e097cb1f8ef7d355ededccb323ecd7fa4f2a237d3 SHA512 aee121e4d25872f0eee6c8150c8c732767ab24c61dc4f6e3f86bd6edc53ad715f3c23045362954a1ad2086ff1002bca821b2e9a53b58b077cbda91a95077ef76 DIST ngx_http_fancyindex-0.4.3.tar.gz 25274 BLAKE2B 5ce3102326f6b8cc2b333ed08f7a66476842d2c70089175e577a3ba958317ed702f24ece002506007eb45e9e50b8f6ecb137cde222566308986cba2682b70f7d SHA512 fe5f6afc29c99f66151c1a06e27b5749b0a16227638583d9c961adc94b2942b981184382f95e70d927f00b09b43f597b963a85a41bde5903b10e42f86bc321f1 DIST ngx_http_geoip2_module-2.0.tar.gz 6766 BLAKE2B 338c9503530ebba6076a2222fe9d164fdfe39ac603c4ecc7ad5b5d1482c1e21d0f1bc52be585d6a88968b29edfd8b1b63ce572e9ee8d8efb4d88889ef4cbb65b SHA512 32a23ba20e4ef3885b09baf938ef57405a6f23e86a7dbecbe5285be74c0433fc33eee70742113706e66ee105909deb1ec844ce36a6f33108597f736341d8c230 -DIST ngx_http_headers_more-0.32.tar.gz 28033 BLAKE2B 51cff34f9a690a3c9a2a05b04084cdd51530b1f41baa1d487bd5bd4349d37a6cc48edffb78466572bee3e42aea10f56e1f8bc47d53a2790023ff831eaa72381f SHA512 e42582b45c3111de3940bbeb67ce161aca2d55adcfb00c61c12256fa0e36221d38723013f36edbcf6d1b520f8dfb49d4657df8a956e66d36e68425afad382bd1 DIST ngx_http_headers_more-0.33.tar.gz 28130 BLAKE2B fe3097a7700ce5da087058f7bb44c95164b75137031187400473f6833bf0e33e5c4920807225a6ff94174fe7dbd6186cca176a33a629ca0911faab6804bdd12a SHA512 13165b1b8d4be281b8bd2404fa48d456013d560bace094c81da08a35dc6a4f025a809a3ae3a42be6bbf67abbcbe41e0730aba06f905220f3baeb01e1192a7d37 -DIST ngx_http_lua-0.10.10.tar.gz 611973 BLAKE2B c84d039087973cc6f718fd5cfcb043fd96893d790d2d65b448faf63ad7e3b8713d529c7804a436cc972bcabb9d4d3a8a605fe70a4ccf0a696dfc493656ac513c SHA512 3440e3fe714407f0ff61e0da207669655b443f7b70ef8a91693ea05ed96d8fde349d9c8ea30d5ff53ea3f8e4a5c7d0a2834e136c340b1b1365d62006339a1e4d DIST ngx_http_lua-0.10.13.tar.gz 624102 BLAKE2B 009506e4cd505a2e383e2c6344b62b541b3bbb28410d4ae2e88139227e22e19dd14372a902f172fadaf82a76c5875936caff4a8c98ff740456488e5ac6ff8c53 SHA512 8c316b9d12dc35779fcddc6bb90942c096f19fd8c2e090b8397e1e1ca6f0ebd7a4edddc03fddb31310147ba4e9db9fc4b3749cfd2323046d88045b3b3333f07d -DIST ngx_http_naxsi-0.55.3.tar.gz 187416 BLAKE2B de4b00bcfa3e81b7f339bde9f2517e228d2f914c1ac76babd7db1419168814d30f44623a67c0f79475c232ca456792cbdc8f2b6ef3ebd1524eff3f2acfa87685 SHA512 9e8f41a5cd1342cc9b8aa334a603842d14a256aab1f4a21205bb1278aecbb0c49e39c889d8113a5b41aad2efeaa2ed9f11cba6929173f50add91f54c4c59c8a0 DIST ngx_http_naxsi-0.56.tar.gz 192120 BLAKE2B cdbfc278f346ccdc0d5407d70ddd4740816d9fe786d3d65189d47e6f3b030c02352a30ed86bf1650139a21a8408e74c1ec7d7aa3512df1428870279ab384dd15 SHA512 4660751849bce303af6010b7257532404710106a94817e78d4bc4b566f8019620f24f30207f1d4366b88132a5124e34b164dc67ed80b6710f4bad66115564cbd -DIST ngx_http_push_stream-0.5.2.tar.gz 182008 BLAKE2B b53c1269a5b96b35054011879dc2288ec7c9dd3965a1d4cea73fb7804626797b3cf7929ffa00fb0fc7479f5d6a7f8d006dbdde1ffa435f878c7cc9278e6cca00 SHA512 ee8bf9ece652da6aa5a39879298bba70d1842696545259f3f5e302cc61397b35f016364805805f9ab1914fc39ed2f07c015e042155789073e3d1fdc02a0783de DIST ngx_http_push_stream-0.5.4.tar.gz 183493 BLAKE2B ccae3113071cee38fa6a7accd580922dc2fc9fa22af737f400c2c5f59352d93ca6cceb47f2aee70dfc111afdf98d27aeb64ddc5a4dbf617359ea4da09486ac7f SHA512 467ae49409adb675979ff591f98df8c96d71ab5ebc2ef9b3c9430e38e7e84d311b4a98c2b1cb1886d895735223dd2a43370aab61b57b34adb1427c184e6b8c86 DIST ngx_http_slowfs_cache-1.10.tar.gz 11809 BLAKE2B 54ec1bd0d1cc43cdaafc93ebd46b33374c57351c7f022eae0351d6961680abb03d896e7f058e67c43c4fee300253354feccb92d00e62bf91250e251e1860ec03 SHA512 fbc9609a8d6913aeefe535f206b9e53477503f131934ead2ae5a6169e395af2f5fb54778704824d5eeb22a4ef40a11ebbcde580db62a631f70edcc2cfc06b15d DIST ngx_http_upload_progress-0.9.2-r1.tar.gz 17268 BLAKE2B 7bbbf52e326c64a008339d2f80f123630fd314f705224c8f1c7d0c90bb4d31a24aaa95df55c9022838179114a031731a894992960aecc727635e0e2a0761d2c4 SHA512 c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c -DIST ngx_http_upstream_check-31b1b42873fa56620d8a873ac13f5f26b52d0cd6.tar.gz 130052 BLAKE2B 0ff95fc9780193b514fc7b28f6c5c1a58942cd54472a495a1812a48ef4039390241c20c8a3e8dfd6168e87df3a9e3b37e9c33f11d13bdf5fb0d1f37041fe4ee8 SHA512 e7ea6712c27fd2610e8681b7f687e24c94cd7558d6f19f87568d4c2169115678a61c58b1cd3686a927173b566ff1e10cb1fb767fe63db61f860a77bac9792f9b DIST ngx_http_upstream_check-9aecf15ec379fe98f62355c57b60c0bc83296f04.tar.gz 130073 BLAKE2B 3c93cef79425a46e22ae39adf13d5ebb0e5d36f5d6be8555ec068dd0017918f5355d82fbbe90ba934e58c52e89c2096e24012f75390c7159d1ebacfaaa112308 SHA512 fad2a0d3ac332b6e67c52e3525f6df8a432df3e92bc173190b8107fba7f24476ab9dae4824630299af68c15e856409bd47a3a79fb5b65e03a5133eb90142b8fc -DIST ngx_http_vhost_traffic_status-0.1.17.tar.gz 380239 BLAKE2B ca642825d02a11d289ca45dfc6231e8ddb13d72bce0343beb2e7fea8f255ac30bdc7751ae1c521f42c5de0245ecd0cff31fea050f7c5b4610620e43c6f4250f2 SHA512 cb9abe922b0494c2587e404b0d603a0441a9a328ef5a83b11e0323e8038010e7d69dfa0d9e5c7122d7bd9b6799a684d4d934e5473442f9f41344c8d38d0d6550 DIST ngx_http_vhost_traffic_status-0.1.18.tar.gz 380327 BLAKE2B 700f48ec3ae7b38d4498b1ca6f7e08069befb4b76a20cc0619d16e613c1efb387eace906901fcb098159bc20acfc8723d98aec690e11deaff949f5612dd414f9 SHA512 86b980095b3b80c8dce2e355db514cb4b3039c8408a2f5ca6df9e105d5462952fddd70f6581ec6aa2763e560b591664c27eefd978c4ea777b1f1f808bc60d4ec -DIST ngx_memc_module-0.18.tar.gz 37113 BLAKE2B e5b89c7c7a3e6f8ee7c1b2623fbec78851a9d7c1c37c1924e8c010b45a4e034afe504a5e228361ad88cf57e83ce06f5f6d635301f8201f1ebd7e99f30447d524 SHA512 8087bd361fb4e522493e66f93d59c9b13245d6eef0fe4a53f619d1826feb02af60769c0a04f87f2faf5308a44b794ef146a445bdbe7cbc7f21c0edaaba08c706 DIST ngx_memc_module-0.19.tar.gz 34654 BLAKE2B 536384c264d88535179634d459d3a47b1d9b11885fbce46fbe9fa4df3dce365320b5963c56aecde3b0039d4f9954943d95f25c5f4fada6256861257f82ebbb12 SHA512 a64ec8dffcd011db2cd12b501271bf5c408f2f31fd2bf477b8db4e88adc5bb5732c4c2181ed8378cab6a937869d8f747ef52b22fe256c90df8440b91890edbe7 DIST ngx_metrics-0.1.1.tar.gz 2964 BLAKE2B 95d71ea26c949c345b83e353bd66a20df18cc8b2b93f692615a1b39c1f327393647f80e7a27e6929799a6e7e3469b61e1cd72f7821f7a820da4dd7cd9a96d85c SHA512 d36a8fb0104c83b6b564e03b351aa750cab08650264c74d6f786af357bfb7006b531a93270dd961896ea8dafe27e5db8548ede714c5f52c4742876bc73af4b5e DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 BLAKE2B e0729b66554c8890727190a624d4c9aef6499dfc2e301541a9bfc15690caf6d3155c8a4b8f7a1555a7655b47aa0cd1b797aeb8ba82efa92ab80808218a0bdcff SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 -DIST ngx_rtmp-1.2.0.tar.gz 519895 BLAKE2B a5a888473dd2ba2320ff74017e8445d96fa3e361acc559edb270ad075c937ab5630e537a67ad8ed134a7ec5809ae63e38791ac25ceab3e26160469be8cc2e82c SHA512 8965d9bee91a46375516ccd012d1c43cd23f15c0630d11ed01472b9a84504574b476f22c5584f43c972a8f923e9ae025b9b60c64aace0ed159c7279bcbd376c8 DIST ngx_rtmp-1.2.1.tar.gz 519919 BLAKE2B 744ccb8031eb9653f158f9eceba64fc9c8af7b9a42e64ef996ab3bbbe1402e5ffd3efcc8e4aaca437eb5e208e4b6f2d8643fcca953b32f32543eaa1ae4d9505c SHA512 4a0af5e9afa4deb0b53de8de7ddb2cfa6430d372e1ef9e421f01b509548bd134d427345442ac1ce667338cc2a1484dc2ab732e316e878ac7d3537dc527d5f922 DIST njs-0.2.2.tar.gz 253349 BLAKE2B 1ca508677a251ff38f5bca01292f2c7d2c41ac1c5d2cffae8b565694cbed9ebb2811b7e8893ea03384810e169ebb0cccfbf51d36166fcbc32e77fb30ba90d664 SHA512 e309b06b66e955873b82ef6c8881c3a98e0cf22e379b292c7561947db34c28990ade5461f42561e73c79c8e1e7914a990a003926054f884551edc16015ac4792 -EBUILD nginx-1.12.2-r1.ebuild 37150 BLAKE2B 65fed3395350ccd46c82c77e42ca5b0407127832fae1b3a3b660fd5d6f13adc6aef65cd340d41c5a0212241881f23843f1cf849dfc46c972f3741e0facc2d5a8 SHA512 59897652e9dfd97468de4b447cbd080917f65d12507ffd2ec0037227c69b029242c8710aa20c041a6f3abe93d8ffd1e8678c131059b612697e1af1d6b702b31c -EBUILD nginx-1.14.0-r2.ebuild 40276 BLAKE2B 4b7fddc3b817e9ca09ca54d5e2dae1c55f01d67647cac6e273afef97981bd9ef20a366475ffc246d8fd5e9c3a8460c0ba372090262b71e8c3e971ea281fa97da SHA512 6ea5e5f876331ed22faeda24d0147505cc5861af845fb45bf4c83d8633dd7beeb05394faebc86425ca906f82659a154b66d7d1a5409b77ddcec41e4625036ef3 -EBUILD nginx-1.15.0-r2.ebuild 40280 BLAKE2B 845639f3598f198e429217c7fad6e7fb42f2d152c8b3e9e713616ee85e0d0b10a85f6bbacfbb63cf45e71ae64163a0985ccb9eb7e0786bb7697bd3ff0b67ba28 SHA512 abb4b16b2f18491c146ee4f8da04d2c7dfa41b1c5d66bdd115ea8a693336d9959576df88d3844358776395152d77b424d36390a43fc1419c88a0bd676b565c16 -EBUILD nginx-1.15.1.ebuild 40278 BLAKE2B 8de00b6addf8957495de879195e0f012484ce8ffba25002186f879b52d8eea9fab9b23d654f642140b56aea70b76da891def4200f49e9cb3061743afcff45d2c SHA512 dac22595fcb2406fa456547b4ae9b83157ff71ac2b53c7dfa2a7bff158e076866596ff5c7f42ed27e0b754072be688c3f0a5cd4e03800b61849463da6cb1d770 +EBUILD nginx-1.14.0-r3.ebuild 40382 BLAKE2B ebc47bcb33f3d29bb4bad703d9ec546e81e090ffca9c091dc318341fcae94119a55a75b2c5a978ea053e9993994e422d35b3b3d3132407d936802fc4c638afc3 SHA512 deb04864d61dbde0167d33398264fbea63dcd4d141921fc68a65457deacc5e867d3fa9a811eb85ed8a0398c0054a25509ad10ed69ee7b9f10e282771d7623951 +EBUILD nginx-1.15.1-r1.ebuild 40384 BLAKE2B 361936e392b9cc5d981258039fe9d151f543ce5a8a71070ace452c1c8637858da88d837ea4a98daf20d6a00b2dff4c1dac2302a6eb6a0d9795fb08e115ec3ef1 SHA512 6d8785bdf574bc9c24484d46e743c9201fb441573de42acba7e00713b2f2094ec268439c50e0f17fd706c705298c5d41ed0772cbd17c7d1ca98011df22f8dc43 MISC metadata.xml 1310 BLAKE2B 6f40252a833a188f4b62cb2f2a126f93e68cdcd0e3575febdc371106c82d7ebdc6931b162a5ef8070fb6fe1f18e969191f67d3ccdd5e55712dc4d209c16c34c9 SHA512 10403ec29eaa83eb45b7b0b78340103b226145b52b3795e18b1e8bf272efa83586bc190e6e66061f33544434e3c2f94d2229be988733713578e9bb495ce7219c diff --git a/www-servers/nginx/nginx-1.12.2-r1.ebuild b/www-servers/nginx/nginx-1.12.2-r1.ebuild deleted file mode 100644 index 40d650b17fe8..000000000000 --- a/www-servers/nginx/nginx-1.12.2-r1.ebuild +++ /dev/null @@ -1,1005 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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.2" -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.10" -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="31b1b42873fa56620d8a873ac13f5f26b52d0cd6" -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" - -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) -HTTP_METRICS_MODULE_PV="0.1.1" -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" - -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) -HTTP_NAXSI_MODULE_PV="0.55.3" -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" - -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) -RTMP_MODULE_PV="1.2.0" -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.1.0" -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" - -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) -HTTP_ECHO_MODULE_PV="0.61" -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.2" -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.18" -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="https://nginx.org" -SRC_URI="https://nginx.org/download/${P}.tar.gz - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz - nginx_modules_http_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" - -# Package doesn't provide a real test suite -RESTRICT="test" - -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: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.11.1+.patch - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch - fi - - if use nginx_modules_http_cache_purge; then - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch - cd "${S}" || die - fi - - if use nginx_modules_http_security; then - cd "${HTTP_SECURITY_MODULE_WD}" || die - - eautoreconf - - if use 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-r4 nginx - newconfd "${FILESDIR}"/nginx.confd nginx - - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service - - doman man/nginx.8 - dodoc CHANGES* README - - # just keepdir. do not copy the default htdocs files (bug #449136) - keepdir /var/www/localhost - rm -rf "${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 ${keepdir_list} - fowners ${PN}:${PN} ${keepdir_list} - - fperms 0710 /var/log/nginx - fowners 0:${PN} /var/log/nginx - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}"/nginx.logrotate-r1 nginx - - if use nginx_modules_http_perl; then - cd "${S}"/objs/src/http/modules/perl/ || die - emake DESTDIR="${D}" INSTALLDIRS=vendor - perl_delete_localpod - cd "${S}" || die - fi - - if use nginx_modules_http_cache_purge; then - docinto ${HTTP_CACHE_PURGE_MODULE_P} - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} - fi - - if use nginx_modules_http_slowfs_cache; then - docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} - fi - - if use nginx_modules_http_fancyindex; then - docinto ${HTTP_FANCYINDEX_MODULE_P} - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_lua; then - docinto ${HTTP_LUA_MODULE_P} - dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_auth_pam; then - docinto ${HTTP_AUTH_PAM_MODULE_P} - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} - fi - - if use nginx_modules_http_upstream_check; then - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} - fi - - if use nginx_modules_http_naxsi; then - insinto /etc/nginx - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules - fi - - if use rtmp; then - docinto ${RTMP_MODULE_P} - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} - fi - - if use nginx_modules_http_dav_ext; then - docinto ${HTTP_DAV_EXT_MODULE_P} - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_echo; then - docinto ${HTTP_ECHO_MODULE_P} - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_security; then - docinto ${HTTP_SECURITY_MODULE_P} - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.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 "" - ewarn "In nginx 1.9.5 the spdy module was superseded by http2." - ewarn "Update your configs and package.use accordingly." - fi - - if use nginx_modules_http_lua; then - ewarn "" - ewarn "While you can build lua 3rd party module against ${P}" - ewarn "the author warns that >=${PN}-1.11.11 is still not an" - ewarn "officially supported target yet. You are on your own." - ewarn "Expect runtime failures, memory leaks and other problems!" - fi - - if use nginx_modules_http_lua && use http2; then - ewarn "" - ewarn "Lua 3rd party module author warns against using ${P} with" - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg" - fi - - local _n_permission_layout_checks=0 - local _has_to_adjust_permissions=0 - local _has_to_show_permission_warning=0 - - # Defaults to 1 to inform people doing a fresh installation - # that we ship modified {scgi,uwsgi,fastcgi}_params files - local _has_to_show_httpoxy_mitigation_notice=1 - - local _replacing_version= - for _replacing_version in ${REPLACING_VERSIONS}; do - _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) - - if [[ ${_n_permission_layout_checks} -gt 1 ]]; then - # Should never happen: - # Package is abusing slots but doesn't allow multiple parallel installations. - # If we run into this situation it is unsafe to automatically adjust any - # permission... - _has_to_show_permission_warning=1 - - ewarn "Replacing multiple ${PN}' versions is unsupported! " \ - "You will have to adjust permissions on your own." - - break - fi - - local _replacing_version_branch=$(get_version_component_range 1-2 "${_replacing_version}") - debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." - - # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? - # This was before we introduced multiple nginx versions so we - # do not need to distinguish between stable and mainline - local _need_to_fix_CVE2013_0337=1 - - if version_is_at_least "1.4.1-r2" "${_replacing_version}"; then - # We are updating an installation which should already be fixed - _need_to_fix_CVE2013_0337=0 - debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2013-0337!" - fi - - # Do we need to inform about HTTPoxy mitigation? - # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then - # Updating from <1.10 - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.1-r2" - ;; - "1.11") - _fixed_in_pvr="1.11.3-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that the user has - # already seen the HTTPoxy mitigation notice because he/she is doing - # an update from previous version where we have already shown - # the warning. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then - # We are updating an installation where we already informed - # that we are mitigating HTTPoxy per default - _has_to_show_httpoxy_mitigation_notice=0 - debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" - else - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - fi - fi - - # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? - # All branches up to 1.11 are affected - local _need_to_fix_CVE2016_1247=1 - - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then - # Updating from <1.10 - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.2-r3" - ;; - "1.11") - _fixed_in_pvr="1.11.6-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that we have already - # adjusted permissions or were never affected because user is - # doing an update from previous version which was safe or did - # the adjustments. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then - # We are updating an installation which should already be adjusted - # or which was never affected - _need_to_fix_CVE2016_1247=0 - debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - fi - fi - done - - if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then - # We do not DIE when chmod/chown commands are failing because - # package is already merged on user's system at this stage - # and we cannot retry without losing the information that - # the existing installation needs to adjust permissions. - # Instead we are going to a show a big warning ... - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then - ewarn "" - ewarn "The world-readable bit (if set) has been removed from the" - ewarn "following directories to mitigate a security bug" - ewarn "(CVE-2013-0337, bug #458726):" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn " ${EPREFIX%/}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "This is a one-time change and will not happen on subsequent updates." - ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX%/}${NGINX_HOME_TMP}'" - chmod o-rwx \ - "${EPREFIX%/}"/var/log/nginx \ - "${EPREFIX%/}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ - _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then - ewarn "" - ewarn "The permissions on the following directory have been reset in" - ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - ewarn "This is a one-time change and will not happen on subsequent updates." - chown 0:nginx "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 - chmod 710 "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then - # Should never happen ... - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "The one-time only attempt to adjust permissions of the" - ewarn "existing nginx installation failed. Be aware that we will not" - ewarn "try to adjust the same permissions again because now you are" - ewarn "using a nginx version where we expect that the permissions" - ewarn "are already adjusted or that you know what you are doing and" - ewarn "want to keep custom permissions." - ewarn "" - fi - fi - - # Sanity check for CVE-2016-1247 - # Required to warn users who received the warning above and thought - # they could fix it by unmerging and re-merging the package or have - # unmerged a affected installation on purpose in the past leaving - # /var/log/nginx on their system due to keepdir/non-empty folder - # and are now installing the package again. - local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX%/}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) - su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null - if [ $? -eq 0 ] ; then - # Cleanup -- no reason to die here! - rm -f "${_sanity_check_testfile}" - - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "Looks like your installation is vulnerable to CVE-2016-1247" - ewarn "(bug #605008) because nginx user is able to create files in" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn "" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - fi - - if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then - # HTTPoxy mitigation - ewarn "" - ewarn "This nginx installation comes with a mitigation for the HTTPoxy" - ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" - ewarn "the HTTP_PROXY parameter to an empty string per default when you" - ewarn "are sourcing one of the default" - ewarn "" - ewarn " - 'fastcgi_params' or 'fastcgi.conf'" - ewarn " - 'scgi_params'" - ewarn " - 'uwsgi_params'" - ewarn "" - ewarn "files in your server block(s)." - ewarn "" - ewarn "If this is causing any problems for you make sure that you are sourcing the" - ewarn "default parameters _before_ you set your own values." - ewarn "If you are relying on user-supplied proxy values you have to remove the" - ewarn "correlating lines from the file(s) mentioned above." - ewarn "" - fi -} diff --git a/www-servers/nginx/nginx-1.14.0-r2.ebuild b/www-servers/nginx/nginx-1.14.0-r3.ebuild index a4c3f22ec716..9332cae2dbb7 100644 --- a/www-servers/nginx/nginx-1.14.0-r2.ebuild +++ b/www-servers/nginx/nginx-1.14.0-r3.ebuild @@ -321,7 +321,9 @@ CDEPEND=" net-misc/curl www-servers/apache ) - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )" + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] ) + nginx_modules_stream_geoip? ( dev-libs/geoip ) + nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-nginx ) !www-servers/nginx:mainline" diff --git a/www-servers/nginx/nginx-1.15.0-r2.ebuild b/www-servers/nginx/nginx-1.15.0-r2.ebuild deleted file mode 100644 index 5c4536292af2..000000000000 --- a/www-servers/nginx/nginx-1.15.0-r2.ebuild +++ /dev/null @@ -1,1079 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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}" - -# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) -HTTP_BROTLI_MODULE_PV="0.1.2" -HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" -HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/v${HTTP_BROTLI_MODULE_PV}.tar.gz" -HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_MODULE_PV}" - -# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2" -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1" -HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz" -HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" - -# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license) -HTTP_HEADERS_MORE_MODULE_PV="0.33" -HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" -HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz" -HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}" - -# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license) -HTTP_CACHE_PURGE_MODULE_PV="2.3" -HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" -HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" - -# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) -HTTP_SLOWFS_CACHE_MODULE_PV="1.10" -HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" -HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" - -# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license) -HTTP_FANCYINDEX_MODULE_PV="0.4.2" -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.13" -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="9aecf15ec379fe98f62355c57b60c0bc83296f04" -HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" -HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" -HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" - -# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) -HTTP_METRICS_MODULE_PV="0.1.1" -HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" -HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" -HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" - -# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) -HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="0.1.17" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/v${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" - -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) -HTTP_NAXSI_MODULE_PV="0.55.3" -HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" -HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" -HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" - -# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) -RTMP_MODULE_PV="1.2.1" -RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}" -RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz" -RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}" - -# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license) -HTTP_DAV_EXT_MODULE_PV="0.1.0" -HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" -HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" -HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" - -# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) -HTTP_ECHO_MODULE_PV="0.61" -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.2" -HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" -HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" -HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" - -# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) -HTTP_PUSH_STREAM_MODULE_PV="0.5.4" -HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" -HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" -HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" - -# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) -HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" -HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" -HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" -HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" - -# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) -HTTP_MOGILEFS_MODULE_PV="1.0.4" -HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" -HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" -HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" - -# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) -HTTP_MEMC_MODULE_PV="0.19" -HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}" -HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz" -HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}" - -# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2) -HTTP_LDAP_MODULE_PV="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" -HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" -HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz" -HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" - -# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) -GEOIP2_MODULE_PV="2.0" -GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" -GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" -GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" - -# njs-module (https://github.com/nginx/njs, as-is) -NJS_MODULE_PV="0.2.2" -NJS_MODULE_P="njs-${NJS_MODULE_PV}" -NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" -NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}" - -# We handle deps below ourselves -SSL_DEPS_SKIP=1 -AUTOTOOLS_AUTO_DEPEND="no" - -inherit autotools 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="https://nginx.org" -SRC_URI="https://nginx.org/download/${P}.tar.gz - ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz - nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) - nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz ) - nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz ) - nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz ) - nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) - nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) - nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) - nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) - nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )" - -LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ - nginx_modules_http_security? ( Apache-2.0 ) - nginx_modules_http_push_stream? ( GPL-3 )" - -SLOT="mainline" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" - -# Package doesn't provide a real test suite -RESTRICT="test" - -NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif - fastcgi geo grpc gzip limit_req limit_conn map memcached mirror - proxy referer rewrite scgi ssi split_clients upstream_hash - upstream_ip_hash upstream_keepalive upstream_least_conn - upstream_zone userid uwsgi" -NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip - gzip_static image_filter mp4 perl random_index realip secure_link - slice stub_status sub xslt" -NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients - upstream_hash upstream_least_conn upstream_zone" -NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread" -NGINX_MODULES_MAIL="imap pop3 smtp" -NGINX_MODULES_3RD=" - http_auth_ldap - http_auth_pam - http_brotli - http_cache_purge - http_dav_ext - http_echo - http_fancyindex - http_geoip2 - http_headers_more - http_javascript - http_lua - http_memc - http_metrics - http_mogilefs - http_naxsi - http_push_stream - http_security - http_slowfs_cache - http_sticky - http_upload_progress - http_upstream_check - http_vhost_traffic_status - stream_geoip2 - stream_javascript -" - -IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl 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_brotli? ( app-arch/brotli:= ) - nginx_modules_http_geoip? ( dev-libs/geoip ) - nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) - nginx_modules_http_gunzip? ( sys-libs/zlib ) - nginx_modules_http_gzip? ( sys-libs/zlib ) - nginx_modules_http_gzip_static? ( sys-libs/zlib ) - nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) - nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) - nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) - nginx_modules_http_secure_link? ( - userland_GNU? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:= ) - ) - ) - nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) - nginx_modules_http_lua? ( !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_brotli? ( virtual/pkgconfig ) - 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_grpc? ( http2 ) - 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_brotli; then - cd "${HTTP_BROTLI_MODULE_WD}" || die - eapply "${FILESDIR}"/http_brotli-detect-brotli-r1.patch - cd "${S}" || die - fi - - if use nginx_modules_http_upstream_check; then - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch - fi - - if use nginx_modules_http_cache_purge; then - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch - cd "${S}" || die - fi - - if use nginx_modules_http_security; then - cd "${HTTP_SECURITY_MODULE_WD}" || die - - eautoreconf - - if use 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 nginx_modules_http_vhost_traffic_status; then - http_enabled=1 - myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) - fi - - if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then - myconf+=( --add-module=${GEOIP2_MODULE_WD} ) - fi - - if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then - myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) - fi - - if use nginx_modules_http_brotli; then - http_enabled=1 - myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) - fi - - if use http || use http-cache || use http2 || use nginx_modules_http_javascript; then - http_enabled=1 - fi - - if [ $http_enabled ]; then - use http-cache || myconf+=( --without-http-cache ) - use ssl && myconf+=( --with-http_ssl_module ) - else - myconf+=( --without-http --without-http-cache ) - fi - - # Stream modules - for mod in $NGINX_MODULES_STREAM_STD; do - if use nginx_modules_stream_${mod}; then - stream_enabled=1 - else - myconf+=( --without-stream_${mod}_module ) - fi - done - - for mod in $NGINX_MODULES_STREAM_OPT; do - if use nginx_modules_stream_${mod}; then - stream_enabled=1 - myconf+=( --with-stream_${mod}_module ) - fi - done - - if use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then - stream_enabled=1 - fi - - if [ $stream_enabled ]; then - myconf+=( --with-stream ) - use ssl && myconf+=( --with-stream_ssl_module ) - fi - - # MAIL modules - for mod in $NGINX_MODULES_MAIL; do - if use nginx_modules_mail_${mod}; then - mail_enabled=1 - else - myconf+=( --without-mail_${mod}_module ) - fi - done - - if [ $mail_enabled ]; then - myconf+=( --with-mail ) - use ssl && myconf+=( --with-mail_ssl_module ) - fi - - # custom modules - for mod in $NGINX_ADD_MODULES; do - myconf+=( --add-module=${mod} ) - done - - # https://bugs.gentoo.org/286772 - export LANG=C LC_ALL=C - tc-export CC - - if ! use prefix; then - myconf+=( --user=${PN} ) - myconf+=( --group=${PN} ) - fi - - local WITHOUT_IPV6= - if ! use ipv6; then - WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" - fi - - if [[ -n "${EXTRA_ECONF}" ]]; then - myconf+=( ${EXTRA_ECONF} ) - ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" - fi - - ./configure \ - --prefix="${EPREFIX}"/usr \ - --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ - --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ - --pid-path="${EPREFIX}"/run/${PN}.pid \ - --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ - --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \ - --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ - --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ - --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ - --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ - --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ - --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ - --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ - --with-compat \ - "${myconf[@]}" || die "configure failed" - - # A purely cosmetic change that makes nginx -V more readable. This can be - # good if people outside the gentoo community would troubleshoot and - # question the users setup. - sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die -} - -src_compile() { - use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" - - # https://bugs.gentoo.org/286772 - export LANG=C LC_ALL=C - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" -} - -src_install() { - emake DESTDIR="${D%/}" install - - cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die - - newinitd "${FILESDIR}"/nginx.initd-r4 nginx - newconfd "${FILESDIR}"/nginx.confd nginx - - systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service - - doman man/nginx.8 - dodoc CHANGES* README - - # just keepdir. do not copy the default htdocs files (bug #449136) - keepdir /var/www/localhost - rm -rf "${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 ${keepdir_list} - fowners ${PN}:${PN} ${keepdir_list} - - fperms 0710 /var/log/nginx - fowners 0:${PN} /var/log/nginx - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}"/nginx.logrotate-r1 nginx - - if use nginx_modules_http_perl; then - cd "${S}"/objs/src/http/modules/perl/ || die - emake DESTDIR="${D}" INSTALLDIRS=vendor - perl_delete_localpod - cd "${S}" || die - fi - - if use nginx_modules_http_cache_purge; then - docinto ${HTTP_CACHE_PURGE_MODULE_P} - dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} - fi - - if use nginx_modules_http_slowfs_cache; then - docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} - fi - - if use nginx_modules_http_fancyindex; then - docinto ${HTTP_FANCYINDEX_MODULE_P} - dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_lua; then - docinto ${HTTP_LUA_MODULE_P} - dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_auth_pam; then - docinto ${HTTP_AUTH_PAM_MODULE_P} - dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} - fi - - if use nginx_modules_http_upstream_check; then - docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} - dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} - fi - - if use nginx_modules_http_naxsi; then - insinto /etc/nginx - doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules - fi - - if use rtmp; then - docinto ${RTMP_MODULE_P} - dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} - fi - - if use nginx_modules_http_dav_ext; then - docinto ${HTTP_DAV_EXT_MODULE_P} - dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst - fi - - if use nginx_modules_http_echo; then - docinto ${HTTP_ECHO_MODULE_P} - dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown - fi - - if use nginx_modules_http_security; then - docinto ${HTTP_SECURITY_MODULE_P} - dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.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 "" - ewarn "In nginx 1.9.5 the spdy module was superseded by http2." - ewarn "Update your configs and package.use accordingly." - fi - - if use nginx_modules_http_lua; then - ewarn "" - ewarn "While you can build lua 3rd party module against ${P}" - ewarn "the author warns that >=${PN}-1.11.11 is still not an" - ewarn "officially supported target yet. You are on your own." - ewarn "Expect runtime failures, memory leaks and other problems!" - fi - - if use nginx_modules_http_lua && use http2; then - ewarn "" - ewarn "Lua 3rd party module author warns against using ${P} with" - ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see https://git.io/OldLsg" - fi - - local _n_permission_layout_checks=0 - local _has_to_adjust_permissions=0 - local _has_to_show_permission_warning=0 - - # Defaults to 1 to inform people doing a fresh installation - # that we ship modified {scgi,uwsgi,fastcgi}_params files - local _has_to_show_httpoxy_mitigation_notice=1 - - local _replacing_version= - for _replacing_version in ${REPLACING_VERSIONS}; do - _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) - - if [[ ${_n_permission_layout_checks} -gt 1 ]]; then - # Should never happen: - # Package is abusing slots but doesn't allow multiple parallel installations. - # If we run into this situation it is unsafe to automatically adjust any - # permission... - _has_to_show_permission_warning=1 - - ewarn "Replacing multiple ${PN}' versions is unsupported! " \ - "You will have to adjust permissions on your own." - - break - fi - - local _replacing_version_branch=$(get_version_component_range 1-2 "${_replacing_version}") - debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." - - # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? - # This was before we introduced multiple nginx versions so we - # do not need to distinguish between stable and mainline - local _need_to_fix_CVE2013_0337=1 - - if version_is_at_least "1.4.1-r2" "${_replacing_version}"; then - # We are updating an installation which should already be fixed - _need_to_fix_CVE2013_0337=0 - debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2013-0337!" - fi - - # Do we need to inform about HTTPoxy mitigation? - # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then - # Updating from <1.10 - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.1-r2" - ;; - "1.11") - _fixed_in_pvr="1.11.3-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that the user has - # already seen the HTTPoxy mitigation notice because he/she is doing - # an update from previous version where we have already shown - # the warning. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then - # We are updating an installation where we already informed - # that we are mitigating HTTPoxy per default - _has_to_show_httpoxy_mitigation_notice=0 - debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" - else - _has_to_show_httpoxy_mitigation_notice=1 - debug-print "Need to inform about HTTPoxy mitigation!" - fi - fi - - # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? - # All branches up to 1.11 are affected - local _need_to_fix_CVE2016_1247=1 - - if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then - # Updating from <1.10 - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - else - # Updating from >=1.10 - local _fixed_in_pvr= - case "${_replacing_version_branch}" in - "1.10") - _fixed_in_pvr="1.10.2-r3" - ;; - "1.11") - _fixed_in_pvr="1.11.6-r1" - ;; - *) - # This should be any future branch. - # If we run this code it is safe to assume that we have already - # adjusted permissions or were never affected because user is - # doing an update from previous version which was safe or did - # the adjustments. Otherwise, we wouldn't hit this code path ... - _fixed_in_pvr= - esac - - if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then - # We are updating an installation which should already be adjusted - # or which was never affected - _need_to_fix_CVE2016_1247=0 - debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" - else - _has_to_adjust_permissions=1 - debug-print "Need to adjust permissions to fix CVE-2016-1247!" - fi - fi - done - - if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then - # We do not DIE when chmod/chown commands are failing because - # package is already merged on user's system at this stage - # and we cannot retry without losing the information that - # the existing installation needs to adjust permissions. - # Instead we are going to a show a big warning ... - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then - ewarn "" - ewarn "The world-readable bit (if set) has been removed from the" - ewarn "following directories to mitigate a security bug" - ewarn "(CVE-2013-0337, bug #458726):" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn " ${EPREFIX%/}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "This is a one-time change and will not happen on subsequent updates." - ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX%/}${NGINX_HOME_TMP}'" - chmod o-rwx \ - "${EPREFIX%/}"/var/log/nginx \ - "${EPREFIX%/}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ - _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then - ewarn "" - ewarn "The permissions on the following directory have been reset in" - ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn "" - ewarn "Check if this is correct for your setup before restarting nginx!" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - ewarn "This is a one-time change and will not happen on subsequent updates." - chown 0:nginx "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 - chmod 710 "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 - fi - - if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then - # Should never happen ... - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "The one-time only attempt to adjust permissions of the" - ewarn "existing nginx installation failed. Be aware that we will not" - ewarn "try to adjust the same permissions again because now you are" - ewarn "using a nginx version where we expect that the permissions" - ewarn "are already adjusted or that you know what you are doing and" - ewarn "want to keep custom permissions." - ewarn "" - fi - fi - - # Sanity check for CVE-2016-1247 - # Required to warn users who received the warning above and thought - # they could fix it by unmerging and re-merging the package or have - # unmerged a affected installation on purpose in the past leaving - # /var/log/nginx on their system due to keepdir/non-empty folder - # and are now installing the package again. - local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX%/}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) - su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null - if [ $? -eq 0 ] ; then - # Cleanup -- no reason to die here! - rm -f "${_sanity_check_testfile}" - - ewarn "" - ewarn "*************************************************************" - ewarn "*************** W A R N I N G ***************" - ewarn "*************************************************************" - ewarn "Looks like your installation is vulnerable to CVE-2016-1247" - ewarn "(bug #605008) because nginx user is able to create files in" - ewarn "" - ewarn " ${EPREFIX%/}/var/log/nginx" - ewarn "" - ewarn "Also ensure that no other log directory used by any of your" - ewarn "vhost(s) is not writeable for nginx user. Any of your log files" - ewarn "used by nginx can be abused to escalate privileges!" - fi - - if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then - # HTTPoxy mitigation - ewarn "" - ewarn "This nginx installation comes with a mitigation for the HTTPoxy" - ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" - ewarn "the HTTP_PROXY parameter to an empty string per default when you" - ewarn "are sourcing one of the default" - ewarn "" - ewarn " - 'fastcgi_params' or 'fastcgi.conf'" - ewarn " - 'scgi_params'" - ewarn " - 'uwsgi_params'" - ewarn "" - ewarn "files in your server block(s)." - ewarn "" - ewarn "If this is causing any problems for you make sure that you are sourcing the" - ewarn "default parameters _before_ you set your own values." - ewarn "If you are relying on user-supplied proxy values you have to remove the" - ewarn "correlating lines from the file(s) mentioned above." - ewarn "" - fi -} diff --git a/www-servers/nginx/nginx-1.15.1.ebuild b/www-servers/nginx/nginx-1.15.1-r1.ebuild index 4d922841b297..addae4eea241 100644 --- a/www-servers/nginx/nginx-1.15.1.ebuild +++ b/www-servers/nginx/nginx-1.15.1-r1.ebuild @@ -321,7 +321,9 @@ CDEPEND=" net-misc/curl www-servers/apache ) - nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )" + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] ) + nginx_modules_stream_geoip? ( dev-libs/geoip ) + nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-nginx ) !www-servers/nginx:0" diff --git a/www-servers/tornado/Manifest b/www-servers/tornado/Manifest index 4f6e51f69902..b3c5d07fe72d 100644 --- a/www-servers/tornado/Manifest +++ b/www-servers/tornado/Manifest @@ -10,5 +10,5 @@ EBUILD tornado-4.4.2-r1.ebuild 1859 BLAKE2B bdd5e41507e83ebc9e2ce2d81e81363b3167 EBUILD tornado-4.5.1.ebuild 1868 BLAKE2B 722e23f6ecdb3d110a61cb074933b2b61b080bc21948fd42fae4099275f8c4114aeed18c6635aa1c569581c2364105c86278f31769dba27dd9d826aa95c29964 SHA512 a844f5b5b52ae13ada511f50c3979b1a96683bb81f52c93d71d89d38da98817e677bccc41113941d996594622e4dd312254a93c636c77d951f31c5b900312447 EBUILD tornado-4.5.3.ebuild 1859 BLAKE2B 9dc760d484e1b2742a68aa734f7cefe49a7ba4f4988cf9878584b54e19d9ef589d031255d847fa67ef1e45e0032e4bdc80f3351ae345105d040cdaca176af2bb SHA512 dd46fc428866b8f717adf6cf0c3421a6cfb8d33850fe902bf4babac59c82c46b62b2314685721b1f4d9c3a5eb68798699f142b2a0d4acc4830ebc867230a6354 EBUILD tornado-5.0.2.ebuild 1791 BLAKE2B c5be3458eac03a96dd4bdd248c6548aebd0eb03e2363c2cf2de79311e8f51d290ae320f97a7b9eda1e42fd21ea97b3e58b362883289e87bd6b3797bee1730b04 SHA512 7541ae290aba4adc0e32ed771ac3a8567a091a6dc000d1a76d829d895ba3fb2e793b2f0f084e975618c9ac0495264ce96b474cfbe8a1e2a6a5ebd9860c056ad1 -EBUILD tornado-5.1.ebuild 1612 BLAKE2B 6a56f2fd42d54c65af03d6380790dbb367e6869b049c0cfdb9b72064946b41e808b8f351028ed02bae7352a4b873d1ef789a22cd981dd9185600c757579163a7 SHA512 9a08d95d33cd9bc892fa509c5fb1fd53d6f3951d8ae87c83f3fb39eea34784f8edb4561e8d62e99d59f0b502b0c3b5dc235119a6fcd5d436069b4c1a5fdcbd55 +EBUILD tornado-5.1.ebuild 1614 BLAKE2B b53658c6e6e1ff32c3e24ffcec98fc10f77f9fd13f6715cfd16e9335884bca70ce78fa072ae8b040cfd9e1f8d9b64fee8e91720bce67289cae743cdfb5e4df30 SHA512 f4cdb0adcbb69e364e9dee6baccad15ff19cae62233293cf82706b15fe5ee35b94dc62abfa5447a76658d84e768e7f60840ede1b1ccd989a8deb3b18ef3dd821 MISC metadata.xml 380 BLAKE2B 16a28ca707ba911df09dfad39b269bd888734c1f5e54fdc57d84f62b541e284f248137a01c13055f5e9fa1e1da0a2c9e1382006119cc11ec19302516262b7dc1 SHA512 e790429d61042b60a9011710e96df0044c64cc5ac941ab6268386138d3a66e46d40ed1098ec8bc164d9f4341040946ec7231e8f28dda11790ecc482b06978771 diff --git a/www-servers/tornado/tornado-5.1.ebuild b/www-servers/tornado/tornado-5.1.ebuild index 7b99b382e3fd..728122716d35 100644 --- a/www-servers/tornado/tornado-5.1.ebuild +++ b/www-servers/tornado/tornado-5.1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index 99908371b6b9..c6f7be608e25 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -3,6 +3,8 @@ AUX 42_mod_uwsgi-r2.conf 254 BLAKE2B 27e8a1814eb6a3a2cf265d5364971cb2aa4ff97a428 AUX gentoo.buildconf 490 BLAKE2B 320b0471c0c76ab6c8ada7b034f612fc20398eb60e1edc3530be9d177bff755779251ea880d98addacf5476e3aae20145c95fad4d7baf594e58b9ebcaf2b0dde SHA512 d5bdc136374aed58ce206ea72cc45c72750f60117eef98960356b5cd64e2152c454af6b5aebb28f03ad46b42ea95a16fbf1e4a6f976ae78744550803ac775fe2 AUX uwsgi.confd-r4 1849 BLAKE2B 80afdf7a5ebc520d887061aba9f7cd64b1bca06d3da478d8d1090a8b9cba973ac2d3dbcbc2ceb980415e98317bc55b07a9a7e6641fac593dc4dd5466bd8d67c9 SHA512 041d1bd694fad6f7c5e28944aab6d7ba53b3c7fc990ce6b7c2d97b9f3d6650c46dda8069e545c252a7400e1d825c8e46d7393a289757b1bd665e64241ca3789a AUX uwsgi.initd-r7 3746 BLAKE2B a56c5f4e32ccb415fab10f357e2a7404179285e656d9f886809da281b214e2110c76e2cf8826d8fd90aba01262a5edc7a941522ff59348972c5a4325c784b9b9 SHA512 81ed974fb2957e05c890cab29f5b5a75845e6b7de899d2695fb2fa5f49b4545daa437c81c8dc5c735b24a45655cf6320c9256bc8faa7e32ffd7a2d981922def5 +DIST uwsgi-2.0.17.1.tar.gz 800156 BLAKE2B a8697263e6e7689c0062a06a9fdb1101a2df72e0ac9122b5f8a0acc78bbdbdeaa96faa1c8870b9c3a43e2e1fb5fc835e708e1bc3d0171ae746467b4734dc299d SHA512 10d357961fde3a3f5f8e77986cc647313f95a33243e24c2afc482fce21df68a8ae48f90e7b5b76d7edc3cf8fd474d99823d6d60ef7477349abc65a319222f11b DIST uwsgi-2.0.17.tar.gz 798642 BLAKE2B 86efb2103efaeedb37ebb00de4c01477162d119ae3dea0dc0696385216e30ff2c74eb48576f86eb181b8ada4b9eaa63b0aa761e966e3301597633d33b81142e1 SHA512 639427fbb89a1c2610c1cafb6ff009398a3c0a8e27c3de3f00829428271ba97b64b1253368dd6150912cf44441052be2a63cbe81613bbe964be27ee2e570d2b2 +EBUILD uwsgi-2.0.17.1.ebuild 12786 BLAKE2B 0ec5625970bd579005e552862aeca312793b6b91c40ac0064adb9c4bdea75b97cfa13a69f92d17912655c00e4556f4f06486d1289b97127e88bd5a712506423f SHA512 0b987ba9c350f647ccd8aa8fda1e11b82ab989b5cc92abe00bc36a1a3fb860c99693e1e50494f369cf08afba3645826dbd806466e2bb493d933826686b55bf14 EBUILD uwsgi-2.0.17.ebuild 12846 BLAKE2B 90fcbf6300de611aa3d7c930dd94c4a55c175656e2bbcdcc606e1b77df1b2e481fb31beedbb20b33db0bc3c4b0e8338661fd471ae7a088a5eaa386b66c4b9b39 SHA512 7940ac487b2ab57bca5790836c40e604fe5129449aac5d6de474f31a4fb1357ce0b724647e73639e2b3f062f0a9243106d352d2413424408f30c44ec9c3e59b4 MISC metadata.xml 1597 BLAKE2B ddee6196349d4be8f3b5ba5a370eeae27bbc834d41e9f3803a2e6aef0966b01f4decbefe0cc4df3f174dde6fe8189120218a598d67dbcde20bf4fc20ad535871 SHA512 6f31168a12d1c3a95cb140624584214fcefda352b4c4904425d633a6d94a74d30186e7fa25c19b6f97cc0ca6ab0a8253cdbcedd11df3be2a32400a6292f2877b diff --git a/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild b/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild new file mode 100644 index 000000000000..623312528d19 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild @@ -0,0 +1,410 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy ) +PYTHON_REQ_USE="threads(+)" + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby22 ruby23 ruby24" + +PHP_EXT_INI="no" +PHP_EXT_NAME="dummy" +PHP_EXT_OPTIONAL_USE="php" +USE_PHP="php5-6 php7-0 php7-1 php7-2" # deps must be registered separately below + +MY_P="${P/_/-}" + +inherit apache-module eutils flag-o-matic multilib pax-utils php-ext-source-r3 python-r1 ruby-ng versionator + +DESCRIPTION="uWSGI server for Python web applications" +HOMEPAGE="http://projects.unbit.it/uwsgi/" +SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" + +UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool + http ugreen signal syslog rsyslog + router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} + {core,fast,raw,ssl}router + redislog mongodblog log{file,socket} + spooler cheaper_busyness symcall + transformation_{chunked,gzip,offload,tofile} + zergpool ) +UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron + dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter + geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam + rados router_{access,radius,spnego,xmldir} + sqlite ssi stats_pusher_statsd + systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) + +LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process +LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby ) + +# plugins to be ignored (for now): +# cheaper_backlog2: example plugin +# coroae: TODO +# cplusplus: partially example code, needs explicit class +# dummy: no idea +# example: example plugin +# exception_log: example plugin +# *java*: TODO +# v8: TODO +# matheval: TODO +IUSE="apache2 +caps debug +embedded expat jemalloc json libressl +pcre +routing selinux +ssl +xml yajl yaml zeromq" + +for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done +for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done +IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" + +REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) + uwsgi_plugins_logcrypto? ( ssl ) + uwsgi_plugins_sslrouter? ( ssl ) + routing? ( pcre ) + uwsgi_plugins_emperor_zeromq? ( zeromq ) + uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) + uwsgi_plugins_router_xmldir? ( xml !expat ) + pypy? ( python_targets_python2_7 ) + python? ( ${PYTHON_REQUIRED_USE} ) + python_asyncio? ( || ( python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_targets_python3_7 ) python_gevent ) + python_gevent? ( python ) + expat? ( xml )" + +# util-linux is required for libuuid when requesting zeromq support +# Order: +# 1. Unconditional +# 2. General features +# 3. Plugins +# 4. Language/app support +CDEPEND="sys-libs/zlib + caps? ( sys-libs/libcap ) + json? ( !yajl? ( dev-libs/jansson ) + yajl? ( dev-libs/yajl ) ) + pcre? ( dev-libs/libpcre:3 ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + xml? ( !expat? ( dev-libs/libxml2 ) + expat? ( dev-libs/expat ) ) + yaml? ( dev-libs/libyaml ) + zeromq? ( net-libs/zeromq sys-apps/util-linux ) + uwsgi_plugins_alarm_curl? ( net-misc/curl ) + uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) + uwsgi_plugins_curl_cron? ( net-misc/curl ) + uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) + uwsgi_plugins_geoip? ( dev-libs/geoip ) + uwsgi_plugins_ldap? ( net-nds/openldap ) + uwsgi_plugins_pam? ( virtual/pam ) + uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) + uwsgi_plugins_rados? ( sys-cluster/ceph ) + uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) + uwsgi_plugins_router_spnego? ( virtual/krb5 ) + uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) + uwsgi_plugins_webdav? ( dev-libs/libxml2 ) + uwsgi_plugins_xslt? ( dev-libs/libxslt ) + go? ( dev-lang/go:=[gccgo] ) + lua? ( dev-lang/lua:= ) + mono? ( =dev-lang/mono-4* ) + perl? ( dev-lang/perl:= ) + php? ( + php_targets_php5-6? ( dev-lang/php:5.6[embed] ) + php_targets_php7-0? ( dev-lang/php:7.0[embed] ) + php_targets_php7-1? ( dev-lang/php:7.1[embed] ) + php_targets_php7-2? ( dev-lang/php:7.2[embed] ) + ) + pypy? ( virtual/pypy ) + python? ( ${PYTHON_DEPS} ) + python_gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) + ruby? ( $(ruby_implementations_depend) )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-uwsgi ) + uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" + +want_apache2 + +S="${WORKDIR}/${MY_P}" +APXS2_S="${S}/apache2" +APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" + +src_unpack() { + default +} + +pkg_setup() { + python_setup + use ruby && ruby-ng_pkg_setup + depend.apache_pkg_setup +} + +src_prepare() { + default + + sed -i \ + -e "s|'-O2', ||" \ + -e "s|'-Werror', ||" \ + -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ + uwsgiconfig.py || die "sed failed" + + sed -i \ + -e "s|/lib|/$(get_libdir)|" \ + plugins/php/uwsgiplugin.py || die "sed failed" +} + +src_configure() { + local embedded_plugins=() + local plugins=() + local malloc_impl="libc" + local json="false" + local xml="false" + + for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do + use uwsgi_plugins_${p} && embedded_plugins+=("${p}") + done + for p in ${LANG_SUPPORT_SIMPLE[@]} ; do + use ${p} && plugins+=("${p}") + done + + # do not embed any plugins + if ! use embedded; then + plugins=( ${plugins[@]} ${embedded_plugins[@]} ) + embedded_plugins=() + fi + + # flatten the arrays + plugins=${plugins[@]} + embedded_plugins=${embedded_plugins[@]} + + # rename some of the use flags, language plugins are always real plugins + plugins="${plugins/perl/psgi}" + plugins="${plugins/sqlite/sqlite3}" + embedded_plugins="${embedded_plugins/sqlite/sqlite3}" + + # override defaults as requested by the user + if use xml; then + use expat && xml="expat" || xml="libxml2" + fi + if use json; then + use yajl && json="yajl" || json="jansson" + fi + use jemalloc && malloc_impl="jemalloc" + + # prepare the buildconf for gentoo + cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die + sed -i \ + -e "s|VAR_XML|${xml}|" \ + -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ + -e "s|VAR_JSON|${json}|" \ + -e "s|VAR_SSL|$(usex ssl true false)|" \ + -e "s|VAR_PCRE|$(usex pcre true false)|" \ + -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ + -e "s|VAR_ROUTING|$(usex routing true false)|" \ + -e "s|VAR_DEBUG|$(usex debug true false)|" \ + -e "s|VAR_MALLOC|${malloc_impl}|" \ + -e "s|VAR_PLUGINS|${plugins// /, }|" \ + -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ + -e "s|VAR_BUILD_DIR|${T}/plugins|" \ + -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ + buildconf/gentoo.ini || die "sed failed" + + if ! use caps; then + sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if ! use zeromq; then + sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" + fi + + if use uwsgi_plugins_emperor_pg ; then + PGPV="$(best_version dev-db/postgresql)" + PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" + sed -i \ + -e "s|pg_config|pg_config${PGSLOT/.}|" \ + plugins/emperor_pg/uwsgiplugin.py || die "sed failed" + fi +} + +each_ruby_compile() { + cd "${WORKDIR}/${MY_P}" || die "sed failed" + + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" +} + +python_compile_plugins() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + if [[ ${EPYTHON} == pypy* ]]; then + einfo "skipping because pypy is not meant to build plugins on its own" + return + fi + + ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" + + if use python_asyncio ; then + if [[ "${PYV}" == "34" || "${PYV}" == "35" ]] ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" + fi + fi + + if use python_gevent ; then + ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" + fi + + if use pypy ; then + if [[ "${PYV}" == "27" ]] ; then + # TODO: do some proper patching ? The wiki didn't help... I gave up for now. + # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so + append-ldflags -Wl,-z,noexecstack + ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" + fi + fi +} + +python_install_symlinks() { + dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} +} + +src_compile() { + mkdir -p "${T}/plugins" || die + + python uwsgiconfig.py --build gentoo || die "building uwsgi failed" + + if use go ; then + python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" + fi + + if use lua ; then + # setting the name for the pkg-config file to lua, since we don't have + # slotted lua + UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" + fi + + if use php ; then + for s in $(php_get_slots); do + UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" + done + fi + + if use python ; then + python_foreach_impl python_compile_plugins + fi + + if use ruby ; then + ruby-ng_src_compile + fi + + if use apache2 ; then + for m in proxy_uwsgi Ruwsgi uwsgi ; do + APXS2_ARGS="-c mod_${m}.c" + apache-module_src_compile + done + fi +} + +src_install() { + dobin uwsgi + pax-mark m "${D}"/usr/bin/uwsgi + + insinto /usr/$(get_libdir)/uwsgi + doins "${T}/plugins"/*.so + + use cgi && dosym uwsgi /usr/bin/uwsgi_cgi + use go && dosym uwsgi /usr/bin/uwsgi_go + use lua && dosym uwsgi /usr/bin/uwsgi_lua + use mono && dosym uwsgi /usr/bin/uwsgi_mono + use perl && dosym uwsgi /usr/bin/uwsgi_psgi + + if use php ; then + for s in $(php_get_slots); do + dosym uwsgi /usr/bin/uwsgi_${s/.} + done + fi + + if use python ; then + python_foreach_impl python_install_symlinks + python_foreach_impl python_domodule uwsgidecorators.py + fi + + if use apache2; then + for m in proxy_uwsgi Ruwsgi uwsgi ; do + APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" + apache-module_src_install + done + fi + + newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi + newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi + keepdir /etc/"${PN}".d + use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" +} + +pkg_postinst() { + if use apache2 ; then + elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." + elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." + elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." + elog "Therefore you can enable only one of them at a time." + elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." + elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." + elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." + fi + + elog "Append the following options to the uwsgi call to load the respective language plugin:" + use cgi && elog " '--plugins cgi' for cgi" + use lua && elog " '--plugins lua' for lua" + use mono && elog " '--plugins mono' for mono" + use perl && elog " '--plugins psgi' for perl" + + if use php ; then + for s in $(php_get_slots); do + elog " '--plugins ${s/.}' for ${s}" + done + fi + + python_pkg_postinst() { + local EPYV + local PYV + EPYV=${EPYTHON/.} + PYV=${EPYV/python} + + if [[ ${EPYTHON} == pypy* ]] ; then + elog " '--plugins pypy' for pypy" + return + fi + + elog " " + elog " '--plugins ${EPYV}' for ${EPYTHON}" + if use python_asyncio ; then + if [[ ${EPYV} == python34 ]] ; then + elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" + else + elog " (asyncio is only supported in python3.4)" + fi + fi + if use python_gevent ; then + elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" + fi + } + + use python && python_foreach_impl python_pkg_postinst + + if use ruby ; then + for ruby in $USE_RUBY; do + if use ruby_targets_${ruby} ; then + elog " '--plugins rack_${ruby/.}' for ${ruby}" + elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" + elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" + fi + done + fi +} |