diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-servers |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-servers')
269 files changed, 20098 insertions, 0 deletions
diff --git a/www-servers/adsf/Manifest b/www-servers/adsf/Manifest new file mode 100644 index 000000000000..000e7ca3827b --- /dev/null +++ b/www-servers/adsf/Manifest @@ -0,0 +1,4 @@ +DIST adsf-1.2.1.tar.gz 162912 SHA256 247b5061f598d9271c05d59925ac9c4f04d879254570ffc0142a48c50e71615a SHA512 88cdc903f21bb3e86fbbfec88ae9650a4676d5d57c526befd1f483bb5281501f28e2ffb6fda8e2b06f891b8f4bbd15a3e6a1c90a96e3eef1c6b4a13a39f1b8cd WHIRLPOOL 335efd8f77ca5164f5b0e62428d737d6d7a4b590937c7aef765594cd7d3913a621bd757ad81234a2a303bf93a886d70eb8066f6c9c724042871bd4cf7c4a6109 +EBUILD adsf-1.2.1.ebuild 604 SHA256 32a228d23faedeaabaeea37a7b216895da50b85a642b9a703218107467476d23 SHA512 6446ecc1d9bba35030c5f7e0650c43d534cdc495997265dc6ff2b902067abb60e7e8ff6571d1a2186490ddf823bca05cdc2edd5372fbb1a11ea60bb9f16b6e2c WHIRLPOOL bb1b6451dd593cfef086f583dd9842bcdfabbfd70483a23364939066638466e2b0cd748f5ac2f62a58995ec83be15c1661aa17e6985a4fefb37ad796cc2fe276 +MISC ChangeLog 916 SHA256 5f829414f170540336fa1eac386eb1f231fc26db86c625597b473e9f13417255 SHA512 bde63b8447b91adf4060e2c389d7550d36591dccef2b37302a260551533384c2af156206cb9b8a99a403746c8f1bbf0f9424c4e729c8286dc82a30feee0c9f92 WHIRLPOOL 2e2c1bb04e4700f4386e14f63fb1a108100bc22a22dddfdf0fdb06579d34fa382f79e6eef786f61d08d898b26e439bbf8c84de19b4a29330452828e71d12a45c +MISC metadata.xml 295 SHA256 06605fca8bfd3cacd9c1df8d94d80713bf83b2e318e8719e641e0b12c0e6d132 SHA512 640f33b2433c2259e00d0fa1daca377084010d7fc28da599ea0d3d4264567691bd4d0ad3033f1c1d852d1cdcf179b88c1e22c75e5955e344c9dfca1e82a79e9c WHIRLPOOL 04fa686aaaccdd9d6a7a8f062c90525c7fdd828e76f579dd96c058c3b47d1ddf2dc2e030ee817e3a497ba915ff5034d596b9256b1c7163fd49990d15ec4ad965 diff --git a/www-servers/adsf/adsf-1.2.1.ebuild b/www-servers/adsf/adsf-1.2.1.ebuild new file mode 100644 index 000000000000..e00cf36cec99 --- /dev/null +++ b/www-servers/adsf/adsf-1.2.1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +USE_RUBY="ruby22 ruby23 ruby24" + +RUBY_FAKEGEM_EXTRADOC="ChangeLog NEWS.md README.md" + +RUBY_FAKEGEM_TASK_DOC="" + +inherit ruby-fakegem + +DESCRIPTION="A Dead Simple Fileserver is a static file server that can launch in a directory" +HOMEPAGE="http://nanoc.stoneship.org/" +SRC_URI="https://github.com/ddfreyne/adsf/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" + +KEYWORDS="~amd64" +SLOT="0" +IUSE="" + +ruby_add_rdepend ">=dev-ruby/rack-1.0.0:*" + +ruby_add_bdepend "test? ( dev-ruby/rack-test )" diff --git a/www-servers/adsf/metadata.xml b/www-servers/adsf/metadata.xml new file mode 100644 index 000000000000..7dfd24dac19f --- /dev/null +++ b/www-servers/adsf/metadata.xml @@ -0,0 +1,10 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>graaff@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">ddfreyne/adsf</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/apache/Manifest b/www-servers/apache/Manifest new file mode 100644 index 000000000000..e670d46a07d4 --- /dev/null +++ b/www-servers/apache/Manifest @@ -0,0 +1,22 @@ +AUX 41_mod_http2.conf 189 SHA256 cd047b552a2d336a31316ca60472591992d6b2eac7bab4d8e6b50c3afa0b785e SHA512 3d56a24ea98bc3188e5d6f8e2e0148e4b718e04f23452e77750bca984c44fc7c3acd4521a945b4c415284d0a5dac0f7e846bb60daf70fe61ce2632e8fa201ed6 WHIRLPOOL 4ae759dca0656c61f737c6beaf752677377da90938754ad1b585df38f67f613aa6b68de2460a3be6e1d7ad3200f3b03ac9156b54f8ef607a96b758ff23c3893b +AUX apache-asf-httpoxy.patch 830 SHA256 5ea2bf7f64dfde9c8141578208fa9eb17702769a18eb5eb5e875bb1f44c425e8 SHA512 efa44896c55cb9a0c87d5c2fff3684e9d0bb949b3e9ca8cf15b1bffa1cafe1d4f85cff8bd949129c0b4e7123940cfe7fba06121a948b6938eef054bec4c5fb94 WHIRLPOOL 2fce1d8dc9dc0ea2e7afa4c93edd97e53c30e2a2d6d1faf2eb658ef86ccfb7260568ec1fcb10c11fc2921795cf4efa7aa2b98aab09642839441c2ade368c414a +AUX apache.conf 55 SHA256 ea616c5cc37979a006d69c51bda43fca15a4327d33175762652b29f5cdea1c7b SHA512 3a53beb7a283d17c14383f16ad14c0602681ac1b193cce8f5aca50ae9d9af3a71054ce4a9ab11cbcb72fe913459e1b306fd54660154e66afe10272f8c0f149f3 WHIRLPOOL fa348414f320a9f70001386dfb77d57ca4836c3ef3d251976077b7ad545d7f6752e534efadbf28c7dcb777388e3d844eba84b939dcf48881983388daf6ac23f0 +AUX apache2.2-hardened.service 970 SHA256 aaddbfb3953ad24b3714c54769df625d990833a24a075cfc0a10976c60dfa774 SHA512 c206e7103d592dcf4f2d62979a20f7ab3cc7ce357ffe3c06ae8137064c812b9727e01a53fd602a0a55a64ed609664061de680ff42329381db787e2dae9310c48 WHIRLPOOL 0dbec118e471363e84e00b6163ee6e7f7d9062d486523171da9c9df1f9eb3a7733bbc7262daa7f1ac9d47c1d4155d94ffd2f4b8d7905fa9372c1e275ea111b95 +AUX apache2.2.service 716 SHA256 e850ad73585fbba52ade58a39ca91adbfd52f56a0bbd426ebcadb340a7dcb62b SHA512 5f736c803772077598248bbb41f76dff396dfd2f11a60d1ba929a619275efb8c1b4c0dab78cbcdf83b9ec94db67b958b3333b01f67d71eb3b2e07dba4bca2a7c WHIRLPOOL 776a928422b8f37a12099111a1503674ca901934b60dca8596dc8bc287390be9a0e912d7ba6226dcb22eb7c669fa298ddc20fd7bf5c275b0cf019bae0d594839 +DIST gentoo-apache-2.2.29-20140922.tar.bz2 64135 SHA256 8c69c36c2f40fb81ee905b4dd72ab74aab4563c75149d302f372a451498e2678 SHA512 1d9aa12aa3ab79b5f80ee3fda020b33ff6798e5b1abbcbc138acea06a1ab9968ad240d2bdf9c5dbb9640fa9fb6718eec7175df7cc0fb8574cc4d7d5cdfb5bcc4 WHIRLPOOL f655300f0dcd2f4503cbdb25983fed902e4b717ff57e06f66486bebd0ed7cb8df56387be74b4259bfffad949bb446c5ec28f89065b6d5239585324b610be7b88 +DIST gentoo-apache-2.2.34-20170918.tar.bz2 64390 SHA256 27a1755e3cee4bf4976fd3ed7aeb55db7ad3c0076ae2081ae626d4133c91aac2 SHA512 10b42e50dcc196f60bcaefe90c382d62a61339dd8a56e899d6afb6998be4acdd376e2c3509791f22a0acf99d06add497e32703b6d523f640306a6db5e05f358a WHIRLPOOL 4480bc9ff7a7291eacdc4a8c77e12e58c48f8e1c87ed164a4af42dbdaceebd554343384291723310cbf20d8d0660817f59aa72e7cf541283a142d9f1b3fa58c2 +DIST gentoo-apache-2.4.18-r1-20160303.tar.bz2 24505 SHA256 d81e32d876594b48a7ff6d9123bf776c5bea5453eddd2fe40f4a9b79c11537aa SHA512 68f0c4de38ae05c45839fe692cbb7de641e331ca133b8aaaf69f3659dec15833cda95e6e074edb3a5b6b6d59b3fc5a4ee3589fff810707fe27417a25cd8a4c4d WHIRLPOOL fb61224b2104e611237e1d09eb4dfb3d2b8f023348c9622f7f19434b6b77d63786c41af17a300d994c14d983676f3753ab6fa52f7a7fcd07b9cea3d7eeacc9b9 +DIST gentoo-apache-2.4.27-20170918.tar.bz2 24850 SHA256 10c7404707508ce91ce59974f55fe4368ee153b299f697441f703dab1aefd17a SHA512 c58a9a0b171188ff163f6b45c47f243797d4050cf461ba1a642115350285879005be6496cee2031bffaccc0d8beda4c27de87afa2ded17cbe559f792eb7c00e8 WHIRLPOOL 143092df671320d353bb8221fe62351f5f70262fa5e83cad6904633bcbbd177810717f297081d59e3e3a37e2cb42a004c0575fb55d52e0d1ae7197768b96aef8 +DIST httpd-2.2.31.tar.bz2 5610489 SHA256 f32f9d19f535dac63b06cb55dfc023b40dcd28196b785f79f9346779e22f26ac SHA512 5aa47d4b76f692bbd8b309135ff99152df98cf69b505b9daf3f13f7f2a31443eaf4995161adfbc47a133b4d0e091fda2d95fc6b87a956f0ada18d7466ee28e74 WHIRLPOOL a2e3e53c51719cb6f7e641b41788cd89ce7b4d2ea105b403bfa3b3d4479b69c5604228269062f66722594e105e91121d05b1c9f27ca7dc4ecfcf339da8b8375c +DIST httpd-2.2.34.tar.bz2 5779739 SHA256 e53183d5dfac5740d768b4c9bea193b1099f4b06b57e5f28d7caaf9ea7498160 SHA512 e6dac5865a48533c025fe17523ee74d68c3a23f9512c9441b78a140e33cfb6835573eb049b0ad424eb5c5ca78a1915778c54e8a409da95fbdd3890cb99e08240 WHIRLPOOL 0bd86b3644fae79c74928c0cd8bc3e4b7d821544a760dbe6459df43210f690d3c4dc74168e029b0b5bbaba6fcd0433aeb4312794455d91b00b7c36c537dfdefd +DIST httpd-2.4.27.tar.bz2 6527394 SHA256 71fcc128238a690515bd8174d5330a5309161ef314a326ae45c7c15ed139c13a SHA512 7e7e8070715b74cb6890096a74e194f4c6a49c14bda685b1ad832e84312f1ac4316ea03a430e679502bfd8e1853aefa544ee002a20d0f7e994b9a590c74bc42c WHIRLPOOL 35aeaa01b2bf5772ad21d1011e619befd75fdaade5aa0ca7c61367e7b7a66af28dccf8729a53418f2598199721b68aac7d8c575797ed218150d00af4e8dd4dba +DIST httpd-2.4.28.tar.bz2 6553163 SHA256 c1197a3a62a4ab5c584ab89b249af38cf28b4adee9c0106b62999fd29f920666 SHA512 8de8e32b87e6de220e492e74db9df0882fae11c3b9732f3d3316da048c04767ac4429c0433c36f87d8705263e3376f97a7e1f66a9d7a518632a67b6fe617590a WHIRLPOOL a4c8be522d5e900e01cefc0fc6d196e3e49e45e2daffa9ec22b2dc44deace506da5a4cf68afd04b0062b87ffcd27b6e59d0b8ae71cc2304d5080d066174e95ed +EBUILD apache-2.2.31-r1.ebuild 3046 SHA256 24ce15f98c4a7aa7e095aedf4aed23f763a3b540bce5976523961c9a96440ca2 SHA512 d3f5c471783365f53a9fd0678ae806d69d6ea3b872cb5ccfe5abdc5e7ad548402a5bac11ebcd1e6100c4245f220663b956ec8b22c1d3963d7ef45b9256def3d7 WHIRLPOOL 638a1978bd526a7e0d1e3c0c77c49a2e82d8869c69a5434c3a84ae83bf5cad18fb294d53c50dd0b5acc1e0e22ad787808b336c1d0b1a31b073fba0693c0092e5 +EBUILD apache-2.2.34.ebuild 2990 SHA256 be262e41891a3fdb2096de2174fd70a027ebdb60e5b84c18afabcfa25a7d6e50 SHA512 41e284116118d0e0a354fe5fb7ec9751a9b913d6d3fdb5663dcf26dda8d715c63bfd4be8029b7ac8be06639e8baf7fe22aad9adf1cfb621f272d4a2f7b25b2e0 WHIRLPOOL d3585090f386833b207935bf133761a3c8eee335ef8a4a4af8da1ae6bec058543cca4c3fb1fbb02eb005643bc6aa0dc8a621164a620fa14e47c6b116131f0a3f +EBUILD apache-2.4.27-r1.ebuild 7751 SHA256 d40f1ec93debfd1807f6a8480584836fea988684220eb8ba5eec8065cf09c241 SHA512 aa93a1a4d18fca111289b47cc4cc81371c75ba578746e8c5c3078f3a7cb824e229ec90d1ba81bc6f81eb66e53d45665a50c273f3c4c528c365b4a3e49b9e0973 WHIRLPOOL 2c2011e1d1bd6eb497a507ff4a9a7f11e24bfa1b9344ec9eca7ee19925b7f6821c45ffbfda8012e2217ce34ffba71a1b86a4664708ac8f516f6ca634972be850 +EBUILD apache-2.4.27.ebuild 7761 SHA256 02a0e6b6d8150ee9766e9e1462ccff5036e00f97cda6540daa4bde08d356bca9 SHA512 efb043984a186acfa87e5cdbef60a65b16d33e870010d2c55ace8e7c9356202bdaec8c6c89586a1664967f27b57f0baaaf62da217c2168d9db0381ed564c1083 WHIRLPOOL 16b20195bede9c2c70451a58ba8fd8b85294a66f24a022feb683cd49719dd6cfc2dc43d451a50539727a6ba1fe5bb0a066cdb5a62fe8c4516b0b342bfe49536f +EBUILD apache-2.4.28.ebuild 7767 SHA256 e3ac8d458f9a64c1e20b31428ffe2586215a5a61387be9585a8a5cf10e02d7df SHA512 18d72e8d5d107cb127a29752ae507df58b2c2c5c2a01cce9fc85efd18fb75fd2121d2511793036144883425ef2f0054e66f09df2d728f29fda92d13a803918f0 WHIRLPOOL 496f1e3320beaa065b1a9057d507f9a51c2809500f7c39839466dc1d3fb68832ed9041719ab8229819f9d23a9b08060e2287d5fbbf36c89707e4d247f5232d70 +MISC ChangeLog 13802 SHA256 23fdf1fc5c8aedb3511251cc41d097c99895ab24e50f48377fe91a39c17b9ddc SHA512 1b92ff6422e0db92f25546ffc37b1d2200060959cb7f1af91159e08b181d66df45baae15df31586a3333877e78cc49e2fa3621a950f52193e43e861fc03babf0 WHIRLPOOL 42e008d07b470d3620d2bfd02049f97463f4dfffe9756bbcde277eb4c1b6ce21f6b2a0f8853226166510012316e22ca3a4b730180c18aa692a929041dc127830 +MISC ChangeLog-2008 105137 SHA256 4afec18ad3c76df40314edb37b5512f81ca6223c38a899534d9d15342481accf SHA512 92dfd339b1c4ddec29222076a597220dc7faa504e2ee770339892f155febbf34004e60395f9eb21b43d3b1feb5f362c2946b69cc65151b5ba00fb53b35ccb9c6 WHIRLPOOL 89d77300aafb53ae0632904118064de19313fe51f635512314471e845574e7a624a770ae4ca4e335cff67d4fee92e062d28ef985a54c577a1b8b3ea0f621c0f8 +MISC ChangeLog-2015 30572 SHA256 2608174e0cdfe351d5c8d25d21cbe9c6b7b98c6de9ee6d04da23c3de9fb95d6b SHA512 b76aaa5b8bc20f2fb45346e5d6f1f094e9f6b6f740054755bdc0399f581c78fd0c087f183ca756a63a08e8d96eedb292ffc4d2f6ddc00c8374435866e15fac9b WHIRLPOOL 8dd5292ae8fa15422c6d663420e7655cb13247380831d2f147dfdd0deaa51d6899e1c7f3b8ae9ae111074c8464e0bd94a38d491981ce84fc6268ab83c0af9396 +MISC metadata.xml 3360 SHA256 0a01a693df933e8ffeaf0795636a135cfd140dca0681b107cbde13920b516f86 SHA512 acbaf64bdaf376e4e1be9134878faf0d000d77138fe9b20f93d3c69d43d65c5e6817522f52b95028e47d1d9a2448c4ae8c1961acd90a31d6515c5e158db3364f WHIRLPOOL 1ee3e882c38d777a67ce4eb5cba9fd8a269f2feecb8b17ace06485179effd7e123b7e3235da5f40e0ea7840dbe1ea14d5eef2199a535c4661fe6105bcf156ef3 diff --git a/www-servers/apache/apache-2.2.31-r1.ebuild b/www-servers/apache/apache-2.2.31-r1.ebuild new file mode 100644 index 000000000000..7aa6f4ad3c01 --- /dev/null +++ b/www-servers/apache/apache-2.2.31-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# latest gentoo apache files +GENTOO_PATCHSTAMP="20140922" +GENTOO_DEVELOPER="polynomial-c" +GENTOO_PATCHNAME="gentoo-apache-2.2.29" + +# IUSE/USE_EXPAND magic +IUSE_MPMS_FORK="itk peruser prefork" +IUSE_MPMS_THREAD="event worker" + +IUSE_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon +authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default +authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta +charset_lite cgi cgid dav dav_fs dav_lock dbd deflate dir disk_cache dumpio +env expires ext_filter file_cache filter headers ident imagemap include info +log_config log_forensic logio mem_cache mime mime_magic negotiation proxy +proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi rewrite +reqtimeout setenvif speling status substitute unique_id userdir usertrack +version vhost_alias" +# The following are also in the source as of this version, but are not available +# for user selection: +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export +# optional_fn_import optional_hook_export optional_hook_import + +# inter-module dependencies +# TODO: this may still be incomplete +MODULE_DEPENDS=" + dav_fs:dav + dav_lock:dav + deflate:filter + disk_cache:cache + ext_filter:filter + file_cache:cache + log_forensic:log_config + logio:log_config + mem_cache:cache + mime_magic:mime + proxy_ajp:proxy + proxy_balancer:proxy + proxy_connect:proxy + proxy_ftp:proxy + proxy_http:proxy + proxy_scgi:proxy + substitute:filter +" + +# module<->define mappings +MODULE_DEFINES=" + auth_digest:AUTH_DIGEST + authnz_ldap:AUTHNZ_LDAP + cache:CACHE + dav:DAV + dav_fs:DAV + dav_lock:DAV + disk_cache:CACHE + file_cache:CACHE + info:INFO + ldap:LDAP + mem_cache:CACHE + proxy:PROXY + proxy_ajp:PROXY + proxy_balancer:PROXY + proxy_connect:PROXY + proxy_ftp:PROXY + proxy_http:PROXY + ssl:SSL + status:STATUS + suexec:SUEXEC + userdir:USERDIR +" + +# critical modules for the default config +MODULE_CRITICAL=" + authz_host + dir + mime +" + +inherit apache-2 systemd toolchain-funcs + +DESCRIPTION="The Apache Web Server" +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 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +PATCHES=( + "${FILESDIR}/${PN}-asf-httpoxy.patch" +) + +src_configure() { + # Brain dead check. + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" + + apache-2_src_configure +} + +src_install() { + apache-2_src_install + + # 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_dir="/usr/bin" + dodir ${apxs_dir} + mv "${D}"/usr/sbin/apxs "${D}"${apxs_dir} || die + ln -s ../bin/apxs "${D}"/usr/sbin/apxs || die + + systemd_newunit "${FILESDIR}/apache2.2.service" "apache2.service" + systemd_dotmpfilesd "${FILESDIR}/apache.conf" +} diff --git a/www-servers/apache/apache-2.2.34.ebuild b/www-servers/apache/apache-2.2.34.ebuild new file mode 100644 index 000000000000..0aad98f00777 --- /dev/null +++ b/www-servers/apache/apache-2.2.34.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# latest gentoo apache files +GENTOO_PATCHSTAMP="20170918" +GENTOO_DEVELOPER="whissi" +GENTOO_PATCHNAME="gentoo-apache-2.2.34" + +# IUSE/USE_EXPAND magic +IUSE_MPMS_FORK="itk peruser prefork" +IUSE_MPMS_THREAD="event worker" + +IUSE_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon +authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default +authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta +charset_lite cgi cgid dav dav_fs dav_lock dbd deflate dir disk_cache dumpio +env expires ext_filter file_cache filter headers ident imagemap include info +log_config log_forensic logio mem_cache mime mime_magic negotiation proxy +proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi rewrite +reqtimeout setenvif speling status substitute unique_id userdir usertrack +version vhost_alias" +# The following are also in the source as of this version, but are not available +# for user selection: +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export +# optional_fn_import optional_hook_export optional_hook_import + +# inter-module dependencies +# TODO: this may still be incomplete +MODULE_DEPENDS=" + dav_fs:dav + dav_lock:dav + deflate:filter + disk_cache:cache + ext_filter:filter + file_cache:cache + log_forensic:log_config + logio:log_config + mem_cache:cache + mime_magic:mime + proxy_ajp:proxy + proxy_balancer:proxy + proxy_connect:proxy + proxy_ftp:proxy + proxy_http:proxy + proxy_scgi:proxy + substitute:filter +" + +# module<->define mappings +MODULE_DEFINES=" + auth_digest:AUTH_DIGEST + authnz_ldap:AUTHNZ_LDAP + cache:CACHE + dav:DAV + dav_fs:DAV + dav_lock:DAV + disk_cache:CACHE + file_cache:CACHE + info:INFO + ldap:LDAP + mem_cache:CACHE + proxy:PROXY + proxy_ajp:PROXY + proxy_balancer:PROXY + proxy_connect:PROXY + proxy_ftp:PROXY + proxy_http:PROXY + ssl:SSL + status:STATUS + suexec:SUEXEC + userdir:USERDIR +" + +# critical modules for the default config +MODULE_CRITICAL=" + authz_host + dir + mime +" + +inherit apache-2 systemd toolchain-funcs + +DESCRIPTION="The Apache Web Server" +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 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +src_configure() { + # Brain dead check. + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" + + apache-2_src_configure +} + +src_install() { + apache-2_src_install + + # 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_dir="/usr/bin" + dodir ${apxs_dir} + mv "${D}"/usr/sbin/apxs "${D}"${apxs_dir} || die + ln -s ../bin/apxs "${D}"/usr/sbin/apxs || die + + systemd_newunit "${FILESDIR}/apache2.2.service" "apache2.service" + systemd_dotmpfilesd "${FILESDIR}/apache.conf" +} diff --git a/www-servers/apache/apache-2.4.27-r1.ebuild b/www-servers/apache/apache-2.4.27-r1.ebuild new file mode 100644 index 000000000000..960206e6c476 --- /dev/null +++ b/www-servers/apache/apache-2.4.27-r1.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# latest gentoo apache files +GENTOO_PATCHSTAMP="20170918" +GENTOO_DEVELOPER="whissi" +GENTOO_PATCHNAME="gentoo-apache-2.4.27" + +# IUSE/USE_EXPAND magic +IUSE_MPMS_FORK="prefork" +IUSE_MPMS_THREAD="event worker" + +# << obsolete modules: +# authn_default authz_default mem_cache +# mem_cache is replaced by cache_disk +# ?? buggy modules +# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found +# >> added modules for reason: +# compat: compatibility with 2.2 access control +# authz_host: new module for access control +# authn_core: functionality provided by authn_alias in previous versions +# authz_core: new module, provides core authorization capabilities +# cache_disk: replacement for mem_cache +# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3 +# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3 +# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests). +# socache_shmcb: shared object cache provider. Default config with ssl needs it +# unixd: fixes startup error: Invalid command 'User' +IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest +authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core +authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex +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 +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 +unixd version vhost_alias xml2enc" +# The following are also in the source as of this version, but are not available +# for user selection: +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export +# optional_fn_import optional_hook_export optional_hook_import + +# inter-module dependencies +# TODO: this may still be incomplete +MODULE_DEPENDS=" + dav_fs:dav + dav_lock:dav + deflate:filter + cache_disk:cache + ext_filter:filter + file_cache:cache + lbmethod_byrequests:proxy_balancer + lbmethod_byrequests:slotmem_shm + lbmethod_bytraffic:proxy_balancer + lbmethod_bybusyness:proxy_balancer + lbmethod_heartbeat:proxy_balancer + log_forensic:log_config + logio:log_config + cache_disk:cache + cache_socache:cache + mime_magic:mime + proxy_ajp:proxy + proxy_balancer:proxy + proxy_balancer:slotmem_shm + proxy_connect:proxy + proxy_ftp:proxy + proxy_html:proxy + proxy_html:xml2enc + proxy_http:proxy + proxy_scgi:proxy + proxy_fcgi:proxy + proxy_wstunnel:proxy + substitute:filter +" + +# module<->define mappings +MODULE_DEFINES=" + auth_digest:AUTH_DIGEST + authnz_ldap:AUTHNZ_LDAP + cache:CACHE + cache_disk:CACHE + cache_socache:CACHE + dav:DAV + dav_fs:DAV + dav_lock:DAV + file_cache:CACHE + http2:HTTP2 + info:INFO + ldap:LDAP + proxy:PROXY + proxy_ajp:PROXY + proxy_balancer:PROXY + proxy_connect:PROXY + proxy_ftp:PROXY + proxy_html:PROXY + proxy_http:PROXY + proxy_fcgi:PROXY + proxy_scgi:PROXY + proxy_wstunnel:PROXY + socache_shmcb:SSL + ssl:SSL + status:STATUS + suexec:SUEXEC + userdir:USERDIR +" + +# critical modules for the default config +MODULE_CRITICAL=" + authn_core + authz_core + authz_host + dir + mime + unixd +" +inherit eutils apache-2 systemd toolchain-funcs + +DESCRIPTION="The Apache Web Server" +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 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris" + +DEPEND+="apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 )" + +REQUIRED_USE="apache2_modules_http2? ( ssl )" + +pkg_setup() { + # dependend critical modules which are not allowed in global scope due + # to USE flag conditionals (bug #499260) + use ssl && MODULE_CRITICAL+=" socache_shmcb" + use doc && MODULE_CRITICAL+=" alias negotiation setenvif" + apache-2_pkg_setup +} + +src_configure() { + # Brain dead check. + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" + + apache-2_src_configure +} + +src_compile() { + if tc-is-cross-compiler; then + # This header is the same across targets, so use the build compiler. + pushd server >/dev/null + emake gen_test_char + tc-export_build_env BUILD_CC + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \ + gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die + popd >/dev/null + fi + + default +} + +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" + 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 + + # Note: wait for mod_systemd to be included in some forthcoming release, + # Then apache2.4.service can be used and systemd support controlled + # through --enable-systemd + systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service" + systemd_dotmpfilesd "${FILESDIR}/apache.conf" + #insinto /etc/apache2/modules.d + #doins "${FILESDIR}/00_systemd.conf" + + # Install http2 module config + insinto /etc/apache2/modules.d + doins "${FILESDIR}"/41_mod_http2.conf +} + +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 + if ! use "apache2_modules_${mod}"; then + echo + ewarn "Warning: Critical module not installed!" + ewarn "Modules 'authn_core', 'authz_core' and 'unixd'" + 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 + use "apache2_modules_${cmod}" || \ + ewarn "+ apache2_modules_${cmod}" + done + echo + break + fi + done + # warning for proxy_balancer and missing load balancing scheduler + if use apache2_modules_proxy_balancer; then + local lbset= + for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do + if use "apache2_modules_${mod}"; then + lbset=1 && break + fi + done + if [ ! ${lbset} ] ; then + echo + ewarn "Info: Missing load balancing scheduler algorithm module" + ewarn "(They were split off from proxy_balancer in 2.3)" + ewarn "In order to get the ability of load balancing, at least" + ewarn "one of these modules has to be present:" + ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat" + echo + fi + fi +} diff --git a/www-servers/apache/apache-2.4.27.ebuild b/www-servers/apache/apache-2.4.27.ebuild new file mode 100644 index 000000000000..90b38c3e0a0b --- /dev/null +++ b/www-servers/apache/apache-2.4.27.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# latest gentoo apache files +GENTOO_PATCHSTAMP="20160303" +GENTOO_DEVELOPER="polynomial-c" +GENTOO_PATCHNAME="gentoo-apache-2.4.18-r1" + +# IUSE/USE_EXPAND magic +IUSE_MPMS_FORK="prefork" +IUSE_MPMS_THREAD="event worker" + +# << obsolete modules: +# authn_default authz_default mem_cache +# mem_cache is replaced by cache_disk +# ?? buggy modules +# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found +# >> added modules for reason: +# compat: compatibility with 2.2 access control +# authz_host: new module for access control +# authn_core: functionality provided by authn_alias in previous versions +# authz_core: new module, provides core authorization capabilities +# cache_disk: replacement for mem_cache +# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3 +# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3 +# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests). +# socache_shmcb: shared object cache provider. Default config with ssl needs it +# unixd: fixes startup error: Invalid command 'User' +IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest +authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core +authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex +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 +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 +unixd version vhost_alias xml2enc" +# The following are also in the source as of this version, but are not available +# for user selection: +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export +# optional_fn_import optional_hook_export optional_hook_import + +# inter-module dependencies +# TODO: this may still be incomplete +MODULE_DEPENDS=" + dav_fs:dav + dav_lock:dav + deflate:filter + cache_disk:cache + ext_filter:filter + file_cache:cache + lbmethod_byrequests:proxy_balancer + lbmethod_byrequests:slotmem_shm + lbmethod_bytraffic:proxy_balancer + lbmethod_bybusyness:proxy_balancer + lbmethod_heartbeat:proxy_balancer + log_forensic:log_config + logio:log_config + cache_disk:cache + cache_socache:cache + mime_magic:mime + proxy_ajp:proxy + proxy_balancer:proxy + proxy_balancer:slotmem_shm + proxy_connect:proxy + proxy_ftp:proxy + proxy_html:proxy + proxy_html:xml2enc + proxy_http:proxy + proxy_scgi:proxy + proxy_fcgi:proxy + proxy_wstunnel:proxy + substitute:filter +" + +# module<->define mappings +MODULE_DEFINES=" + auth_digest:AUTH_DIGEST + authnz_ldap:AUTHNZ_LDAP + cache:CACHE + cache_disk:CACHE + cache_socache:CACHE + dav:DAV + dav_fs:DAV + dav_lock:DAV + file_cache:CACHE + http2:HTTP2 + info:INFO + ldap:LDAP + proxy:PROXY + proxy_ajp:PROXY + proxy_balancer:PROXY + proxy_connect:PROXY + proxy_ftp:PROXY + proxy_html:PROXY + proxy_http:PROXY + proxy_fcgi:PROXY + proxy_scgi:PROXY + proxy_wstunnel:PROXY + socache_shmcb:SSL + ssl:SSL + status:STATUS + suexec:SUEXEC + userdir:USERDIR +" + +# critical modules for the default config +MODULE_CRITICAL=" + authn_core + authz_core + authz_host + dir + mime + unixd +" +inherit eutils apache-2 systemd toolchain-funcs + +DESCRIPTION="The Apache Web Server" +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 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris" + +DEPEND+="apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 )" + +REQUIRED_USE="apache2_modules_http2? ( ssl )" + +pkg_setup() { + # dependend critical modules which are not allowed in global scope due + # to USE flag conditionals (bug #499260) + use ssl && MODULE_CRITICAL+=" socache_shmcb" + use doc && MODULE_CRITICAL+=" alias negotiation setenvif" + apache-2_pkg_setup +} + +src_configure() { + # Brain dead check. + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" + + apache-2_src_configure +} + +src_compile() { + if tc-is-cross-compiler; then + # This header is the same across targets, so use the build compiler. + pushd server >/dev/null + emake gen_test_char + tc-export_build_env BUILD_CC + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \ + gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die + popd >/dev/null + fi + + default +} + +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" + 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 + + # Note: wait for mod_systemd to be included in some forthcoming release, + # Then apache2.4.service can be used and systemd support controlled + # through --enable-systemd + systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service" + systemd_dotmpfilesd "${FILESDIR}/apache.conf" + #insinto /etc/apache2/modules.d + #doins "${FILESDIR}/00_systemd.conf" + + # Install http2 module config + insinto /etc/apache2/modules.d + doins "${FILESDIR}"/41_mod_http2.conf +} + +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 + if ! use "apache2_modules_${mod}"; then + echo + ewarn "Warning: Critical module not installed!" + ewarn "Modules 'authn_core', 'authz_core' and 'unixd'" + 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 + use "apache2_modules_${cmod}" || \ + ewarn "+ apache2_modules_${cmod}" + done + echo + break + fi + done + # warning for proxy_balancer and missing load balancing scheduler + if use apache2_modules_proxy_balancer; then + local lbset= + for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do + if use "apache2_modules_${mod}"; then + lbset=1 && break + fi + done + if [ ! ${lbset} ] ; then + echo + ewarn "Info: Missing load balancing scheduler algorithm module" + ewarn "(They were split off from proxy_balancer in 2.3)" + ewarn "In order to get the ability of load balancing, at least" + ewarn "one of these modules has to be present:" + ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat" + echo + fi + fi +} diff --git a/www-servers/apache/apache-2.4.28.ebuild b/www-servers/apache/apache-2.4.28.ebuild new file mode 100644 index 000000000000..33dec2f1025a --- /dev/null +++ b/www-servers/apache/apache-2.4.28.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# latest gentoo apache files +GENTOO_PATCHSTAMP="20160303" +GENTOO_DEVELOPER="polynomial-c" +GENTOO_PATCHNAME="gentoo-apache-2.4.18-r1" + +# IUSE/USE_EXPAND magic +IUSE_MPMS_FORK="prefork" +IUSE_MPMS_THREAD="event worker" + +# << obsolete modules: +# authn_default authz_default mem_cache +# mem_cache is replaced by cache_disk +# ?? buggy modules +# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found +# >> added modules for reason: +# compat: compatibility with 2.2 access control +# authz_host: new module for access control +# authn_core: functionality provided by authn_alias in previous versions +# authz_core: new module, provides core authorization capabilities +# cache_disk: replacement for mem_cache +# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3 +# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3 +# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3 +# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests). +# socache_shmcb: shared object cache provider. Default config with ssl needs it +# unixd: fixes startup error: Invalid command 'User' +IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest +authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core +authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex +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 +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 +unixd version vhost_alias xml2enc" +# The following are also in the source as of this version, but are not available +# for user selection: +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export +# optional_fn_import optional_hook_export optional_hook_import + +# inter-module dependencies +# TODO: this may still be incomplete +MODULE_DEPENDS=" + dav_fs:dav + dav_lock:dav + deflate:filter + cache_disk:cache + ext_filter:filter + file_cache:cache + lbmethod_byrequests:proxy_balancer + lbmethod_byrequests:slotmem_shm + lbmethod_bytraffic:proxy_balancer + lbmethod_bybusyness:proxy_balancer + lbmethod_heartbeat:proxy_balancer + log_forensic:log_config + logio:log_config + cache_disk:cache + cache_socache:cache + mime_magic:mime + proxy_ajp:proxy + proxy_balancer:proxy + proxy_balancer:slotmem_shm + proxy_connect:proxy + proxy_ftp:proxy + proxy_html:proxy + proxy_html:xml2enc + proxy_http:proxy + proxy_scgi:proxy + proxy_fcgi:proxy + proxy_wstunnel:proxy + substitute:filter +" + +# module<->define mappings +MODULE_DEFINES=" + auth_digest:AUTH_DIGEST + authnz_ldap:AUTHNZ_LDAP + cache:CACHE + cache_disk:CACHE + cache_socache:CACHE + dav:DAV + dav_fs:DAV + dav_lock:DAV + file_cache:CACHE + http2:HTTP2 + info:INFO + ldap:LDAP + proxy:PROXY + proxy_ajp:PROXY + proxy_balancer:PROXY + proxy_connect:PROXY + proxy_ftp:PROXY + proxy_html:PROXY + proxy_http:PROXY + proxy_fcgi:PROXY + proxy_scgi:PROXY + proxy_wstunnel:PROXY + socache_shmcb:SSL + ssl:SSL + status:STATUS + suexec:SUEXEC + userdir:USERDIR +" + +# critical modules for the default config +MODULE_CRITICAL=" + authn_core + authz_core + authz_host + dir + mime + unixd +" +inherit eutils apache-2 systemd toolchain-funcs + +DESCRIPTION="The Apache Web Server" +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 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris" + +DEPEND+="apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 )" + +REQUIRED_USE="apache2_modules_http2? ( ssl )" + +pkg_setup() { + # dependend critical modules which are not allowed in global scope due + # to USE flag conditionals (bug #499260) + use ssl && MODULE_CRITICAL+=" socache_shmcb" + use doc && MODULE_CRITICAL+=" alias negotiation setenvif" + apache-2_pkg_setup +} + +src_configure() { + # Brain dead check. + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" + + apache-2_src_configure +} + +src_compile() { + if tc-is-cross-compiler; then + # This header is the same across targets, so use the build compiler. + pushd server >/dev/null + emake gen_test_char + tc-export_build_env BUILD_CC + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \ + gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die + popd >/dev/null + fi + + default +} + +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" + 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 + + # Note: wait for mod_systemd to be included in some forthcoming release, + # Then apache2.4.service can be used and systemd support controlled + # through --enable-systemd + systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service" + systemd_dotmpfilesd "${FILESDIR}/apache.conf" + #insinto /etc/apache2/modules.d + #doins "${FILESDIR}/00_systemd.conf" + + # Install http2 module config + insinto /etc/apache2/modules.d + doins "${FILESDIR}"/41_mod_http2.conf +} + +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 + if ! use "apache2_modules_${mod}"; then + echo + ewarn "Warning: Critical module not installed!" + ewarn "Modules 'authn_core', 'authz_core' and 'unixd'" + 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 + use "apache2_modules_${cmod}" || \ + ewarn "+ apache2_modules_${cmod}" + done + echo + break + fi + done + # warning for proxy_balancer and missing load balancing scheduler + if use apache2_modules_proxy_balancer; then + local lbset= + for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do + if use "apache2_modules_${mod}"; then + lbset=1 && break + fi + done + if [ ! ${lbset} ] ; then + echo + ewarn "Info: Missing load balancing scheduler algorithm module" + ewarn "(They were split off from proxy_balancer in 2.3)" + ewarn "In order to get the ability of load balancing, at least" + ewarn "one of these modules has to be present:" + ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat" + echo + fi + fi +} diff --git a/www-servers/apache/files/41_mod_http2.conf b/www-servers/apache/files/41_mod_http2.conf new file mode 100644 index 000000000000..e4c9454e0127 --- /dev/null +++ b/www-servers/apache/files/41_mod_http2.conf @@ -0,0 +1,9 @@ +<IfDefine SSL> + <IfModule http2_module> + # enable debugging for this module + #LogLevel http2:info + + #Enable HTTP/2 support + Protocols h2 h2c http/1.1 + </IfModule> +</IfDefine> diff --git a/www-servers/apache/files/apache-asf-httpoxy.patch b/www-servers/apache/files/apache-asf-httpoxy.patch new file mode 100644 index 000000000000..68e3d869a77e --- /dev/null +++ b/www-servers/apache/files/apache-asf-httpoxy.patch @@ -0,0 +1,20 @@ +https://bugs.gentoo.org/589226 +https://www.apache.org/security/asf-httpoxy-response.txt + +--- server/util_script.c (revision 1752426) ++++ server/util_script.c (working copy) +@@ -186,6 +186,14 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r + else if (!strcasecmp(hdrs[i].key, "Content-length")) { + apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val); + } ++ /* HTTP_PROXY collides with a popular envvar used to configure ++ * proxies, don't let clients set/override it. But, if you must... ++ */ ++#ifndef SECURITY_HOLE_PASS_PROXY ++ else if (!strcasecmp(hdrs[i].key, "Proxy")) { ++ ; ++ } ++#endif + /* + * You really don't want to disable this check, since it leaves you + * wide open to CGIs stealing passwords and people viewing them diff --git a/www-servers/apache/files/apache.conf b/www-servers/apache/files/apache.conf new file mode 100644 index 000000000000..56e23aefaf8e --- /dev/null +++ b/www-servers/apache/files/apache.conf @@ -0,0 +1,2 @@ +d /run/apache2 710 root apache +d /run/apache_ssl_mutex diff --git a/www-servers/apache/files/apache2.2-hardened.service b/www-servers/apache/files/apache2.2-hardened.service new file mode 100644 index 000000000000..7a512a733e72 --- /dev/null +++ b/www-servers/apache/files/apache2.2-hardened.service @@ -0,0 +1,27 @@ +[Unit] +Description=The Apache HTTP Server +After=network.target remote-fs.target nss-lookup.target + +[Service] +EnvironmentFile=/etc/conf.d/apache2 +ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND +ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful +ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop +# We want systemd to give httpd some time to finish gracefully, but still want +# it to kill httpd after TimeoutStopSec if something went wrong during the +# graceful stop. Normally, Systemd sends SIGTERM signal right after the +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give +# httpd time to finish. +KillSignal=SIGCONT +PrivateTmp=true +#Hardening +PrivateTmp=true +CapabilityBoundingSet=CAP_CHOWN CAP_SETGID CAP_SETUID CAP_DAC_OVERRIDE CAP_KILL CAP_NET_BIND_SERVICE CAP_IPC_LOCK +SecureBits=noroot-locked +ProtectSystem=full +NoNewPrivileges=true +PrivateDevices=true +MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/apache/files/apache2.2.service b/www-servers/apache/files/apache2.2.service new file mode 100644 index 000000000000..76f783a423b9 --- /dev/null +++ b/www-servers/apache/files/apache2.2.service @@ -0,0 +1,19 @@ +[Unit] +Description=The Apache HTTP Server +After=network.target remote-fs.target nss-lookup.target + +[Service] +EnvironmentFile=/etc/conf.d/apache2 +ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND +ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful +ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop +# We want systemd to give httpd some time to finish gracefully, but still want +# it to kill httpd after TimeoutStopSec if something went wrong during the +# graceful stop. Normally, Systemd sends SIGTERM signal right after the +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give +# httpd time to finish. +KillSignal=SIGCONT +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/apache/metadata.xml b/www-servers/apache/metadata.xml new file mode 100644 index 000000000000..631209d0e12f --- /dev/null +++ b/www-servers/apache/metadata.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> + <longdescription> + The Apache HTTP Server Project is an effort to develop and maintain an + open-source HTTP server for modern operating systems. The goal of this + project is to provide a secure, efficient and extensible server that + provides HTTP services in sync with the current HTTP standards. + </longdescription> + <use> + <flag name="suexec">Install suexec with apache</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> + <flag name="apache2_modules_authz_core">Provides core authorization capabilities to various authorization/authorization modules, such as authn_file and authz_user.</flag> + <flag name="apache2_modules_authz_dbd">Provides authorization capabilities via SQL database so that authenticated users can be allowed or denied access to portions of the web site by group membership.</flag> + <flag name="apache2_modules_cache_disk">Disk based storage module for the HTTP caching filter (similar to mem_cache in previous versions).</flag> + <flag name="apache2_modules_cache_socache">Shared object cache (socache) based storage module for the HTTP caching filter.</flag> + <flag name="apache2_modules_proxy_html">Module to rewrite links in html pages behind a reverse proxy</flag> + <flag name="apache2_modules_http2">Enable http2/alpn module</flag> + <flag name="apache2_modules_lbmethod_byrequests">Request counting load balancer scheduler algorithm for proxy_balancer.</flag> + <flag name="apache2_modules_lbmethod_bytraffic">Weighted traffic counting load balancer scheduler algorithm for proxy_balancer.</flag> + <flag name="apache2_modules_lbmethod_bybusyness">Pending request counting load balancer scheduler algorithm for proxy_balancer.</flag> + <flag name="apache2_modules_lbmethod_heartbeat">Heartbeat traffic counting load balancer scheduler algorithm for proxy_balancer.</flag> + <flag name="apache2_modules_macro">Macros for the Apache config file.</flag> + <flag name="apache2_modules_slotmem_shm">Slot-based shared memory provider.</flag> + <flag name="apache2_modules_socache_shmcb">A shared object cache provider using a high-performance cyclic buffer inside a shared memory segment.</flag> + <flag name="apache2_modules_unixd">Basic (required) security for Unix-family platforms.</flag> + <flag name="apache2_modules_proxy_fcgi">FCGI support module for mod_proxy.</flag> + <flag name="apache2_modules_proxy_wstunnel">Provides support for the tunnelling of web socket connections to a backend websockets server.</flag> + <flag name="apache2_modules_ratelimit">Ratelimit module for transfer rate management</flag> + <flag name="apache2_modules_remoteip">Remotip module for logging</flag> + <flag name="apache2_modules_xml2enc">Enable xml2 encoding module</flag> + </use> +</pkgmetadata> diff --git a/www-servers/boa/Manifest b/www-servers/boa/Manifest new file mode 100644 index 000000000000..bdd5a4177463 --- /dev/null +++ b/www-servers/boa/Manifest @@ -0,0 +1,14 @@ +AUX boa-0.94.14_rc21-ENOSYS.patch 800 SHA256 2cc5662ae9ce9e41f51538c6f3c83462aa6768e93b949252283640b2fab49c38 SHA512 2f3131f32fc748ff9ad1dca746597939662ebbcde086df1f21de4e6e84afda26309bee32de86ebce650070ce1020b7edaecdf3e096e3ed124739193cc479adb6 WHIRLPOOL 0961c61ecc61ca9bbfea0633bbd3fc4687991a292baaf058fa2d2271f5f4464fb9770fdb0b0bcf210219281b9a981b282891ec8b6c3646786f5a747b69d49fb6 +AUX boa-0.94.14_rc21-texi.patch 431 SHA256 e0c6a7746ed40d2b023716f2ccebda982f2e4765441a2cc69fe2f3838edd60cd SHA512 f1abf52b7257dc590b58c6264f06710cb0163c1d2762fd6bb9cf0f086a72bbfc6b627aac04d187827660d1eb899850549849f6c713feaf47a802db56c39d5b23 WHIRLPOOL a4ed5fb4efcdbfe4f7b85a0883cc59657dfe6ac2d5dd2b3382fcfc2db471b8f182118366af7cba2a4a35ebd83b6c7d30773db028bac59202b072b300586b5574 +AUX boa.conf 7339 SHA256 01a8d6632d946ea3b170ad32c25f98e77e9d2d3d9884e0bea678e86aaf87d554 SHA512 28a4d171aa31cdc961d93df0076f520d1c3d8d502027c7ade2acdd63a154c5c1efbda63a94a1569cc23a824f2637cec134201e2994ace5d0ae65d60134e7322c WHIRLPOOL 1513005fe4bea45e78b592cf6f15cbbf167610b1b48b897e27842b5f2ae855604d7b0bcdff10499c86ecd7bc0f8ed032be6415c2e5c280db5e36514209e81239 +AUX boa.conf.d 104 SHA256 06380c2fd0d579286c97e5d70ae494705862a82ec2510af69f0107b247cd2ddf SHA512 334e6699d2a8e83fd81c08df5d140658a8cfcc10538c3496752c5eb37a4ce89ed604a9c094c767dc3d8d88053176f88dc8b9ec9b85ac134f09bf0fc15df994fe WHIRLPOOL c01a2e3dd09c02823c5c4385fd9b55b3f71b9e997dad778074e5879d6ed908c427cd6828ed0d0ef212963241b5ecdfead594c964f396f8bda1da46a3edcc2b08 +AUX boa.initd 639 SHA256 3b130f0449e9344def78faeca9e8640b131b84a673bba16c067b7947d5c390f3 SHA512 41c242e17c5cc21c7834a4b7c2123fe47b00b3a107dd11c003bbb21d6ff599df1adfe0c58d7451a3326662d9c802af78996a6c4434ee0407f26eedeb45559305 WHIRLPOOL b4e6d62163dbbacff0b2e56614ed1d3537af860ae930b83050854da11fc5d5aa87d1cc4a6ed08ffd656b972aa5951a84c067303b2932024cbcb43c06c7887239 +AUX boa.rc6 816 SHA256 3679cdb452a10e0a696eb2eec15585b2ea678557e628549a335adb73e2d2eae7 SHA512 c06898e3a5277de8b44f97b948628ad3fa106a30b5b0ddbf2b83825ee5c9c7dfa5f86ad5b23af8c2287a7368572a9510af46865520d05785faf3bc2d8224f471 WHIRLPOOL d57e9920b8e21ee472b1f646ce63bbb5151b9859ed5bd8346f8a98165033ff4fee1329205d7f1130ec5b5d974fd468896f31635704dc20e8210a218691f65d4f +AUX boa.service 131 SHA256 f4a3a2c04be02da9f03ce6246b16e2bc1b89caf38f157741dd56c6dbdaa400e8 SHA512 62628a38bd679e10b0f5d3712d206fe292d4adf0ed4af9387b7e923ce0c2efad060f139a8cf5d0aad89485ee4ba94565387e6cf0858e779538d24705aa01ee99 WHIRLPOOL 82cf771d3480f8844863423c52a37c13297f8417bd5e85df73d7a7a489bf1bd77e8ca7805cd3edb6b280709ab2a9bf38ccf2b29aa2b5d14a15c4616faf83b1cc +AUX mime.types 5488 SHA256 6e1c21758dd18a914f69bcfff8d6c8de5ad4ae4ba68cab52eeea65ce0ce108e7 SHA512 5498bc2cf93640f04240b96ff6ac297d9900d44180a9fc6d4a763f5c97c140f46e0a16efb736be6e295b9448915c80830854eb2c705f37b04633fed6352262bd WHIRLPOOL f22aa3fda40dfe4660d9b6b17614f8356e327a8d6ee553788715a9f613e477d200949e76fb7fd20280c83ae00cd05fcbc177a558df98bc5fcedfc8e979cc38ae +DIST boa-0.94.14rc21.tar.gz 199950 SHA256 02c51bf25f29d56e641b662f0767759654c28d88ec31f55c5a73d57edfe13cf6 SHA512 ca8e5c2c29f0b6cd4fd2f7268682dc345c1d37f4de099319e22d63d822a72195659d707e148f2e2725edec88d90208fc40702f15ab2cacadc9957f1a0437d798 WHIRLPOOL 81e2175a79d8592a6c801ea07350743e2b606d928e63e11a1642b0be195752073c0fb7187e2875a80f849481794c435bf1a053d5f0465c912e6a59746cf267c7 +EBUILD boa-0.94.14_rc21-r1.ebuild 1200 SHA256 30011ce78b438ac66d0992d948fb1763ace6b9d3e7333ea1a1f0373c78c5bd25 SHA512 1167ac6fb017b9b21b3d90b36afb3cc34fb4b270169e5e0747847f171b3161bb49ed6c5c36934ad5a180fd792f70b3bae2902ee117b98dcd7413311b69929337 WHIRLPOOL 0316313702867d8afc0ba08bac673db1c06a648563612bfed0c89fa3b327e525b8956cef35a7993cae595d72ad8ae32a970c7df120af6ea8548c3e4e3eea8d39 +EBUILD boa-0.94.14_rc21-r2.ebuild 1202 SHA256 aa607d817d7ea8ee1ffd0e1c1a3011374a4bc6119931d1be36a85979ba797975 SHA512 8251a496b079e459a3e00f333f6b75d3a35b1c94e980a33e777411320e7d0bd001f46dde3abf2ab377f6f5cfa041db0f226a75b438d38107224a8494a34293fc WHIRLPOOL 117c709f3927e73db4e073029024d9661b13308866399293181bc5f8aa62f6ced92c5ab9cd7de6e9dcaca71d7ab4b5d158684569f777c88036ea45714430add5 +MISC ChangeLog 2720 SHA256 c4217c162cca072967af7de177dc4e6adb595b832cc6a5b187109a6da459d59d SHA512 cf5045fae3515ea4e253f602b30bed9af1cf8327d9fc70011d6f90d7a41a2b82f1fc476a6a52ea159cc155a4a52be5ed898389a270d30f94300187ae18324d4f WHIRLPOOL fbcfaf86d8d7ed57cda29f6e75d19f634408a808bcb05b6d16a0b5f5d08153b6cb2d45ff9666f9c4206cecdc7f8240ff123723773938ea1b1a891829d87af274 +MISC ChangeLog-2015 7071 SHA256 872925d319ba79e5768b71a12374531b817067e527a1a6ca76ca8882db800156 SHA512 e26f30fbd5e3715b5808caffd0bf8f9cb14076555517661e3e4a111b6e1d5c672fd0566c8c454613912f7c18a415c49f44153cfaebe449d97d682ff05419ee79 WHIRLPOOL ea81798645548efeb79691419b44fdd857269241dec8b67ca5a31cb6126d916cfd32fe4c84be369b6a2de4c2931eec224dbe0fa0c427a9ee6f87bdfc87bf8b7f +MISC metadata.xml 247 SHA256 34d6ed4186bad4ac57e0b4c08b657b14e28852a83c4ccf4d8a62f7829063b1cf SHA512 d6e2ea8a9d74791bcbf3d6311a66bafc20b8f4db3a576d9a8d54b86d7afb231122b8d87f71f3f46360980adf8d815c633b6d5041f9a30fc8656e8fb66057a282 WHIRLPOOL fbd18b3e6e3d777e8d78e91b8d32c5e357fd2a1c754d2c9add4622be682521e59556f466cba397d913f0e63265202744ceaf76dc7823be0a172a9bf4da6a2579 diff --git a/www-servers/boa/boa-0.94.14_rc21-r1.ebuild b/www-servers/boa/boa-0.94.14_rc21-r1.ebuild new file mode 100644 index 000000000000..1b0652fa298e --- /dev/null +++ b/www-servers/boa/boa-0.94.14_rc21-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils systemd + +MY_P=${P/_/} +DESCRIPTION="A very small and very fast http daemon" +SRC_URI="http://www.boa.org/${MY_P}.tar.gz" +HOMEPAGE="http://www.boa.org/" + +KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86" +LICENSE="GPL-2" +SLOT="0" +IUSE="doc" + +RDEPEND="" +DEPEND="sys-devel/bison + sys-devel/flex + doc? ( virtual/latex-base )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-texi.patch + epatch "${FILESDIR}"/${P}-ENOSYS.patch +} + +src_compile() { + default + + use doc || sed -i -e '/^all:/s/boa.dvi //' docs/Makefile + emake docs +} + +src_install() { + dosbin src/boa + doman docs/boa.8 + doinfo docs/boa.info + if use doc; then + dodoc docs/boa.html + dodoc docs/boa_banner.png + dodoc docs/boa.dvi + fi + + keepdir /var/log/boa + keepdir /var/www/localhost/htdocs + keepdir /var/www/localhost/cgi-bin + keepdir /var/www/localhost/icons + + newinitd "${FILESDIR}"/boa.rc6 boa + newconfd "${FILESDIR}"/boa.conf.d boa + + systemd_dounit "${FILESDIR}"/boa.service + + exeinto /usr/lib/boa + doexe src/boa_indexer + + insinto /etc/boa + doins "${FILESDIR}"/boa.conf + doins "${FILESDIR}"/mime.types +} diff --git a/www-servers/boa/boa-0.94.14_rc21-r2.ebuild b/www-servers/boa/boa-0.94.14_rc21-r2.ebuild new file mode 100644 index 000000000000..bde46ceae873 --- /dev/null +++ b/www-servers/boa/boa-0.94.14_rc21-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils systemd + +MY_P=${P/_/} +DESCRIPTION="A very small and very fast http daemon" +SRC_URI="http://www.boa.org/${MY_P}.tar.gz" +HOMEPAGE="http://www.boa.org/" + +KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86" +LICENSE="GPL-2" +SLOT="0" +IUSE="doc" + +RDEPEND="" +DEPEND="sys-devel/bison + sys-devel/flex + doc? ( virtual/latex-base )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-texi.patch + epatch "${FILESDIR}"/${P}-ENOSYS.patch +} + +src_compile() { + default + + use doc || sed -i -e '/^all:/s/boa.dvi //' docs/Makefile + emake docs +} + +src_install() { + dosbin src/boa + doman docs/boa.8 + doinfo docs/boa.info + if use doc; then + dodoc docs/boa.html + dodoc docs/boa_banner.png + dodoc docs/boa.dvi + fi + + keepdir /var/log/boa + keepdir /var/www/localhost/htdocs + keepdir /var/www/localhost/cgi-bin + keepdir /var/www/localhost/icons + + newinitd "${FILESDIR}"/boa.initd boa + newconfd "${FILESDIR}"/boa.conf.d boa + + systemd_dounit "${FILESDIR}"/boa.service + + exeinto /usr/lib/boa + doexe src/boa_indexer + + insinto /etc/boa + doins "${FILESDIR}"/boa.conf + doins "${FILESDIR}"/mime.types +} diff --git a/www-servers/boa/files/boa-0.94.14_rc21-ENOSYS.patch b/www-servers/boa/files/boa-0.94.14_rc21-ENOSYS.patch new file mode 100644 index 000000000000..35dc3d2493e7 --- /dev/null +++ b/www-servers/boa/files/boa-0.94.14_rc21-ENOSYS.patch @@ -0,0 +1,17 @@ +check for sendfile() returning ENOSYS and fall back to standard I/O. +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330871 + +diff -Naur boa-0.94.14rc21-orig/src/pipe.c boa-0.94.14rc21/src/pipe.c +--- boa-0.94.14rc21-orig/src/pipe.c 2007-07-01 10:49:23.000000000 -0600 ++++ boa-0.94.14rc21/src/pipe.c 2007-07-01 10:56:56.000000000 -0600 +@@ -215,7 +215,9 @@ + } + req->ranges->start = sendfile_offset; + if (bytes_written < 0) { +- if (errno == EWOULDBLOCK || errno == EAGAIN) { ++ if (errno == ENOSYS) { ++ return io_shuffle(req); ++ } else if (errno == EWOULDBLOCK || errno == EAGAIN) { + return -1; /* request blocked at the pipe level, but keep going */ + } else if (errno == EINTR) { + goto retrysendfile; diff --git a/www-servers/boa/files/boa-0.94.14_rc21-texi.patch b/www-servers/boa/files/boa-0.94.14_rc21-texi.patch new file mode 100644 index 000000000000..68fcdfbe08e3 --- /dev/null +++ b/www-servers/boa/files/boa-0.94.14_rc21-texi.patch @@ -0,0 +1,14 @@ +--- docs/boa.texi.org 2003-02-02 06:02:22.000000000 +0100 ++++ docs/boa.texi 2007-05-21 01:22:27.997819260 +0200 +@@ -33,10 +33,10 @@ + @direntry + * Boa: (boa). The Boa Webserver + @end direntry +-@end ifinfo + + @comment node-name, next, previous, up + @node Top, Introduction, , (dir) ++@end ifinfo + + Welcome to the documentation for Boa, a high performance + HTTP Server for UN*X-alike computers, covered by the diff --git a/www-servers/boa/files/boa.conf b/www-servers/boa/files/boa.conf new file mode 100644 index 000000000000..a888ffc5427b --- /dev/null +++ b/www-servers/boa/files/boa.conf @@ -0,0 +1,191 @@ +# Boa v0.94 configuration file +# File format has not changed from 0.93 +# File format has changed little from 0.92 +# version changes are noted in the comments +# +# The Boa configuration file is parsed with a lex/yacc or flex/bison +# generated parser. If it reports an error, the line number will be +# provided; it should be easy to spot. The syntax of each of these +# rules is very simple, and they can occur in any order. Where possible +# these directives mimic those of NCSA httpd 1.3; I saw no reason to +# introduce gratuitous differences. + +# The "ServerRoot" is not in this configuration file. It can be compiled +# into the server (see defines.h) or specified on the command line with +# the -c option, for example: +# +# boa -c /usr/local/boa + + +# Port: The port Boa runs on. The default port for http servers is 80. +# If it is less than 1024, the server must be started as root. + +Port 80 + +# Listen: the Internet address to bind(2) to. If you leave it out, +# it takes the behavior before 0.93.17.2, which is to bind to all +# addresses (INADDR_ANY). You only get one "Listen" directive, +# if you want service on multiple IP addresses, you have three choices: +# 1. Run boa without a "Listen" directive +# a. All addresses are treated the same; makes sense if the addresses +# are localhost, ppp, and eth0. +# b. Use the VirtualHost directive below to point requests to different +# files. Should be good for a very large number of addresses (web +# hosting clients). +# 2. Run one copy of boa per IP address, each has its own configuration +# with a "Listen" directive. No big deal up to a few tens of addresses. +# Nice separation between clients. +# The name you provide gets run through inet_aton(3), so you have to use dotted +# quad notation. This configuration is too important to trust some DNS. + +#Listen 192.68.0.5 + +# User: The name or UID the server should run as. +# Group: The group name or GID the server should run as. + +User nobody +Group nogroup + +# ServerAdmin: The email address where server problems should be sent. +# Note: this is not currently used, except as an environment variable +# for CGIs. + +#ServerAdmin root@localhost + +# ErrorLog: The location of the error log file. If this does not start +# with /, it is considered relative to the server root. +# Set to /dev/null if you don't want errors logged. +# If unset, defaults to /dev/stderr + +ErrorLog /var/log/boa/error_log +# Please NOTE: Sending the logs to a pipe ('|'), as shown below, +# is somewhat experimental and might fail under heavy load. +# "Usual libc implementations of printf will stall the whole +# process if the receiving end of a pipe stops reading." +#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log" + +# AccessLog: The location of the access log file. If this does not +# start with /, it is considered relative to the server root. +# Comment out or set to /dev/null (less effective) to disable +# Access logging. + +AccessLog /var/log/boa/access_log +# Please NOTE: Sending the logs to a pipe ('|'), as shown below, +# is somewhat experimental and might fail under heavy load. +# "Usual libc implementations of printf will stall the whole +# process if the receiving end of a pipe stops reading." +#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log" + +# UseLocaltime: Logical switch. Uncomment to use localtime +# instead of UTC time +#UseLocaltime + +# VerboseCGILogs: this is just a logical switch. +# It simply notes the start and stop times of cgis in the error log +# Comment out to disable. + +#VerboseCGILogs + +# ServerName: the name of this server that should be sent back to +# clients if different than that returned by gethostname + gethostbyname + +#ServerName www.your.org.here + +# VirtualHost: a logical switch. +# Comment out to disable. +# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A' +# become /var/www/IP-A. +# Example: http://localhost/ becomes /var/www/127.0.0.1 +# +# Not used until version 0.93.17.2. This "feature" also breaks commonlog +# output rules, it prepends the interface number to each access_log line. +# You are expected to fix that problem with a postprocessing script. + +#VirtualHost + +# DocumentRoot: The root directory of the HTML documents. +# Comment out to disable server non user files. + +DocumentRoot /var/www/localhost/htdocs + +# UserDir: The name of the directory which is appended onto a user's home +# directory if a ~user request is recieved. + +UserDir public_html + +# DirectoryIndex: Name of the file to use as a pre-written HTML +# directory index. Please MAKE AND USE THESE FILES. On the +# fly creation of directory indexes can be _slow_. +# Comment out to always use DirectoryMaker + +DirectoryIndex index.html + +# DirectoryMaker: Name of program used to create a directory listing. +# Comment out to disable directory listings. If both this and +# DirectoryIndex are commented out, accessing a directory will give +# an error (though accessing files in the directory are still ok). + +DirectoryMaker /usr/lib/boa/boa_indexer + +# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker +# has been commented out, the the on-the-fly indexing of Boa can be used +# to generate indexes of directories. Be warned that the output is +# extremely minimal and can cause delays when slow disks are used. +# Note: The DirectoryCache must be writable by the same user/group that +# Boa runs as. + +# DirectoryCache /var/spool/boa/dircache + +# KeepAliveMax: Number of KeepAlive requests to allow per connection +# Comment out, or set to 0 to disable keepalive processing + +KeepAliveMax 1000 + +# KeepAliveTimeout: seconds to wait before keepalive connection times out + +KeepAliveTimeout 10 + +# MimeTypes: This is the file that is used to generate mime type pairs +# and Content-Type fields for boa. +# Comment out to avoid loading mime.types (better use AddType!) + +MimeTypes /etc/boa/mime.types + +# DefaultType: MIME type used if the file extension is unknown, or there +# is no file extension. + +DefaultType text/plain + +# AddType: adds types without editing mime.types +# Example: AddType type extension [extension ...] + +# Uncomment the next line if you want .cgi files to execute from anywhere +#AddType application/x-httpd-cgi cgi + +# Redirect, Alias, and ScriptAlias all have the same semantics -- they +# match the beginning of a request and take appropriate action. Use +# Redirect for other servers, Alias for the same server, and ScriptAlias +# to enable directories for script execution. + +# Redirect allows you to tell clients about documents which used to exist in +# your server's namespace, but do not anymore. This allows you to tell the +# clients where to look for the relocated document. +# Example: Redirect /bar http://elsewhere/feh/bar + +# Aliases: Aliases one path to another. +# Example: Alias /path1/bar /path2/foo + +Alias /doc /usr/share/doc +Alias /icons /var/www/localhost/icons + +# ScriptAlias: Maps a virtual path to a directory for serving scripts +# Example: ScriptAlias /htbin/ /www/htbin/ + +ScriptAlias /cgi-bin/ /var/www/localhost/cgi-bin/ + +# Do not remove this line if you are using sys-apps/OpenRC to manage the +# boa server. +# A PidFile setting is needed in order for OpenRC to stop boa, and it +# must match the setting in the service script. + +PidFile /run/boa.pid diff --git a/www-servers/boa/files/boa.conf.d b/www-servers/boa/files/boa.conf.d new file mode 100644 index 000000000000..5952e434dbc5 --- /dev/null +++ b/www-servers/boa/files/boa.conf.d @@ -0,0 +1,4 @@ +# config file for /etc/init.d/boa +# +# The only option allowed is '-c ServerRoot' +BOA_OPTS="-c /etc/boa" diff --git a/www-servers/boa/files/boa.initd b/www-servers/boa/files/boa.initd new file mode 100644 index 000000000000..fe9b63efe1d6 --- /dev/null +++ b/www-servers/boa/files/boa.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NB: Standard config is in /etc/boa/boa.conf +# NB: Arguments to pass to boa are in /etc/conf.d/boa + +command=/usr/sbin/boa +command_args="${BOA_OPTS}" +pidfile="/run/boa.pid" + +depend() { + need net +} + +start_pre() { + if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then + SR="$(echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }')" + else + SR=/etc/boa + fi + + if [ ! -e ${SR}/boa.conf ] ; then + eerror "You need a ${SR}/boa.conf to run Boa" + eerror "There is a sample file in /usr/share/docs/boa" + return 1 + fi +} diff --git a/www-servers/boa/files/boa.rc6 b/www-servers/boa/files/boa.rc6 new file mode 100644 index 000000000000..506abfbe697c --- /dev/null +++ b/www-servers/boa/files/boa.rc6 @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NB: Standard config is in /etc/boa/boa.conf +# NB: Arguments to pass to boa are in /etc/conf.d/boa + +depend() { + need net +} + +checkconfig() { + if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then + SR=`echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }'` + else + SR=/etc/boa + fi + + if [ ! -e ${SR}/boa.conf ] ; then + eerror "You need a ${SR}/boa.conf to run Boa" + eerror "There is a sample file in /usr/share/docs/boa" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Boa" + start-stop-daemon --quiet --start --exec /usr/sbin/boa -- ${BOA_OPTS} + eend $? +} + +stop() { + ebegin "Stopping Boa" + start-stop-daemon --quiet --stop --name boa --exec /usr/sbin/boa + eend $? +} diff --git a/www-servers/boa/files/boa.service b/www-servers/boa/files/boa.service new file mode 100644 index 000000000000..e4410d8e061f --- /dev/null +++ b/www-servers/boa/files/boa.service @@ -0,0 +1,9 @@ +[Unit] +Description=Boa web server +After=network.target + +[Service] +ExecStart=/usr/sbin/boa -d + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/boa/files/mime.types b/www-servers/boa/files/mime.types new file mode 100644 index 000000000000..53f6ea1011c8 --- /dev/null +++ b/www-servers/boa/files/mime.types @@ -0,0 +1,205 @@ +############################################################################### +# +# MIME-TYPES and the extensions that represent them +# +# This file is part of the "mime-support" package. Please send email (not a +# bug report) to mime-support@packages.debian.org if you would like new types +# and/or extensions to be added. +# +# Note: Compression schemes like "gzip", "bzip", and "compress" are not +# actually "mime-types". They are "encodings" and hence must _not_ have +# entries in this file to map their extensions. The "mime-type" of an +# encoded file refers to the type of data that has been encoded, not the +# type of the encoding. +# +############################################################################### + + +application/activemessage +application/andrew-inset +application/applefile +application/atomicmail +application/cu-seeme csm cu +application/dca-rft +application/dec-dx +application/dsptype tsp +application/futuresplash spl +application/ghostview +application/mac-binhex40 hqx +application/macwriteii +application/msaccess mdb +application/msword doc dot +application/news-message-id +application/news-transmission +application/octet-stream bin +application/oda oda +application/pdf pdf +application/pgp-signature pgp +application/postscript ps ai eps +application/remote-printing +application/rtf rtf +application/slate +application/vnd.ms-excel xls xlb +application/vnd.ms-powerpoint ppt pps pot +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/wita +application/wordperfect5.1 wp5 +application/zip zip +application/x-123 wk +application/x-bcpio bcpio +application/x-chess-pgn pgn +application/x-core +application/x-cpio cpio +application/x-csh +application/x-debian-package deb +application/x-director dcr dir dxr +application/x-dms dms +application/x-dvi dvi +application/x-executable +application/x-font pfa pfb gsf pcf pcf.Z +application/x-gnumeric gnumeric +application/x-gtar gtar tgz +application/x-hdf hdf +application/x-httpd-php phtml pht php +application/x-httpd-php3 php3 +application/x-httpd-php3-source phps +application/x-httpd-php3-preprocessed php3p +application/x-httpd-php4 php4 +application/x-ica ica +application/x-java class +application/x-javascript js +application/x-kdelnk +application/x-kchart chrt +application/x-killustrator kil +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex +application/x-lha lha +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/x-mif mif +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-netcdf nc cdf +application/x-ns-proxy-autoconfig pac +application/x-object o +application/x-ogg ogg +application/x-oz-application oza +application/x-perl pl pm +application/x-redhat-package-manager rpm +application/x-rx +application/x-sh +application/x-shar shar +application/x-shellscript +application/x-shockwave-flash swf swfl +application/x-stuffit sit +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl +application/x-tex +application/x-tex-gf gf +application/x-tex-pk pk PK +application/x-texinfo texinfo texi +application/x-trash ~ % bak old sik +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x-wingz wz + +audio/basic au snd +audio/midi mid midi +audio/mpeg mpga mpega mp2 mp3 +audio/mpegurl m3u +audio/prs.sid sid +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-pn-realaudio ra rm ram +audio/x-wav wav + +image/bitmap bmp +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/pcx pcx +image/png png +image/tiff tiff tif +image/vnd.wap.wbmp wbmp +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-jng jng +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/chardevice +inode/blockdevice +inode/directory-locked +inode/directory +inode/fifo +inode/socket + +message/external-body +message/news +message/partial +message/rfc822 + +multipart/alternative +multipart/appledouble +multipart/digest +multipart/mixed +multipart/parallel + +text/comma-separated-values csv +text/css css +text/english +text/html htm html xhtml +text/mathml mml +text/plain txt text diff +text/richtext rtx +text/tab-separated-values tsv +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/xml xml +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-crontab +text/x-csh csh +text/x-csrc c +text/x-java java +text/x-makefile +text/x-moc moc +text/x-pascal p pas +text/x-setext etx +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs +text/x-vcard vcf + +video/dl dl +video/fli fli +video/gl gl +video/mpeg mpeg mpg mpe +video/quicktime qt mov +video/x-mng mng +video/x-ms-asf asf asx +video/x-msvideo avi +video/x-sgi-movie movie + +x-world/x-vrml vrm vrml wrl diff --git a/www-servers/boa/metadata.xml b/www-servers/boa/metadata.xml new file mode 100644 index 000000000000..0319eec4c8be --- /dev/null +++ b/www-servers/boa/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> +</pkgmetadata> diff --git a/www-servers/bozohttpd/Manifest b/www-servers/bozohttpd/Manifest new file mode 100644 index 000000000000..20219d7d6ae4 --- /dev/null +++ b/www-servers/bozohttpd/Manifest @@ -0,0 +1,7 @@ +AUX bozohttpd.conffile 218 SHA256 fb44fd86b49072559f4f6ffab13e9e4e8ce62eda1b29cb6214042c4a697baaf4 SHA512 fbc819db45d9ded83a14cc2088c5446c1a56509e2ed4a80a3bd1bb398d32130c1366ac1aad4152527665e9c8f9d097427160a9bfe703922e73a713abf7020f29 WHIRLPOOL 83a9ee110ca31923c0e687c634da8ef550802d9aca4073cf3d358b316005e778fa5fb551c0adc2b64acd7e509dc8a41d5171f8ec5356ae265e986c5a4b80a29d +AUX bozohttpd.initscript 942 SHA256 055df954b98d0cfab72d9a5b8f6c84d6549f5cb05b51a09edb97f9835549fa44 SHA512 7ea3a704fcc1b5b9ea8c2d66fba6b2f273b77efa97d0222578d82d653d4c0c7d926d9fabf5dd3e14b80cc3e79674290acb0116e68a3b044a91c4d12115c9b365 WHIRLPOOL 6a3656a374f1f3e48e5b90d03f238b4e76fbd4f7d06cb73308dc7fbde4d6eb95aea9d6b6f2dbcc09bc37baa6c5f03c0665a6763dc40212164bf7d016406b192a +DIST bozohttpd-20170201.tar.bz2 55730 SHA256 bfec085149f1d84358554216a1eeb0ec246e8138443118060be4de416d2a95c5 SHA512 f8fba17a454b3825bf0562072bf0acf5890639d83e3bc5c6b7e87f13860d37a3dfc3fd155bd9873d5201b85f31185b24677c22db1cb303fd556f22afa8b7895e WHIRLPOOL 14c7bbe8c7e0955d68c386b91cb009b8cd81a8c89e70f7ab74445d4a9d321ec0347c28233e7688650ba438ef45f66b105434d6e6c74898db60aaa8f1ef20f3b8 +EBUILD bozohttpd-20170201.ebuild 765 SHA256 857219de38000a338d1f71a4d2f622f71fd17ed7d9efcee37b9dab63ae824f33 SHA512 fe4d2a5d28b5dc13a52abd83fd4562ccf155f0f9b5ec2aea105b52962ff27e725603c01503e59577029394ae32367689fa196d9c85913fd19a047f28f13bfef9 WHIRLPOOL e9981660b2939a9472abdc4120a5ec048115c3b031e5b21fe85545879fb1b6a070e5385782962eab5cf23d18acc8353ba1e4ab1867f6b3271f153236394bd052 +MISC ChangeLog 3242 SHA256 7ab3f8276253396be1d940c376c528f27cbd8881daac2ebe31dba8ac0bda9f6c SHA512 a703bab11c9d4f2aed9b5c5326032b7033ad37f35354bb024c9bef94c61439ad56ab01920bc7ca0fbc5c5b1b96c5498d4ca3ce690c55e60fb6c67185a52e86af WHIRLPOOL 7370ea69ea03a79e0858d06747d274cedd80ce8196132a452a596fd924391f13b4bf333a4c9de1f7ec8a61262ae1025f64a28a20eb852fc18759215fb63e4926 +MISC ChangeLog-2015 3871 SHA256 7de0b06ead580d0561860acfb0977b6416b3de919c3d85d0cf3a0dbba924e88a SHA512 ec0ebe0eb9995ae49669e6b96c17a9fdbbca8fbcf2e6aaa7560ed5c9b569d5104a2d8c56a9efd95422187b4a8566e58206068a895e56ef2c1d2eefe4b5f35fc3 WHIRLPOOL d9adb76c526daa9945dad67db27387b9dfd75710d22b0c032e113bdbb28460bebad55e1a67c8678344535309f9edf860e71b580d364e2f9735e9b4f9c0b76f63 +MISC metadata.xml 312 SHA256 4835cd8441c49746cfc0861a4ef46562393818ec1e04f84c9df14cacb03f50a6 SHA512 9970b0a12f1e68b7f0babffef064357434c7c3e37c1e92d8b336d70ef8f8940b8cc73d68bb0b338a13e6613cf086c5f2e06f119f6feae067cc31b91cd743e41f WHIRLPOOL f73cb1b7ec53046df025dc542c16b55c3d8063c6e171f5f4d87bc35d5a86effe2f0f43df666cb5d7be368e06d0f3d787331d95cbbd870051ee251427f8436b69 diff --git a/www-servers/bozohttpd/bozohttpd-20170201.ebuild b/www-servers/bozohttpd/bozohttpd-20170201.ebuild new file mode 100644 index 000000000000..1044a7a84412 --- /dev/null +++ b/www-servers/bozohttpd/bozohttpd-20170201.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit toolchain-funcs + +DESCRIPTION="bozohttpd is a small and secure http server" +HOMEPAGE="http://www.eterna.com.au/bozohttpd/" +SRC_URI="http://www.eterna.com.au/bozohttpd/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="libressl" + +DEPEND="!libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= )" +RDEPEND="${DEPEND} + virtual/logger" + +src_prepare() { + default + mv Makefile{.boot,} || die +} + +src_compile() { + emake CC="$(tc-getCC)" OPT="${CFLAGS}" +} + +src_install() { + dobin bozohttpd + doman bozohttpd.8 + + newconfd "${FILESDIR}"/${PN}.conffile bozohttpd + newinitd "${FILESDIR}"/${PN}.initscript bozohttpd +} diff --git a/www-servers/bozohttpd/files/bozohttpd.conffile b/www-servers/bozohttpd/files/bozohttpd.conffile new file mode 100644 index 000000000000..49dbbe5517c4 --- /dev/null +++ b/www-servers/bozohttpd/files/bozohttpd.conffile @@ -0,0 +1,11 @@ +# Config file for /etc/init.d/bozohttpd + +# necessary stuff +DATADIR=/var/www/localhost/htdocs +BIND_ADDRESS=localhost +LISTEN_PORT=80 + +# optional stuff +#USER=daemon +#INDEX_DEFAULT=index.php +#APPEND="-C .php /usr/bin/php" diff --git a/www-servers/bozohttpd/files/bozohttpd.initscript b/www-servers/bozohttpd/files/bozohttpd.initscript new file mode 100644 index 000000000000..9f05c4184178 --- /dev/null +++ b/www-servers/bozohttpd/files/bozohttpd.initscript @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +#NB: Config is in /etc/conf.d/bozohttpd + + +depend() { + need logger net +} + +checkconfig() { + if [ -z "$DATADIR" ] || [ -z "$BIND_ADDRESS" ] || [ -z "$LISTEN_PORT" ]; then + eerror "You need to setup DATADIR, BIND_ADDRESS and LISTEN PORT in /etc/conf.d/bozohttpd first" + return 1 + fi +} + +start() { + checkconfig || return 1 + + local params="" + + [ -n "$USER" ] && params="$params -U $USER" + [ -n "$INDEX_DEFAULT" ] && params="$params -x $INDEX_DEFAULT" + [ -n "$APPEND" ] && params="$params $APPEND" + + ebegin "Starting bozohttpd" + start-stop-daemon --start --exec /usr/bin/bozohttpd -- -b -i $BIND_ADDRESS -I $LISTEN_PORT -X ${params} $DATADIR + eend ${?} +} + +stop() { + ebegin "Stopping bozohttpd" + start-stop-daemon --stop --exec /usr/bin/bozohttpd + eend ${?} +} diff --git a/www-servers/bozohttpd/metadata.xml b/www-servers/bozohttpd/metadata.xml new file mode 100644 index 000000000000..c6139216f04a --- /dev/null +++ b/www-servers/bozohttpd/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +<longdescription> + bozohttpd is designed to be small, simple and relatively + featureless, hopefully increasing its security. +</longdescription> +</pkgmetadata> diff --git a/www-servers/caddy/Manifest b/www-servers/caddy/Manifest new file mode 100644 index 000000000000..27850187bb20 --- /dev/null +++ b/www-servers/caddy/Manifest @@ -0,0 +1,5 @@ +DIST caddy-0.10.10.tar.gz 2706112 SHA256 aafaeb092e7b1bcff8ec31f19a1ded1253ff95cfdd4441378e5a530508614e8d SHA512 78152e01739ffbe6d36f5d10cab92ad0d112242d679064199c271c20fd22c24f8d51ed884ddef6d80291d15d41d4620d6431e9a6fb0e8c0eab66cc50d57d5b0d WHIRLPOOL a08be3aec673cfffb7ca5047247f35cee2cc96e9aa747ba6dce31dfbf36a0be3039781159d4b330f3ca2f1e6c2f85013038d6f73a94d9fb94fa2418a05cb3734 +DIST caddy-0.10.9.tar.gz 2695894 SHA256 be70a4324e3f6cd4da5e379b31562d07f40f6e39439c7274d4bb94fe482b86e4 SHA512 dc61a059f1e1abacdf1e2baa154b4c53e68e32d27dabc9bf17157d5a54d92e0976539a90ebe9ba74f9f726660f17610dfa938f715b2466d3e4db514b1104098d WHIRLPOOL 0a29f2eaaf9babadcf7478d6e315e54c280c9ea14e839bc675a65fa6217d763b8e8d441d7bf73f0e7c443cb2ab93b1bd421a932ab5488872b1e5032d1b27c2cb +EBUILD caddy-0.10.10.ebuild 744 SHA256 eace4791f43317c642a6a719cc0be0c177873653a04981a7e23fb4036d1cfea8 SHA512 2b28a0c202d546845fd0106dd235cdb9fd1c45972948c1c190f4843c6ce9464914471308b2320281ee72e4a3ac9eac1c8399ad04ef2332447d1030cbe48b5df7 WHIRLPOOL 3e762a2ff32d2b53534daa5063a9054eb174ac28223edacd938a77e32fec67d80300710463015d15dc5a45d0de820e16b80f8f70a9e84b1f895938ec02f5f241 +EBUILD caddy-0.10.9.ebuild 744 SHA256 eace4791f43317c642a6a719cc0be0c177873653a04981a7e23fb4036d1cfea8 SHA512 2b28a0c202d546845fd0106dd235cdb9fd1c45972948c1c190f4843c6ce9464914471308b2320281ee72e4a3ac9eac1c8399ad04ef2332447d1030cbe48b5df7 WHIRLPOOL 3e762a2ff32d2b53534daa5063a9054eb174ac28223edacd938a77e32fec67d80300710463015d15dc5a45d0de820e16b80f8f70a9e84b1f895938ec02f5f241 +MISC metadata.xml 322 SHA256 558c127db48cf6ec2035334283ce87d461fb033c21df8eadf1fd3786c9fd20d5 SHA512 8e895cdf287f3edd1b77ee45c7bdb0bf3b0edff526086530e0110c32bb25c3e12381e47c89785c3382aa7ac2ff4e82a24f3da0d47560f32640282cbf2b82e282 WHIRLPOOL 70cf153cd23a3d672eefa456bcddc09d5a5c8510386d58a989f923fa0f66cd5b7e177d18147d5d853bd80a79ee5932c0a70cc500dd2600d2a478558cafca333d diff --git a/www-servers/caddy/caddy-0.10.10.ebuild b/www-servers/caddy/caddy-0.10.10.ebuild new file mode 100644 index 000000000000..28d63e7aab2d --- /dev/null +++ b/www-servers/caddy/caddy-0.10.10.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/mholt/${PN}" + +inherit golang-build golang-vcs-snapshot + +EGIT_COMMIT="v${PV}" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Fast, cross-platform HTTP/2 web server with automatic HTTPS" +HOMEPAGE="https://github.com/mholt/caddy" + +SRC_URI="${ARCHIVE_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +RESTRICT="test" + +src_compile() { + GOPATH="${WORKDIR}/${P}" go install -ldflags "-X github.com/mholt/caddy/caddy/caddymain.gitTag=${PV}" ${EGO_PN}/caddy || die +} + +src_install() { + dobin bin/* + dodoc src/${EGO_PN}/README.md src/${EGO_PN}/dist/CHANGES.txt +} diff --git a/www-servers/caddy/caddy-0.10.9.ebuild b/www-servers/caddy/caddy-0.10.9.ebuild new file mode 100644 index 000000000000..28d63e7aab2d --- /dev/null +++ b/www-servers/caddy/caddy-0.10.9.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/mholt/${PN}" + +inherit golang-build golang-vcs-snapshot + +EGIT_COMMIT="v${PV}" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Fast, cross-platform HTTP/2 web server with automatic HTTPS" +HOMEPAGE="https://github.com/mholt/caddy" + +SRC_URI="${ARCHIVE_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +RESTRICT="test" + +src_compile() { + GOPATH="${WORKDIR}/${P}" go install -ldflags "-X github.com/mholt/caddy/caddy/caddymain.gitTag=${PV}" ${EGO_PN}/caddy || die +} + +src_install() { + dobin bin/* + dodoc src/${EGO_PN}/README.md src/${EGO_PN}/dist/CHANGES.txt +} diff --git a/www-servers/caddy/metadata.xml b/www-servers/caddy/metadata.xml new file mode 100644 index 000000000000..7fdf4b166f51 --- /dev/null +++ b/www-servers/caddy/metadata.xml @@ -0,0 +1,11 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mrueg@gentoo.org</email> + <name>Manuel Rüger</name> + </maintainer> + <upstream> + <remote-id type="github">go-yaml/yaml</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/cherokee/Manifest b/www-servers/cherokee/Manifest new file mode 100644 index 000000000000..6ec75753d05e --- /dev/null +++ b/www-servers/cherokee/Manifest @@ -0,0 +1,10 @@ +AUX cherokee-1.2.99-gentoo.patch 1763 SHA256 66b3e85370082feb20205ed484a858a79656e0adb793fea5be796632fc327201 SHA512 2f2b1aa03cd7656ceb90f9a94d24704b4a411b3ab99e084444d1f60ce0270bad650b597b1edbdcb4fb0dda750215f42c3f5de3e9f6253825f3742dfbe871be4b WHIRLPOOL e8d03dc5c15e22cc94bae1f6082ee0aabb4990239bb6db9da3dda78565379720af5e61f2f60715505538a9c974e24fb84a2738d8ed593777d4621fcfdc2bfe62 +AUX cherokee-confd-1.2.98 144 SHA256 48331d56dfa6743444e0b01ce4df2013b27dd30804c88365257d560cc6adcab0 SHA512 e010ec9e6d6bd6862c486c494e968cf93ff5f7eeaa523f1bc1fb9db72dc878c17fbc04443e74aef0bbfef1e2ba64ba00a7dc8bbd1b58f6759d2e000c76e88f84 WHIRLPOOL 4ee6e81e60a934c190201b920488dbfb2f073b387da46068c616891c16b6ef05c9932487374b3ca051d3b1a1b8809d7245f289c8128547b6297ce1a32ce48800 +AUX cherokee-initd-1.2.99 1186 SHA256 41fd5dc54d03f70294d2226fbac0a1af965d9672eb0b94ac972566b8cd1bd8b4 SHA512 595e37b6cf70d4fbd466be918db6c17c37766f5e39a9ee4384a21025f1ce04367aeca495217b1e2c74ed2bce9ff8cfd9a58523b59d1181ce9f470eca97445641 WHIRLPOOL b651d87384c9f55986f4980335efa90a4229fe881b9f609e38c11e7469c79d1a7551178d96f977c2638fd47a3260985f69f361bce1648809df1205c0e3cb6977 +AUX cherokee.logrotate-r1 255 SHA256 7ad14c9886992b5133354d56d25340d452583eb01bc6ff6a5741cd5c40df341a SHA512 73be4a46f217302b3e7969f0a5acf7f83357a831331f85c89c17320c594eb9e6fd87da111b7d8eb06840e0b1bb094106a5bb6f7dbf7923e834164a367f85d5ad WHIRLPOOL 34cb4553dd237a22a2dd547ebc120084e6d4ed306f2c4a9d1f9b72388c56c275c64d2101525173f92e9b8f86ebe90aad58086214d2c955969762e5829617ea83 +AUX cherokee.service 184 SHA256 a5ba46821799eaeea39c35f46ae51d58a8394f5e729889729f814562561d1edb SHA512 e05cfe0805bcd7f133fc0bf485fbf781b9cc5e6f9e222b8ea89bdc4e9d4531caa6049100670b67d12bdb73c1e93ed5d949cc1828241213cfcd60a39b7424d8ec WHIRLPOOL 1c095ac36f9f17917557b4157318c051cc031829ce13fd4dfabdb46f945af823ca5b92a7a35577de8734f219b4d08963fdddaa0680eed840821fbd430800120a +DIST cherokee-1.2.104.zip 6200164 SHA256 1acc80de22ed0aa4a0d95aa643ac92a2cce435480258081213214bec05da4098 SHA512 9c9f44643d0d2636f2e3e61ef8e2918d91d9bb6099be761826c8ffad01d339739ed40984d01151044c2e536d4754b5157d6d20c37627ce49eecdb404a716cd9d WHIRLPOOL b0c13205014daee461538d0b7968bf255fd6633dbf3defeb2505ce463772c6f56b06ef91ff6b055bd589a15d19974d794fcbe039c1552b04a6bd1228a690f417 +EBUILD cherokee-1.2.104.ebuild 4947 SHA256 bcafa7b28b35d79b10b258250c5ebbc2462224ac9da25ddfe9433aa5a13646de SHA512 715f2e8bdbc7a98cedd60bd685195b02b7e3026f247d6f18f67ba14ed0ffa43bfcc8e97d6ab20fe7c0d64a4808cd62b623ee51d9ae567dd711a87d8385dd8a9c WHIRLPOOL 5170ae1ebdb8f8ec8f441015ba3445c109ab91c94b26250010f5552e8b01a241dd14fd88969793dc5a40c904742dabfebe458545f90456c4c68eb10b4b5623fd +MISC ChangeLog 3068 SHA256 27bc3ec527dfb4e03204f9f1ca2b1086dc4236d9d43a6ab25de12d7b05577f9d SHA512 13a0b67d31980f1903ab02a70ba9cfb0bd4f68088ed9550352774e87612632fab3394dd774b8cf0e6ad113f7af577ef3c4f6b2677553950e377410466b379ec6 WHIRLPOOL 517837a195028ab6af05fd412f218fd7b7c3b5e2376c86e77305fcc8551daf74bf83f9f93571c6345f011762000ff02c25ba3dc7855965f3c08261cdf46a0414 +MISC ChangeLog-2015 24470 SHA256 1d0e85adc44395807d12a5df8b7e1e9a1cab94f5ced95b4da58cb00e4715bd60 SHA512 32cb25f65763164d989aba7ba7681882c0e48e791e43b7d44b8a51311c27eb029013283ec189b850fa7f288dfabbaf4f6348402b806c82c5fe95fbc02459314e WHIRLPOOL 9aa61f26750f165cc122787e95beb215381f3eae40fe2391ddba16838f5be6079db2c24dc57ea310091c75408c01d4674b7d205478f63e55a6fac7e6c25b7363 +MISC metadata.xml 468 SHA256 54cf8de7a3275fee855f42bb4a6a7e3004141a9fc70f0ab7bee9459190ada6cb SHA512 bfd1c8c432210025dd9b29ec89b383d3211ee9d1aabec4d59c2ec5801feccebcee3c55f7b6ed4e02daab9e72f42ab12517f957f396d0fd410ad3eee4fd05520d WHIRLPOOL a099b7cc03a3609e10316a50079bcb9102319e474f0f7a03aaf08bce91cbdb2718db9a9f8a1f7c02818d5e1111a371c50fa17ef593238b038b75a7d9d58a2e64 diff --git a/www-servers/cherokee/cherokee-1.2.104.ebuild b/www-servers/cherokee/cherokee-1.2.104.ebuild new file mode 100644 index 000000000000..adff732826e5 --- /dev/null +++ b/www-servers/cherokee/cherokee-1.2.104.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +WANT_AUTOMAKE="1.11" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools python-r1 eutils multilib pam systemd user + +DESCRIPTION="An extremely fast and tiny web server" +SRC_URI="https://github.com/cherokee/webserver/archive/v${PV}.zip -> ${P}.zip" +HOMEPAGE="http://www.cherokee-project.com/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="admin ffmpeg debug geoip ipv6 kernel_linux ldap libressl mysql nls pam php rrdtool ssl static static-libs" +RDEPEND="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +COMMON_DEPEND=" + ${PYTHON_DEPS} + dev-libs/libpcre + >=sys-libs/zlib-1.1.4-r1 + ffmpeg? ( virtual/ffmpeg ) + geoip? ( dev-libs/geoip ) + ldap? ( net-nds/openldap ) + mysql? ( >=virtual/mysql-5 ) + nls? ( virtual/libintl ) + pam? ( virtual/pam ) + php? ( || ( + dev-lang/php:*[fpm] + dev-lang/php:*[cgi] + ) ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + " +DEPEND="${COMMON_DEPEND} + nls? ( sys-devel/gettext )" +RDEPEND="${COMMON_DEPEND} + rrdtool? ( net-analyzer/rrdtool )" + +RESTRICT="test" + +WEBROOT="/var/www/localhost" + +src_unpack() { + unpack ${A} + mv "webserver-${PV}" "${S}" || die +} + +pkg_setup() { + enewgroup cherokee + enewuser cherokee -1 -1 /var/www cherokee +} + +src_prepare() { + python_setup + epatch \ + "${FILESDIR}/${PN}-1.2.99-gentoo.patch" + + "${S}/po/admin/generate_POTFILESin.py" > po/admin/POTFILES.in + eautoreconf +} + +src_configure() { + local myconf + + if use admin ; then + myconf="${myconf} --enable-admin --with-python=/usr/bin/python" + else + myconf="${myconf} --disable-admin" + fi + + # Uses autodetect because --with-php requires path to php-{fpm,cgi}. + if ! use php ; then + myconf="${myconf} --without-php" + fi + + if use static ; then + myconf="${myconf} --enable-static-module=all" + fi + + local os="Unknown" + case "${CHOST}" in + *-freebsd*) + os="FreeBSD" ;; + *-netbsd*) + os="NetBSD" ;; + *-openbsd*) + os="OpenBSD" ;; + *) + os="Linux" ;; + esac + + econf \ + $(use_enable debug trace) \ + $(use_enable debug backtraces) \ + $(use_enable ipv6) \ + $(use_enable kernel_linux epoll) \ + $(use_enable nls) \ + $(use_enable pam) \ + $(use_enable static-libs static) \ + $(use_with ffmpeg) \ + $(use_with geoip) \ + $(use_with ldap) \ + $(use_with mysql) \ + $(use_with ssl libssl) \ + --disable-dependency-tracking \ + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --enable-os-string="Gentoo ${os}" \ + --enable-tmpdir="${EPREFIX}/var/tmp" \ + --localstatedir="${EPREFIX}/var" \ + --with-wwwroot="${EPREFIX}${WEBROOT}/htdocs" \ + --with-cgiroot="${EPREFIX}${WEBROOT}/cgi-bin" \ + --with-wwwuser=cherokee \ + --with-wwwgroup=cherokee \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + if ! use static-libs ; then + find "${ED}" -name '*.la' -delete || die + elif ! use static ; then + find "${ED}/usr/$(get_libdir)/cherokee" '(' -name '*.la' -o -name '*.a' ')' -delete || die + fi + + dodoc AUTHORS NEWS README.rst + + if use pam ; then + pamd_mimic system-auth cherokee auth account session || die + fi + + newinitd "${FILESDIR}/${PN}-initd-1.2.99" ${PN} + newconfd "${FILESDIR}/${PN}-confd-1.2.98" ${PN} + + if ! use admin ; then + rm -r \ + "${ED}"/usr/bin/cherokee-admin-launcher \ + "${ED}"/usr/bin/CTK-run \ + "${ED}"/usr/sbin/cherokee-admin \ + "${ED}"/usr/share/cherokee/admin || die + fi + + exeinto /usr/share/doc/${PF}/contrib + doexe contrib/{bin2buffer.py,make-cert.sh,make-dh_params.sh,tracelor.py} + + #move the htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${ED}"${WEBROOT}/htdocs \ + "${ED}"/usr/share/doc/"${PF}"/htdocs.dist + mkdir "${ED}"${WEBROOT}/htdocs + + keepdir \ + "${WEBROOT}"/htdocs \ + /var/log/cherokee \ + /var/lib/cherokee/graphs/images + fowners cherokee:cherokee \ + /var/log/cherokee \ + /var/lib/cherokee/graphs \ + /var/lib/cherokee/graphs/images + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r1 ${PN} + + systemd_dounit "${FILESDIR}"/cherokee.service +} + +pkg_postinst() { + elog + if use admin ; then + elog "Just run '/usr/sbin/cherokee-admin' and go to: http://localhost:9090" + elog + elog "Cherokee currently supports configuration versioning, so from now on," + elog "whenever a change is made to the configuration file format," + elog "Cherokee-Admin will be able to automatically convert yours to the new" + elog "release. You simply have to load Cherokee-Admin and it will be converted" + elog "once you proceed to saving it." + elog + elog "There is also a command line utility that you can use to do the exact" + elog "same thing. Config format can change in different versions. It is" + elog "provided under:" + elog " ${EPREFIX}/usr/share/cherokee/admin/upgrade_config.py" + else + elog "Try USE=admin if you want an easy way to configure cherokee." + fi + elog + elog "emerge www-servers/spawn-fcgi if you use Ruby on Rails with ${PN}." + elog +} diff --git a/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch b/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch new file mode 100644 index 000000000000..d55a5a2a82cf --- /dev/null +++ b/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch @@ -0,0 +1,38 @@ +diff -Naur cherokee-1.2.99.orig/admin/configured.py.pre cherokee-1.2.99/admin/configured.py.pre +--- cherokee-1.2.99.orig/admin/configured.py.pre 2011-03-31 17:30:04.000000000 +0900 ++++ cherokee-1.2.99/admin/configured.py.pre 2011-09-16 19:37:15.893487362 +0900 +@@ -22,7 +22,7 @@ + CHEROKEE_DATADIR = join (DATADIR, "cherokee") + CHEROKEE_DEPSDIR = join (DATADIR, "cherokee/deps") + CHEROKEE_CONFDIR = join (SYSCONFDIR, "cherokee") +-CHEROKEE_VAR_LOG = join (LOCALSTATE, "log") ++CHEROKEE_VAR_LOG = join (LOCALSTATE, "log/cherokee") + CHEROKEE_VAR_RUN = join (LOCALSTATE, "run") + CHEROKEE_VAR_LIB = join (LOCALSTATE, "lib/cherokee") + CHEROKEE_RRD_DIR = join (LOCALSTATE, "lib/cherokee/graphs") +diff -Naur cherokee-1.2.99.orig/cherokee.conf.sample.pre cherokee-1.2.99/cherokee.conf.sample.pre +--- cherokee-1.2.99.orig/cherokee.conf.sample.pre 2011-05-03 18:01:42.000000000 +0900 ++++ cherokee-1.2.99/cherokee.conf.sample.pre 2011-09-16 19:37:15.894487368 +0900 +@@ -18,6 +18,8 @@ + server!server_tokens = full + server!panic_action = %prefix%/bin/cherokee-panic + server!pid_file = %localstatedir%/run/cherokee.pid ++server!user = cherokee ++server!group = cherokee + + # Default virtual server + # +@@ -27,11 +29,11 @@ + + vserver!1!logger = combined + vserver!1!logger!access!type = file +-vserver!1!logger!access!filename = %localstatedir%/log/cherokee.access ++vserver!1!logger!access!filename = %localstatedir%/log/cherokee/cherokee.access + vserver!1!logger!access!buffsize = 16384 + + vserver!1!error_writer!type = file +-vserver!1!error_writer!filename = %localstatedir%/log/cherokee.error ++vserver!1!error_writer!filename = %localstatedir%/log/cherokee/cherokee.error + + vserver!1!rule!1!match = default + vserver!1!rule!1!handler = common diff --git a/www-servers/cherokee/files/cherokee-confd-1.2.98 b/www-servers/cherokee/files/cherokee-confd-1.2.98 new file mode 100644 index 000000000000..62e7fd64f787 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-confd-1.2.98 @@ -0,0 +1,4 @@ +# /etc/conf.d/cherokee: config file for /etc/init.d/cherokee + +#CHEROKEE_OPTS="--config=/etc/cherokee/cherokee.conf --valgrind" +CHEROKEE_OPTS="" diff --git a/www-servers/cherokee/files/cherokee-initd-1.2.99 b/www-servers/cherokee/files/cherokee-initd-1.2.99 new file mode 100644 index 000000000000..488cc819d0df --- /dev/null +++ b/www-servers/cherokee/files/cherokee-initd-1.2.99 @@ -0,0 +1,67 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/cherokee" +extra_commands="configtest" +extra_started_commands="graceful reload" + + +depend() { + need net + use dns ldap logger mysql netmount +} + +checkconfig() { + ${command} -t 1>/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your config:" + ${command} -t ${CHEROKEE_OPTS} + fi + return $? +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet \ + --exec ${command} -- -d ${CHEROKEE_OPTS} + eend $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet \ + --exec ${command} + eend $? +} + +graceful() { + checkconfig || return 1 + + ebegin "Restarting ${SVCNAME} and closing all the opened connections" + start-stop-daemon \ + --exec ${command} \ + --signal USR1 + eend $? +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading ${SVCNAME} configuration" + start-stop-daemon \ + --exec ${command} \ + --signal HUP + eend $? +} diff --git a/www-servers/cherokee/files/cherokee.logrotate-r1 b/www-servers/cherokee/files/cherokee.logrotate-r1 new file mode 100644 index 000000000000..49b68364bc24 --- /dev/null +++ b/www-servers/cherokee/files/cherokee.logrotate-r1 @@ -0,0 +1,10 @@ +# lighttpd logrotate script for Gentoo + +/var/log/cherokee/cherokee.access /var/log/cherokee/cherokee.error { + missingok + notifempty + sharedscripts + postrotate + [ -f /var/run/cherokee.pid ] && /bin/kill -USR2 `cat /var/run/cherokee.pid` + endscript +} diff --git a/www-servers/cherokee/files/cherokee.service b/www-servers/cherokee/files/cherokee.service new file mode 100644 index 000000000000..a2d703185d37 --- /dev/null +++ b/www-servers/cherokee/files/cherokee.service @@ -0,0 +1,10 @@ +[Unit] +Description=Cherokee web server +After=syslog.target + +[Service] +Type=forking +ExecStart=/usr/sbin/cherokee -d -C /etc/cherokee/cherokee.conf + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/cherokee/metadata.xml b/www-servers/cherokee/metadata.xml new file mode 100644 index 000000000000..bb0494e0acc6 --- /dev/null +++ b/www-servers/cherokee/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <use> + <flag name="admin">Install web based cherokee conf tool</flag> + <flag name="rrdtool">Enable rrdtool support</flag> + </use> + <upstream> + <remote-id type="github">cherokee/webserver</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/fnord/Manifest b/www-servers/fnord/Manifest new file mode 100644 index 000000000000..20641f712dbb --- /dev/null +++ b/www-servers/fnord/Manifest @@ -0,0 +1,8 @@ +AUX fnord-1.10-gentoo.diff 3204 SHA256 d770079e5025288dc8d6ca8d4d7f7f2c9c62964f7fa4d415ccc2438f700c9b7f SHA512 93921b050e8b165124b738fcd96c0d828289ee238284088c6859777fd5ca647f9156a0419e4cd6ee65df6e9d944913b8f1e7c6382c358b8c549425cac7414a7b WHIRLPOOL 31000add65d5d3a74b53c3a087fabe28c377a303376aa7d49358494d41e329b32490d177d5fd30d24e4c704c9f50f8fb09f1c88f78bd65b303fbc9f656158f92 +DIST fnord-1.10.tar.bz2 33408 SHA256 39a878e910d569fbf3909d8efe7ec6dd85c9484711b0d748b51012a15ddf3cc7 SHA512 45c584844de9d26aad0e6ff0a08a27aacb1f27e5a0128f43758622d41183cc92c483ef85cc84421afd2107b4c2838b167ab0788031499b2f18c3df861c05dfbd WHIRLPOOL 316aebcc2b3dd38d4157974599338564898a6df34bc20b5806a9f0a6250b7aa968e2142a91d38134156a7c5325069f69d4f609b7b8fec2048198eefa93d0e218 +DIST fnord-1.11.tar.bz2 28845 SHA256 896f734b589b52a145dbb1d268f41ae94eff90529db36658a66eda3aada21d35 SHA512 12a3751a2f98acb3ba2d468972bb785b656fa01bfb0828bc9ba5488dc7a2a66e9f226a6cc49ceda57aa7875d8d90954a9e79806c9506a7906cfff346cd400154 WHIRLPOOL b6d644b6689f1b90bec777ae0d85852767ba7f83e69420590645883ce81e2d8f72debf1d993e061fb984a01936ecb001b31f212d281d7847c736cb9b00259a2e +EBUILD fnord-1.10-r2.ebuild 904 SHA256 bf55ef6acb4cc5b75d423eabdf78c3480abad3f5b6a6990ff87f1dfcea59dafa SHA512 d950e2e0fbb5dd6e2b779945049caf346545c8e0a6cfc094e9311fc97822173ab1eb60a86e301278c548b1448ea6e696eae5f2cb14aaa216d8da01836ec4864b WHIRLPOOL 91df848802735345597550179026f3cde3f98ada0a6544fd45ba24c08744754de0253fdb34e054d6deecb468379574e9a0160d1396969aac33f49301ae1519e4 +EBUILD fnord-1.11.ebuild 915 SHA256 d39c5f2776d7748c81f23b10475df1401bf09a597916d3cea1864be95c30a44b SHA512 730dfb51e773edc35f08622ddce14d86c9c4ed26575f8bf5a31886ac26ca407a47598776af31d54b6be26560a4b0f142d164788f4809ed32b9685b0dd81ae65d WHIRLPOOL ad3defcf2675c2ae937726f256d67cdc9d1b9df3490ca2de28ac99bdb764acb8af559ad1656e07f0d909cd0bdba3aeb257b212f24e91c7d63778a570d28703a0 +MISC ChangeLog 3025 SHA256 88408640d486783bb8aa5e8e2ba84fbd8a5979d9c911ac31ce05a725efe47158 SHA512 4d89bf92e2917b8a476101e879c872d60a5a02bb987142fc3377319afdd3d613566184adbfa612916886340533a0af42e8b3e894fc06b178d8334588c243b70a WHIRLPOOL 23288d4ea5564622b679e5149ce83eda78788cc15c070005347f2ee6f87953dafcb807722388366ac65ca40ab7300daecd4398b0c2fa3386331a85537b67d8cd +MISC ChangeLog-2015 6094 SHA256 c58c08224f266c007cbc8d05f66682113bae26c26ce33bedf9c6faad7d5723b9 SHA512 49bc9621088ea1acf8bdcdd9e229dd3ad0e299263500c62e2f4a30ce1b5c9f00c647de658a2887eac407a55a5a8a42be74605ef283322f0a4395fd9f9175c341 WHIRLPOOL 1fbbb9d54cc9fb57b89e84dfef8428f926c4a43ee024d648f88c79c0ba236966e5008e58c07333844c76b5b9afa53d488274c6a8fbfcd3e4dcbb35d3ef104a40 +MISC metadata.xml 242 SHA256 ba925f863b1583c282a5d4fe412f4f62444e06aab6f2ab89357af89abc316220 SHA512 688a7e67d3fcc02afd7795ace015bf7832ba3bc428cf64042b4ad9ea72d815996ea128b0a4cf97e8331dc3ad371c4565963d6c773d161e88cd6b6926b58aecec WHIRLPOOL ed7773ac3162b37457a1381e9a5e75e49bddb2a8696fb607532dda3a56af37a0790b7d898d4b2246c6be34104abe0dd1c9e2c20eaebf563c9deb4d9c16c84674 diff --git a/www-servers/fnord/files/fnord-1.10-gentoo.diff b/www-servers/fnord/files/fnord-1.10-gentoo.diff new file mode 100644 index 000000000000..3e2f1f5fc7c4 --- /dev/null +++ b/www-servers/fnord/files/fnord-1.10-gentoo.diff @@ -0,0 +1,99 @@ +diff -Naur fnord-1.10.orig/fnord-conf fnord-1.10/fnord-conf +--- fnord-1.10.orig/fnord-conf 2010-10-22 17:31:41.000000000 +0200 ++++ fnord-1.10/fnord-conf 2010-10-22 19:57:28.000000000 +0200 +@@ -17,7 +17,7 @@ + mkdir -p $dir + echo "#!/bin/sh" > $dir/run + echo "cd $webroot" >> $dir/run +-echo "exec envuidgid $acct tcpserver -RHl localhost ${myip:-0} 80 fnord 2>&1" >> $dir/run ++echo "exec envuidgid $acct tcpserver -RHl localhost ${myip:-0} 80 /usr/bin/fnord 2>&1" >> $dir/run + chmod 755 $dir/run + + # tell old daemontools that it should spawn a log process, too +diff -Naur fnord-1.10.orig/httpd.c fnord-1.10/httpd.c +--- fnord-1.10.orig/httpd.c 2010-10-22 17:31:41.000000000 +0200 ++++ fnord-1.10/httpd.c 2010-10-22 19:57:28.000000000 +0200 +@@ -25,7 +25,9 @@ + #include "scan.h" + + /* uncomment the following line to enable support for CGI */ +-// #define CGI ++#ifndef CGI ++# define CGI ++#endif + + #ifdef CGI + /* uncomment the following line to enable support for "index.cgi" +@@ -39,7 +41,9 @@ + + /* uncomment the following line to enable support for autogenerated + * directory-listings for directories without index */ +-/* #define DIR_LIST */ ++#ifndef DIR_LIST ++# define DIR_LIST ++#endif + + #ifdef DIR_LIST + /* uncomment the following line to enable support for system symlink +diff -Naur fnord-1.10.orig/Makefile fnord-1.10/Makefile +--- fnord-1.10.orig/Makefile 2010-10-22 17:31:41.000000000 +0200 ++++ fnord-1.10/Makefile 2010-10-22 19:58:56.000000000 +0200 +@@ -1,28 +1,19 @@ +-CC=gcc +-CXX=g++ +- +-#LIBOWFAT=../libowfat/ +-DIET=diet -Os +- +-CFLAGS=-Os -fomit-frame-pointer +-#CFLAGS=-g ++CC:=gcc ++CXX:=g++ + + all: fnord fnord-cgi fnord-idx + + fnord: httpd + cp -p $^ $@ +- -strip -R .note -R .comment $@ + + httpd: httpd.o libowfat.a +- $(DIET) $(CC) -o $@ $^ $(CFLAGS) ++ $(DIET) $(CC) $(LDFLAGS) -o $@ $^ $(CFLAGS) + + fnord-cgi: httpd-cgi.o libowfat.a +- $(DIET) $(CC) -o $@ $^ $(CFLAGS) +- -strip -R .note -R .comment $@ ++ $(DIET) $(CC) $(LDFLAGS) -o $@ $^ $(CFLAGS) + + fnord-idx: httpd-idx.o libowfat.a +- $(DIET) $(CC) -o $@ $^ $(CFLAGS) +- -strip -R .note -R .comment $@ ++ $(DIET) $(CC) $(LDFLAGS) -o $@ $^ $(CFLAGS) + + libowfat.a: httpd.o buffer_1.o buffer_puts.o buffer_flush.o buffer_put.o \ + buffer_putulong.o buffer_2.o buffer_putspace.o buffer_stubborn.o \ +@@ -32,19 +23,19 @@ + -ranlib $@ + + httpd.o: httpd.c +- $(DIET) $(CC) -pipe $(CFLAGS) -c $^ -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" ++ $(DIET) $(CC) $(CFLAGS) -c $^ -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" + + httpd-cgi.o: httpd.c +- $(DIET) $(CC) -pipe $(CFLAGS) -c httpd.c -o $@ -DCGI -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" ++ $(DIET) $(CC) $(CFLAGS) -c httpd.c -o $@ -DCGI -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" + + httpd-idx.o: httpd.c +- $(DIET) $(CC) -pipe $(CFLAGS) -c httpd.c -o $@ -DDIR_LIST -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" ++ $(DIET) $(CC) $(CFLAGS) -c httpd.c -o $@ -DDIR_LIST -DFNORD=\"fnord/$(shell head -n 1 CHANGES|sed 's/://')\" + + %.o: %.c +- $(DIET) $(CC) -pipe $(CFLAGS) -c $^ ++ $(DIET) $(CC) $(CFLAGS) -c $^ + + %.o: %.cpp +- $(DIET) $(CXX) -pipe $(CFLAGS) -c $^ ++ $(DIET) $(CXX) $(CFLAGS) -c $^ + + .PHONY: rename clean install server + server: fnord diff --git a/www-servers/fnord/fnord-1.10-r2.ebuild b/www-servers/fnord/fnord-1.10-r2.ebuild new file mode 100644 index 000000000000..c28da178d9fe --- /dev/null +++ b/www-servers/fnord/fnord-1.10-r2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +inherit eutils flag-o-matic toolchain-funcs user + +DESCRIPTION="Yet another small httpd" +HOMEPAGE="http://www.fefe.de/fnord/" +SRC_URI="http://www.fefe.de/fnord/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="hppa ppc sparc x86" +IUSE="auth" + +DEPEND="" +RDEPEND="${DEPEND} + virtual/daemontools + sys-apps/ucspi-tcp" + +pkg_setup() { + enewgroup nofiles 200 + enewuser fnord -1 -1 /etc/fnord nofiles + enewuser fnordlog -1 -1 /etc/fnord nofiles +} + +src_prepare() { + epatch "${FILESDIR}/${PN}"-1.10-gentoo.diff +} + +src_compile() { + # Fix for bug #45716 + replace-sparc64-flags + + use auth && \ + append-flags -DAUTH + + emake DIET="" CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install () { + dobin fnord-conf fnord || die + dodoc TODO README* SPEED CHANGES +} diff --git a/www-servers/fnord/fnord-1.11.ebuild b/www-servers/fnord/fnord-1.11.ebuild new file mode 100644 index 000000000000..fa335779fa4b --- /dev/null +++ b/www-servers/fnord/fnord-1.11.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +inherit eutils flag-o-matic toolchain-funcs user + +DESCRIPTION="Yet another small httpd" +HOMEPAGE="http://www.fefe.de/fnord/" +SRC_URI="http://www.fefe.de/fnord/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="auth" + +DEPEND="" +RDEPEND="${DEPEND} + virtual/daemontools + sys-apps/ucspi-tcp" + +pkg_setup() { + enewgroup nofiles 200 + enewuser fnord -1 -1 /etc/fnord nofiles + enewuser fnordlog -1 -1 /etc/fnord nofiles +} + +src_prepare() { + epatch "${FILESDIR}/${PN}"-1.10-gentoo.diff +} + +src_compile() { + # Fix for bug #45716 + replace-sparc64-flags + + use auth && \ + append-flags -DAUTH + + emake DIET="" CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install () { + dobin fnord-conf fnord || die + dodoc TODO README* SPEED CHANGES +} diff --git a/www-servers/fnord/metadata.xml b/www-servers/fnord/metadata.xml new file mode 100644 index 000000000000..fb8717df15b1 --- /dev/null +++ b/www-servers/fnord/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +<use> + <flag name="auth">Enable HTTP authentication support</flag> + </use> +</pkgmetadata> diff --git a/www-servers/gatling/Manifest b/www-servers/gatling/Manifest new file mode 100644 index 000000000000..76609a1496f3 --- /dev/null +++ b/www-servers/gatling/Manifest @@ -0,0 +1,16 @@ +AUX gatling-0.12-compile.patch 764 SHA256 fa6918b662dfcb626b049a16298c0598692f81fac86083403d11341fb4f2a81f SHA512 c734018a9c052ae3cb79e86be2229c222079d87665a32e5de679df9e12361ba2f023043b6ec73506788bbdb00e8a8f7a97a90f779ca12ff93abf96a91144e580 WHIRLPOOL 0b330a922308624e1a938f4c6d6d9600eb2312813b2b52c87471b1e128fc6d4560c0d4b9fc0d670c052af5e6c10489f871ed5fb5571af0e92efe6c7df24285c6 +AUX gatling-0.13-compile.patch 323 SHA256 5717ef91effb298a2b1733bd3ad79e61eaa9fab01838b9e862699b761e116850 SHA512 86cf97e2100ac3836a6ce9d2f35779aa0480adcd82fb25f60c27db103faeeaa835f89d90872c5a91b46a8946b93e3ecf67285089a9af6114af3a8ddde708b2b7 WHIRLPOOL 16c9ca81fee63e3cf39dba12ae5a6734c6069f61417f0bd7b551f60c2287cfb0011c607cfe3050430a6484bccedafb53126d5e20f33e30327d2dc5cdfc0d807d +AUX gatling.confd 659 SHA256 278ee92229263cf7cff919795e099ec22e6696cf9790fc805601ca38929f1d8e SHA512 e903cd9afbb575226c6de0da8ad673d4650a53cac7442505422c98c32a00457f3d48f2853355cd76ea0f83671cb973ddf90df900d86a15172291317109481fb3 WHIRLPOOL 6b15188843076525d00512682e0125637d74b8cfa7ae7f05f05538bbbef496af7cd0c37b9f795a66ea9b49083669cc366b33bc30dd19582ee503c9d0fe076dd5 +AUX gatling.initd 1915 SHA256 b4b13e44633ffd545d2a1717852335ca045519c6ac2150817660affae404898b SHA512 7992a44fc61408eef740bd94fd127240b85a27954c6217b44e7be01a6b95256acc8f61962b661eaeecd6321b958403430aae673b9e88656bb11883b577a3d9a6 WHIRLPOOL b8c2bacafe1b64709b499479a6c50abcb7fa08197aab9e12bf8c03fb79768470027480ba163c169c3c4adbe8f002c39c0e8e773ede4af49a61c72ca3cd4c83b3 +AUX gatling.initd-2 1970 SHA256 92d7a52b1fb8dd9b5725aa596dfd6cb5adf40f8d6839886a24ed1f7dfa2c9fb4 SHA512 916b19712c51564bb38167262de1358289202894b80b948c1d10463c74fea0de9bcddc33a8dd804a08f5a07d1762e0cd21bfe6a404dbfe3fd49138248384dbfc WHIRLPOOL 373f74c639fa7fb7b10b8612ddf9d45d604b83ca7cdf0c868678dd16e3b135d4f048f0b074b0427d38c051eacb00fc6c30bf8d17e04c6229982ee73994c4f199 +AUX gatling.initd-3 1970 SHA256 1cecbfd15aa213283f32aea7f1ba5ca933310c6d907bcaa87279e79abc06d773 SHA512 3b198ed6728add5f30e8ec16171cc7086d315448821b3a5487be1cf7b318735a77f0881d9aca0a5af179a2b8aff75fd0c0ce80836172a26c439cba2859c6ab1f WHIRLPOOL b78387f660bdae07b7f3ddd1e73b38024482b50e4b644fc6ad0d85c242f58f798b3f3bee3d5a91b82f9409bd5cb918e0f4306b27385036c4aba70f8a014dcf90 +DIST gatling-0.12.tar.bz2 99540 SHA256 ffe4dbff99404eb80e6aac215fdf6bf8174355edc33dd1848a51fc1093296a7c SHA512 50330e92576ce8002acaba9692cb9270ed2d794b1118e697193bd47beadac8ae75a8e2e0b802923172961d74e50cbe114b5e39c083b79a975c0a1bf4c86cab0a WHIRLPOOL 5f16ffff9bfc0e91281833b543c050daaa5fe9f6f419e5a0a3b03f6853cb40468b375df849cfc4b036544131e1cefa97ccdde377629499f0a010cb56add33881 +DIST gatling-0.13.tar.bz2 108128 SHA256 b42145fdf7b66602fa8bc64661c2762172f6d33dbd9d53efebf821cd81e89245 SHA512 b9fa604aa8bb8c5d40d9c3eaaa536ed5e73d0ed93eccb41ca4744316ad893dc6fe92fe2c1f0247de82d4eda63b0ab7ab338355d9963fb58f23d39a2c678a1db8 WHIRLPOOL c9d90bec09cf07bc506bd84491d550834d48e0e3b19b2e7095ab43a4a3cd7a182fc1660d5a5cef878f1e1a7b3d367c5e76efc75df77269ab89d64c73c2af7a59 +DIST gatling-0.15.tar.xz 121804 SHA256 6fa329d0ced0c80deb8dde5460e9d9e984bee94f265043d7fdec0e253dce9aa4 SHA512 b76d220a0644f1e6e7ea966a4eff409964c564fc4a31c4efdb764e5f7b5857bc58c26bc31e860fe35df932cbd60fb2b0f4f21c75cb5aa56427e8a2a453684716 WHIRLPOOL 74d4613ca83500d11e81fc4a59e4a1749d0cac7baf1da16d7cbfb4573e3d94bddd1adc7f563de61942f46dd1e5dc88b19f498182eb63919ff71773ef31a19a38 +EBUILD gatling-0.12-r2.ebuild 1448 SHA256 2e89df50f4237a607c8f7313b90e087fdc0e5468b9829ddff81c29e89f5f9214 SHA512 d8aa82aeefce975684f99c1df7feea7329979cb57a0f7f214a401d5ee5aa9a09618241ecf37a0bd8a2467ca7a66ab1f7e00decd1f2c4eb3a188bc26bf932e168 WHIRLPOOL fc918e404aac78dc9329632281a69abb3fc32d7a4a2ccbccbce790eb572063feb2fe2e68cdd92b90f9e7ada6e9cb7d4df34a142ad542fcb1f975e9ced073088c +EBUILD gatling-0.13-r1.ebuild 1517 SHA256 ce094ce3ebf7f598a97f6c7192133c37af734280310e05b283fe106e195ef9c3 SHA512 b946510624a7154271a78460e50235a1e7d1f2b3aa897efe3bbb378221adb2de296584f02a6c033794a6af27ddbbd1ec1b015059122aab36bdab248b6e3cced1 WHIRLPOOL a21cbad21d04814932091798468cd5a113a7b39ce53e2fcd1b7cdafecdbceab623256de2d8459d977c2fa954dac0b092780298a8bec55e461120bb429fc6f2ab +EBUILD gatling-0.13.ebuild 1454 SHA256 313810cc8cd58b2cb82d47523f477faa0a9cd8d882ead2320f7ed950be169995 SHA512 a23dd560da18fd14702b657b61678b450a09449eb7bed6d1df884271c70bb50118d2325acb7896c2af0651c5e4554da774ab9f94cfd7aacbc7b02617f30d6df9 WHIRLPOOL 00794c3963293bf912a88091c5885c2cc4ea1c5142fe7597e28b47dbb4f2c7b993284361a6034d738bf5e007efd49d9df89b8fc45ee0b18ce0fe7243436fa138 +EBUILD gatling-0.15.ebuild 1545 SHA256 5389e36b68b387ecd3d54021fbd95582c8ff4941149bd6266b9e8d3223d89803 SHA512 088ab87c7075960f4e9a27f3731aa4145976b84a5c102f4dc51622a93cd8ea6e7b3442cd5e0979a0cab4a6ae9ff636ded07df3c58ce047986e29b2462fa5d747 WHIRLPOOL 3bfd720142c14731a7e9dd5b8e73f856804398a7a0be6872ef7d5aa52e5690dec7936cc895a289b2b6b6451fa1754cb8bbfc05202a423db9a991717ee4994a60 +MISC ChangeLog 2861 SHA256 ae9ac0374f3e7ce9776931fa77a5ff6e0b7dc4bed6d6972d2c5a523466f7a0cb SHA512 0d0b4f7c8ff104b0d96142c546ce24a63172ed01b4e5b908cc06bcba1f2077483c34ba3385ca86bbeb32989aa4ff6d8fa161c3316829720c43dc6acae159d8ea WHIRLPOOL db2f90e8d2b4e129c42915fa66b7bc30771d62fae4511f3274fbbf0475758dd0f40cb9d6ea3d134d404ee1eabec39055a4403ca96d6b5e4d8ab79b0aa9e0d5a2 +MISC ChangeLog-2015 2739 SHA256 84234496ba88d33788b48ece817c5971f84de041548935d6103db163e51e8e55 SHA512 22cbbac0c6c50f645061c9dcf06df8cc6aab1c63380bc06ba5698fa597b3746b1946905840cd28776e763254d317b33ac102cc5078dc9b164d84066910fffa22 WHIRLPOOL 17a15b567055a27368216b037190f015e7284cd5ada41d26e50bab4da77e409aa3c5a142c3f31054ca91baf9212007cad90a8f11b0cae7b01abc72b956503692 +MISC metadata.xml 444 SHA256 c66d8b1bfd06a7b9f94f89d3ac68048fdea221bf9ee3336955685e78b330bdce SHA512 0f829523b85ea9fcd62743f72f7a985e532685d4989b0083191286cbc9a99db398fde3c63f86ad9bdeb6e75d559a777e85cf2df037456e5b0960b15c2511815a WHIRLPOOL 2a429ec310b226c9548b0c82eb0dc1c4224d3db5dde368d4c747fdb606406ba398139f9aaa8b699774f76d602fd952edd14ab4d289e5deef3ec32711b6ffe370 diff --git a/www-servers/gatling/files/gatling-0.12-compile.patch b/www-servers/gatling/files/gatling-0.12-compile.patch new file mode 100644 index 000000000000..db609836332b --- /dev/null +++ b/www-servers/gatling/files/gatling-0.12-compile.patch @@ -0,0 +1,20 @@ +--- GNUmakefile 2012-04-10 04:31:14.505474482 +0200 ++++ GNUmakefile 2012-04-10 04:31:53.821982958 +0200 +@@ -64,7 +64,7 @@ + acc: acc.c + $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) -lowfat + +-CC:=$(DIET) $(CC) ++override CC:=$(DIET) $(CC) + + pthreadbench: pthreadbench.o + $(CC) $< -o $@ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) -lpthread +@@ -80,7 +80,7 @@ + $(OBJS) https.o gatling.o: gatling.h version.h gatling_features.h + + tlsgatling: gatling.c ssl.o $(HTTPS_OBJS) +- -$(CC) -o $@ gatling.c ssl.o $(HTTPS_OBJS) $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS) ++ $(CC) -o $@ gatling.c ssl.o $(HTTPS_OBJS) $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS) + + gatling: gatling.o $(OBJS) md5lib + $(CC) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LDLIBS) `cat md5lib` diff --git a/www-servers/gatling/files/gatling-0.13-compile.patch b/www-servers/gatling/files/gatling-0.13-compile.patch new file mode 100644 index 000000000000..7b4d44af9c09 --- /dev/null +++ b/www-servers/gatling/files/gatling-0.13-compile.patch @@ -0,0 +1,11 @@ +--- GNUmakefile 2012-04-10 04:31:14.505474482 +0200 ++++ GNUmakefile 2012-04-10 04:31:53.821982958 +0200 +@@ -64,7 +64,7 @@ + acc: acc.c + $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) -lowfat + +-CC:=$(DIET) $(CC) ++override CC:=$(DIET) $(CC) + + pthreadbench: pthreadbench.o + $(CC) $< -o $@ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) -lpthread diff --git a/www-servers/gatling/files/gatling.confd b/www-servers/gatling/files/gatling.confd new file mode 100644 index 000000000000..afbaecf80780 --- /dev/null +++ b/www-servers/gatling/files/gatling.confd @@ -0,0 +1,49 @@ +# /etc/conf.d/gatling + +# UID to run gatling server on +GATLING_UID="gatling" + +# Bind to IP address +IP="127.0.0.1" + +# Root directory +ROOTDIR="/var/www" + +# Bind to Port +PORT="80" + +# HTTP timeout +HTTP_TIMEOUT="23" + +# Gatling pid file +PID="/var/run/gatling.pid" + +# Virtual domain hosting +VHOST="NO" + +# Directory indexing +DIR_INDEXING="NO" + +# Secure Socket Connections SSL +SSL="NO" + +# Prefetch value (see man page for details) +PREFETCH="2M" + +# FTP access +FTP="YES" + +# FTP timeout +FTP_TIMEOUT="60" + +# FTP User Authorization +FTP_AUTH="YES" + +# FTP file uploads +FTP_UP="NO" + +# Enable ftp file downloads +FTP_FILE_FETCH="YES" + +# Transparent proxy mode +TRANS_PROXY="YES" diff --git a/www-servers/gatling/files/gatling.initd b/www-servers/gatling/files/gatling.initd new file mode 100644 index 000000000000..fadb1ce9d175 --- /dev/null +++ b/www-servers/gatling/files/gatling.initd @@ -0,0 +1,63 @@ +#!/sbin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Gatling high performance web server init script" +opts="reload" + +depend() { + need net +} + +checkconfig() { + # Verify UID is valid for running process. + if [[ ! $(id ${GATLING_UID} 2>/dev/null) ]]; then + ewarn "User ${GATLING_UID} not found!" + return 1 + fi + + # Set gatling run opts + if yesno ${VHOST};then VHOST=-v;else VHOST=-V;fi + if yesno ${SSL};then SSL=-e;else SSL=-E;fi + if yesno ${DIR_INDEXING};then DIR_INDEXING=-d;else DIR_INDEXING=-D;fi + if yesno ${FTP}; then FTP=-f;else FTP=-F;fi + if yesno ${FTP_AUTH}; then FTP_AUTH=-l;else unset FTP_AUTH;fi + if yesno ${FTP_UP};then unset FTP_UP;else FTP_UP=-U;fi + yesno ${TRANS_PROXY} && TRANS_PROXY=-t +} + +start() { + checkconfig || return 1 + + ebegin "Starting gatling" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} + +stop() { + ebegin "Stopping gatling" + start-stop-daemon --quiet --stop --pidfile ${PID} + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + + checkconfig || return 1 + + ebegin "Sending gatling the HUP signal" + start-stop-daemon --quiet --signal HUP --pidfile ${PID} + + ebegin "Restarting gatling server" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} diff --git a/www-servers/gatling/files/gatling.initd-2 b/www-servers/gatling/files/gatling.initd-2 new file mode 100644 index 000000000000..77f436009b34 --- /dev/null +++ b/www-servers/gatling/files/gatling.initd-2 @@ -0,0 +1,63 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Gatling high performance web server init script" +extra_started_commands="reload" + +depend() { + need net +} + +checkconfig() { + # Verify UID is valid for running process. + if [[ ! $(id ${GATLING_UID} 2>/dev/null) ]]; then + ewarn "User ${GATLING_UID} not found!" + return 1 + fi + + # Set gatling run opts + if yesno ${VHOST};then VHOST=-v;else VHOST=-V;fi + if yesno ${SSL};then SSL=-e;else SSL=-E;fi + if yesno ${DIR_INDEXING};then DIR_INDEXING=-d;else DIR_INDEXING=-D;fi + if yesno ${FTP}; then FTP=-f;else FTP=-F;fi + if yesno ${FTP_AUTH}; then FTP_AUTH=-l;else unset FTP_AUTH;fi + if yesno ${FTP_UP};then unset FTP_UP;else FTP_UP=-U;fi + if yesno ${TRANS_PROXY};then TRANS_PROXY=-t;else unset TRANS_PROXY;fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting gatling" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} + +stop() { + ebegin "Stopping gatling" + start-stop-daemon --quiet --stop --pidfile ${PID} + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + + checkconfig || return 1 + + ebegin "Sending gatling the HUP signal" + start-stop-daemon --quiet --signal HUP --pidfile ${PID} + + ebegin "Restarting gatling server" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} diff --git a/www-servers/gatling/files/gatling.initd-3 b/www-servers/gatling/files/gatling.initd-3 new file mode 100644 index 000000000000..33c5e5a3095f --- /dev/null +++ b/www-servers/gatling/files/gatling.initd-3 @@ -0,0 +1,63 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Gatling high performance web server init script" +extra_started_commands="reload" + +depend() { + need net +} + +checkconfig() { + # Verify UID is valid for running process. + if [ ! "$(id ${GATLING_UID} 2>/dev/null)" ]; then + ewarn "User ${GATLING_UID} not found!" + return 1 + fi + + # Set gatling run opts + if yesno ${VHOST};then VHOST=-v;else VHOST=-V;fi + if yesno ${SSL};then SSL=-e;else SSL=-E;fi + if yesno ${DIR_INDEXING};then DIR_INDEXING=-d;else DIR_INDEXING=-D;fi + if yesno ${FTP}; then FTP=-f;else FTP=-F;fi + if yesno ${FTP_AUTH}; then FTP_AUTH=-l;else unset FTP_AUTH;fi + if yesno ${FTP_UP};then unset FTP_UP;else FTP_UP=-U;fi + if yesno ${TRANS_PROXY};then TRANS_PROXY=-t;else unset TRANS_PROXY;fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting gatling" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} + +stop() { + ebegin "Stopping gatling" + start-stop-daemon --quiet --stop --pidfile ${PID} + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + + checkconfig || return 1 + + ebegin "Sending gatling the HUP signal" + start-stop-daemon --quiet --signal HUP --pidfile ${PID} + + ebegin "Restarting gatling server" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \ +--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \ +${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \ +${FTP_AUTH} ${FTP_UPLOADS} + eend $? +} diff --git a/www-servers/gatling/gatling-0.12-r2.ebuild b/www-servers/gatling/gatling-0.12-r2.ebuild new file mode 100644 index 000000000000..ffa25cc9ce32 --- /dev/null +++ b/www-servers/gatling/gatling-0.12-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit eutils toolchain-funcs user + +DESCRIPTION="High performance web server" +HOMEPAGE="http://www.fefe.de/gatling/" +SRC_URI="http://dl.fefe.de/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="ssl diet" +REQUIRED_USE="ssl? ( !diet )" + +DEPEND=">=dev-libs/libowfat-0.25[diet=] + diet? ( dev-libs/dietlibc ) + ssl? ( dev-libs/openssl )" +RDEPEND="${DEPEND}" + +src_prepare() { + rm Makefile # leaves us with GNUmakefile + epatch "${FILESDIR}/${P}-compile.patch" +} + +src_compile() { + local DIET= + use diet && DIET='/usr/bin/diet' + + local targets='gatling' + use ssl && targets+=' tlsgatling' + + emake DIET="${DIET}" CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -I/usr/include/libowfat" \ + LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \ + || die "emake ${targets} failed" +} + +src_install() { + doman gatling.1 || die "installing manpage failed" + + newconfd "${FILESDIR}/gatling.confd" gatling || die + newinitd "${FILESDIR}/gatling.initd-2" gatling || die + dodoc README.{ftp,http} || die "installing docs failed" + + dobin gatling || die "installing gatling binary failed" + use ssl && { + dodoc README.tls || die "installing docs failed" + dobin tlsgatling || die "installing tlsgatling binary failed" + } +} + +pkg_setup() { + ebegin "Creating gatling user and group" + enewgroup gatling + enewuser ${PN} -1 -1 /var/www/localhost ${PN} +} diff --git a/www-servers/gatling/gatling-0.13-r1.ebuild b/www-servers/gatling/gatling-0.13-r1.ebuild new file mode 100644 index 000000000000..45cbd5827819 --- /dev/null +++ b/www-servers/gatling/gatling-0.13-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils toolchain-funcs user + +DESCRIPTION="High performance web server" +HOMEPAGE="http://www.fefe.de/gatling/" +SRC_URI="http://dl.fefe.de/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="libressl ssl diet" +REQUIRED_USE="ssl? ( !diet )" + +DEPEND=">=dev-libs/libowfat-0.25[diet=] + diet? ( dev-libs/dietlibc ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + )" +RDEPEND="${DEPEND}" + +src_prepare() { + rm Makefile # leaves us with GNUmakefile + epatch "${FILESDIR}/${P}-compile.patch" +} + +src_compile() { + local DIET= + use diet && DIET='/usr/bin/diet' + + local targets='gatling' + use ssl && targets+=' tlsgatling' + + emake DIET="${DIET}" CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -I${ROOT}usr/include/libowfat" \ + LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \ + || die "emake ${targets} failed" +} + +src_install() { + doman gatling.1 || die "installing manpage failed" + + newconfd "${FILESDIR}/gatling.confd" gatling || die + newinitd "${FILESDIR}/gatling.initd-2" gatling || die + dodoc README.{ftp,http} || die "installing docs failed" + + dobin gatling || die "installing gatling binary failed" + use ssl && { + dodoc README.tls || die "installing docs failed" + dobin tlsgatling || die "installing tlsgatling binary failed" + } +} + +pkg_setup() { + ebegin "Creating gatling user and group" + enewgroup gatling + enewuser ${PN} -1 -1 /var/www/localhost ${PN} +} diff --git a/www-servers/gatling/gatling-0.13.ebuild b/www-servers/gatling/gatling-0.13.ebuild new file mode 100644 index 000000000000..a3f6ea2f13d6 --- /dev/null +++ b/www-servers/gatling/gatling-0.13.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit eutils toolchain-funcs user + +DESCRIPTION="High performance web server" +HOMEPAGE="http://www.fefe.de/gatling/" +SRC_URI="http://dl.fefe.de/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="ssl diet" +REQUIRED_USE="ssl? ( !diet )" + +DEPEND=">=dev-libs/libowfat-0.25[diet=] + diet? ( dev-libs/dietlibc ) + ssl? ( dev-libs/openssl )" +RDEPEND="${DEPEND}" + +src_prepare() { + rm Makefile # leaves us with GNUmakefile + epatch "${FILESDIR}/${P}-compile.patch" +} + +src_compile() { + local DIET= + use diet && DIET='/usr/bin/diet' + + local targets='gatling' + use ssl && targets+=' tlsgatling' + + emake DIET="${DIET}" CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -I${ROOT}usr/include/libowfat" \ + LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \ + || die "emake ${targets} failed" +} + +src_install() { + doman gatling.1 || die "installing manpage failed" + + newconfd "${FILESDIR}/gatling.confd" gatling || die + newinitd "${FILESDIR}/gatling.initd-2" gatling || die + dodoc README.{ftp,http} || die "installing docs failed" + + dobin gatling || die "installing gatling binary failed" + use ssl && { + dodoc README.tls || die "installing docs failed" + dobin tlsgatling || die "installing tlsgatling binary failed" + } +} + +pkg_setup() { + ebegin "Creating gatling user and group" + enewgroup gatling + enewuser ${PN} -1 -1 /var/www/localhost ${PN} +} diff --git a/www-servers/gatling/gatling-0.15.ebuild b/www-servers/gatling/gatling-0.15.ebuild new file mode 100644 index 000000000000..f2b75dd25464 --- /dev/null +++ b/www-servers/gatling/gatling-0.15.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils toolchain-funcs user + +DESCRIPTION="High performance web server" +HOMEPAGE="https://www.fefe.de/gatling/" +SRC_URI="https://www.fefe.de/gatling/${P}.tar.xz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="libressl ssl diet" +REQUIRED_USE="ssl? ( !diet )" + +DEPEND=">=dev-libs/libowfat-0.25[diet=] + diet? ( dev-libs/dietlibc ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + )" +RDEPEND="${DEPEND}" + +src_prepare() { + rm Makefile # leaves us with GNUmakefile + epatch "${FILESDIR}/${PN}-0.13-compile.patch" + eapply_user +} + +src_compile() { + local DIET= + use diet && DIET='/usr/bin/diet' + + local targets='gatling' + use ssl && targets+=' tlsgatling' + + emake DIET="${DIET}" CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -I${ROOT}usr/include/libowfat" \ + LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \ + || die "emake ${targets} failed" +} + +src_install() { + doman gatling.1 || die "installing manpage failed" + + newconfd "${FILESDIR}/gatling.confd" gatling || die + newinitd "${FILESDIR}/gatling.initd-3" gatling || die + dodoc README.{ftp,http} || die "installing docs failed" + + dobin gatling || die "installing gatling binary failed" + use ssl && { + dodoc README.tls || die "installing docs failed" + dobin tlsgatling || die "installing tlsgatling binary failed" + } +} + +pkg_setup() { + ebegin "Creating gatling user and group" + enewgroup gatling + enewuser ${PN} -1 -1 /var/www/localhost ${PN} +} diff --git a/www-servers/gatling/metadata.xml b/www-servers/gatling/metadata.xml new file mode 100644 index 000000000000..94889d6a7b45 --- /dev/null +++ b/www-servers/gatling/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="person"> + <email>sping@gentoo.org</email> + <name>Sebastian Pipping</name> + </maintainer> + <use> + <flag name="diet">Compile against <pkg>dev-libs/dietlibc</pkg></flag> + </use> +</pkgmetadata> diff --git a/www-servers/gunicorn/Manifest b/www-servers/gunicorn/Manifest new file mode 100644 index 000000000000..ae81f143ecd4 --- /dev/null +++ b/www-servers/gunicorn/Manifest @@ -0,0 +1,11 @@ +DIST gunicorn-19.1.1.tar.gz 385155 SHA256 82715511fb6246fad4ba66d812eb93416ae8371b464fa88bf3867c9c177daa14 SHA512 1b42f0dadb8ced12954e821ad3dc7fad67ae6f1123218fe79e32d7089d9ae65bcd973613c226d9a16b11d7d35632990f2c9499594c7a383a79698a1c2db471de WHIRLPOOL 29c99b33b72d00dc248adedf89517804f58ee4ee36a3c9fdddb9d65ee047dd57d381d719e1ed44b7b5284f11ac703d29f3d66fd077f996de2ab9effa8fb15fda +DIST gunicorn-19.3.0.tar.gz 395381 SHA256 8bc835082882ad9a012cd790c460011e4d96bf3512d98a04d3dabbe45393a089 SHA512 8c4e0bb1bf0b35aaf9160b9b7d87890a991451fbc86186454203f3483767858944704c1ec22dd52480ce1e4693e84b62b1428dd3b67b2ae925e0475dc08fcb50 WHIRLPOOL 7a840b5878b409d89a61dcca40632448e7b5a402b0e26ba03a65f3384a9491f06c2c69279cdfcc0013e2b6d7ee0de619d17437a60990d19f674653d29c83502a +DIST gunicorn-19.4.5.tar.gz 399066 SHA256 53b58044764ad79d732af18c580b1a54b724adf4d290ec19c4ca78ab22a1ee0d SHA512 a255178a4ce7966af5883fc6c104e7c472c87ce91861caf976b52cfb0ccd90b34109130334afa6c1f6dd251a4b33b052b1f9a4f598c5cd1e7f26e332b92e9154 WHIRLPOOL 1ee0ea3b69ab10a2afa67b237a8197ff06334ab1df6b4dd84479bbc6360094c0806ace6c64a80032921321434d83a5b8831641bda966e826a5c8e3b4206eb3ac +DIST gunicorn-19.6.0.tar.gz 404497 SHA256 813f6916d18a4c8e90efde72f419308b357692f81333cb1125f80013d22fb618 SHA512 50b69ae18acc6f60be6fc5c6f4a867d8415d32009a1f959155b58502d52403a057612e97d6c9b69ec068ee5af7b9b045952a636a5edf4713a1249492611be479 WHIRLPOOL dbe1b2e66ca0f1a19a8e235a1ca58d77cbd6f5f54d26ea9c4a4a4b2a5110a2185f3c9f378ce9297879bc4b74ba63322803b2d0a090f7b5fb669530a0e8ef1d4a +EBUILD gunicorn-19.1.1.ebuild 1155 SHA256 2e290c07c7dbe3520b0cd750b76de961d98ee42e9df5073306c99655ea6dfa3e SHA512 883495c7e2d4a85a1fd917980ae598088ccce08393eedad95d30d5eaad52047ff05d2ff8a68929e0e83d6e4709a0d7f584f4fe92c9993544edaf7730feeecb8c WHIRLPOOL 72a45403930edd3b0431e47e7e45116a0cbba4a22f9b9fb50f901a2db1804cd24a48b856b7eb740ead19a38a7b3601fac6e9875830adcb7b82f5fa5f4c9488f4 +EBUILD gunicorn-19.3.0.ebuild 1211 SHA256 e24b11619f6c20d182d20da0ec69637046709da5604b134e0f8f2e26dbb729f5 SHA512 e6a0ea3758c0199aacf756851ca9e97ceb63cb22ddd1e52a93812de2fadb582260630a9857d7c3d6a5901ccec44e8e63ba200b8a051d0555b40ec79e06c303bf WHIRLPOOL 721a333e460ddae8abc0c23588539d7f0f08c1bfe65e731fd6f373de2250495581b47dd8a1cab53c713f08d9fd1e2673312346fd09506ae3c0c1b43ad4c26b32 +EBUILD gunicorn-19.4.5.ebuild 1109 SHA256 a001f4505ac6fd7154a9651b69ce069aa6e85650a4e35e113bd2e548edeb3187 SHA512 f1d2fb42e31ad2eed1504fe51bf2e3e9241ce25d298c15ae27c9d8e6134097f91da50688ad6c9e07bbf499038061361969994e172f38b4016142f4616c1ad155 WHIRLPOOL 048313ee949fa296c84d3d768ae22bfc34a780322897631097c0f99080133876f5a489088e1d59b6955504e6be8a91fdfb0c84e8b1841a6be8ea2ffc2cab2577 +EBUILD gunicorn-19.6.0.ebuild 1174 SHA256 db8bf905fe7351ec63aad16754f722d5bd6e56f6d83178abc1a45657c5dcfa68 SHA512 b7554cee97aec109fa2a65540bb8326a6b641b83c8bfdfa4004a27df26caae655f6aaf89982134ae1ad790c39650a0fc87d93d9b1302e9bd030b6ef6d9022059 WHIRLPOOL b341dac79753e2aad69b7f924994264a104fafe4fafde7970ac9b875538dcd9b6f73b91ef6920c7c89aa5cbe3b0ca49753984ca418a905b519fd45f2ddc87304 +MISC ChangeLog 4184 SHA256 6833bd02a06041d73543725441e6b048362253b3fc1d0009d544c3bc018267ae SHA512 eaa279736257ade26949f0ea8c13ac45fffd0fc34cd0420cdbbf7d20377f66c9224f4f3d3c3ac5b9e9979ed3ef5aca1b9d600edabcf2e7c6dd629cdcd278d505 WHIRLPOOL f2ede6c470d35ca3ad2c4310ff098b46d5922516d77046ec5386107846e3f570f9376157e2abd96c30d8aa2881ab91afee776a6dea107dc1cd738f1fc9f4365b +MISC ChangeLog-2015 6027 SHA256 3df4903a0cb1eb20ec5e4e8b103ca1c2e95b5d5792a10cdb7f5f1fad1c4eeac6 SHA512 b9005c3e52ce3136e7195c890d46dcf6a2d3a641048c2475e089f0fe6aab7821d4f95800f9c4cbc614914cd707c4924dd8863e558b5895b3a39132af10518fbc WHIRLPOOL 86488af7e24a5530fb22d2293454863bd172fb032dfaca339ef6efc24f303205057ab5cc18cbb0fd3b8b5263a0ba5370401aa039e886cc8732b60ccce91d4379 +MISC metadata.xml 709 SHA256 a802eb3e7ae96d265158484edb0686e3d6d3dff6789e7273ba923622e46dda71 SHA512 5ed1fb8047189e38f9f666625744d5a09f7de56ebd03a393e9d19ca85d0485960aceab3662c494d7fdeacc730c7ffea0422215a39d80786f160051cb4f2799bd WHIRLPOOL 1e40c079ac91054da428d8729b299b6c95c74488384a23448f055185df8b3c977aff9df28b902ce4ed151c84268e300e7d8353377962e515bea95d105a21113a diff --git a/www-servers/gunicorn/gunicorn-19.1.1.ebuild b/www-servers/gunicorn/gunicorn-19.1.1.ebuild new file mode 100644 index 000000000000..2b534c00a950 --- /dev/null +++ b/www-servers/gunicorn/gunicorn-19.1.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) + +inherit distutils-r1 + +DESCRIPTION="A WSGI HTTP Server for UNIX" +HOMEPAGE="http://gunicorn.org https://pypi.python.org/pypi/gunicorn" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +IUSE="doc examples test" +KEYWORDS="amd64 x86" + +RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/pytest[${PYTHON_USEDEP}] )" + +DOCS="README.rst" + +python_prepare() { + # these tests requires an already installed version of gunicorn + rm tests/test_003-config.py + + sed -ie "s/..\/bin/\/usr\/bin\//" docs/Makefile || die + + distutils-r1_python_prepare +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test -v || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + + distutils-r1_python_install_all + + if use examples; then + insinto /usr/share/doc/${P} + doins -r examples + fi +} diff --git a/www-servers/gunicorn/gunicorn-19.3.0.ebuild b/www-servers/gunicorn/gunicorn-19.3.0.ebuild new file mode 100644 index 000000000000..5990dadd704d --- /dev/null +++ b/www-servers/gunicorn/gunicorn-19.3.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) + +inherit distutils-r1 + +DESCRIPTION="A WSGI HTTP Server for UNIX" +HOMEPAGE="http://gunicorn.org https://pypi.python.org/pypi/gunicorn https://github.com/benoitc/gunicorn" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples test" + +RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + )" + +DOCS="README.rst" + +python_prepare_all() { + # these tests requires an already installed version of gunicorn + rm tests/test_003-config.py || die + + sed -ie "s/..\/bin/\/usr\/bin\//" docs/Makefile || die + + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test -v || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + use examples && EXAMPLES=( examples/. ) + + distutils-r1_python_install_all +} diff --git a/www-servers/gunicorn/gunicorn-19.4.5.ebuild b/www-servers/gunicorn/gunicorn-19.4.5.ebuild new file mode 100644 index 000000000000..05be8e62d5fa --- /dev/null +++ b/www-servers/gunicorn/gunicorn-19.4.5.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) + +inherit distutils-r1 + +DESCRIPTION="A WSGI HTTP Server for UNIX" +HOMEPAGE="http://gunicorn.org https://pypi.python.org/pypi/gunicorn https://github.com/benoitc/gunicorn" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples test" + +RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + )" + +DOCS="README.rst" + +python_prepare_all() { + sed -ie "s/..\/bin/\/usr\/bin\//" docs/Makefile || die + + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test -v || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + use examples && EXAMPLES=( examples/. ) + + distutils-r1_python_install_all +} diff --git a/www-servers/gunicorn/gunicorn-19.6.0.ebuild b/www-servers/gunicorn/gunicorn-19.6.0.ebuild new file mode 100644 index 000000000000..6da709721f9f --- /dev/null +++ b/www-servers/gunicorn/gunicorn-19.6.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) + +inherit distutils-r1 + +DESCRIPTION="A WSGI HTTP Server for UNIX" +HOMEPAGE="http://gunicorn.org https://pypi.python.org/pypi/gunicorn https://github.com/benoitc/gunicorn" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT PSF-2 doc? ( BSD )" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="doc examples test" + +RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + )" + +DOCS="README.rst" + +python_prepare_all() { + sed -ie "s/..\/bin/\/usr\/bin\//" docs/Makefile || die + + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test -v || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + use examples && EXAMPLES=( examples/. ) + + distutils-r1_python_install_all +} diff --git a/www-servers/gunicorn/metadata.xml b/www-servers/gunicorn/metadata.xml new file mode 100644 index 000000000000..2461e1cdf801 --- /dev/null +++ b/www-servers/gunicorn/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>rafaelmartins@gentoo.org</email> + <name>Rafael G. Martins</name> + </maintainer> + <longdescription lang="en">Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a + pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn + server is broadly compatible with various web frameworks, simply + implemented, light on server resources, and fairly speedy. </longdescription> + <upstream> + <remote-id type="pypi">gunicorn</remote-id> + <remote-id type="github">benoitc/gunicorn</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest new file mode 100644 index 000000000000..333e47595b85 --- /dev/null +++ b/www-servers/h2o/Manifest @@ -0,0 +1,8 @@ +AUX h2o.conf 673 SHA256 e22bffda48ad6519d071d5de7afa6ea7acd6fba21c879d5c0b2e2f0b91df75de SHA512 48ab93dd7aee65f88bb12bc270f0ba0edf31bcb4610bb4b648936f8ffca47b30a3aa2aec129aa3c985f476450dc47305bd111f326715941f84e54bbc66f1325a WHIRLPOOL 5b0919b9415b6b42a2415c511615d867efaabb8c2628997dc3c4ded73a3bab60b914c66705e1829c0356087538719892bfcf7ce2888e4cd0c4f8552a48308cea +AUX h2o.initd 1137 SHA256 4a2ab08c15b8c5d10cf538862f0cd48419e2968061f0e6ce56c1540ce064954b SHA512 2509b1b6996be25bba158b626c8eb260aae2400d76dc0edcee38869eb1124ae9ed125fb1887bf85f3c96db189b68c77706c7a9aeb9f4be2d2dfd998606d3a763 WHIRLPOOL 7ec5716442283b56f294016c211bd23a8d3d3c09cb667f72915f33e01bc59d5cdadba920938a8e5943d82afcdf68d696e6cc46df15ed228e1e1464a2484e1135 +AUX h2o.logrotate 176 SHA256 31749cf8fbc34c73c8fd439579cbd07bf9d0c3c2d0db8f7fb32f340727131e13 SHA512 e7e15bb7813b45342a9d435d07eea0627b802a4c03c6f4204b533a7bfac9566152f875965e4ea761572324a278e7b85c507729210d92ca4bede3ef9b9d2ac305 WHIRLPOOL 2ab1cbffcebddb2a7e8ca9cefd124670b1b11be0e9bf4202727201aef9d25ffbc893ce5e9903c92aca4b5787a6d46c344e5445721d6f1bbcfac7a5441001b9cb +AUX h2o.service 290 SHA256 9eae3d4b08f22e2b140e736d36b347bcb5d817c60faff72804c80f5ccc660954 SHA512 e1acd226a5e333538be782f5d47c8debf418966c86eaa5d7464431ecc399821e336c9539e90370b9f8041c023f876815050e5ad5a7d29288b6f87bd3adbe0e95 WHIRLPOOL 1bd06fdcefb4bd35c02b0294af395efa172390114dbda375fcb136fec63d9bccf621850d4348caf77b24835b8b47e8c4bfb06ea38c2604667ed0df215cef0903 +DIST h2o-2.2.2.tar.gz 16192602 SHA256 cf45780058566bd63d90ad0b52b1d15f8515519090753398b9bcf770162a0433 SHA512 b5cc08f2be7056bbac4370f9b6ccb1ba0ad4ea61ce67e946a4f26b8f9c0a575f603c899b1a88f17d1065e0e72e1d1094199200ed24b4f3644a3c7df34aa04b51 WHIRLPOOL d9aff2d3e7caa0334efbac86a807fe8ecd5f146ae56315a5194b8de653ae4f91d33cad754714cd38fadd1c59d87cafe30c1f5f6cb2102362a7647ebd3f18dc84 +EBUILD h2o-2.2.2.ebuild 1337 SHA256 316d3860e5d289943bc291106c2e83aba5e4125ce218fd7ccab54e92fa564f2c SHA512 c7f6030add11f692ea59a62a4c10eb111f0e4b2edbcb4837fc17e781670ac677001f1413c05d5477ad84ed75de29460974025d1672f7e36d04fc4961b139638c WHIRLPOOL eac6fc4188ded50a4066315d9fea653baac4684493a64fc15096609c77953b45d5a8605ad95f2faf09553fedece33447cd830bbadbaca7956044443d7bfd8dd7 +EBUILD h2o-9999.ebuild 1306 SHA256 c14fe20cecb0e14f30a7669e716eae5dcef06735e58b89f320c52e993595b324 SHA512 76636b6de8b0aed676314971e3b6d7f5c00bb1c0071a4d4facf5d9088335913a2c488b15f4d07411de1895dec48d32984a47b4a3485cc44d90f4d017c0184200 WHIRLPOOL 02540fd4c7403d2d10a89931ff3c6baede24dd1c03674b8681a094788d5ca1fd876cc5632333fc029c3251beebfe6085c1a2ebede9d0b0e34c0a19f8b52c9bb8 +MISC metadata.xml 728 SHA256 1531440761f65dcd9833c08638bb78488c9a151e6adacc2209e5baf4e5907838 SHA512 ae4a00e6c50ef7930e264cb3a747e14e656908fab0e3da4673c6719dda3744b34451361cd118feaaa6eebf3980c56ec297df9306e9ffa56c56df6c150e27707b WHIRLPOOL fdbe147f6fe521123e68c847a829074bc7b5c9838d055f317b16e774769c78e8a0103c179086edec35abdb05f27694c91fd6c9fedad2e29467a089f0e2ba7c10 diff --git a/www-servers/h2o/files/h2o.conf b/www-servers/h2o/files/h2o.conf new file mode 100644 index 000000000000..ccca5dd2de51 --- /dev/null +++ b/www-servers/h2o/files/h2o.conf @@ -0,0 +1,30 @@ +# see /usr/share/doc/h2o/index.html for detailed documentation +# see h2o --help for command-line options and settings + +user: h2o +pid-file: /run/h2o.pid +access-log: /var/log/h2o/access.log +error-log: /var/log/h2o/error.log + +# httpoxy mitigation (https://httpoxy.org) +# see https://github.com/h2o/h2o/pull/996 +setenv: + HTTP_PROXY: "" + +listen: 80 + +#listen: +# port: 443 +# ssl: +# minimum-version: TLSv1.2 +# certificate-file: /etc/h2o/server.crt +# key-file: /etc/h2o/server.key + +hosts: + "localhost:80": + paths: + "/": + file.dir: /var/www/localhost/htdocs + "/doc": + file.dir: /usr/share/doc/h2o/ + file.index: [ 'index.html' ] diff --git a/www-servers/h2o/files/h2o.initd b/www-servers/h2o/files/h2o.initd new file mode 100644 index 000000000000..ad598a5f6199 --- /dev/null +++ b/www-servers/h2o/files/h2o.initd @@ -0,0 +1,51 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configtest" +extra_started_commands="reload" +description="An optimized HTTP/1.x, HTTP/2 server" +description_configtest="Run H2O' internal config check" +description_reload="Reload the H2O configuration or upgrade the binary without losing connections" + +: ${config:="/etc/h2o/h2o.conf"} +pidfile=$(grep pid-file "${config}" | cut -d' ' -f2) + +name="H2O" +command="/usr/bin/h2o" +command_args="-m daemon -c ${config}" +required_files="$config" + +depend() { + use net + after logger +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + configtest || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi +} + +reload() { + configtest || return 1 + ebegin "Refreshing ${name} configuration" + kill -HUP $(cat ${pidfile}) &>/dev/null + eend $? "Failed to reload ${name}" +} + +configtest() { + ebegin "Checking ${name} configuration" + + if ! ${command} -c ${config} -t &>/dev/null; then + ${command} -c ${config} -t + fi + + eend $? "Failed, please correct the errors above" +} diff --git a/www-servers/h2o/files/h2o.logrotate b/www-servers/h2o/files/h2o.logrotate new file mode 100644 index 000000000000..b901bcfacb19 --- /dev/null +++ b/www-servers/h2o/files/h2o.logrotate @@ -0,0 +1,8 @@ +/var/log/h2o/*.log { + missingok + delaycompress + sharedscripts + postrotate + test -r $(grep pid-file "/etc/h2o/h2o.conf" | cut -d' ' -f2) && kill -HUP $(pidof h2o) + endscript +} diff --git a/www-servers/h2o/files/h2o.service b/www-servers/h2o/files/h2o.service new file mode 100644 index 000000000000..fe32c45cd90f --- /dev/null +++ b/www-servers/h2o/files/h2o.service @@ -0,0 +1,13 @@ +[Unit] +Description=An optimized HTTP/1.x, HTTP/2 server +After=network-online.target nss-lookup.target remote-fs.target + +[Service] +Type=simple +ExecStart=/usr/bin/h2o -c /etc/h2o/h2o.conf -m master +SyslogLevel=notice +PrivateTmp=true +LimitNOFILE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/h2o/h2o-2.2.2.ebuild b/www-servers/h2o/h2o-2.2.2.ebuild new file mode 100644 index 000000000000..428e789f69a3 --- /dev/null +++ b/www-servers/h2o/h2o-2.2.2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils systemd user + +DESCRIPTION="An optimized HTTP server with support for HTTP/1.x and HTTP/2" +HOMEPAGE="https://h2o.examp1e.net" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +mruby" + +RDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="${RDEPEND} + mruby? ( + sys-devel/bison + || ( + dev-lang/ruby:2.4 + dev-lang/ruby:2.3 + dev-lang/ruby:2.2 + ) + )" + +pkg_setup() { + enewgroup h2o + enewuser h2o -1 -1 -1 h2o +} + +src_prepare() { + # Leave optimization level to user CFLAGS + sed -i 's/-O2 -g ${CC_WARNING_FLAGS} //g' ./CMakeLists.txt \ + || die "sed fix failed!" + + default +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/h2o + -DWITH_MRUBY="$(usex mruby)" + -DWITHOUT_LIBS=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd "${FILESDIR}"/h2o.initd h2o + systemd_dounit "${FILESDIR}"/h2o.service + + insinto /etc/h2o + doins "${FILESDIR}"/h2o.conf + + keepdir /var/log/h2o + fperms 0700 /var/log/h2o + + keepdir /var/www/localhost/htdocs + + insinto /etc/logrotate.d + newins "${FILESDIR}"/h2o.logrotate h2o +} diff --git a/www-servers/h2o/h2o-9999.ebuild b/www-servers/h2o/h2o-9999.ebuild new file mode 100644 index 000000000000..fb30d888bf19 --- /dev/null +++ b/www-servers/h2o/h2o-9999.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils git-r3 systemd user + +DESCRIPTION="An optimized HTTP server with support for HTTP/1.x and HTTP/2" +HOMEPAGE="https://h2o.examp1e.net" +EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" +IUSE="libressl +mruby" + +RDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="${RDEPEND} + mruby? ( + sys-devel/bison + || ( + dev-lang/ruby:2.4 + dev-lang/ruby:2.3 + dev-lang/ruby:2.2 + ) + )" + +pkg_setup() { + enewgroup h2o + enewuser h2o -1 -1 -1 h2o +} + +src_prepare() { + # Leave optimization level to user CFLAGS + sed -i 's/-O2 -g ${CC_WARNING_FLAGS} //g' ./CMakeLists.txt \ + || die "sed fix failed!" + + default +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/h2o + -DWITH_MRUBY="$(usex mruby)" + -DWITHOUT_LIBS=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd "${FILESDIR}"/h2o.initd h2o + systemd_dounit "${FILESDIR}"/h2o.service + + insinto /etc/h2o + doins "${FILESDIR}"/h2o.conf + + keepdir /var/log/h2o + fperms 0700 /var/log/h2o + + keepdir /var/www/localhost/htdocs + + insinto /etc/logrotate.d + newins "${FILESDIR}"/h2o.logrotate h2o +} diff --git a/www-servers/h2o/metadata.xml b/www-servers/h2o/metadata.xml new file mode 100644 index 000000000000..8603b5978487 --- /dev/null +++ b/www-servers/h2o/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>csmk+gentoo@chaoslab.org</email> + <name>Ian Moone</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + H2O is a new generation HTTP server. Not only is it very fast, + it also provides much quicker response to end-users + when compared to older generations of HTTP servers. + </longdescription> + <use> + <flag name="mruby">Enable support for mruby</flag> + </use> + <upstream> + <remote-id type="github">h2o/h2o</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/hiawatha/Manifest b/www-servers/hiawatha/Manifest new file mode 100644 index 000000000000..b740fab5aef2 --- /dev/null +++ b/www-servers/hiawatha/Manifest @@ -0,0 +1,8 @@ +AUX hiawatha-9.5-cflags.patch 485 SHA256 fdae13ea1a6f7ead9e4cb5786757bd9d941a8775e413154b1961f8e73e25c141 SHA512 64bb15a13d8b370bd1c22ee1fba49badfafee5aa2ba143dd1abf367e767a6bc615627f1419736cef687e521b8a6485440ee6fb1364dfea3302b8062b08047f70 WHIRLPOOL e0daa79bcc07f9b48f27da1c88ee0e476787f175c0ea0d622ddab008af914bfc44676343cd2189317cfa2e82f98ee0db881c6cc9891f99d3a2cfe8896b79ae71 +AUX hiawatha.initd-r1 474 SHA256 6bec859fa08b181f37ad6cd62e2468e7ddd7748145b503d4bb08b849d25e9033 SHA512 ce0d7e197da496c2fcad71faf313d4160357fe784569ff879debe8314728698ffc3e0e28032f301261b191947f4e332384a268be43f2ed6e522f4e183c15f5bf WHIRLPOOL 47c29caa4d4ea04c353e5c8e6442baf3448a5d2154db6dd72054e0dc0f5bed650ea09a9716b7db42ce2b577f6166d7557229e63e60f0c6296a08a6901d120f62 +AUX hiawatha.service 140 SHA256 91f46ed4d82ca1e434a9b9f06b27087c27722d988d4a93c568ed68869c9b7af5 SHA512 a393c6df1ea2c0ad1e18fc7381f12ea82f859fd7157a0b1983288037647c9bc2023c4923e1b01031c691dee4bc7b89730036ca51a50af37e11f6890098e397a1 WHIRLPOOL 7b2143bc0dc4c236589f0e8eea0831e1b2f6eb7d179e671bf578cf21370615ced1dcaf74c0a6e8e88cbdbef9719b85b670871c0843200d69e87f7e26877089a9 +DIST hiawatha-9.15.tar.gz 869922 SHA256 e9252133a1114095d1a9a89144b88828ee3b9754f435bd88270f7bf444dd9421 SHA512 e5f0459475863c7cb2d15bdf2a9712f13c96ac450f349fd89e60fd600aad9010f25182aa6353a3014069a9798544a56ef79695918613946b63fecd3806b1982b WHIRLPOOL 80840072765430b05ecaf1ec631d3f1981c6f420edc18b4bcc7957f53f28ed2800170bbcec943c287da2968e6ac769514843fc54aa2a927d7d451057ed76d4d3 +EBUILD hiawatha-9.15.ebuild 4066 SHA256 eec8bc5a08bad3fc2056e6679f755e2c9088a74c981250c0d3ed922069e53793 SHA512 d881666c8b3fedb64caa023b9fafe9e75aabd424ebae7b2704e48c7679b63bc0f84f9869fd7f48ad841fb1da1dd1fca72fb9bfa6d6a727643de34fca8ffcbdf1 WHIRLPOOL 5a757cb65b8e89c20f4401409a562a0b06c8fa17fc2ffa01c66f8409aebb240704a8aa2f78df9ad3d91fa7dd56aefb2c035528e8cce17f36878ba2000c6ff9d5 +MISC ChangeLog 3692 SHA256 e650a45306596f4cce534379e793293be0947164dead24473809fd4eadb820ac SHA512 3e366bceb260319d2ac6cda61a727efa9f242b2fe19bcb71ac24cc94052b99b099eadfd3f548c1728dd21eadfbb34150cecd5cc1b088ff830de05775ccdfc655 WHIRLPOOL 4bbf5e502937bafff92b3587337102e42da9f5306c2393acd1ac7ed17b540c4f3ccdaca02ab5a58d1accba04f704517f2d1baab489e670150a741f672142dec6 +MISC ChangeLog-2015 1766 SHA256 3446e2818697985bb7175d029ad98a6d45318f1c5c870d4f728cbae9b5b977f6 SHA512 4db4288c57c3d1b164f59e207b73a02962c793f5a9d6a852805d92022be77a077c684329764be725e6faf96fa053cc247ea0f4db2b3759eab59a9a83ef7d79c6 WHIRLPOOL a3ac30a96730226d89f7a14b0e6b5ea6a5e3bda671e77831bb88170b5f5c2f17b30ce51d18d56222c014a52917d17ad80581c24290162183cba95f0f089123fd +MISC metadata.xml 734 SHA256 e719dbc3b6c2b060b479a76dba381170bea472ced70bc80e0084eb8d4973e5d5 SHA512 7880b2e670368a0bda7901599ef44e16b8089f2a2e445edcdb33727a42368378801d41d991f7ed5aef5f161e0a1654b5f5183e0bc2deefd437252ddaa8670587 WHIRLPOOL 922b206cd0299d46a6ad1c92b89d93485723b4221b4b6c1886a67840b0891ece462927cb394043379a0bbb3095666e32f5db9365c7c487c106c0fe9eb969c31c diff --git a/www-servers/hiawatha/files/hiawatha-9.5-cflags.patch b/www-servers/hiawatha/files/hiawatha-9.5-cflags.patch new file mode 100644 index 000000000000..4ff33cd0d126 --- /dev/null +++ b/www-servers/hiawatha/files/hiawatha-9.5-cflags.patch @@ -0,0 +1,17 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri May 23 16:59:33 UTC 2014 +Subject: make optimization level build-type dependant + +--- hiawatha-9.5/CMakeLists.txt ++++ hiawatha-9.5/CMakeLists.txt +@@ -2,7 +2,9 @@ + project(Hiawatha C) + + # Compiler +-set(CMAKE_C_FLAGS "-O2 -Wall -Wextra ${CMAKE_C_FLAGS}") ++set(CMAKE_C_FLAGS "-Wall -Wextra ${CMAKE_C_FLAGS}") ++set(CMAKE_C_FLAGS_RELEASE "-O2") ++set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2") + set(CMAKE_BUILD_TYPE "RelWithDebInfo") + + # Options diff --git a/www-servers/hiawatha/files/hiawatha.initd-r1 b/www-servers/hiawatha/files/hiawatha.initd-r1 new file mode 100644 index 000000000000..a6ebb0d64c4b --- /dev/null +++ b/www-servers/hiawatha/files/hiawatha.initd-r1 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --exec "/usr/sbin/hiawatha" \ + --pidfile "@HIAWATHA_PID_DIR@/hiawatha.pid" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --exec "/usr/sbin/hiawatha" \ + --pidfile "@HIAWATHA_PID_DIR@/hiawatha.pid" + eend $? +} diff --git a/www-servers/hiawatha/files/hiawatha.service b/www-servers/hiawatha/files/hiawatha.service new file mode 100644 index 000000000000..35e740b7e390 --- /dev/null +++ b/www-servers/hiawatha/files/hiawatha.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hiawatha webserver +After=network.target + +[Service] +ExecStart=/usr/sbin/hiawatha -d + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/hiawatha/hiawatha-9.15.ebuild b/www-servers/hiawatha/hiawatha-9.15.ebuild new file mode 100644 index 000000000000..754860d9b1a2 --- /dev/null +++ b/www-servers/hiawatha/hiawatha-9.15.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit cmake-utils eutils systemd user + +DESCRIPTION="Advanced and secure webserver" +HOMEPAGE="https://www.hiawatha-webserver.org" +SRC_URI="https://www.hiawatha-webserver.org/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+cache ipv6 monitor +rewrite +rproxy +ssl tomahawk +xslt" + +RDEPEND=" + sys-libs/zlib + ssl? ( >=net-libs/mbedtls-2.0[threads] ) + xslt? ( dev-libs/libxslt + dev-libs/libxml2 )" +DEPEND="${RDEPEND}" +PDEPEND="monitor? ( www-apps/hiawatha-monitor )" + +# set these in the environment of your PM if you want to use different values +HIAWATHA_CONFIG_DIR="${HIAWATHA_CONFIG_DIR:-/etc/hiawatha}" +HIAWATHA_LOG_DIR="${HIAWATHA_LOG_DIR:-/var/log/hiawatha}" +HIAWATHA_PID_DIR="${HIAWATHA_PID_DIR:-/var/run}" +HIAWATHA_WEBROOT_DIR="${HIAWATHA_WEBROOT_DIR:-/var/www/hiawatha}" +HIAWATHA_WORK_DIR="${HIAWATHA_WORK_DIR:-/var/lib/hiawatha}" +HIAWATHA_USER="${HIAWATHA_USER:-hiawatha}" +HIAWATHA_GROUP="${HIAWATHA_GROUP:-hiawatha}" + +safe_sed() { + local replace_of=$1 + local replace_with=$2 + local file=$3 + # optional + local outfile=$4 + + grep -E "${replace_of}" "${file}" 1>/dev/null \ + || die "\"${replace_of}\" not found in ${file}!" + + if [[ -n ${outfile} ]] ; then + einfo "Sedding ${file} into ${outfile}" + sed -r \ + -e "s|${replace_of}|${replace_with}|" \ + "${file}" > ${outfile} || die "sed on ${file} to ${outfile} failed!" + else + einfo "Sedding ${file} in-place" + sed -r -i \ + -e "s|${replace_of}|${replace_with}|" \ + "${file}" || die "sed on ${file} failed!" + fi + +} + +pkg_pretend() { + einfo + einfo "You can change hiawatha user and group, as well as the" + einfo "directories the webserver is going to use. For that," + einfo "set the following environment variables in your PM:" + einfo " HIAWATHA_CONFIG_DIR" + einfo " default: /etc/hiawatha" + einfo " current: ${HIAWATHA_CONFIG_DIR}" + einfo " HIAWATHA_LOG_DIR" + einfo " default: /var/log/hiawatha" + einfo " current: ${HIAWATHA_LOG_DIR}" + einfo " HIAWATHA_PID_DIR" + einfo " default: /var/run" + einfo " current: ${HIAWATHA_PID_DIR}" + einfo " HIAWATHA_WEBROOT_DIR" + einfo " default: /var/www/hiawatha" + einfo " current: ${HIAWATHA_WEBROOT_DIR}" + einfo " HIAWATHA_WORK_DIR" + einfo " default: /var/lib/hiawatha" + einfo " current: ${HIAWATHA_WORK_DIR}" + einfo " HIAWATHA_USER" + einfo " default: hiawatha" + einfo " current: ${HIAWATHA_USER}" + einfo " HIAWATHA_GROUP" + einfo " default: hiawatha" + einfo " current: ${HIAWATHA_GROUP}" + einfo +} + +pkg_setup() { + enewgroup ${HIAWATHA_GROUP} + enewuser ${HIAWATHA_USER} -1 -1 "${HIAWATHA_WEBROOT_DIR}" ${HIAWATHA_GROUP} +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-9.5-cflags.patch + + safe_sed "^#ServerId =.*$" "ServerId = ${HIAWATHA_USER}" \ + config/hiawatha.conf.in + + safe_sed "@HIAWATHA_PID_DIR@" "${HIAWATHA_PID_DIR}" \ + "${FILESDIR}/hiawatha.initd-r1" \ + "${T}/hiawatha.initd-r1" +} + +src_configure() { + local mycmakeargs=( + -DCONFIG_DIR:STRING="${HIAWATHA_CONFIG_DIR}" + -DENABLE_CACHE=$(usex cache) + -DENABLE_IPV6=$(usex ipv6) + -DENABLE_LOADCHECK=$(usex kernel_linux) + -DENABLE_MONITOR=$(usex monitor) + -DENABLE_RPROXY=$(usex rproxy) + -DENABLE_TLS=$(usex ssl) + -DENABLE_TOMAHAWK=$(usex tomahawk) + -DENABLE_TOOLKIT=$(usex rewrite) + -DENABLE_XSLT=$(usex xslt) + -DLOG_DIR:STRING="${HIAWATHA_LOG_DIR}" + -DPID_DIR:STRING="${HIAWATHA_PID_DIR}" + -DUSE_SYSTEM_MBEDTLS=$(usex ssl) + -DWEBROOT_DIR:STRING="${HIAWATHA_WEBROOT_DIR}" + -DWORK_DIR:STRING="${HIAWATHA_WORK_DIR}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + rm -r "${ED%/}${HIAWATHA_WEBROOT_DIR}"/* || die + + newinitd "${T}"/hiawatha.initd-r1 hiawatha + systemd_dounit "${FILESDIR}"/hiawatha.service + + local i + for i in "${HIAWATHA_LOG_DIR}" "${HIAWATHA_WORK_DIR}" ; do + keepdir "${i}" + fowners ${HIAWATHA_USER}:${HIAWATHA_GROUP} "${i}" + fperms 0750 "${i}" + done + + keepdir "${HIAWATHA_WEBROOT_DIR}" + fowners ${HIAWATHA_USER}:${HIAWATHA_GROUP} "${HIAWATHA_WEBROOT_DIR}" +} diff --git a/www-servers/hiawatha/metadata.xml b/www-servers/hiawatha/metadata.xml new file mode 100644 index 000000000000..9c55764f9182 --- /dev/null +++ b/www-servers/hiawatha/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <use> + <flag name="cache">Enable caching of content</flag> + <flag name="monitor">Pull in www-apps/hiawatha-monitor</flag> + <flag name="rewrite">Enable the rewrite toolkit</flag> + <flag name="ssl">Enable TLS support via + <pkg>net-libs/mbedtls</pkg></flag> + <flag name="tomahawk">Enable Tomahawk control server</flag> + <flag name="xslt">Enable XSLT support. + This is also needed for directory listings</flag> + <flag name="rproxy">Enable reverse proxy support</flag> + </use> + <upstream> + <remote-id type="github">hsleisink/hiawatha</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest new file mode 100644 index 000000000000..992bee7609de --- /dev/null +++ b/www-servers/lighttpd/Manifest @@ -0,0 +1,22 @@ +AUX conf/lighttpd.conf 8261 SHA256 98f1d23c2f3f1e7f58041a27516f8ba29312b66634371afe6fa10fa4038cdd29 SHA512 a1b336b34dddc3fdb3da3e9a03e054c32334f88ec06d73a3f649a4fe4d5f240704e638b9083177d0ed844cab3129d2760578fddb9f618607c3b8a1e339ae114c WHIRLPOOL c4aefa4d0d0a7d4d1cbe595498503b1274bf090d6e329a455cac97f28c390b5483279f59b896ad898a5b6043d5121bf86814d4de67bced5136007c04cfd8b2d9 +AUX conf/mime-types.conf 3313 SHA256 4db775fd31f89e8d2c2e64f685b3929755accbbd1b91beaba866ab6fea9eeddd SHA512 2535c9458f556a7f1a37461b543ff34869ab714438a3e53d13809bb46f0d6f4efa2da1407411678f54a64f6f9bdb32d5c3a7daf76903ef512c6d3b021719ebe7 WHIRLPOOL b442f6f75ba68a2eab23c2016373a2c4703a578291dea5732f25ebdee8db2649bf5d7121cf0311d2a8e8ae14554a0f40baa68b6185f77d1bed8e8102bdcd9844 +AUX conf/mod_cgi.conf 749 SHA256 ba6a242fd39f6d29eded80d5ea157108ac35d9bcfdb168568b35a64285fb9603 SHA512 e611b3ed232af4fb8e9b8821a29fbc32acb0a3431c701e5a64afc192abc288cf90582fbbf79085de9426be23d8d42d90da66e6993ab7cf89943ae23d59d681a1 WHIRLPOOL fb2e146db32e33d3acd077dea5295fa2a48e1d3602575d633369071e94304fa780adfcfade418e3534820736817feb436f8c6bf641c158da3de82e604581f9c9 +AUX conf/mod_fastcgi.conf 553 SHA256 61f89fd8c324d1817aaabd283024686d8b02b76eb47a344a2beada3fb3c5bf88 SHA512 e2796181ae9f7c55a48b690835f8f84aaab2c5c100846fc8ac5126b9a1351ef1a2ab30f26da2e16afa197bddf555c299a82a5cc133350212e171ac555765a08d WHIRLPOOL 64d53ffe634adf1d90e3578a86404a81eb0520780d8ece37b993c7bdc988cb27b49a82d4c6e86c3933f41d3cc714e220541b4bb4bf759f9b0b5bd0b097b0811a +AUX lighttpd.confd 240 SHA256 0be7c9c04ce508cbefb3e913951d83c5ed7f0e01fe5aebcf3a5071f30ef3dbc2 SHA512 dd722c15230df734d7151bcb9cfc66d6d54aac5dcdca5f50eb33979d3a2443ba3a9ef3d7cb35e6dbd3d39fce09da15ab0029b1399bf1b1e4f4ef20d40f70a416 WHIRLPOOL 9ffa7ee9fa1620520a282da15c5b68ee43e2bf5bfe47bd889a39d294ec48c6a254eb6d4af4fc842755f6939dc41276d25e253e088d09cd788c2495f557d15912 +AUX lighttpd.initd 1957 SHA256 aceed021f24b817347fdf216ccc61e7f34cb8fd831a377c2fbbf1230873498e2 SHA512 d5fc03ded923d2aeea19fefdf658ed793114867dd0b50be6836d767108c98fb7de56011f00ea63220c4b198cff45d98fdc8a649efae90673536e03f786219485 WHIRLPOOL 57f49ee5139338eeccc462ef5994d4048293cb3f9151e4c5cf8607af54c1520f8a20a286e847aed92766d33081c0bcdb1929bf5dcd1c04899185ec9e50ddad6c +AUX lighttpd.logrotate 366 SHA256 4141042540d995736de86dfb24aacc5be809defcf8320bbec181ac5c7184fc3a SHA512 d28b491423d7cf6b2f5d82191da7e816c73c36e2db469f543f4c09b6e60fce4f0931af49ffc4965e3f5906e22ea6439248dce0d3f4727022df9b6fb5e8a0b92a WHIRLPOOL 46f00ebd72931f1732c91ee1d7214dbf223a20ea962733476b6ed8ee45e1c65da3c4c7c467763d064e02f16e1949765ae9c6de0c4a5da07b5e02d29ee6a4e654 +AUX lighttpd.logrotate-r1 385 SHA256 b0f1b8d824d24e0a69ed84af05e4336db3863333f221e5c1e222694bf2c42b4d SHA512 8cae2d3acb2f4d9a9043e492c4b15024f85f92d93616d5e92e08d51e2295fde6160c750be08244703f999208c4b43ecfb9a2fcb8e223e52992551a0668302ffe WHIRLPOOL f134479f46fc299997c56dc12e23dbf0f5e2b6b49f62795788c34d38df12fe1f3cd4db6fcd26b8b2a0644129295b3a03a2434821758e61bc8728f2501489cb49 +AUX lighttpd.service 257 SHA256 3e8c6615b46f35e0e585fa6e788d4fc5725c656404d3c47081ceca77f8873c6b SHA512 fbcd7dbf9c6b97284465af133a7cd1f711978ef4318a749ff7d366b053265fac94a1d76f074f56722c382179631d38ed8a07ac2c2fc4b712a93acab2f3609c0f WHIRLPOOL f6078f3b676d753fd130e46367043bc498617d19564c8e78874629f82f2df817e2398774aa41382d6a38826d7bdaf5b2190fa6e298ae83d6819d4aacf758a979 +AUX lighttpd.tmpfiles.conf 44 SHA256 a31237336ad02b22579b5e2168485d43d350f78ed010d39a2dbc554dd574bbcb SHA512 795448ad726ebfe7688236a23cb21bf06bbf8edd7e243924e3d1c21d33fffba1e04501734b189eb2081f6737b74af7c978eed802fb5e540dcc5c5aea69544936 WHIRLPOOL 5774c609ead3af3758766cd69111af5e080dc230cb7632ae54ade74313a20f5680d83117a2a369230e2d7c5328e1703ecc315fa1555f79a688e8728a7a209b4a +DIST lighttpd-1.4.42.tar.xz 652140 SHA256 b2c9069ed0bade9362c27b469a9b884641786aea1c3d686f9fd9f01d15e2a15f SHA512 eb43a53f1fe7a115d0cf60ed8b79a22472a4fef939937401a475bdfd7244e53efa3aae1f66cd709989e77064aadd40004455b167ea3c4efc07ced261c18bd773 WHIRLPOOL 2886d02c477ffe4a36a4d33656c69c34df65b563e6ee81dad7be957ab472197fb91087e1e494b23f4e83a35939f102494140d34737fd280692503e54b3676fe7 +DIST lighttpd-1.4.43.tar.xz 656248 SHA256 fe0c4a06dd2408a83ee7a2bfedc45e09597f3313cbda82485507573ae8fa948a SHA512 131e1d96276a6b5ca597bae9ff78df20bfc9907e9c832b6fdea8b86d493764a5dce24cfc3bb2e931755af18a26b0e8c6fd21714fca7d6c6a402c85f7fe4a588a WHIRLPOOL 90110b2b06c3579c435cd5a0539371bba8f0b70f7c1ee344ed98b9a55d6dd07c38d11430589b11257385815183bf208aed3c115554c6822056a7cedf5047341c +DIST lighttpd-1.4.44.tar.xz 660304 SHA256 adb66ca985651957feb209c91c55ebbf917d23630bfc3a216a2f70043c7b5422 SHA512 b7481482bc130c80f076002b2853e1b0ecb2af5d6c6f5428854ae7a60bda591cf96f23e9f3a24cfb36ada3ba97ebff449e102895f7eb4b0aa50ec275eb44725b WHIRLPOOL 69431f5626ca64a8bd4f4e3ada01a22cfa4516e54a11d3050943696aafcb01d0c62db71259054ca24378b1b21b4c33f0a1521e676bff6b37c7bdf661edad6a99 +DIST lighttpd-1.4.45.tar.xz 660432 SHA256 1c97225deea33eefba6d4158c2cef27913d47553263516bbe9d2e2760fc43a3f SHA512 d030674a8c55aab12d32ac75f8df2628ba2332a5263c8bd2dd4f39342530080edc6ba2a6fee749c1301d601ab766a265d3c630b04d38bb26bba3cf045935573d WHIRLPOOL 8bf52ab4a33a1ede77185d6bb1a420cc61333bff67cc641625efb5e5c101eeb55ce1a177a5bd273408c857675c7ed91aeccffe5bc2109be145430e32979052c8 +EBUILD lighttpd-1.4.42.ebuild 6071 SHA256 370b883602d941ad465f471277dfea74277050e653bc189491854c7a4d0ee22f SHA512 10e645c61a008469af635b4449e1f26cc3425671f12b65dcc4d4f64501225185d9fd74d59a167980ca6a513effd9c3634ecbdc0b609b9a81b93b7e155d4f9257 WHIRLPOOL d7bd593a5ba38965ef8ad1facbfdd6628569bc542784cfcc00802be9d97ab69478ee4e65e86fd5921104599c6dc7e7a5b44fafc4b9910c543eeb528ca187aaaa +EBUILD lighttpd-1.4.43.ebuild 6080 SHA256 dbc189710a2a360de1a3d981cd468bad30135fd049031c63d13a00904edc6888 SHA512 b17ab4887776c304a1584d4ed79776ec14d7f9fac0bdafc9ddf32b4f427bc71ef2a9d12c5f36849c3c2de7eae4f59d46402a63f4826569ec224e0d64919ed1ec WHIRLPOOL 92ca023ff5e43aa4fbe65df006780f523cd4c958a23fed5b2d56ce3761cd93da5bdad5faa8684a2970312ddf4d564537c7a3e690b0b859ddf432242289b53d9a +EBUILD lighttpd-1.4.44.ebuild 6080 SHA256 0920bd50fb0f7a1decb7d3fa2915e47f9ff885b982a315c72506e28228095981 SHA512 e6d29f7d6617733f9c7260ffd4549b63b3630314fbdf9c2ee2a264febabbe498c289c8693f0118c3fb4f5e2054a00d0d6209fb853e114e6ddc883c70dd4c8f02 WHIRLPOOL ac6a58369e29cb33cb80deca7f4093036fceb3b261ccc03979d8621c72dfbd57a4be74acfafaeeca9f158f4717bab488d7a9753d8e79f399ac5a107ea7f0b7a2 +EBUILD lighttpd-1.4.45.ebuild 6079 SHA256 bbcd11ac3b5f7e49e1124be04c8401125c788e02597c7eba56a43a6246aeaaea SHA512 3f22286876882bbb2eaef844e00466b8d290ce1afd7c000bf4e7387d0e96f25c274fdc53f6ac1cde4433c66dc0a9e352a7e48ea8a016de48e1d2dd2f79156208 WHIRLPOOL 41e8427540379feee038a9ceb1d0e6724f2b28759feebe85aba81cf00b9e84cc08296e04e7edda92a6566dcaa94baa2b61855cb32af7c01ef7fdd69373f2293a +EBUILD lighttpd-9999.ebuild 6097 SHA256 6cd03e52014e85149a459a421abe57877fb7990baf7de117a49fdba12a565100 SHA512 f1898fb6b9b9331d206119bd3ca0cec00d8cce4836dda65829d7d82c79ba4a38b8a55cd5e08dedd1780a29f78e0deb7ecbb546826a182202fa1c009a3a794bc9 WHIRLPOOL 8141eb819762dd7a9b5ed683d5241d76c3c5095a99d1724c1d2e1b33e53f3ba1764590e3d7837276cbc0fd596eee41f2943a40022acdbf443eb943532af9b709 +MISC ChangeLog 6969 SHA256 98caae3758751b6ac130263038f7713d728701422c2f5b50347049f66dc53f7d SHA512 dfebc0e6ffa9d2ca30c21167b3a1f7458f6c7ffc189e41bfe714e09bdfc648d6830955f3b5bf19fafd4030a7924048d6d356e261b8a8351b09c59d43af4286db WHIRLPOOL 3f5d71548c717b1b419fba2b4138ed87ae76818eb97cf7a4b1f2f71d4254c8d85869fde46d6b305fe7e98ff671776e6e40583cb653634936334989fc6b1197e0 +MISC ChangeLog-2015 68066 SHA256 e7fefb5620b11f07ecfb5d88b3419a982bf4032fab68f6dab74898c6c33167aa SHA512 4f13902c1d561e94d30511b7aa305bebf2bca96b8f841667d77a69bdcfb08511c7a837a08c694ee8287e747456182c9c201dce63c46be14a3eecde1598fe7c96 WHIRLPOOL 62440fda0dce63a1ba2fcfa512099110cbde210b2f5f5a3f3b23faf28c2d339f59becba15e4ef5797688b992273ff58e08173eab65bc7d53bf70b65bbe718c1c +MISC metadata.xml 1160 SHA256 044167e054ba70a03a1632afe00b9243cfabbbc721634035edb89860ed5ef8ea SHA512 0da707e67458f194bdecfc8e123d2e50e45d0906f8bb6fb1052527d00a539646b6c44bd9a5d481df28e55bda37a8a2a514713f22a008815c54fc0e23f1360517 WHIRLPOOL 39d615eacbfea30c40a38eff21babbe12f120d67690de1db108ed55d7968c0b401c406c7d37fdf999f64453fedccffde91c5eb2f69aa47ef7026185c3d5b5d0c diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf b/www-servers/lighttpd/files/conf/lighttpd.conf new file mode 100644 index 000000000000..763170c6ff0c --- /dev/null +++ b/www-servers/lighttpd/files/conf/lighttpd.conf @@ -0,0 +1,329 @@ +############################################################################### +# Default lighttpd.conf for Gentoo. +############################################################################### + +# {{{ variables +var.basedir = "/var/www/localhost" +var.logdir = "/var/log/lighttpd" +var.statedir = "/var/lib/lighttpd" +# }}} + +# {{{ modules +# At the very least, mod_access and mod_accesslog should be enabled. +# All other modules should only be loaded if necessary. +# NOTE: the order of modules is important. +server.modules = ( +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", + "mod_access", +# "mod_cml", +# "mod_trigger_b4_dl", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_evhost", +# "mod_userdir", +# "mod_compress", +# "mod_ssi", +# "mod_usertrack", +# "mod_expire", +# "mod_secdownload", +# "mod_rrdtool", +# "mod_webdav", + "mod_accesslog" +) +# }}} + +# {{{ includes +include "mime-types.conf" +# fcgi and cgi are included below +# }}} + +# {{{ server settings +server.username = "lighttpd" +server.groupname = "lighttpd" + +server.document-root = var.basedir + "/htdocs" +server.pid-file = "/var/run/lighttpd.pid" + +server.errorlog = var.logdir + "/error.log" +# log errors to syslog instead +# server.errorlog-use-syslog = "enable" + +server.indexfiles = ("index.php", "index.html", + "index.htm", "default.htm") + +# server.tag = "lighttpd" + +server.follow-symlink = "enable" + +# event handler (defaults to "poll") +# see performance.txt +# +# for >= linux-2.4 +# server.event-handler = "linux-rtsig" +# for >= linux-2.6 +# server.event-handler = "linux-sysepoll" +# for FreeBSD +# server.event-handler = "freebsd-kqueue" + +# chroot to directory (defaults to no chroot) +# server.chroot = "/" + +# bind to port (defaults to 80) +# server.port = 81 + +# bind to name (defaults to all interfaces) +# server.bind = "grisu.home.kneschke.de" + +# error-handler for status 404 +# server.error-handler-404 = "/error-handler.html" +# server.error-handler-404 = "/error-handler.php" + +# Format: <errorfile-prefix><status-code>.html +# -> ..../status-404.html for 'File not found' +# server.errorfile-prefix = var.basedir + "/error/status-" + +# FAM support for caching stat() calls +# requires that lighttpd be built with USE=fam +# server.stat-cache-engine = "fam" + +# If lighttpd was build with IPv6 support, and you would like to listen on IPv6, +# uncomment the following: +# server.use-ipv6 = "enable" + +# }}} + +# {{{ mod_staticfile + +# which extensions should not be handled via static-file transfer +# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc). +static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") +# }}} + +# {{{ mod_accesslog +accesslog.filename = var.logdir + "/access.log" +# }}} + +# {{{ mod_dirlisting +# enable directory listings +# dir-listing.activate = "enable" +# +# don't list hidden files/directories +# dir-listing.hide-dotfiles = "enable" +# +# use a different css for directory listings +# dir-listing.external-css = "/path/to/dir-listing.css" +# +# list of regular expressions. files that match any of the +# specified regular expressions will be excluded from directory +# listings. +# dir-listing.exclude = ("^\.", "~$") +# }}} + +# {{{ mod_access +# see access.txt + +url.access-deny = ("~", ".inc") +# }}} + +# {{{ mod_userdir +# see userdir.txt +# +# userdir.path = "public_html" +# userdir.exclude-user = ("root") +# }}} + +# {{{ mod_ssi +# see ssi.txt +# +# ssi.extension = (".shtml") +# }}} + +# {{{ mod_ssl +# see ssl.txt +# +# ssl.engine = "enable" +# ssl.pemfile = "server.pem" +# }}} + +# {{{ mod_status +# see status.txt +# +# status.status-url = "/server-status" +# status.config-url = "/server-config" +# }}} + +# {{{ mod_simple_vhost +# see simple-vhost.txt +# +# If you want name-based virtual hosting add the next three settings and load +# mod_simple_vhost +# +# document-root = +# virtual-server-root + virtual-server-default-host + virtual-server-docroot +# or +# virtual-server-root + http-host + virtual-server-docroot +# +# simple-vhost.server-root = "/home/weigon/wwwroot/servers/" +# simple-vhost.default-host = "grisu.home.kneschke.de" +# simple-vhost.document-root = "/pages/" +# }}} + +# {{{ mod_compress +# see compress.txt +# +# compress.cache-dir = var.statedir + "/cache/compress" +# compress.filetype = ("text/plain", "text/html") +# }}} + +# {{{ mod_proxy +# see proxy.txt +# +# proxy.server = ( ".php" => +# ( "localhost" => +# ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) +# }}} + +# {{{ mod_auth +# see authentication.txt +# +# auth.backend = "plain" +# auth.backend.plain.userfile = "lighttpd.user" +# auth.backend.plain.groupfile = "lighttpd.group" + +# auth.backend.ldap.hostname = "localhost" +# auth.backend.ldap.base-dn = "dc=my-domain,dc=com" +# auth.backend.ldap.filter = "(uid=$)" + +# auth.require = ( "/server-status" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "user=jan" +# ), +# "/server-info" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "valid-user" +# ) +# ) +# }}} + +# {{{ mod_rewrite +# see rewrite.txt +# +# url.rewrite = ( +# "^/$" => "/server-status" +# ) +# }}} + +# {{{ mod_redirect +# see redirect.txt +# +# url.redirect = ( +# "^/wishlist/(.+)" => "http://www.123.org/$1" +# ) +# }}} + +# {{{ mod_evhost +# define a pattern for the host url finding +# %% => % sign +# %0 => domain name + tld +# %1 => tld +# %2 => domain name without tld +# %3 => subdomain 1 name +# %4 => subdomain 2 name +# +# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" +# }}} + +# {{{ mod_expire +# expire.url = ( +# "/buggy/" => "access 2 hours", +# "/asdhas/" => "access plus 1 seconds 2 minutes" +# ) +# }}} + +# {{{ mod_rrdtool +# see rrdtool.txt +# +# rrdtool.binary = "/usr/bin/rrdtool" +# rrdtool.db-name = var.statedir + "/lighttpd.rrd" +# }}} + +# {{{ mod_setenv +# see setenv.txt +# +# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) +# setenv.add-response-header = ( "X-Secret-Message" => "42" ) +# }}} + +# {{{ mod_trigger_b4_dl +# see trigger_b4_dl.txt +# +# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" +# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" ) +# trigger-before-download.trigger-url = "^/trigger/" +# trigger-before-download.download-url = "^/download/" +# trigger-before-download.deny-url = "http://127.0.0.1/index.html" +# trigger-before-download.trigger-timeout = 10 +# }}} + +# {{{ mod_cml +# see cml.txt +# +# don't forget to add index.cml to server.indexfiles +# cml.extension = ".cml" +# cml.memcache-hosts = ( "127.0.0.1:11211" ) +# }}} + +# {{{ mod_webdav +# see webdav.txt +# +# $HTTP["url"] =~ "^/dav($|/)" { +# webdav.activate = "enable" +# webdav.is-readonly = "enable" +# } +# }}} + +# {{{ extra rules +# +# set Content-Encoding and reset Content-Type for browsers that +# support decompressing on-thy-fly (requires mod_setenv) +# $HTTP["url"] =~ "\.gz$" { +# setenv.add-response-header = ("Content-Encoding" => "x-gzip") +# mimetype.assign = (".gz" => "text/plain") +# } + +# $HTTP["url"] =~ "\.bz2$" { +# setenv.add-response-header = ("Content-Encoding" => "x-bzip2") +# mimetype.assign = (".bz2" => "text/plain") +# } +# +# }}} + +# {{{ debug +# debug.log-request-header = "enable" +# debug.log-response-header = "enable" +# debug.log-request-handling = "enable" +# debug.log-file-not-found = "enable" +# }}} + +# {{{ cgi includes +# uncomment for cgi support +# include "mod_cgi.conf" +# uncomment for php/fastcgi support +# include "mod_fastcgi.conf" +# }}} + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/files/conf/mime-types.conf b/www-servers/lighttpd/files/conf/mime-types.conf new file mode 100644 index 000000000000..e2a72e2d2e76 --- /dev/null +++ b/www-servers/lighttpd/files/conf/mime-types.conf @@ -0,0 +1,78 @@ +############################################################################### +# Default mime-types.conf for Gentoo. +# include'd from lighttpd.conf. +############################################################################### + +# {{{ mime types +mimetype.assign = ( + ".svg" => "image/svg+xml", + ".svgz" => "image/svg+xml", + ".pdf" => "application/pdf", + ".sig" => "application/pgp-signature", + ".spl" => "application/futuresplash", + ".class" => "application/octet-stream", + ".ps" => "application/postscript", + ".torrent" => "application/x-bittorrent", + ".dvi" => "application/x-dvi", + ".gz" => "application/x-gzip", + ".pac" => "application/x-ns-proxy-autoconfig", + ".swf" => "application/x-shockwave-flash", + ".tar.gz" => "application/x-tgz", + ".tgz" => "application/x-tgz", + ".tar" => "application/x-tar", + ".zip" => "application/zip", + ".dmg" => "application/x-apple-diskimage", + ".mp3" => "audio/mpeg", + ".m3u" => "audio/x-mpegurl", + ".wma" => "audio/x-ms-wma", + ".wax" => "audio/x-ms-wax", + ".ogg" => "application/ogg", + ".wav" => "audio/x-wav", + ".gif" => "image/gif", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".xbm" => "image/x-xbitmap", + ".xpm" => "image/x-xpixmap", + ".xwd" => "image/x-xwindowdump", + ".css" => "text/css", + ".html" => "text/html", + ".htm" => "text/html", + ".js" => "text/javascript", + ".asc" => "text/plain", + ".c" => "text/plain", + ".h" => "text/plain", + ".cc" => "text/plain", + ".cpp" => "text/plain", + ".hh" => "text/plain", + ".hpp" => "text/plain", + ".conf" => "text/plain", + ".log" => "text/plain", + ".text" => "text/plain", + ".txt" => "text/plain", + ".diff" => "text/plain", + ".patch" => "text/plain", + ".ebuild" => "text/plain", + ".eclass" => "text/plain", + ".rtf" => "application/rtf", + ".bmp" => "image/bmp", + ".tif" => "image/tiff", + ".tiff" => "image/tiff", + ".ico" => "image/x-icon", + ".dtd" => "text/xml", + ".xml" => "text/xml", + ".mpeg" => "video/mpeg", + ".mpg" => "video/mpeg", + ".mov" => "video/quicktime", + ".qt" => "video/quicktime", + ".avi" => "video/x-msvideo", + ".asf" => "video/x-ms-asf", + ".asx" => "video/x-ms-asf", + ".wmv" => "video/x-ms-wmv", + ".bz2" => "application/x-bzip", + ".tbz" => "application/x-bzip-compressed-tar", + ".tar.bz2" => "application/x-bzip-compressed-tar" + ) +# }}} + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/files/conf/mod_cgi.conf b/www-servers/lighttpd/files/conf/mod_cgi.conf new file mode 100644 index 000000000000..982333a007c6 --- /dev/null +++ b/www-servers/lighttpd/files/conf/mod_cgi.conf @@ -0,0 +1,32 @@ +############################################################################### +# mod_cgi.conf +# include'd by lighttpd.conf. +############################################################################### + +# +# see cgi.txt for more information on using mod_cgi +# + +server.modules += ("mod_cgi") + +# NOTE: this requires mod_alias +alias.url = ( + "/cgi-bin/" => var.basedir + "/cgi-bin/" +) + +# +# Note that you'll also want to enable the +# cgi-bin alias via mod_alias (above). +# + +$HTTP["url"] =~ "^/cgi-bin/" { + # disable directory listings + dir-listing.activate = "disable" + # only allow cgi's in this directory + cgi.assign = ( + ".pl" => "/usr/bin/perl", + ".cgi" => "/usr/bin/perl" + ) +} + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf b/www-servers/lighttpd/files/conf/mod_fastcgi.conf new file mode 100644 index 000000000000..b72b1ce604b1 --- /dev/null +++ b/www-servers/lighttpd/files/conf/mod_fastcgi.conf @@ -0,0 +1,16 @@ +############################################################################### +# mod_fastcgi.conf +# include'd by lighttpd.conf. +############################################################################### + +server.modules += ("mod_fastcgi") +fastcgi.server = ( ".php" => + ( "localhost" => + ( + "socket" => "/var/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket", + "bin-path" => "/usr/bin/php-cgi" + ) + ) + ) + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/files/lighttpd.confd b/www-servers/lighttpd/files/lighttpd.confd new file mode 100644 index 000000000000..c7733de7e75e --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.confd @@ -0,0 +1,8 @@ +# /etc/conf.d/lighttpd + +# Location of a shell used by the 'include_shell' directive +# in the lighttpd's configuration file +#export SHELL="/bin/bash" + +# Location of the lighttpd configuration file +LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd new file mode 100644 index 000000000000..190cd140e95e --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.initd @@ -0,0 +1,79 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload graceful" + +LIGHTTPD_PID="$(grep pid ${LIGHTTPD_CONF} | cut -d '=' -f 2 | tr -d \\\" | tr -d [:space:])" + +depend() { + need net + use mysql logger spawn-fcgi ldap slapd netmount dns + after famd + after sshd +} + +checkconfig() { + if [ ! -f "${LIGHTTPD_CONF}" ] ; then + ewarn "${LIGHTTPD_CONF} does not exist." + return 1 + fi + + if [ -z "${LIGHTTPD_PID}" ] ; then + eerror "server.pid-file variable in ${LIGHTTPD_CONF}" + eerror "is not set. Please set this variable properly" + eerror "and try again" + return 1 + fi + /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null +} + +start() { + checkconfig || return 1 + # Glean lighttpd's credentials from the configuration file + # Fixes bug 454366 + LIGHTTPD_USER="$(awk '/^server.username/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" + LIGHTTPD_GROUP="$(awk '/^server.groupname/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" + checkpath -d -q -m 0750 -o "${LIGHTTPD_USER}":"${LIGHTTPD_GROUP}" /run/lighttpd/ + + ebegin "Starting lighttpd" + start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \ + --pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}" + eend $? +} + +stop() { + local rv=0 + ebegin "Stopping lighttpd" + start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}" + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Re-opening lighttpd log files" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal HUP + eend $? +} + +graceful() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Gracefully stopping lighttpd" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal INT + if eend $? ; then + rm -f "${LIGHTTPD_PID}" + start + fi +} diff --git a/www-servers/lighttpd/files/lighttpd.logrotate b/www-servers/lighttpd/files/lighttpd.logrotate new file mode 100644 index 000000000000..80a8644e2c97 --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.logrotate @@ -0,0 +1,16 @@ +# lighttpd logrotate script for Gentoo + +/var/log/lighttpd/*.log { + daily + missingok + copytruncate + rotate 7 + compress + notifempty + sharedscripts + postrotate + if [ -f /var/run/lighttpd.pid ]; then \ + /etc/init.d/lighttpd reload > /dev/null 2>&1 || true ; \ + fi; + endscript +} diff --git a/www-servers/lighttpd/files/lighttpd.logrotate-r1 b/www-servers/lighttpd/files/lighttpd.logrotate-r1 new file mode 100644 index 000000000000..a364680035b2 --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.logrotate-r1 @@ -0,0 +1,15 @@ +# lighttpd logrotate script for Gentoo + +/var/log/lighttpd/*.log { + daily + missingok + copytruncate + rotate 7 + compress + notifempty + sharedscripts + postrotate + test -e /run/openrc/softlevel && /etc/init.d/lighttpd reload 1>/dev/null || true + test -e /run/systemd/system && systemctl reload lighttpd.service || true + endscript +} diff --git a/www-servers/lighttpd/files/lighttpd.service b/www-servers/lighttpd/files/lighttpd.service new file mode 100644 index 000000000000..f5f5be757626 --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lightning Fast Webserver With Light System Requirements +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/lighttpd/files/lighttpd.tmpfiles.conf b/www-servers/lighttpd/files/lighttpd.tmpfiles.conf new file mode 100644 index 000000000000..325ab13d839c --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd.tmpfiles.conf @@ -0,0 +1 @@ +d /var/run/lighttpd 0750 lighttpd lighttpd -
\ No newline at end of file diff --git a/www-servers/lighttpd/lighttpd-1.4.42.ebuild b/www-servers/lighttpd/lighttpd-1.4.42.ebuild new file mode 100644 index 000000000000..95e83a5b1e5b --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.42.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils readme.gentoo-r1 user systemd + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="http://www.lighttpd.net/" +SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" + +REQUIRED_USE="kerberos? ( ssl !libressl )" + +CDEPEND=" + bzip2? ( app-arch/bzip2 ) + fam? ( virtual/fam ) + gdbm? ( sys-libs/gdbm ) + ldap? ( >=net-nds/openldap-2.1.26 ) + libev? ( >=dev-libs/libev-4.01 ) + lua? ( >=dev-lang/lua-5.1:= ) + memcached? ( dev-libs/libmemcache ) + mysql? ( >=virtual/mysql-4.0 ) + pcre? ( >=dev-libs/libpcre-3.1 ) + php? ( dev-lang/php:*[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) + libressl? ( dev-libs/libressl:= ) + ) + webdav? ( + dev-libs/libxml2 + >=dev-db/sqlite-3 + sys-fs/e2fsprogs + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + doc? ( dev-python/docutils ) + test? ( + virtual/perl-Test-Harness + dev-libs/fcgi + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-apache ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${D}/etc/lighttpd/lighttpd.conf" + + # enable php/mod_fastcgi settings + use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } + + # enable stat() caching + use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } + + # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 + use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } +} + +# remove non-essential stuff (for USE=minimal) +remove_non_essential() { + local libdir="${D}/usr/$(get_libdir)/${PN}" + + # text docs + use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt + + # non-essential modules + rm -f \ + ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* + + # allow users to keep some based on USE flags + use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* + use webdav || rm -f ${libdir}/mod_webdav.* + use mysql || rm -f ${libdir}/mod_mysql_vhost.* + use lua || rm -f ${libdir}/mod_{cml,magnet}.* + use rrdtool || rm -f ${libdir}/mod_rrdtool.* + use zlib || rm -f ${libdir}/mod_compress.* +} + +pkg_setup() { + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}" + ewarn "and mod_ssi." + fi + if use mmap; then + ewarn "You have enabled the mmap option. This option may allow" + ewarn "local users to trigger SIGBUG crashes. Use this option" + ewarn "with EXTRA care." + fi + enewgroup lighttpd + enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd + + DOC_CONTENTS="IPv6 migration guide:\n + http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" +} + +src_prepare() { + default + #dev-python/docutils installs rst2html.py not rst2html + sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ + die "sed doc/Makefile.am failed" + eautoreconf +} + +src_configure() { + econf --libdir=/usr/$(get_libdir)/${PN} \ + --enable-lfs \ + $(use_enable ipv6) \ + $(use_enable mmap) \ + $(use_with bzip2) \ + $(use_with fam) \ + $(use_with gdbm) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with libev) \ + $(use_with lua) \ + $(use_with memcached) \ + $(use_with mysql) \ + $(use_with pcre) \ + $(use_with ssl openssl) \ + $(use_with webdav webdav-props) \ + $(use_with webdav webdav-locks) \ + $(use_with xattr attr) \ + $(use_with zlib) +} + +src_compile() { + emake + + if use doc ; then + einfo "Building HTML documentation" + cd doc || die + emake html + fi +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + default_src_test + else + ewarn "test skipped, please re-run as root if you wish to test ${PN}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # init script stuff + newinitd "${FILESDIR}"/lighttpd.initd lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + use fam && has_version app-admin/fam && \ + { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } + + # configs + insinto /etc/lighttpd + doins "${FILESDIR}"/conf/lighttpd.conf + doins "${FILESDIR}"/conf/mime-types.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + + # update lighttpd.conf directives based on conditionals + update_config + + # docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config//lighttpd.conf lighttpd.conf.distrib + use ipv6 && readme.gentoo_create_doc + + use doc && dohtml -r doc/* + + docinto txt + dodoc doc/outdated/*.txt + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi + rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* + + use minimal && remove_non_essential + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" +} + +pkg_postinst () { + use ipv6 && readme.gentoo_print_elog + + if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then + einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." + einfo "spawn-fcgi's init script configuration is now located" + einfo "at /etc/conf.d/spawn-fcgi." + fi + + if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then + elog "Gentoo has a customized configuration," + elog "which is now located in /etc/lighttpd. Please migrate your" + elog "existing configuration." + fi +} diff --git a/www-servers/lighttpd/lighttpd-1.4.43.ebuild b/www-servers/lighttpd/lighttpd-1.4.43.ebuild new file mode 100644 index 000000000000..a4141e3de4b2 --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.43.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils readme.gentoo-r1 user systemd + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="http://www.lighttpd.net/" +SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" + +REQUIRED_USE="kerberos? ( ssl !libressl )" + +CDEPEND=" + bzip2? ( app-arch/bzip2 ) + fam? ( virtual/fam ) + gdbm? ( sys-libs/gdbm ) + ldap? ( >=net-nds/openldap-2.1.26 ) + libev? ( >=dev-libs/libev-4.01 ) + lua? ( >=dev-lang/lua-5.1:= ) + memcached? ( dev-libs/libmemcache ) + mysql? ( >=virtual/mysql-4.0 ) + pcre? ( >=dev-libs/libpcre-3.1 ) + php? ( dev-lang/php:*[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) + libressl? ( dev-libs/libressl:= ) + ) + webdav? ( + dev-libs/libxml2 + >=dev-db/sqlite-3 + sys-fs/e2fsprogs + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + doc? ( dev-python/docutils ) + test? ( + virtual/perl-Test-Harness + dev-libs/fcgi + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-apache ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${D}/etc/lighttpd/lighttpd.conf" + + # enable php/mod_fastcgi settings + use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } + + # enable stat() caching + use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } + + # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 + use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } +} + +# remove non-essential stuff (for USE=minimal) +remove_non_essential() { + local libdir="${D}/usr/$(get_libdir)/${PN}" + + # text docs + use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt + + # non-essential modules + rm -f \ + ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* + + # allow users to keep some based on USE flags + use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* + use webdav || rm -f ${libdir}/mod_webdav.* + use mysql || rm -f ${libdir}/mod_mysql_vhost.* + use lua || rm -f ${libdir}/mod_{cml,magnet}.* + use rrdtool || rm -f ${libdir}/mod_rrdtool.* + use zlib || rm -f ${libdir}/mod_compress.* +} + +pkg_setup() { + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}" + ewarn "and mod_ssi." + fi + if use mmap; then + ewarn "You have enabled the mmap option. This option may allow" + ewarn "local users to trigger SIGBUG crashes. Use this option" + ewarn "with EXTRA care." + fi + enewgroup lighttpd + enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd + + DOC_CONTENTS="IPv6 migration guide:\n + http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" +} + +src_prepare() { + default + #dev-python/docutils installs rst2html.py not rst2html + sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ + die "sed doc/Makefile.am failed" + eautoreconf +} + +src_configure() { + econf --libdir=/usr/$(get_libdir)/${PN} \ + --enable-lfs \ + $(use_enable ipv6) \ + $(use_enable mmap) \ + $(use_with bzip2) \ + $(use_with fam) \ + $(use_with gdbm) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with libev) \ + $(use_with lua) \ + $(use_with memcached) \ + $(use_with mysql) \ + $(use_with pcre) \ + $(use_with ssl openssl) \ + $(use_with webdav webdav-props) \ + $(use_with webdav webdav-locks) \ + $(use_with xattr attr) \ + $(use_with zlib) +} + +src_compile() { + emake + + if use doc ; then + einfo "Building HTML documentation" + cd doc || die + emake html + fi +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + default_src_test + else + ewarn "test skipped, please re-run as root if you wish to test ${PN}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # init script stuff + newinitd "${FILESDIR}"/lighttpd.initd lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + use fam && has_version app-admin/fam && \ + { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } + + # configs + insinto /etc/lighttpd + doins "${FILESDIR}"/conf/lighttpd.conf + doins "${FILESDIR}"/conf/mime-types.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + + # update lighttpd.conf directives based on conditionals + update_config + + # docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config//lighttpd.conf lighttpd.conf.distrib + use ipv6 && readme.gentoo_create_doc + + use doc && dohtml -r doc/* + + docinto txt + dodoc doc/outdated/*.txt + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi + rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* + + use minimal && remove_non_essential + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" +} + +pkg_postinst () { + use ipv6 && readme.gentoo_print_elog + + if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then + einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." + einfo "spawn-fcgi's init script configuration is now located" + einfo "at /etc/conf.d/spawn-fcgi." + fi + + if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then + elog "Gentoo has a customized configuration," + elog "which is now located in /etc/lighttpd. Please migrate your" + elog "existing configuration." + fi +} diff --git a/www-servers/lighttpd/lighttpd-1.4.44.ebuild b/www-servers/lighttpd/lighttpd-1.4.44.ebuild new file mode 100644 index 000000000000..3bd94fc68eba --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.44.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils readme.gentoo-r1 user systemd + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="http://www.lighttpd.net/" +SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" + +REQUIRED_USE="kerberos? ( ssl !libressl )" + +CDEPEND=" + bzip2? ( app-arch/bzip2 ) + fam? ( virtual/fam ) + gdbm? ( sys-libs/gdbm ) + ldap? ( >=net-nds/openldap-2.1.26 ) + libev? ( >=dev-libs/libev-4.01 ) + lua? ( >=dev-lang/lua-5.1:= ) + memcached? ( dev-libs/libmemcache ) + mysql? ( >=virtual/mysql-4.0 ) + pcre? ( >=dev-libs/libpcre-3.1 ) + php? ( dev-lang/php:*[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) + libressl? ( dev-libs/libressl:= ) + ) + webdav? ( + dev-libs/libxml2 + >=dev-db/sqlite-3 + sys-fs/e2fsprogs + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + doc? ( dev-python/docutils ) + test? ( + virtual/perl-Test-Harness + dev-libs/fcgi + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-apache ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${D}/etc/lighttpd/lighttpd.conf" + + # enable php/mod_fastcgi settings + use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } + + # enable stat() caching + use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } + + # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 + use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } +} + +# remove non-essential stuff (for USE=minimal) +remove_non_essential() { + local libdir="${D}/usr/$(get_libdir)/${PN}" + + # text docs + use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt + + # non-essential modules + rm -f \ + ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* + + # allow users to keep some based on USE flags + use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* + use webdav || rm -f ${libdir}/mod_webdav.* + use mysql || rm -f ${libdir}/mod_mysql_vhost.* + use lua || rm -f ${libdir}/mod_{cml,magnet}.* + use rrdtool || rm -f ${libdir}/mod_rrdtool.* + use zlib || rm -f ${libdir}/mod_compress.* +} + +pkg_setup() { + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}" + ewarn "and mod_ssi." + fi + if use mmap; then + ewarn "You have enabled the mmap option. This option may allow" + ewarn "local users to trigger SIGBUG crashes. Use this option" + ewarn "with EXTRA care." + fi + enewgroup lighttpd + enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd + + DOC_CONTENTS="IPv6 migration guide:\n + http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" +} + +src_prepare() { + default + #dev-python/docutils installs rst2html.py not rst2html + sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ + die "sed doc/Makefile.am failed" + eautoreconf +} + +src_configure() { + econf --libdir=/usr/$(get_libdir)/${PN} \ + --enable-lfs \ + $(use_enable ipv6) \ + $(use_enable mmap) \ + $(use_with bzip2) \ + $(use_with fam) \ + $(use_with gdbm) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with libev) \ + $(use_with lua) \ + $(use_with memcached) \ + $(use_with mysql) \ + $(use_with pcre) \ + $(use_with ssl openssl) \ + $(use_with webdav webdav-props) \ + $(use_with webdav webdav-locks) \ + $(use_with xattr attr) \ + $(use_with zlib) +} + +src_compile() { + emake + + if use doc ; then + einfo "Building HTML documentation" + cd doc || die + emake html + fi +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + default_src_test + else + ewarn "test skipped, please re-run as root if you wish to test ${PN}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # init script stuff + newinitd "${FILESDIR}"/lighttpd.initd lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + use fam && has_version app-admin/fam && \ + { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } + + # configs + insinto /etc/lighttpd + doins "${FILESDIR}"/conf/lighttpd.conf + doins "${FILESDIR}"/conf/mime-types.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + + # update lighttpd.conf directives based on conditionals + update_config + + # docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config//lighttpd.conf lighttpd.conf.distrib + use ipv6 && readme.gentoo_create_doc + + use doc && dohtml -r doc/* + + docinto txt + dodoc doc/outdated/*.txt + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi + rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* + + use minimal && remove_non_essential + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" +} + +pkg_postinst () { + use ipv6 && readme.gentoo_print_elog + + if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then + einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." + einfo "spawn-fcgi's init script configuration is now located" + einfo "at /etc/conf.d/spawn-fcgi." + fi + + if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then + elog "Gentoo has a customized configuration," + elog "which is now located in /etc/lighttpd. Please migrate your" + elog "existing configuration." + fi +} diff --git a/www-servers/lighttpd/lighttpd-1.4.45.ebuild b/www-servers/lighttpd/lighttpd-1.4.45.ebuild new file mode 100644 index 000000000000..1ffdc768f837 --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.45.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils readme.gentoo-r1 user systemd + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="http://www.lighttpd.net/" +SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ~ppc ppc64 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" + +REQUIRED_USE="kerberos? ( ssl !libressl )" + +CDEPEND=" + bzip2? ( app-arch/bzip2 ) + fam? ( virtual/fam ) + gdbm? ( sys-libs/gdbm ) + ldap? ( >=net-nds/openldap-2.1.26 ) + libev? ( >=dev-libs/libev-4.01 ) + lua? ( >=dev-lang/lua-5.1:= ) + memcached? ( dev-libs/libmemcache ) + mysql? ( >=virtual/mysql-4.0 ) + pcre? ( >=dev-libs/libpcre-3.1 ) + php? ( dev-lang/php:*[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) + libressl? ( dev-libs/libressl:= ) + ) + webdav? ( + dev-libs/libxml2 + >=dev-db/sqlite-3 + sys-fs/e2fsprogs + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + doc? ( dev-python/docutils ) + test? ( + virtual/perl-Test-Harness + dev-libs/fcgi + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-apache ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${D}/etc/lighttpd/lighttpd.conf" + + # enable php/mod_fastcgi settings + use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } + + # enable stat() caching + use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } + + # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 + use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } +} + +# remove non-essential stuff (for USE=minimal) +remove_non_essential() { + local libdir="${D}/usr/$(get_libdir)/${PN}" + + # text docs + use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt + + # non-essential modules + rm -f \ + ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* + + # allow users to keep some based on USE flags + use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* + use webdav || rm -f ${libdir}/mod_webdav.* + use mysql || rm -f ${libdir}/mod_mysql_vhost.* + use lua || rm -f ${libdir}/mod_{cml,magnet}.* + use rrdtool || rm -f ${libdir}/mod_rrdtool.* + use zlib || rm -f ${libdir}/mod_compress.* +} + +pkg_setup() { + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}" + ewarn "and mod_ssi." + fi + if use mmap; then + ewarn "You have enabled the mmap option. This option may allow" + ewarn "local users to trigger SIGBUG crashes. Use this option" + ewarn "with EXTRA care." + fi + enewgroup lighttpd + enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd + + DOC_CONTENTS="IPv6 migration guide:\n + http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" +} + +src_prepare() { + default + #dev-python/docutils installs rst2html.py not rst2html + sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ + die "sed doc/Makefile.am failed" + eautoreconf +} + +src_configure() { + econf --libdir=/usr/$(get_libdir)/${PN} \ + --enable-lfs \ + $(use_enable ipv6) \ + $(use_enable mmap) \ + $(use_with bzip2) \ + $(use_with fam) \ + $(use_with gdbm) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with libev) \ + $(use_with lua) \ + $(use_with memcached) \ + $(use_with mysql) \ + $(use_with pcre) \ + $(use_with ssl openssl) \ + $(use_with webdav webdav-props) \ + $(use_with webdav webdav-locks) \ + $(use_with xattr attr) \ + $(use_with zlib) +} + +src_compile() { + emake + + if use doc ; then + einfo "Building HTML documentation" + cd doc || die + emake html + fi +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + default_src_test + else + ewarn "test skipped, please re-run as root if you wish to test ${PN}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # init script stuff + newinitd "${FILESDIR}"/lighttpd.initd lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + use fam && has_version app-admin/fam && \ + { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } + + # configs + insinto /etc/lighttpd + doins "${FILESDIR}"/conf/lighttpd.conf + doins "${FILESDIR}"/conf/mime-types.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + + # update lighttpd.conf directives based on conditionals + update_config + + # docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config//lighttpd.conf lighttpd.conf.distrib + use ipv6 && readme.gentoo_create_doc + + use doc && dohtml -r doc/* + + docinto txt + dodoc doc/outdated/*.txt + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi + rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* + + use minimal && remove_non_essential + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" +} + +pkg_postinst () { + use ipv6 && readme.gentoo_print_elog + + if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then + einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." + einfo "spawn-fcgi's init script configuration is now located" + einfo "at /etc/conf.d/spawn-fcgi." + fi + + if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then + elog "Gentoo has a customized configuration," + elog "which is now located in /etc/lighttpd. Please migrate your" + elog "existing configuration." + fi +} diff --git a/www-servers/lighttpd/lighttpd-9999.ebuild b/www-servers/lighttpd/lighttpd-9999.ebuild new file mode 100644 index 000000000000..889032d8b589 --- /dev/null +++ b/www-servers/lighttpd/lighttpd-9999.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils readme.gentoo-r1 user systemd git-r3 + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="http://www.lighttpd.net/" +EGIT_REPO_URI="https://git.lighttpd.net/lighttpd1.4.git git+ssh://git@lighttpd.net/lighttpd/lighttpd1.4.git git://git.lighttpd.net/lighttpd/lighttpd1.4.git" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" + +REQUIRED_USE="kerberos? ( ssl !libressl )" + +CDEPEND=" + bzip2? ( app-arch/bzip2 ) + fam? ( virtual/fam ) + gdbm? ( sys-libs/gdbm ) + ldap? ( >=net-nds/openldap-2.1.26 ) + libev? ( >=dev-libs/libev-4.01 ) + lua? ( >=dev-lang/lua-5.1:= ) + memcached? ( dev-libs/libmemcache ) + mysql? ( >=virtual/mysql-4.0 ) + pcre? ( >=dev-libs/libpcre-3.1 ) + php? ( dev-lang/php:*[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) + libressl? ( dev-libs/libressl:= ) + ) + webdav? ( + dev-libs/libxml2 + >=dev-db/sqlite-3 + sys-fs/e2fsprogs + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 )" + +DEPEND="${CDEPEND} + virtual/pkgconfig + doc? ( dev-python/docutils ) + test? ( + virtual/perl-Test-Harness + dev-libs/fcgi + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-apache ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${D}/etc/lighttpd/lighttpd.conf" + + # enable php/mod_fastcgi settings + use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } + + # enable stat() caching + use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } + + # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 + use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } +} + +# remove non-essential stuff (for USE=minimal) +remove_non_essential() { + local libdir="${D}/usr/$(get_libdir)/${PN}" + + # text docs + use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt + + # non-essential modules + rm -f \ + ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* + + # allow users to keep some based on USE flags + use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* + use webdav || rm -f ${libdir}/mod_webdav.* + use mysql || rm -f ${libdir}/mod_mysql_vhost.* + use lua || rm -f ${libdir}/mod_{cml,magnet}.* + use rrdtool || rm -f ${libdir}/mod_rrdtool.* + use zlib || rm -f ${libdir}/mod_compress.* +} + +pkg_setup() { + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}" + ewarn "and mod_ssi." + fi + if use mmap; then + ewarn "You have enabled the mmap option. This option may allow" + ewarn "local users to trigger SIGBUG crashes. Use this option" + ewarn "with EXTRA care." + fi + enewgroup lighttpd + enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd + + DOC_CONTENTS="IPv6 migration guide:\n + http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" +} + +src_prepare() { + #dev-python/docutils installs rst2html.py not rst2html + sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ + die "sed doc/Makefile.am failed" + eautoreconf + default +} + +src_configure() { + econf --libdir=/usr/$(get_libdir)/${PN} \ + --enable-lfs \ + $(use_enable ipv6) \ + $(use_enable mmap) \ + $(use_with bzip2) \ + $(use_with fam) \ + $(use_with gdbm) \ + $(use_with kerberos kerberos5) \ + $(use_with ldap) \ + $(use_with libev) \ + $(use_with lua) \ + $(use_with memcached memcache) \ + $(use_with mysql) \ + $(use_with pcre) \ + $(use_with ssl openssl) \ + $(use_with webdav webdav-props) \ + $(use_with webdav webdav-locks) \ + $(use_with xattr attr) \ + $(use_with zlib) +} + +src_compile() { + emake + + if use doc ; then + einfo "Building HTML documentation" + cd doc || die + emake html + fi +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + default_src_test + else + ewarn "test skipped, please re-run as root if you wish to test ${PN}" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # init script stuff + newinitd "${FILESDIR}"/lighttpd.initd lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + use fam && has_version app-admin/fam && \ + { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } + + # configs + insinto /etc/lighttpd + doins "${FILESDIR}"/conf/lighttpd.conf + doins "${FILESDIR}"/conf/mime-types.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + + # update lighttpd.conf directives based on conditionals + update_config + + # docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config//lighttpd.conf lighttpd.conf.distrib + use ipv6 && readme.gentoo_create_doc + + use doc && dohtml -r doc/* + + docinto txt + dodoc doc/outdated/*.txt + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi + rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* + + use minimal && remove_non_essential + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" +} + +pkg_postinst () { + use ipv6 && readme.gentoo_print_elog + + if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then + einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." + einfo "spawn-fcgi's init script configuration is now located" + einfo "at /etc/conf.d/spawn-fcgi." + fi + + if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then + elog "Gentoo has a customized configuration," + elog "which is now located in /etc/lighttpd. Please migrate your" + elog "existing configuration." + fi +} diff --git a/www-servers/lighttpd/metadata.xml b/www-servers/lighttpd/metadata.xml new file mode 100644 index 000000000000..02985d4da2b8 --- /dev/null +++ b/www-servers/lighttpd/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!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>zlg@gentoo.org</email> + <name>Daniel Campbell</name> + </maintainer> + <longdescription lang="en"> + lighttpd a secure, fast, compliant and very flexible web-server + which has been optimized for high-performance environments. It has a very + low memory footprint compared to other webservers and takes care of cpu-load. + Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, + URL-Rewriting and many more) make lighttpd the perfect webserver-software + for every server that is suffering load problems. + </longdescription> + <use> + <flag name="libev">Enable fdevent handler</flag> + <flag name="mmap">Use mmap with files owned by lighttpd. This is a dangerous option as it may allow local users to trigger SIGBUS crashes.</flag> + <flag name="rrdtool">Enable rrdtool support via mod_rrdtool</flag> + <flag name="webdav">Enable webdav properties</flag> + </use> +</pkgmetadata> diff --git a/www-servers/metadata.xml b/www-servers/metadata.xml new file mode 100644 index 000000000000..565534f11f2b --- /dev/null +++ b/www-servers/metadata.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The www-servers category contains web server packages. + </longdescription> + <longdescription lang="es"> + La categoría www-servers contiene servidores web. + </longdescription> + <longdescription lang="de"> + Die Kategorie www-server enthält verschiedene Webserver. + </longdescription> + <longdescription lang="ja"> + www-miscカテゴリーにはウェブサーバーのパッケージが含まれています。 + </longdescription> + <longdescription lang="nl"> + De www-server categorie bevat verschillende webservers. + </longdescription> + <longdescription lang="vi"> + Nhóm www-servers chứa các phần mềm web server. + </longdescription> + <longdescription lang="it"> + La categoria www-servers contiene una selezione di software web server. + </longdescription> + <longdescription lang="pt"> + A categoria www-servers contém pacotes de servidores de web. + </longdescription> + <longdescription lang="pl"> + Kategoria www-servers zawiera serwery stron WWW. + </longdescription> +</catmetadata> + diff --git a/www-servers/mongoose/Manifest b/www-servers/mongoose/Manifest new file mode 100644 index 000000000000..f8cde9e7c53a --- /dev/null +++ b/www-servers/mongoose/Manifest @@ -0,0 +1,5 @@ +DIST mongoose-5.6.tar.gz 114392 SHA256 cc2557c7cf9f15e1e691f285a4c6c705cc7e56cb70c64cb49703a428a0677065 SHA512 528d3bdabcf34358754c4d8969d0300c26e80df07e670ff5eec514bbb5357003401811e12585e1cf319b17be402be3148f26ca9c86bed45acb7c21143f34842f WHIRLPOOL 7a8e2d4f0f058f95aa311e2e521dfdc362a1b9c02c270e5b28ba16fa3d7fbb6d3e44103e22810849daaea7c34eef0fb3a4d33fc4b4fdb8ecdadc2f7d7893bc79 +EBUILD mongoose-5.6.ebuild 679 SHA256 1a51495910f1cb3e57243cad476f04a7da20d287de9458a1f7cf6ee0f40bb6b2 SHA512 3d46d1409a4b883a22b9af18d2a105c22eff3e1f8c1913a32ebcc7e592728ed0a814506542b8b657ff91b13615ad050f4638f4c4ff295a31d68f82634cff73c6 WHIRLPOOL 7b822be5f1f94905dada60d5e44e32fcd11369270882fcd1e559a4e60b49db526f6497e437e307adf3c1f21eb76183bb01384200540ba02bbb807a182c6fe518 +MISC ChangeLog 2333 SHA256 63035330721aa83a1374993a10c3c289884fa67af4f2671c2c8352a4ba03ddb5 SHA512 17b6339d6187bdae309d2224e4cba352854c8b0ddfbe5b2f903d4420af140c99857385c9e0a4e3e789755f3062ee1bab9d91a95f99bea6da58d871686f8b7aff WHIRLPOOL 8e79aefc001e3cb4227f6bf82b68ea030750fae19e0cbd5ed2c35b01677f8ed97bd8e3d1add9b3baebdd6c4768aad0f4909fe96fe1f3fa7777557db6b497e830 +MISC ChangeLog-2015 490 SHA256 a150d728d910bc4a8388ebe831ba9e9381cebc3892b9a6e6de7249c5031bb522 SHA512 b565501c08e37f2de15c1f98e1d6e9f2c387021de5777259dfee7d03de2e32c96b8dc442e1ee44be8a2b844e73bd65b82248ca51ff5f8b05e100976726cd786c WHIRLPOOL e55b8397fa7ae9ef77932a0d96734ad61dabe0c0dd25d0a02b8e6bd10d3da03b2876bb0595773b632dea5dbee86c1053c5068094510bc94bb53801aafba5b485 +MISC metadata.xml 307 SHA256 24e80c6526f1875ef58fac88b7f812db968665a4b3b5b70fb9ae32eb20202ca2 SHA512 6930a64d12c69ff5f4c1244607bf4137b6bf46dd039b884ee5ce80d4863292d57c78afd3564e3e9441b3e4f7cf281e641044ee8855cbf6bfb67f0ca10ccc548b WHIRLPOOL c820152bc842b0a79449eb5a638cdc18399c034d8f28388bb27a27457362e757bc3dcc8591eb7a41539ad441781624df245a4e3a6daa90fd1f5d040b4e541343 diff --git a/www-servers/mongoose/metadata.xml b/www-servers/mongoose/metadata.xml new file mode 100644 index 000000000000..55be8299a870 --- /dev/null +++ b/www-servers/mongoose/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">cesanta/mongoose</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/mongoose/mongoose-5.6.ebuild b/www-servers/mongoose/mongoose-5.6.ebuild new file mode 100644 index 000000000000..242c08c99c91 --- /dev/null +++ b/www-servers/mongoose/mongoose-5.6.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="easy to use web server" +SRC_URI="https://github.com/cesanta/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +HOMEPAGE="https://code.google.com/p/${PN}/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~amd64-linux ~x86 ~arm-linux ~x86-linux" +IUSE="" + +RDEPEND="" +DEPEND="" + +S=${WORKDIR}/${P}/examples/web_server + +src_prepare() { + eapply_user + sed -e "s|-g -O0 ||" -i Makefile || die +} + +src_compile() { + tc-export CC + emake CFLAGS_EXTRA="${CFLAGS}" web_server +} + +src_install() { + newbin "${S}/web_server" "${PN}" + dodoc ../../README.md +} diff --git a/www-servers/mongrel2/Manifest b/www-servers/mongrel2/Manifest new file mode 100644 index 000000000000..ba8618d6d436 --- /dev/null +++ b/www-servers/mongrel2/Manifest @@ -0,0 +1,7 @@ +AUX mongrel2-1.11.0-polarssl-platform-590512.patch 617 SHA256 d834ec0fa4c3c2fece23f1a938756a7e3d688709990d91abe1e264898bd1483e SHA512 176ffc3ebb360fb56ca3774cad71ad0e0fa7f519cb899f5aeed1d9f5beaaf6578f67713a206daebd3b9b56533628cf1620a66ebc607db35f40ba7ad8d11946f4 WHIRLPOOL 360fb9920fc5c5f95d6f18f3a0cbe732bb113f57668f18550df4d8fb75a6bbfaa2944d90f12d98093465569c21dea0f0e2fc5dd6a0f8eedc58bb13fd0d2454e7 +AUX systemtls.mak 4506 SHA256 34f84ea40934994b1b9af36f32944eaa3e1478d2bc9efd614497ee11a1bbc705 SHA512 9b1fc5bf23d60267d64c08e0f0956deee0c421b03556138f994822abdcb324702bde744559e6629488cb05669b3228078180cb4f30af8fa09c10bc110ce7e3e1 WHIRLPOOL a2664bafad88df8eb07b056663f62122f962f90fc9f67cd6dd1e7081186b92f7b8b0f5dfc9ab218e6afab0263f6579d907e8f456d67688f727f6def4ae59374f +DIST mongrel2-1.11.0.tar.gz 1060770 SHA256 dd7accbe4be25ee841b1d73e1fc2e6230e90f5783e1d25527037416e5f519c86 SHA512 60ee5036c2ac826a08bb1300969f5ad7ec2bc67c7f47635a3b458a0bad6d7e2fa37183c2708d512632c86101f537a4eb64eeef0775137705898480da70d61e90 WHIRLPOOL 928b50b5170ac8015bb63c623de644302329bd5ca47608a9f3dfd96b403c95f2ea78475b33b11f8c64403882d4130a5ba1658ba286b5339fbb174b2ebe93d3ba +EBUILD mongrel2-1.11.0-r1.ebuild 692 SHA256 41183b7914d94bcecfb04034b6066da78a3e00d8391bfdbfe874a59218800a68 SHA512 421dd70d910b3bcd9a53ec0031a40a2d14c74e3064410d5255eebd556edc8cf6c3134246d4166b6f2a8bc308f2de17428b0738f5bb24245aea73bdb1afb105a4 WHIRLPOOL 7b46667b98078e579b3be3cf79ff2fc543cf221c72a293c26ca41c05451ede9e9c31a09df81c85545d28d37343e3bef42398b07cf0a20852d975e73334027448 +EBUILD mongrel2-1.11.0.ebuild 621 SHA256 9c84d47ba602865af67110e560a1b22f1b3068def20dbc77fe13f43cb29d7717 SHA512 e5e031ccfadef12fd72a55bac4c7fdf203b06c4cbde2b01abda6287cb179986c361a85a85910ebed94fb52991d3d320a753a6974baee1cfe378c7a8e6982f4e2 WHIRLPOOL f6e3ee87039c4e7e09eed1518fd5be4174fae5db82a5aeb39ac52b8d9614b6e23bd1df9c4561db9af97beb54f7467b5c6df948ba83e93409cc3ec8067f411451 +MISC ChangeLog 1395 SHA256 54cc6514ba2ad6b7c94a01a899042cfa75e3e0790189bb7a46ef0703ec853e82 SHA512 a1aff4ab49798a678cb8f3d22c5a5024557488ee6284072837f0aabeeb70d5a8c4bdcef11d31429c06af71cd0e4b42a1f765cc5086fee3a65cca03019412b976 WHIRLPOOL c53eda84b5fa520b78625c374c78c58637d690bfa0c9c8837a0fa863494b8577312b40e8a55726931ec5bbd522157fa45cecf6fd13dc25596b739895d39bdcba +MISC metadata.xml 465 SHA256 c4b1dd55f00b97fd5910a63d71f540c6ab98774b4b397c4c2fd121ea48005516 SHA512 81c89b2b259cb5ef69b68b64f9e1bebd13431db578862ecac4a10b607aab0a1b123d46332d905055c11652789bf815f0f2cdc90a2c0c9b6e9748f9e5e5bc88e0 WHIRLPOOL 14b2b8ca16a133c679f25c7bdf5d2bef51473ceae1e4b0932100df05e20b83d1376398560bf0392fd65054bd548af3de447c1286877e6cc60577eff863260e77 diff --git a/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch b/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch new file mode 100644 index 000000000000..0e5957e551b8 --- /dev/null +++ b/www-servers/mongrel2/files/mongrel2-1.11.0-polarssl-platform-590512.patch @@ -0,0 +1,22 @@ +# Fix missing include for newer mbedtls +--- a/src/io.h 2016-08-04 15:55:53.124890328 -0700 ++++ b/src/io.h 2015-12-31 01:25:07.000000000 -0800 +@@ -6,6 +6,7 @@ + #endif + + #include <stdlib.h> ++#include <mbedtls/platform.h> + #include <mbedtls/x509.h> + #include <mbedtls/ssl.h> + #include "server.h" +--- a/src/server.h 2016-08-04 15:54:49.539498093 -0700 ++++ b/src/server.h 2015-12-31 01:25:07.000000000 -0800 +@@ -39,6 +39,7 @@ + #include "adt/darray.h" + #include "host.h" + #include "routing.h" ++#include <mbedtls/platform.h> + #include <mbedtls/ssl.h> + #include <mbedtls/entropy.h> + #include <mbedtls/x509.h> + diff --git a/www-servers/mongrel2/files/systemtls.mak b/www-servers/mongrel2/files/systemtls.mak new file mode 100644 index 000000000000..e449b762af3d --- /dev/null +++ b/www-servers/mongrel2/files/systemtls.mak @@ -0,0 +1,136 @@ +CFLAGS?=-g -O2 +CFLAGS += -Wall -Wextra -I./src -DNDEBUG -D_FILE_OFFSET_BITS=64 -pthread +LIBS+=-lzmq -ldl -lsqlite3 -lmbedtls -lmbedx509 -lmbedcrypto +PREFIX?=/usr/local + +get_objs = $(addsuffix .o,$(basename $(wildcard $(1)))) + +ASM=$(wildcard src/**/*.S src/*.S) +RAGEL_TARGETS=src/state.c src/http11/http11_parser.c +SOURCES=$(wildcard src/**/*.c src/*.c) $(RAGEL_TARGETS) +OBJECTS=$(patsubst %.c,%.o,${SOURCES}) $(patsubst %.S,%.o,${ASM}) +OBJECTS_NOEXT=$(filter-out ${OBJECTS_EXTERNAL},${OBJECTS}) +LIB_SRC=$(filter-out src/mongrel2.c,${SOURCES}) +LIB_OBJ=$(filter-out src/mongrel2.o,${OBJECTS}) +TEST_SRC=$(wildcard tests/*_tests.c) +TESTS=$(patsubst %.c,%,${TEST_SRC}) +MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}" LIBS="${LIBS}" DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" + +all: builddirs bin/mongrel2 tests m2sh procer + +${OBJECTS_NOEXT}: CFLAGS += ${NOEXTCFLAGS} +${OBJECTS}: + +# +# CFLAGS_DEFS: The $(CC) flags required to obtain C pre-processor #defines, per: +# +# http://nadeausoftware.com/articles/2011/12/c_c_tip_how_list_compiler_predefined_macros +# +# It may be appropriate to copy some of these platform-specific CFLAGS_DEFS assignments into the +# appropriate platform target at the end of this file, eg: +# +# solaris: CFLAGS_DEF=... +# solaris: all + +#CFLAGS_DEFS=-dM -E # Portland Group PGCC +#CFLAGS_DEFS=-xdumpmacros -E # Oracle Solaris Studio +#CFLAGS_DEFS=-qshowmacros -E # IBM XL C +CFLAGS_DEFS=-dM -E -x c # clang, gcc, HP C, Intel icc + +.PHONY: builddirs +builddirs: + @mkdir -p build + @mkdir -p bin + +bin/mongrel2: build/libm2.a src/mongrel2.o + $(CC) $(CFLAGS) $(LDFLAGS) src/mongrel2.o -o $@ $< $(LIBS) + +build/libm2.a: CFLAGS += -fPIC +build/libm2.a: ${LIB_OBJ} + ar rcs $@ ${LIB_OBJ} + ranlib $@ + +clean: + rm -rf build bin lib ${OBJECTS} ${TESTS} tests/config.sqlite + rm -f tests/perf.log + rm -f tests/test.pid + rm -f tests/tests.log + rm -f tests/empty.sqlite + rm -f tools/lemon/lemon + rm -f tools/m2sh/tests/tests.log + rm -rf release-scripts/output + find . \( -name "*.gcno" -o -name "*.gcda" \) -exec rm {} \; + ${MAKE} -C tools/m2sh OPTLIB=${OPTLIB} clean + ${MAKE} -C tools/filters OPTLIB=${OPTLIB} clean + ${MAKE} -C tests/filters OPTLIB=${OPTLIB} clean + ${MAKE} -C tools/config_modules OPTLIB=${OPTLIB} clean + ${MAKE} -C tools/procer OPTLIB=${OPTLIB} clean + +pristine: clean + sudo rm -rf examples/python/build examples/python/dist examples/python/m2py.egg-info + sudo find . -name "*.pyc" -exec rm {} \; + ${MAKE} -C docs/manual clean + cd docs/ && ${MAKE} clean + ${MAKE} -C examples/kegogi clean + rm -f logs/* + rm -f run/* + ${MAKE} -C tools/m2sh pristine + ${MAKE} -C tools/procer pristine + git submodule deinit -f src/mbedtls + +.PHONY: tests +tests: tests/config.sqlite ${TESTS} test_filters filters config_modules + sh ./tests/runtests.sh + +tests/config.sqlite: src/config/config.sql src/config/example.sql src/config/mimetypes.sql + sqlite3 $@ < src/config/config.sql + sqlite3 $@ < src/config/example.sql + sqlite3 $@ < src/config/mimetypes.sql + +$(TESTS): %: %.c build/libm2.a + $(CC) $(CFLAGS) -o $@ $< build/libm2.a $(LIBS) + +src/state.c: src/state.rl src/state_machine.rl +src/http11/http11_parser.c: src/http11/http11_parser.rl +src/http11/httpclient_parser.c: src/http11/httpclient_parser.rl + +check: + @echo Files with potentially dangerous functions. + @egrep '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)|stpn?cpy|a?sn?printf|byte_)' $(filter-out src/bstr/bsafe.c,${SOURCES}) + +m2sh: build/libm2.a + ${MAKE} ${MAKEOPTS} -C tools/m2sh all + +procer: build/libm2.a + ${MAKE} ${MAKEOPTS} -C tools/procer all + +test_filters: build/libm2.a + ${MAKE} ${MAKEOPTS} -C tests/filters all + +filters: build/libm2.a + ${MAKE} ${MAKEOPTS} -C tools/filters all + +config_modules: build/libm2.a + ${MAKE} ${MAKEOPTS} -C tools/config_modules all + +# Try to install first before creating target directory and trying again +install: all + install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ \ + || ( install -d $(DESTDIR)/$(PREFIX)/bin/ \ + && install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ ) + ${MAKE} ${MAKEOPTS} -C tools/m2sh install + ${MAKE} ${MAKEOPTS} -C tools/config_modules install + ${MAKE} ${MAKEOPTS} -C tools/filters install + ${MAKE} ${MAKEOPTS} -C tools/procer install + +examples/python/mongrel2/sql/config.sql: src/config/config.sql src/config/mimetypes.sql + cat src/config/config.sql src/config/mimetypes.sql > $@ + +ragel: + ragel -G2 src/state.rl + ragel -G2 src/http11/http11_parser.rl + ragel -G2 src/handler_parser.rl + ragel -G2 src/http11/httpclient_parser.rl + +%.o: %.S + $(CC) $(CFLAGS) -c $< -o $@ diff --git a/www-servers/mongrel2/metadata.xml b/www-servers/mongrel2/metadata.xml new file mode 100644 index 000000000000..7bddc1dfeb10 --- /dev/null +++ b/www-servers/mongrel2/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>Aidenn0@geocities.com</email> + <name>Jason Miller</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>proxy-mintainers</name> + </maintainer> + <upstream> + <remote-id type="github">mongrel2/mongrel2</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild b/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild new file mode 100644 index 000000000000..f651aa267276 --- /dev/null +++ b/www-servers/mongrel2/mongrel2-1.11.0-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A language agnostic web server focused on web applications" +HOMEPAGE="http://mongrel2.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="net-libs/zeromq + >=net-libs/mbedtls-2.1[havege] + dev-db/sqlite:3" +RDEPEND="${DEPEND}" + +src_prepare() { + cp "${FILESDIR}/systemtls.mak" Makefile || die + eapply "${FILESDIR}/${P}-polarssl-platform-590512.patch" + eapply_user +} + +src_install() { + emake install PREFIX=/usr DESTDIR="${D}" + dodoc README examples/configs/mongrel2.conf +} diff --git a/www-servers/mongrel2/mongrel2-1.11.0.ebuild b/www-servers/mongrel2/mongrel2-1.11.0.ebuild new file mode 100644 index 000000000000..74ba23e4320f --- /dev/null +++ b/www-servers/mongrel2/mongrel2-1.11.0.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="A language agnostic web server focused on web applications" +HOMEPAGE="http://mongrel2.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="net-libs/zeromq + >=net-libs/mbedtls-2.1[havege] + dev-db/sqlite:3" +RDEPEND="${DEPEND}" + +src_prepare() { + cp "${FILESDIR}/systemtls.mak" Makefile || die +} + +src_install() { + emake install PREFIX=/usr DESTDIR="${D}" + dodoc README examples/configs/mongrel2.conf +} diff --git a/www-servers/monkeyd/Manifest b/www-servers/monkeyd/Manifest new file mode 100644 index 000000000000..9b14831d53fe --- /dev/null +++ b/www-servers/monkeyd/Manifest @@ -0,0 +1,11 @@ +AUX monkeyd-1.6.8-system-mbedtls.patch 672 SHA256 70811bf0c650526b6b17d2c2af8e6223e7f1f0dfd1c5d1e46de9fd2e2fbb52a0 SHA512 e5eed5eb1d5810b56c94280419859bcb8f8d5d2277965ffc17e00c9074da282c2197ac4ed7e029a57264722f8e1df43cdc5aae4cbf7900e537c60802ad397647 WHIRLPOOL 3ead8d2366ef7dcd2b8cb8de9401055cb7ff1da23cadd1728d9a349f5aa7ed4beca66ed38ce9da4ca398bd4e29c16b500c7f5ee808051983eafd50510372402c +AUX monkeyd-1.6.9-fix-pidfile.patch 526 SHA256 12c5d7422ea83923b5e1f9441cadf1f1c7d3d7decead80e394430183d0dc39a9 SHA512 73026d23723b95316f83ec7c9c49be014c3a52b86bf76cc5b4273ac4393f968d6123bff48afda6478b5d5409eb154d25eeb5f51fc20db53f4d679fdf3cbb35a2 WHIRLPOOL 02bb81d205904032fadd932ba8c5abe9315f6e34cb175c30ed8e135cd5cf5952b7a279322e269fac8b14586e84ed76244589487060c6abb68c1d59e93fda54e2 +AUX monkeyd.confd 172 SHA256 bfd675e83ea839282fa60ff7b137933b47e4beeed3f22703a79d4201580de508 SHA512 8ca7312a80440e908ef8c6297870411f4978c56fe8ad09589d1bb56e9d545d086a53f07120d5cc14c6042a83755730ac6fc4839020a5159eb054eb34d3f264e7 WHIRLPOOL a806a4fabc56310ace71725cba2432abf1d5d8c905aa90d5c9cf88b5006a0c5e3035a9117c5fd3bc458ac8c3df828edd9c0ab58ce7089657dbe11ecd5f6c643e +AUX monkeyd.initd 601 SHA256 2a4f288f0fb9a8901091655a1fb52351cd8f46c2426830b6c45a02bd1082b4b4 SHA512 e356742c537b5bbc8d9696e5fdad0c08d93ace5085f8939fa50d97498ebe0d85712af5da675e76c642296856768081ee14d6f0d3d73a17ce4642cf46e9056a79 WHIRLPOOL f4b87bbd19c8315b1cc9ac4719f1ec9b821cc304bfbf8da510df0965cdda038f33924542216a3b3550b56688862e18e8a393510170f6032e891589a3087a0036 +AUX monkeyd.initd-r1 608 SHA256 7bf2d1c95b93e70355f3530598c95dad1ead96e87760463a455c62a9080dc2d8 SHA512 d1a30f0033d9f2a0957028a6873b71903d8051340ac272ccbaf12daba9a89bf0c2e476b8aa22a0e60697ffd10ab5c1d6a4aa0ff7b204f8b4adc76ebe91b8abaa WHIRLPOOL 27c9b84400eea25d7853d1fa1d6e2f6cdb1acc3f5497c19e575946f1ebdbaee7adfa65221f39239cb0cdfa6b08d2f4f2bc4ba1c4806721b567a3ac73856d5d2b +DIST monkey-1.6.9.tar.gz 1972040 SHA256 f1122e89cda627123286542b0a18fcaa131cbe9d4f5dd897d9455157289148fb SHA512 3540a17fffe57a9d4b88b6243c634dcf6a27ed894ae2a0d5d42a4881221a9d59ae67d4c7fcf087535360d20ccdadab16947cf3a7dc6d4e864d487f598eb0ba62 WHIRLPOOL c0af688a0a9d8d82a6dc405a79640738ebd62fe1de8a0aad715c1356c73a499ff5854f2a16d69e9a1022bfd02ca04dc17163011a27e53b438ca0e32c9b824f2b +EBUILD monkeyd-1.6.9-r1.ebuild 4115 SHA256 27f3f295b131ed3cdf45a8eb4b54a00b7bfffa28b894c90e38b62a0d5d7bd9d8 SHA512 ab02c02930a25e73937fd73be03abd15c54fc16f0e30c0a85f8bcc0804ad7a5b0aeea2c57dda6294ce12fae56bfd4bb0b9d6f468346aabf1f278d97abde4046a WHIRLPOOL dcdaffe9c7c5977e93e7a664c1b1f0f2bb48d111752476cce38bbfa5c851d061671548c35873f670a5bf03efade4961efbf0fe5cf29431c471117e56e6d41b39 +EBUILD monkeyd-9999.ebuild 4105 SHA256 7126ceb31edded7042bf690969c71c49aa32c0e416142ff02b30c51fb88f33b6 SHA512 5eeca2050e7948d32f073a18dc5b49a84aa1ede42a17811c139341d05fccf6e7a506bb8f73a9b8928a77f255fa47d28415b31519d08c987c3a21a621599e1ee9 WHIRLPOOL 544606655352ece2e65c6dbcabae2011bb474d121c4c4d73659d994ef066fba81f646ad6d43abae90e8d952ad14620ae4b26906f2ea3dcf29c8b6360d5a8409c +MISC ChangeLog 8220 SHA256 5822b22bab9b7c1ffd1bdeadc854c586af71c89912960c82ea35ef743d8faa35 SHA512 af827d231d530daf2b5e3d2551e65075c1a0def38419f8a01b0550c4e0b9ea417b72358643d49fe14a957dccd7f94788a842251fad390a5b72d4b80e441fc548 WHIRLPOOL 6543554ca201731b083a351a738532f6366087c4fca7f5927e01c81bbd9bea1f4f37c8921cac891b23100278e5111af930303a746c0ed7e3c0dc60c49d174469 +MISC ChangeLog-2015 14869 SHA256 9636aca8a6170d58e5dff30ce7613efabc1812475396700a9b4894fccec5cccf SHA512 e56ecdfbe16c9789dce47ddb08ce12101995eae785f0048343ff3a0f9bc7393c4d2d482ffd9498a44ea78d04c391fc327a9aa6b2e5aaeae9b2863a216c4612a8 WHIRLPOOL 5a3aad6e4dab6f0bb76a80aa2c481a0428232a306ef261e871e40e25b13ca96670b03df924d7028b96197bc56b836d586d7494486c16c42a4025c8903a246a1f +MISC metadata.xml 394 SHA256 068168d91dc6999fbb8105282aa96ae5b3c15a172c667b11cb6a81d8e360aff6 SHA512 9431b7f6722baa7c18ab2341a35aed3978f54e92c0b2a686bef0f7dc20934a14f93b6a1f1208b47b720f11e5f901e634c3b278eb540dfcc06c3a7c668fc0a209 WHIRLPOOL d959efd9ed61f7122828bf30338e42ab4408d5588c398171b933d140618590586abf2be006292b4d1a1b07c813a1fb7edbb8df0b590c881024fc3ef41bde81d2 diff --git a/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch b/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch new file mode 100644 index 000000000000..6b7ca5473ee0 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch @@ -0,0 +1,19 @@ +diff -Naur monkey-1.6.3.orig/plugins/tls/CMakeLists.txt monkey-1.6.3/plugins/tls/CMakeLists.txt +--- monkey-1.6.3.orig/plugins/tls/CMakeLists.txt 2015-10-13 13:23:34.000000000 -0400 ++++ monkey-1.6.3/plugins/tls/CMakeLists.txt 2015-10-14 21:28:27.941930485 -0400 +@@ -2,15 +2,6 @@ + tls.c + ) + +-if(NOT WITH_MBEDTLS_SHARED) +- option(ENABLE_TESTING OFF) +- option(ENABLE_PROGRAMS OFF) +- option(INSTALL_MBEDTLS_HEADERS OFF) +- set(MK_MBEDTLS_SRC ../../deps/mbedtls-2.2.1) +- add_subdirectory(${MK_MBEDTLS_SRC} ${CMAKE_BINARY_DIR}/mbedtls-2.2.1) +- include_directories(${MK_MBEDTLS_SRC}/include) +-endif() +- + MONKEY_PLUGIN(tls "${src}") + + MONKEY_PLUGIN_LINK_LIB(tls mbedtls) diff --git a/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch new file mode 100644 index 000000000000..82550aef4d09 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch @@ -0,0 +1,12 @@ +diff -Naur monkey-1.6.9.orig/CMakeLists.txt monkey-1.6.9/CMakeLists.txt +--- monkey-1.6.9.orig/CMakeLists.txt 2016-06-04 19:16:47.000000000 -0400 ++++ monkey-1.6.9/CMakeLists.txt 2016-07-01 13:08:51.237213196 -0400 +@@ -285,7 +285,7 @@ + + # Custom PIDPATH + if(NOT PID_PATH) +- set(MK_PATH_PIDPATH ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/ CACHE STRING "Server PID path") ++ set(MK_PATH_PIDPATH /run/ CACHE STRING "Server PID path") + else() + set(MK_PATH_PIDPATH ${PID_PATH} CACHE STRING "Server PID path") + endif() diff --git a/www-servers/monkeyd/files/monkeyd.confd b/www-servers/monkeyd/files/monkeyd.confd new file mode 100644 index 000000000000..818957c9792c --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.confd @@ -0,0 +1,5 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Add any additional command line arguments here +MONKEY_ARGS="" diff --git a/www-servers/monkeyd/files/monkeyd.initd b/www-servers/monkeyd/files/monkeyd.initd new file mode 100644 index 000000000000..c44975ddda24 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/bin/monkey" +CONFFILE="/etc/monkeyd/monkey.conf" + +depend() { + use net +} + +start() { + ebegin "Starting monkeyd" + start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null + eend $? +} + +stop() { + ebegin "Stopping monkeyd" + local PORT=$(awk '/^ *Port/ { print $2 }' "${CONFFILE}") + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + PIDFILE="${PIDFILE}"."${PORT}" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/www-servers/monkeyd/files/monkeyd.initd-r1 b/www-servers/monkeyd/files/monkeyd.initd-r1 new file mode 100644 index 000000000000..6ec67e11435c --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.initd-r1 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/sbin/monkey" +CONFFILE="/etc/monkeyd/monkey.conf" + +depend() { + use net +} + +start() { + ebegin "Starting monkeyd" + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + mkdir -p $(dirname ${PIDFILE}) + start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null + eend $? +} + +stop() { + ebegin "Stopping monkeyd" + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/www-servers/monkeyd/metadata.xml b/www-servers/monkeyd/metadata.xml new file mode 100644 index 000000000000..1e7b130da6f1 --- /dev/null +++ b/www-servers/monkeyd/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <use> + <flag name="debug">Enable lots of debugging info</flag> + <flag name="static-plugins">Build statically linked plugins</flag> + </use> +</pkgmetadata> diff --git a/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild new file mode 100644 index 000000000000..67bcf7351327 --- /dev/null +++ b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic toolchain-funcs user multilib + +DESCRIPTION="A small, fast, and scalable web server" +HOMEPAGE="http://www.monkey-project.com/" +MY_P="${PN/d}-${PV}" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/monkey/monkey.git" + inherit git-2 + KEYWORDS="amd64 arm ppc64" +else + SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz" + KEYWORDS="amd64 arm ~mips ppc ppc64 x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +# jemalloc is also off until we figure out how to work CMakeLists.txt magic. +#IUSE="cgi -debug fastcgi jemalloc php static-plugins ${PLUGINS}" + +PLUGINS="monkeyd_plugins_auth monkeyd_plugins_cheetah monkeyd_plugins_dirlisting +monkeyd_plugins_liana monkeyd_plugins_logger monkeyd_plugins_mandril monkeyd_plugins_tls" +IUSE="cgi -debug fastcgi php static-plugins ${PLUGINS}" + +# uclibc is often compiled without backtrace info so we should +# force this off. If someone complains, consider relaxing it. +REQUIRED_USE=" + monkeyd_plugins_tls? ( !static-plugins ) + elibc_uclibc? ( !debug ) + cgi? ( php )" + +#DEPEND="jemalloc? ( >=dev-libs/jemalloc-3.3.1 )" +DEPEND=" + dev-util/cmake + monkeyd_plugins_tls? ( net-libs/mbedtls:= )" +RDEPEND=" + php? ( dev-lang/php ) + cgi? ( dev-lang/php[cgi] )" + +S="${WORKDIR}/${MY_P}" + +WEBROOT="/var/www/localhost" + +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + +pkg_setup() { + if use debug; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn "Do not use debug in production!" + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + fi +} + +src_prepare() { + # Unconditionally get rid of the bundled jemalloc + rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch + epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch +} + +src_configure() { + local myconf="" + + use elibc_uclibc && myconf+=" --uclib-mode" + use elibc_musl && myconf+=" --musl-mode" + + #use jemalloc || myconf+=" --malloc-libc" + myconf+=" --malloc-libc" + + if use debug; then + myconf+=" --debug --trace" + else + myconf+=" --no-backtrace" + fi + + local enable_plugins="" + local disable_plugins="" + # We use 'cgi' and 'fastcgi' because they are global flags + # instead of the corresponding monkeyd_plugins_* + use cgi && enable_plugins+="cgi," || disable_plugins+="cgi," + use fastcgi && enable_plugins+="fastcgi," || disable_plugins+="fastcgi," + # For the rest, we scan the monkeyd_plugins_* and parse out the plugin name. + local p + for p in ${PLUGINS}; do + pp=${p/+/} + cp=${pp/monkeyd_plugins_/} + use $pp && enable_plugins+="${cp}," || disable_plugins+="${cp}," + done + myconf+=" --enable-plugins=${enable_plugins%,} --disable-plugins=${disable_plugins%,}" + if use static-plugins; then + myconf+=" --static-plugins=${enable_plugins%,}" + fi + + # For O_CLOEXEC which is guarded by _GNU_SOURCE in uClibc, + # but shouldn't because it is POSIX. This needs to be fixed + # in uClibc. Also, we really should us append-cppflags but + # monkey's build system doesn't respect CPPFLAGS. This needs + # to be fixed in monkey. + use elibc_uclibc && append-cflags -D_GNU_SOURCE + + # Non-autotools configure + ./configure \ + --pthread-tls \ + --prefix=/usr \ + --default-user=monkeyd \ + --sbindir=/usr/sbin \ + --webroot=${WEBROOT}/htdocs \ + --logdir=/var/log/monkeyd \ + --mandir=/usr/share/man \ + --libdir=/usr/$(get_libdir) \ + --sysconfdir=/etc/monkeyd \ + ${myconf} \ + || die +} + +src_compile() { + emake VERBOSE=1 +} + +src_install() { + default + + newinitd "${FILESDIR}"/monkeyd.initd-r1 monkeyd + newconfd "${FILESDIR}"/monkeyd.confd monkeyd + + # Move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${D}"${WEBROOT}/htdocs \ + "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die + + keepdir \ + /var/tmp/monkeyd \ + /var/log/monkeyd \ + ${WEBROOT}/htdocs + + # This needs to be created at runtime + rm -rf "${D}"/run +} + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} diff --git a/www-servers/monkeyd/monkeyd-9999.ebuild b/www-servers/monkeyd/monkeyd-9999.ebuild new file mode 100644 index 000000000000..fafdebcfb419 --- /dev/null +++ b/www-servers/monkeyd/monkeyd-9999.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic toolchain-funcs user multilib + +DESCRIPTION="A small, fast, and scalable web server" +HOMEPAGE="http://www.monkey-project.com/" +MY_P="${PN/d}-${PV}" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/monkey/monkey.git" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +# jemalloc is also off until we figure out how to work CMakeLists.txt magic. +#IUSE="cgi -debug fastcgi jemalloc php static-plugins ${PLUGINS}" + +PLUGINS="monkeyd_plugins_auth monkeyd_plugins_cheetah monkeyd_plugins_dirlisting +monkeyd_plugins_liana monkeyd_plugins_logger monkeyd_plugins_mandril monkeyd_plugins_tls" +IUSE="cgi -debug fastcgi php static-plugins ${PLUGINS}" + +# uclibc is often compiled without backtrace info so we should +# force this off. If someone complains, consider relaxing it. +REQUIRED_USE=" + monkeyd_plugins_tls? ( !static-plugins ) + elibc_uclibc? ( !debug ) + cgi? ( php )" + +#DEPEND="jemalloc? ( >=dev-libs/jemalloc-3.3.1 )" +DEPEND=" + dev-util/cmake + monkeyd_plugins_tls? ( net-libs/mbedtls:= )" +RDEPEND=" + php? ( dev-lang/php ) + cgi? ( dev-lang/php[cgi] )" + +S="${WORKDIR}/${MY_P}" + +WEBROOT="/var/www/localhost" + +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + +pkg_setup() { + if use debug; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn "Do not use debug in production!" + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + fi +} + +src_prepare() { + # Unconditionally get rid of the bundled jemalloc + rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch + epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch +} + +src_configure() { + local myconf="" + + use elibc_uclibc && myconf+=" --uclib-mode" + use elibc_musl && myconf+=" --musl-mode" + + #use jemalloc || myconf+=" --malloc-libc" + myconf+=" --malloc-libc" + + if use debug; then + myconf+=" --debug --trace" + else + myconf+=" --no-backtrace" + fi + + local enable_plugins="" + local disable_plugins="" + # We use 'cgi' and 'fastcgi' because they are global flags + # instead of the corresponding monkeyd_plugins_* + use cgi && enable_plugins+="cgi," || disable_plugins+="cgi," + use fastcgi && enable_plugins+="fastcgi," || disable_plugins+="fastcgi," + # For the rest, we scan the monkeyd_plugins_* and parse out the plugin name. + local p + for p in ${PLUGINS}; do + pp=${p/+/} + cp=${pp/monkeyd_plugins_/} + use $pp && enable_plugins+="${cp}," || disable_plugins+="${cp}," + done + myconf+=" --enable-plugins=${enable_plugins%,} --disable-plugins=${disable_plugins%,}" + if use static-plugins; then + myconf+=" --static-plugins=${enable_plugins%,}" + fi + + # For O_CLOEXEC which is guarded by _GNU_SOURCE in uClibc, + # but shouldn't because it is POSIX. This needs to be fixed + # in uClibc. Also, we really should us append-cppflags but + # monkey's build system doesn't respect CPPFLAGS. This needs + # to be fixed in monkey. + use elibc_uclibc && append-cflags -D_GNU_SOURCE + + # Non-autotools configure + ./configure \ + --pthread-tls \ + --prefix=/usr \ + --default-user=monkeyd \ + --sbindir=/usr/sbin \ + --webroot=${WEBROOT}/htdocs \ + --logdir=/var/log/monkeyd \ + --mandir=/usr/share/man \ + --libdir=/usr/$(get_libdir) \ + --sysconfdir=/etc/monkeyd \ + ${myconf} \ + || die +} + +src_compile() { + emake VERBOSE=1 +} + +src_install() { + default + + newinitd "${FILESDIR}"/monkeyd.initd-r1 monkeyd + newconfd "${FILESDIR}"/monkeyd.confd monkeyd + + # Move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${D}"${WEBROOT}/htdocs \ + "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die + + keepdir \ + /var/tmp/monkeyd \ + /var/log/monkeyd \ + ${WEBROOT}/htdocs + + # This needs to be created at runtime + rm -rf "${D}"/run +} + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest new file mode 100644 index 000000000000..c0188940a24c --- /dev/null +++ b/www-servers/nginx/Manifest @@ -0,0 +1,49 @@ +AUX http_echo-nginx-1.11.11+.patch 1920 SHA256 96b83fa02d977f3eeb8af73f065a4ba359515f098722988693ac824384a09f12 SHA512 fb86dd9a17a1ed6d99609a9e024971749569bfa108e1bae86e9e9f72792e2e6767ad710330bcc81cc67deca7fdaabe8dbb63a5ae3a519481c8ffab1e8c446f34 WHIRLPOOL 1a04d6b967fb3b35db1ebfc6a145966607830132eaa1cdc1f7a9f9a0bcd2651492b26504f4c444519bf0ffdd376ce88c228813ad767de4e48e5cb11d801bb1ca +AUX http_lua_nginx-1.11.11+-r1.patch 6790 SHA256 57867eda9eeee7fe5b55d8916047c8e5ffd156cfed4ca2d64470ae4132784261 SHA512 bbd9f97d598482212887ebfa62b6037e2c5d89087ff761925399ef3ff6a35970a88b42e4d59f54ee59fd5402b37a40640599257e61bcb9ac49ec7fa857a674f2 WHIRLPOOL 01be216559482007c1fc1095b59e290a4ccd96271786e639de9c0a99741f5d7a2ba70869878a4c673a07662d2f82bd37604506f5b429edb57bc16a3a27e82c89 +AUX http_security-pr_1158.patch 3045 SHA256 7ed9980ad98aa76924f2122f2d08102be28315d1d36b8367e99b5750f4de432c SHA512 7bb5a1c1feabd81279b7fb40df470b0d496f68b7c45e72d26afe1ef4c911de979ea9f5f30c5cbfe93b05971232885246bfab807d04f6943f772118af21ecf4ab WHIRLPOOL cd25c1a757c3c41c70247e5e612dc87f5f2175a8354fba761c5460c1a671aa6663a6407524b5dfce5040b4e389a9ea4fa16eff3fc4c1ae1a1d9be05324ff1502 +AUX http_security-pr_1373.patch 1185 SHA256 8e7469924ce464e16fab2eb627963c891cd0bddbca190ca29bc43a40a1437d33 SHA512 7b2e6d0606cfa40a7851f85d8295cb62e4e00cf895b0ad78f52ac636d8efed4bae748c0c3437144d5f9a0a12ffd5ac897be1d679435780e5f753c2409e0ee4c8 WHIRLPOOL a40bb386d28990d765b66386ba29fcc32b83bac57745a9a66d454679b0ccc3f3d0e7789a06e091ec4a64cae1723abe67b2d15c010b5f69541e466f17cf6eb390 +AUX http_uploadprogress-issue_50-r1.patch 1098 SHA256 4fdf5269aadce50cc8ab6f2ffed19df40db681b25c6a37fa660686aa07ff3a27 SHA512 bdc3a129059b1af9c317d1e8b74ec98a14bf1e55b59ae867b963304541457e1676acb775ac2cec730ee2036feedf75d636eeb36700b0913e417045a52a00eec9 WHIRLPOOL 5c772e7d1c5b8fb643d9f925b7c1a64cfa477f3e28fa0b3508f66e12f2b9d085455db2d1240d464add051807962d82a54656587a66a8d817030bdb1391d36557 +AUX http_upstream_check-nginx-1.11.5+.patch 8557 SHA256 4aacd8c4ed7f993b5fd207738755050907eb645bdc34d153fd4b8226ee759c35 SHA512 9b377defaa9ddb78fee3f37e054c7b16258fd380b4093d6d61bc45fdc42cb45ee5246901cddd230dc1765838fabbd71d558b5b1d12d9829615b3501da4f3824a WHIRLPOOL 1de7347bb9a59244fac24fe1a89b0694962cba32e91ae08e13267443e205143f00f3ef09ac5b3ba3aa8db02ec6f707d6c43e794ddc0aa533a2a6d40863094679 +AUX nginx-1.4.1-fix-perl-install-path.patch 403 SHA256 0f10cf594208d99942cd07b13799bdd62ad9dc62479b302c0390de381c7fdf28 SHA512 b8f6876831e1149b1421fff4919f8d4893e5fc46aad8a91d4cf2e0b21767b59820b8e227e3b722b80060832844ef191f30aa5dc056daeb49e55a05702d72858f WHIRLPOOL a29dc1b707695ad29b5e967c545b6059120ce9d1a95b828062f6507d8ccd730c95fc82843564baa51d644e138d40fc93b0a84c916a4d77a51c1495625a103809 +AUX nginx-httpoxy-mitigation-r1.patch 2023 SHA256 f2e1365bc16f2e038e33631b1c6b9823f73b8e57c20a1ec5d29aedd1007158c5 SHA512 bfc480c34cea525b0eb3753622eb371198e2252aba3299fca4f1c7b29848da162b93757b05eb11a3839618ed895f7b73534dcd7861f4b924997ec422939222a3 WHIRLPOOL 7a97d8a0d25c97708cd2bf35db26d01f43676ffda58fcb0f94162e692af1bbb6c46cadab09ae974f498087914bf6a3e8ce04c115fbf509877d849400e9279415 +AUX nginx.conf-r2 1292 SHA256 5386dfa5a9d3ecd724f59b77f5bf67aa195cb9ea2c16b71f97ce54c19e336577 SHA512 de9ffb84d7de468fa7aebfb205529edb1c372f3ff6990b0cac9d1f3012be9ced65db4d260fd852c91cc033805c023a02790770cca43c6ad6335fb58a9c694c95 WHIRLPOOL 70dacd19de8c56f1072f254185b97620fa7928815a94058468fb822e2696f0cd9ee9032af046b281f0ac3d52ed5f00fcb25da6b11b31c0b80001591bfb961f94 +AUX nginx.confd 1131 SHA256 29677faab40d1fff740d743614788fd73c8c2d4167c3bd64d3e8bd4b0eb90d2b SHA512 9023b33b6e03de4fa4df8459118a34a24a52ec167eb0aa1d220fd5ba8555aa454ca3451cad4eecc87a445b74cae5132fd717286aec3f1fea390eb96547e4ae85 WHIRLPOOL 45a05f20eec7ef3a68b22842f951497fbf15ab15d034e812ba40fc15e7a287bf84cc10360e01dc715e52cdb5654a98901cde800983b7e1894718f6122743fc6b +AUX nginx.initd-r4 2192 SHA256 a28354a71c1d9d9f681835a1afe73ca538aca81c4a28d0166b66344854cca235 SHA512 e641829466e54093ad01e9f6c57acd2f0505e489a32e67dfee9279d5da57b216052a92eb05eb0c9c122c12f8b7bf8274b520b6e02fda161cc03187ce7c0660f1 WHIRLPOOL 63481cc8f980ace439cc0cbc030b816f02c90bd24828b5571bffb7ba8d327f1fbbcd4d427ed668f4ecd294c5631f5c86adb66f4da7fc6fd1a02a85d922b2fa59 +AUX nginx.logrotate-r1 257 SHA256 83d7a38bcefe2530b327f8ec6d75f69885032d92314a5bf5e314c6da0505704a SHA512 4892fc1700817c9a459a531df0320fe606a51be7f8b4e3ddf5852fe33def70dbff36fcefd2fce247c6846d6315ea92f3421eb21299a162d082b85fa27572cd95 WHIRLPOOL af813247e3a69b25f7ae9f24466eff70fc30d883c719d003d0f5286092f0a64a91c48e73624212c37c0489fd5f737c2bb2b947e8d2bd649ad64b81bc90fa6f20 +AUX nginx.service-r1 327 SHA256 17c404c5130115e3ebadb09e25cff0103b48ae7dbff2284fa690161fda7888ae SHA512 9b6bcf74df2f74ae6a2c255ebf2d826ea92ed9921b9995da6c9a0c5656e2863a2fe5293ef8a656fbd36298602cc88ffc5d7acfbbf143c23a78c9689d61b05df9 WHIRLPOOL 126c56732b8bd9948595727aa8c056c44df05f4c8e708b00c9de715a7260e4e120fd9e076672312b55c889ff4a3ca100ce696165a4eaf93d89e808e1e28653fa +DIST modsecurity-2.9.1.tar.gz 4261212 SHA256 958cc5a7a7430f93fac0fd6f8b9aa92fc1801efce0cda797d6029d44080a9b24 SHA512 374733cbfc26e53d95b78c8f268a4e465d838163e9893fc24e33a9d272b114f1b287147bab6d0289575074cbbd94f48983e23fa59832cbcb32950046cea59269 WHIRLPOOL 5f41bebf032f8a269412d104b7632a06af4d4c495658c9cd1ebf69b82c10ce1bbcb34b9dd159a7b00e57348714a5e93ad3db19701dda51479accd3a9dc79a9cb +DIST modsecurity-2.9.2.tar.gz 4298993 SHA256 41a8f73476ec891f3a9e8736b98b64ea5c2105f1ce15ea57a1f05b4bf2ffaeb5 SHA512 69c87ef6f7b6411f4803eb25af32969a1da59722121257c2edf345a3f5a4ab9ae8a49c886cbbfc722c5bda91c6d6ea55232f968c0a0407d7d7b3af53dc862c21 WHIRLPOOL cbdc090f5fefeb6b6b71362e03dc12c4c574b7726005e8b552f4db7b765fc77f4609af5f216fad6c336d886e112aa392e3f885a140a72d731eed78a1ed51cd88 +DIST nginx-1.12.1.tar.gz 981093 SHA256 8793bf426485a30f91021b6b945a9fd8a84d87d17b566562c3797aba8fac76fb SHA512 3a2ad2a559b366dda92dd58c0fe40ee84dd60a3eaf72071454110e032c3e9a03f2a63b28fe3a615b527950521eeb533c687a2cc4c87524e1d8f3a0a5f043fdb6 WHIRLPOOL 17e91044636839f0c8c476879227f2de1633679199787157e5ed47c306dcb9597646c5be96957d51e38d96ddbb0346ec9f72b87c37023e19e572fa404ef0fd1f +DIST nginx-1.13.3.tar.gz 985931 SHA256 5b73f98004c302fb8e4a172abf046d9ce77739a82487e4873b39f9b0dcbb0d72 SHA512 4a8924b1edd0b8476437680ea548a0bc983d360e73f2d5797f60cebc3ef7d6fb64e56b6aaf5a4fc1707d24519dc70d466a7bf1d336c463651928d65c2f7b5380 WHIRLPOOL 9cb1f77a60945d9c1df6e2589116406f31939882131759d3aa95b25edfe86bc5fe712a517a3b0f77a5fca2b3706884984b90e293a4e791faa824bbf0e964518e +DIST nginx-1.13.4.tar.gz 988415 SHA256 de21f3c49ba65c611329d8759a63d72e5fcf719bc6f2a3270e2541348ef1fbba SHA512 068f59f0dfe68a9a20a141bf5416551bc758fe50a38b2576f0e1c9df2ec674c7348b151f3ce80b614ac20610bc85374be7cef69f95b925f4fde351716c1da740 WHIRLPOOL 333cf2542fef05a0709259e6c8ea363a2eaaade00e1e1f0f50df081af023826d452b7b5fd3e826a63cad1753949f469424723b0a9731a34418c06517e14d6f3a +DIST nginx-1.13.5.tar.gz 988821 SHA256 0e75b94429b3f745377aeba3aff97da77bf2b03fcb9ff15b3bad9b038db29f2e SHA512 ffd0406a75a35da427522f58c9b710cde86acb1ebf48f4e6b7f6a44e04ccd83950fedc6dceed9e2ab5132e06559f3bf45935d5011fc436e7c2efd46ac1e86459 WHIRLPOOL 94703bff57b0c701709974748f07ba444143707ecfb98beb9ca0d30d66913cde07725f3ae82a44d5585709c35b0ff600eccab37f0b5df904b67cee8e2085207d +DIST nginx-auth-ldap-49a8b4d28fc4a518563c82e0b52821e5f37db1fc.tar.gz 17159 SHA256 3c11c32f05da04f1a4647dc4e35dd8d8aeacd5a2e763ba349feba3dba8663132 SHA512 323abd0ca8e90f5afcaf81a8ff1a8abe3dfcbff3d69f0dd4a1c005fe6436acbf3076c4c57a4df877b3d8e388cbea085d46301bb2df9c0752e2567817ff7cca92 WHIRLPOOL ad65e8182b2634db5fa06055ef7d91c7d8aabd0fa986d8402a4845977354d6edb329621b6f9f96c90ce2d158cff20e42ae50fba06a088a84de3e3f414205dbc2 +DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 SHA256 6f9102321d8c68df6d67e9bde145a8de3f45f99f6cb47c08735a86f003234d31 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529 WHIRLPOOL 38abe56e177e22dad68ac7d6570425ecd763d2e891627a75156a6f39bd7edc54f664c3d2f638e1ea57c743dadc6a8c9889be087abbdb4c98b5641c299f7fbc07 +DIST ngx_devel_kit-0.3.0-r1.tar.gz 66455 SHA256 88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 SHA512 558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 WHIRLPOOL 5f6ed4e6850d2ce7e8c65e0570a7e2c74a1fe360e167644ed405fff682ab178b09c722c99c1df9af552fb816219b9fc04dcdf638b3e4af68c688434cdb33aa59 +DIST ngx_http_auth_pam-1.5.1.tar.gz 6863 SHA256 77676842919134af88a7b4bfca4470223e3a00d287d17c0dbdc9a114a685b6e7 SHA512 973b94874d8a58c0df0ac2d31571eafc1e80b11179cba33ec88421a826207fbf7e99b0387e135a1ca48d82daacb78f19a4c21d3a27b49b16dc86b4748bb72261 WHIRLPOOL 4fcaadee859f325c734aa16763702ee40284d1debcfbf5df1cb9aadf2bfc72c1e8d0e5b9d1495f34fc719f4d7fa3e653797fa7917f8fd0437fa2023a1930f667 +DIST ngx_http_cache_purge-2.3.tar.gz 12248 SHA256 279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c SHA512 50a31dbf2216a6fae74a186af56dec4600cf55777e76a10ac0075f609e7737135aab063a64f2590dddcd0369ebebd4a523027f3d9ebcca74f7b4355be1c5dcc0 WHIRLPOOL 5451ef3e33044210453995ea916acec679599c0ded5471d464db5003a07e7a06e9690812091148c2af7b50384e52b32e49136eac02e0330724ba2408d893f96c +DIST ngx_http_dav_ext-0.0.3.tar.gz 6260 SHA256 d428a0236c933779cb40ac8c91afb19d5c25a376dc3caab825bfd543e1ee530d SHA512 4763b1c5e417248d80acfacf20bfc5ba3e06675ff08e37703867daef99a400980b536941e4955c259432905bd11ab998bc2e2489a50350413c7bf37e18eafb74 WHIRLPOOL 5adbcea768fbb179249a03fe69304505ec09a1dafac848dd5e3cde96693c6fbcf6cf6c128ca116d02b36c1be0008807d9e86fee5b411e137b18b15a60291f29b +DIST ngx_http_dav_ext-0.1.0.tar.gz 6614 SHA256 6b004eed8ea16ad8de4d304027bf0413cc323a95914e58625a7dc066481aae3a SHA512 47b1686b483640a7fdcbf8081aae2e9f83fb0072ef0940b1cd7f8ddf4932317740b38f0dd4a8f3dd8da074c11c70038ac6758c0feafd3851331acdc85f3e0ee1 WHIRLPOOL 2c65c0ac05726e6983840ddb374f5de0648230c3e2f3928dc8ccb0c38d2c4d5c1cb113800ee941a6dbb234d6960a349c71de218e83f78a3db279764a0d806edc +DIST ngx_http_echo-0.60.tar.gz 52771 SHA256 1077da2229ac7d0a0215e9e6817e297c10697e095010d88f1adbd1add1ce9f4e SHA512 c455bee73cebd0752449472452d15614b9587ddd199263d366484ede890c4d108eacbbeaef31adc9dc7732b56ef2bfc73c0fef3366366db03a8ec3fdc27a985c WHIRLPOOL 8938ac18aae74a5c4806ff3611c243c9bee108ef93fef7b0da284040c2ec2d9a57cb3cad9e3719cb795bbb063176d7afe81b7288ebacf5096d26b16e5ef34da6 +DIST ngx_http_echo-0.61.tar.gz 53155 SHA256 2e6a03032555f5da1bdff2ae96c96486f447da3da37c117e0f964ae0753d22aa SHA512 c90b81a4e85a8e9beeb5ff591dc91adb25fa4e0b6cb47086b577e5fa36db2368442dd011187675e358781956c364b949bc4d920ca2b534481b21c9987d2a9a3b WHIRLPOOL 66c4103ce093afb15cd3ec8c53ba52f8db0f10837084448cbc080618c3882f5441491ba60a74831012433a0e4286d8ae66187e33cac3d1b715e58694fddfc84e +DIST ngx_http_fancyindex-0.4.1.tar.gz 21130 SHA256 2b00d8e0ad2a67152a9cee7b7ee67990c742d501412df912baaf1eee9bb6dc71 SHA512 ce0043ad4a2b638c5d99244d6caaa65ad142cea78884084a9aeca5a9593c68dbe508c9e4dd85dc5722eb63ef386612bffc48d4b6fc1487df244fbcb7a73bffe1 WHIRLPOOL 4a885afbadf64bbd25df6580a099472ae48836d9dddfe1dee6ac6a6f97bfb0cf7120ff10dd69fceca7085fab590bec3a4b4b5be5644f2352375316885ddc3cac +DIST ngx_http_fancyindex-0.4.2.tar.gz 22047 SHA256 8327150864ca267b735d550d3304030efbbd863fdddfe0a94e970f249a8827ee SHA512 aee121e4d25872f0eee6c8150c8c732767ab24c61dc4f6e3f86bd6edc53ad715f3c23045362954a1ad2086ff1002bca821b2e9a53b58b077cbda91a95077ef76 WHIRLPOOL 81b34afe05fda9068a53d5fa29937c72210847a9eda86f8858d6d2d625958f1c6cea2c3639ce9132687b672384b066f314bfb7096098646131c7380bd99c5470 +DIST ngx_http_headers_more-0.32.tar.gz 28033 SHA256 c6d9dab8ea1fc997031007e2e8f47cced01417e203cd88d53a9fe9f6ae138720 SHA512 e42582b45c3111de3940bbeb67ce161aca2d55adcfb00c61c12256fa0e36221d38723013f36edbcf6d1b520f8dfb49d4657df8a956e66d36e68425afad382bd1 WHIRLPOOL 2b95ea8e2933e83082b9dfd7aaa8f57dd38b0ec12fb452a4aa38a215ca76b6572fe35b79c8afe8cf3097bf89ced0e81c33e07ee6913c99966b87b8e610df3121 +DIST ngx_http_lua-0.10.10.tar.gz 611973 SHA256 b4acb84e2d631035a516d61830c910ef6e6485aba86096221ec745e0dbb3fbc9 SHA512 3440e3fe714407f0ff61e0da207669655b443f7b70ef8a91693ea05ed96d8fde349d9c8ea30d5ff53ea3f8e4a5c7d0a2834e136c340b1b1365d62006339a1e4d WHIRLPOOL 23b5509618a7b3db215ed62b37773f7fa4e1ec14efceef631344c608c079929cded79c6888fa4a45fc31b25463ebb43030cf86868e3df99bb8b3d49116a448d5 +DIST ngx_http_lua-0.10.8.tar.gz 606643 SHA256 d67449c71051b3cc2d6dd60df0ae0d21fca08aa19c9b30c5b95ee21ff38ef8dd SHA512 ad621cec178eb37109f16ebc30dbab7b1ea344ac4b523ff1e6ad62364b8cf437488a89c593ca44b446b729a1c578e3a97685851847b4b16a147ac9eca8f23a2a WHIRLPOOL 07ba9d1c35c5f8cf627a485ee19b4a5bd0969efc70283f4617af542c5152879aba2b6f5e0a8fd1a6d1a69c2438a499f56156de6f3345a0f2f6527686e682baba +DIST ngx_http_naxsi-0.55.3.tar.gz 187416 SHA256 0b3c95d250772dc89ad8b49e47c1e024c5ae2c76c0cffa445e9fe05c4dd13495 SHA512 9e8f41a5cd1342cc9b8aa334a603842d14a256aab1f4a21205bb1278aecbb0c49e39c889d8113a5b41aad2efeaa2ed9f11cba6929173f50add91f54c4c59c8a0 WHIRLPOOL 0a1bbe06730730944a882d86ffa378c4a3c759366208913603ffd18fcd7b18e65b6b1a89e9a07dc82e360dfe7ef4a6430391f6e52de35023d33ca19e80a3b693 +DIST ngx_http_push_stream-0.5.2.tar.gz 182008 SHA256 1d07f38acdb8194bd49344b0ba21de101070de9b8731d27a8d22e928850bc199 SHA512 ee8bf9ece652da6aa5a39879298bba70d1842696545259f3f5e302cc61397b35f016364805805f9ab1914fc39ed2f07c015e042155789073e3d1fdc02a0783de WHIRLPOOL d309cecbb1bb5b6c4f64712d44889e3ecca59140d845a31a3f605dc3cc2aa01622b0deadb8f6852baea3c211bebbe6ed7d7868399447ac1249c1b1b740fa3c27 +DIST ngx_http_slowfs_cache-1.10.tar.gz 11809 SHA256 1e81453942e5b0877de1f1f06c56ae82918ea9818255cb935bcb673c95a758a1 SHA512 fbc9609a8d6913aeefe535f206b9e53477503f131934ead2ae5a6169e395af2f5fb54778704824d5eeb22a4ef40a11ebbcde580db62a631f70edcc2cfc06b15d WHIRLPOOL a02ed77422c47d9e476f8746186d19d632ddb953635d8d9dd51ff076225a78044286ee7e114478bc02e4b2a422e4fdc207154fc287629dd2cd7c3f9a634dad18 +DIST ngx_http_upload_progress-0.9.2-r1.tar.gz 17268 SHA256 b286689355442657650421d8e8398bd4abf9dbbaade65947bb0cb74a349cc497 SHA512 c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c WHIRLPOOL e847603f1445c7e1471a5570e2774a448be880eb71eeb21e27361586bcee9aae31cb0a8a80cd5abfc8d14e2c356fabfa7293e6a4d5f6782d41521a7bdc124066 +DIST ngx_http_upstream_check-0.3.0-10-gf3bdb7b.tar.gz 129060 SHA256 9e0835e8c1550033e74c7eaeebf94d41ab1617cff152dd076da976e0eba30bfc SHA512 5b2ae6d305d24d0c64dc118fd3b0c23f5bf0e9a282e70e8d2c4eb946ed510263b5e845f64ca352784e34708cf9d98804cacf64b6c9efd712a395076dd0ba7c29 WHIRLPOOL 8dab8aa1bf3f7c9adbf2952148d76cc627682876b5e64dc789582b573a4b6fa73910043325fc664784b68966bcb1e8ba9ae6bfa457133bde0d52e39b7d3c09e0 +DIST ngx_memc_module-0.18.tar.gz 37113 SHA256 4e280d1dcb8b312bc7875604c1e35b17879279126d3d5fbf482aa9cc7c11276d SHA512 8087bd361fb4e522493e66f93d59c9b13245d6eef0fe4a53f619d1826feb02af60769c0a04f87f2faf5308a44b794ef146a445bdbe7cbc7f21c0edaaba08c706 WHIRLPOOL 9570bf7fb4e925d1794f3af0914efca036fe65696e7e380969133b89878e5f46f71cd5ffb7b5ea94085aced26d289abca77d7ef805f03ff614bc12a47d7aab3f +DIST ngx_metrics-0.1.1.tar.gz 2964 SHA256 1c62ebb31e3caafad91720962770b0e7a4287f195520cf12471c262ac19b154e SHA512 d36a8fb0104c83b6b564e03b351aa750cab08650264c74d6f786af357bfb7006b531a93270dd961896ea8dafe27e5db8548ede714c5f52c4742876bc73af4b5e WHIRLPOOL 2796f5a97e76dfcc91133240e8e90ba493f0356f781a173d8cacdd09eba64b75ef531db398c0566fda395124700de8c991b771433e376ca0d5898c2ea6f82868 +DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 SHA256 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 WHIRLPOOL 64c9b11ad938e6dbe5ba31298f1cd46f6e6bb4ba039c96b1e43bd85919d1606326f74b677f789ecabe0b0f4e0f08ac5aaf8148bf820de65aaa1e9966a28b9f61 +DIST ngx_rtmp-1.2.0.tar.gz 519895 SHA256 a8026f5ade30b178a06f12c46dff053cfe12256016ad465a46646183086b16b0 SHA512 8965d9bee91a46375516ccd012d1c43cd23f15c0630d11ed01472b9a84504574b476f22c5584f43c972a8f923e9ae025b9b60c64aace0ed159c7279bcbd376c8 WHIRLPOOL ea18f30cac7310a9b9be92178266afab5403f9e2e52cf89142c3c8bd20c05b12390ae90bdb50ceabef7ba869ef95502fee2f046716daea95de10527acba826c8 +EBUILD nginx-1.12.1.ebuild 37447 SHA256 2477ca64039f20ac1bca067199a20beea17ee7db62f91036133dbbf8d7c74c3f SHA512 dad602d21ce679a674455f478efad66d1532862d277e65797279c476d24242c4f4b04bd03168a14eee171148d3d2d6488b80a86b001036b087a02630d9ad6642 WHIRLPOOL 7fbb98e1a096b0c0709c49959e98601f7486960cdce075d93dd741849d805249c72c6ea26e53884198cbad1e2e9e97261728ff2ee77a421008062b05352038a4 +EBUILD nginx-1.13.3.ebuild 37449 SHA256 32838376e6479d1f23bd1d0f500129df8d6c9bac8306fdf0c78bbc0829fc1ea6 SHA512 0adc9b68fb63bf90773fbc08d9a8c9f358cf447b54ff122f6069ffcf725af9dbf34deefa23fe8b4817044578cf1f47c0ca1857e4208bc30761c45a67ef964fe1 WHIRLPOOL d8548150c12049999f515657a91e645a249ad4eaca51485b8900f9e8bfbc633b08ec3d1e34855a3df2779054474782f531d7097fe78ec2617dc1ed54bf4d3b79 +EBUILD nginx-1.13.4.ebuild 36979 SHA256 3bcaaf3a338d9f835a123972ceb5c850d65f4202a344eff387e3585db8e59d6c SHA512 e37db661b34783e2888a1dbb41dc056a4dde164e98679f64d79bea49b8241186cd845429bd025b31787d81a8ba464325955607490335d125529e8c82ff84f381 WHIRLPOOL 39da88134ed266beec030be3504630b22d1d5b8291223b82821ca2dfc0599285f78b682140f003ac93755f79d386b56d8d209ff6d639942deeb07e2d8c539320 +EBUILD nginx-1.13.5.ebuild 36986 SHA256 2776b48e3377e64310dd3a27a0a7073c309ef2b6420a02ef7286f7f5dad9c676 SHA512 38717303b8e653edcabcfa080b3afa8188c5f6fed6b7c7f4ee512f05b2c572be99bf1ed91c1ee9b80958103eea1a91192faed3cd7c1d42bb80a02e8370226c4f WHIRLPOOL 339b305c223c2fd7ef7a11d614d871cecec7125c60e322dc4126c04222e7569f2434e2f8b1a0b99fcde72dc25ea623bba74ea195cb5d154270e5825ceacdb991 +MISC ChangeLog 20921 SHA256 6daa8e175ce89e3bcc1d0ce14ca52fd82bda991200624c46830e680614e494d6 SHA512 f3f2d93714c35d1ebc04d9aa2e0b6605334bcae88cc8a58c24eed9d479292d9288801dcbf224144914f8715092be69617b6e4c5fe837eeea87e8d499c4e91366 WHIRLPOOL bbb44c9e3e3e8a7ea93b358054266b593083ce38dbdac404dc54f8fdfdf83ef5ab54b5e3978a0c1597e6ed0a0005f064a271f83c3abc27e4598066efede3c563 +MISC ChangeLog-2015 69680 SHA256 10720899590f9065076fca43d949a1fc45b04562b93ca1b47f8bce211bc26a50 SHA512 2c149e4a9a2d37127b9520aa09fe789216a1498d73351b0563c45d8838abdc7788ad3d34ccddfd8b27d7eb386a1344e1726f2ee93a29c886e018057d0ade5546 WHIRLPOOL fcb612cb6854cd2644344220c0fabd8cffeb548008327920eb535986af33c7ad3ae4c31ac57497d9f35bfeabb10cbca1e9897d42009dcfd8a8a7b1dfc0fb9d30 +MISC metadata.xml 1484 SHA256 c7ee4adf7c78b790d017b86fcac77615c3e4202e9304957da891b17e530b2f43 SHA512 5d17d3074acd6b5df642ab4f0e70a3db593e0e09198b98dba0c177951abc8e9b9bfc088a0428ad15717d77598cc54e453092f9e6485009373372535c88588aed WHIRLPOOL b27eb87db6471c5314cc9fffce167b09634084061a84e974775137f001b9ef2ad7afe5796e2ad8c87b9c13e8c1e91fb368459bee9db20f481585f09d6eaaf328 diff --git a/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch b/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch new file mode 100644 index 000000000000..d4f3db808098 --- /dev/null +++ b/www-servers/nginx/files/http_echo-nginx-1.11.11+.patch @@ -0,0 +1,59 @@ +From d16babcc09050966f5055df41572429bd84d811a Mon Sep 17 00:00:00 2001 +From: Andrei Belov <defanator@gmail.com> +Date: Wed, 22 Mar 2017 08:43:30 +0300 +Subject: [PATCH] fixed build with nginx/1.11.11 + +Closes openresty/echo-nginx-module#64 + +See also: +http://hg.nginx.org/nginx/rev/e662cbf1b932 +--- + src/ngx_http_echo_request_info.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/src/ngx_http_echo_request_info.c b/src/ngx_http_echo_request_info.c +index d28ec4d..27b3c52 100644 +--- a/src/ngx_http_echo_request_info.c ++++ b/src/ngx_http_echo_request_info.c +@@ -179,6 +179,9 @@ ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r, + ngx_int_t i, j; + ngx_buf_t *b, *first = NULL; + unsigned found; ++#if defined(nginx_version) && nginx_version >= 1011011 ++ ngx_chain_t *cl; ++#endif + ngx_connection_t *c; + ngx_http_request_t *mr; + ngx_http_connection_t *hc; +@@ -215,8 +218,15 @@ ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r, + + if (hc->nbusy) { + b = NULL; ++ ++#if defined(nginx_version) && nginx_version >= 1011011 ++ for (cl = hc->busy; cl; /* void */) { ++ b = cl->buf; ++ cl = cl->next; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (first == NULL) { + if (mr->request_line.data >= b->pos +@@ -280,8 +290,15 @@ ngx_http_echo_client_request_headers_variable(ngx_http_request_t *r, + } + + if (hc->nbusy) { ++ ++#if defined(nginx_version) && nginx_version >= 1011011 ++ for (cl = hc->busy; cl; /* void */) { ++ b = cl->buf; ++ cl = cl->next; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (!found) { + if (b != first) { diff --git a/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch b/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch new file mode 100644 index 000000000000..2a61c03b2008 --- /dev/null +++ b/www-servers/nginx/files/http_lua_nginx-1.11.11+-r1.patch @@ -0,0 +1,214 @@ +From 0459a285ca0159d45e73da8bd1164edb5c57cde3 Mon Sep 17 00:00:00 2001 +From: Andrei Belov <defanator@gmail.com> +Date: Wed, 22 Mar 2017 07:50:57 +0300 +Subject: [PATCH] feature: nginx 1.11.11+ can now build with this module. + +Note: nginx 1.11.11+ are still not an officially supported target yet. +More work needed. + +Closes openresty/lua-nginx-module#1016 + +See also: +http://hg.nginx.org/nginx/rev/e662cbf1b932 +--- + src/ngx_http_lua_common.h | 6 ++++ + src/ngx_http_lua_headers.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ + src/ngx_http_lua_headers.h | 3 ++ + src/ngx_http_lua_module.c | 13 ++++++++- + 4 files changed, 89 insertions(+), 1 deletion(-) + +diff --git a/src/ngx_http_lua_common.h b/src/ngx_http_lua_common.h +index 079a4dc..f37d776 100644 +--- a/src/ngx_http_lua_common.h ++++ b/src/ngx_http_lua_common.h +@@ -199,6 +199,12 @@ struct ngx_http_lua_main_conf_s { + of reqeusts */ + ngx_uint_t malloc_trim_req_count; + ++#if nginx_version >= 1011011 ++ /* the following 2 fields are only used by ngx.req.raw_headers() for now */ ++ ngx_buf_t **busy_buf_ptrs; ++ ngx_int_t busy_buf_ptr_count; ++#endif ++ + unsigned requires_header_filter:1; + unsigned requires_body_filter:1; + unsigned requires_capture_filter:1; +diff --git a/src/ngx_http_lua_headers.c b/src/ngx_http_lua_headers.c +index 2392598..6700ce8 100644 +--- a/src/ngx_http_lua_headers.c ++++ b/src/ngx_http_lua_headers.c +@@ -26,6 +26,9 @@ static int ngx_http_lua_ngx_req_get_headers(lua_State *L); + static int ngx_http_lua_ngx_req_header_clear(lua_State *L); + static int ngx_http_lua_ngx_req_header_set(lua_State *L); + static int ngx_http_lua_ngx_resp_get_headers(lua_State *L); ++#if nginx_version >= 1011011 ++void ngx_http_lua_ngx_raw_header_cleanup(void *data); ++#endif + + + static int +@@ -77,6 +80,11 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L) + size_t size; + ngx_buf_t *b, *first = NULL; + ngx_int_t i, j; ++#if nginx_version >= 1011011 ++ ngx_buf_t **bb; ++ ngx_chain_t *cl; ++ ngx_http_lua_main_conf_t *lmcf; ++#endif + ngx_connection_t *c; + ngx_http_request_t *r, *mr; + ngx_http_connection_t *hc; +@@ -93,6 +101,10 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L) + return luaL_error(L, "no request object found"); + } + ++#if nginx_version >= 1011011 ++ lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module); ++#endif ++ + ngx_http_lua_check_fake_request(L, r); + + mr = r->main; +@@ -109,8 +121,13 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L) + dd("hc->nbusy: %d", (int) hc->nbusy); + + if (hc->nbusy) { ++#if nginx_version >= 1011011 ++ dd("hc->busy: %p %p %p %p", hc->busy->buf->start, hc->busy->buf->pos, ++ hc->busy->buf->last, hc->busy->buf->end); ++#else + dd("hc->busy: %p %p %p %p", hc->busy[0]->start, hc->busy[0]->pos, + hc->busy[0]->last, hc->busy[0]->end); ++#endif + } + + dd("request line: %p %p", mr->request_line.data, +@@ -146,9 +163,37 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L) + dd("size: %d", (int) size); + + if (hc->nbusy) { ++#if nginx_version >= 1011011 ++ if (hc->nbusy > lmcf->busy_buf_ptr_count) { ++ if (lmcf->busy_buf_ptrs) { ++ ngx_free(lmcf->busy_buf_ptrs); ++ } ++ ++ lmcf->busy_buf_ptrs = ngx_alloc(hc->nbusy * sizeof(ngx_buf_t *), ++ r->connection->log); ++ ++ if (lmcf->busy_buf_ptrs == NULL) { ++ return luaL_error(L, "no memory"); ++ } ++ ++ lmcf->busy_buf_ptr_count = hc->nbusy; ++ } ++ ++ bb = lmcf->busy_buf_ptrs; ++ for (cl = hc->busy; cl; cl = cl->next) { ++ *bb++ = cl->buf; ++ } ++#endif + b = NULL; ++ ++#if nginx_version >= 1011011 ++ bb = lmcf->busy_buf_ptrs; ++ for (i = hc->nbusy; i > 0; i--) { ++ b = bb[i - 1]; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + dd("busy buf: %d: [%.*s]", (int) i, (int) (b->pos - b->start), + b->start); +@@ -223,8 +268,15 @@ ngx_http_lua_ngx_req_raw_header(lua_State *L) + } + + if (hc->nbusy) { ++ ++#if nginx_version >= 1011011 ++ bb = lmcf->busy_buf_ptrs; ++ for (i = hc->nbusy - 1; i >= 0; i--) { ++ b = bb[i]; ++#else + for (i = 0; i < hc->nbusy; i++) { + b = hc->busy[i]; ++#endif + + if (!found) { + if (b != first) { +@@ -1431,4 +1483,20 @@ ngx_http_lua_ffi_get_resp_header(ngx_http_request_t *r, + #endif /* NGX_LUA_NO_FFI_API */ + + ++#if nginx_version >= 1011011 ++void ++ngx_http_lua_ngx_raw_header_cleanup(void *data) ++{ ++ ngx_http_lua_main_conf_t *lmcf; ++ ++ lmcf = (ngx_http_lua_main_conf_t *) data; ++ ++ if (lmcf->busy_buf_ptrs) { ++ ngx_free(lmcf->busy_buf_ptrs); ++ lmcf->busy_buf_ptrs = NULL; ++ } ++} ++#endif ++ ++ + /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ +diff --git a/src/ngx_http_lua_headers.h b/src/ngx_http_lua_headers.h +index 39f1114..ee4d21c 100644 +--- a/src/ngx_http_lua_headers.h ++++ b/src/ngx_http_lua_headers.h +@@ -15,6 +15,9 @@ + void ngx_http_lua_inject_resp_header_api(lua_State *L); + void ngx_http_lua_inject_req_header_api(lua_State *L); + void ngx_http_lua_create_headers_metatable(ngx_log_t *log, lua_State *L); ++#if nginx_version >= 1011011 ++void ngx_http_lua_ngx_raw_header_cleanup(void *data); ++#endif + + + #endif /* _NGX_HTTP_LUA_HEADERS_H_INCLUDED_ */ +diff --git a/src/ngx_http_lua_module.c b/src/ngx_http_lua_module.c +index 3dc2817..875f933 100644 +--- a/src/ngx_http_lua_module.c ++++ b/src/ngx_http_lua_module.c +@@ -28,6 +28,7 @@ + #include "ngx_http_lua_ssl_certby.h" + #include "ngx_http_lua_ssl_session_storeby.h" + #include "ngx_http_lua_ssl_session_fetchby.h" ++#include "ngx_http_lua_headers.h" + + + static void *ngx_http_lua_create_main_conf(ngx_conf_t *cf); +@@ -624,7 +625,7 @@ ngx_http_lua_init(ngx_conf_t *cf) + volatile ngx_cycle_t *saved_cycle; + ngx_http_core_main_conf_t *cmcf; + ngx_http_lua_main_conf_t *lmcf; +-#ifndef NGX_LUA_NO_FFI_API ++#if !defined(NGX_LUA_NO_FFI_API) || nginx_version >= 1011011 + ngx_pool_cleanup_t *cln; + #endif + +@@ -716,6 +717,16 @@ ngx_http_lua_init(ngx_conf_t *cf) + cln->handler = ngx_http_lua_sema_mm_cleanup; + #endif + ++#if nginx_version >= 1011011 ++ cln = ngx_pool_cleanup_add(cf->pool, 0); ++ if (cln == NULL) { ++ return NGX_ERROR; ++ } ++ ++ cln->data = lmcf; ++ cln->handler = ngx_http_lua_ngx_raw_header_cleanup; ++#endif ++ + if (lmcf->lua == NULL) { + dd("initializing lua vm"); + diff --git a/www-servers/nginx/files/http_security-pr_1158.patch b/www-servers/nginx/files/http_security-pr_1158.patch new file mode 100644 index 000000000000..92f1094c2434 --- /dev/null +++ b/www-servers/nginx/files/http_security-pr_1158.patch @@ -0,0 +1,103 @@ +From 2fa8ffea68498e02005e85c27e61bde30718ae3b Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <whissi@whissi.de> +Date: Sat, 11 Jun 2016 16:18:17 +0200 +Subject: [PATCH 1/2] configure: Fix detection whether libcurl is linked + against gnutls + +The find_curl macro is also checking whether libcurl is linked against +gnutls. However the check depends on "CURL_LIBS" which wasn't defined +by the macro. + +This commit will define "CURL_LIBS" so that the check works as expected. +--- + build/find_curl.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/build/find_curl.m4 b/build/find_curl.m4 +index 6b23ad6..3310e40 100644 +--- a/build/find_curl.m4 ++++ b/build/find_curl.m4 +@@ -2,6 +2,7 @@ dnl Check for CURL Libraries + dnl CHECK_CURL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) + dnl Sets: + dnl CURL_CFLAGS ++dnl CURL_LDADD + dnl CURL_LIBS + + CURL_CONFIG="" +@@ -57,7 +58,8 @@ if test -n "${curl_path}"; then + if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl VERSION: $CURL_VERSION); fi + CURL_CFLAGS="`${CURL_CONFIG} --cflags`" + if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl CFLAGS: $CURL_CFLAGS); fi +- CURL_LDADD="`${CURL_CONFIG} --libs`" ++ CURL_LIBS="`${CURL_CONFIG} --libs`" ++ CURL_LDADD="${CURL_LIBS}" + if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl LDADD: $CURL_LIBS); fi + + dnl # Check version is ok + +From 67f98e7da04251a40a0172e3dfac2c5a6ac6f7dd Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <whissi@whissi.de> +Date: Sat, 11 Jun 2016 16:48:58 +0200 +Subject: [PATCH 2/2] configure: Move verbose_output declaration up to the + beginning + +Macros like "find_curl" are using "verbose_output" variable but because some +of them are called before we define the variable we are seeing errors like + + ./configure: line 13855: test: : integer expression expected + +This commit will fix the problem by moving the "verbose_output" declaration +up to the beginning so that the variable is available for every macro. +--- + configure.ac | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7517885..0f32b01 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,6 +70,22 @@ AC_SUBST(MSC_REGRESSION_DOCROOT_DIR) + + ### Configure Options + ++# Verbose output ++AC_ARG_ENABLE(verbose-output, ++ AS_HELP_STRING([--enable-verbose-output], ++ [Enable more verbose configure output.]), ++[ ++ if test "$enableval" != "no"; then ++ verbose_output=1 ++ else ++ verbose_output=0 ++ fi ++], ++[ ++ verbose_output=0 ++]) ++ ++ + #OS type + + AC_CANONICAL_HOST +@@ -410,20 +426,6 @@ AC_ARG_ENABLE(errors, + report_errors=1 + ]) + +-# Verbose output +-AC_ARG_ENABLE(verbose-output, +- AS_HELP_STRING([--enable-verbose-output], +- [Enable more verbose configure output.]), +-[ +- if test "$enableval" != "no"; then +- verbose_output=1 +- else +- verbose_output=0 +- fi +-], +-[ +- verbose_output=0 +-]) + + # Strict Compile + AC_ARG_ENABLE(strict-compile, diff --git a/www-servers/nginx/files/http_security-pr_1373.patch b/www-servers/nginx/files/http_security-pr_1373.patch new file mode 100644 index 000000000000..e4069e16330d --- /dev/null +++ b/www-servers/nginx/files/http_security-pr_1373.patch @@ -0,0 +1,33 @@ +From d19df159043106a4d6dfd113696900b5b0dae24b Mon Sep 17 00:00:00 2001 +From: Andrei Belov <defanator@gmail.com> +Date: Mon, 3 Apr 2017 12:52:01 +0300 +Subject: [PATCH] Fix building with nginx >= 1.11.11 + +Closes SpiderLabs/ModSecurity#1359 + +See also: +http://hg.nginx.org/nginx/rev/e662cbf1b932 +--- + nginx/modsecurity/ngx_http_modsecurity.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/nginx/modsecurity/ngx_http_modsecurity.c b/nginx/modsecurity/ngx_http_modsecurity.c +index 7c13953..367b2b8 100644 +--- a/nginx/modsecurity/ngx_http_modsecurity.c ++++ b/nginx/modsecurity/ngx_http_modsecurity.c +@@ -528,9 +528,15 @@ ngx_http_modsecurity_save_request_body(ngx_http_request_t *r) + + hc = r->http_connection; + ++#if defined(nginx_version) && nginx_version >= 1011011 ++ if (hc->free && size == cscf->large_client_header_buffers.size) { ++ ++ buf = hc->free->buf; ++#else + if (hc->nfree && size == cscf->large_client_header_buffers.size) { + + buf = hc->free[--hc->nfree]; ++#endif + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ModSecurity: use http free large header buffer: %p %uz", diff --git a/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch b/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch new file mode 100644 index 000000000000..42cbd779a8cb --- /dev/null +++ b/www-servers/nginx/files/http_uploadprogress-issue_50-r1.patch @@ -0,0 +1,31 @@ +From dd138546b16a01e9c09613d02211373baf1cac02 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <whissi@whissi.de> +Date: Thu, 20 Oct 2016 03:09:37 +0200 +Subject: [PATCH] config: Fix ngx_module_type + +Since commit 37182ce2f3b6 the module was not present in static builds +because due to an invalid "ngx_module_type" the module was not added to +objs/ngx_modules.c. + +This commit will fix the problem by setting the correct module type +"HTTP_FILTER" [Link 1]. + +Link 1: https://www.nginx.com/resources/wiki/extending/new_config/#key-ngx_module_type +Gentoo-Bug: https://bugs.gentoo.org/593450 +Fixes: https://github.com/masterzen/nginx-upload-progress-module/issues/50 +--- + config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config b/config +index 364af8c..5f4ade1 100644 +--- a/config ++++ b/config +@@ -1,6 +1,6 @@ + ngx_addon_name=ngx_http_uploadprogress_module + if test -n "$ngx_module_link"; then +- ngx_module_type=FILTER ++ ngx_module_type=HTTP_FILTER + ngx_module_name=ngx_http_uploadprogress_module + ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c" + diff --git a/www-servers/nginx/files/http_upstream_check-nginx-1.11.5+.patch b/www-servers/nginx/files/http_upstream_check-nginx-1.11.5+.patch new file mode 100644 index 000000000000..a894bde8ec34 --- /dev/null +++ b/www-servers/nginx/files/http_upstream_check-nginx-1.11.5+.patch @@ -0,0 +1,246 @@ +Upstream: https://github.com/yaoweibin/nginx_upstream_check_module/pull/119 + +diff --git src/http/modules/ngx_http_upstream_hash_module.c src/http/modules/ngx_http_upstream_hash_module.c +index 6c28c64..a187887 100644 +--- src/http/modules/ngx_http_upstream_hash_module.c ++++ src/http/modules/ngx_http_upstream_hash_module.c +@@ -9,6 +9,9 @@ + #include <ngx_core.h> + #include <ngx_http.h> + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++#include "ngx_http_upstream_check_module.h" ++#endif + + typedef struct { + uint32_t hash; +@@ -235,6 +238,16 @@ ngx_http_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data) + goto next; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, ++ "get hash peer, check_index: %ui", ++ peer->check_index); ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ goto next; ++ } ++#endif ++ ++ + if (peer->max_fails + && peer->fails >= peer->max_fails + && now - peer->checked <= peer->fail_timeout) +@@ -538,6 +551,15 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data) + continue; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, ++ "get consistent_hash peer, check_index: %ui", ++ peer->check_index); ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ continue; ++ } ++#endif ++ + if (peer->server.len != server->len + || ngx_strncmp(peer->server.data, server->data, server->len) + != 0) +diff --git src/http/modules/ngx_http_upstream_ip_hash_module.c src/http/modules/ngx_http_upstream_ip_hash_module.c +index 296108f..135ce5d 100644 +--- src/http/modules/ngx_http_upstream_ip_hash_module.c ++++ src/http/modules/ngx_http_upstream_ip_hash_module.c +@@ -9,6 +9,9 @@ + #include <ngx_core.h> + #include <ngx_http.h> + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++#include "ngx_http_upstream_check_module.h" ++#endif + + typedef struct { + /* the round robin data must be first */ +@@ -205,6 +208,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data) + goto next; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, ++ "get ip_hash peer, check_index: %ui", ++ peer->check_index); ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ goto next; ++ } ++#endif ++ + if (peer->max_fails + && peer->fails >= peer->max_fails + && now - peer->checked <= peer->fail_timeout) +diff --git src/http/modules/ngx_http_upstream_least_conn_module.c src/http/modules/ngx_http_upstream_least_conn_module.c +index ebe0627..94f1883 100644 +--- src/http/modules/ngx_http_upstream_least_conn_module.c ++++ src/http/modules/ngx_http_upstream_least_conn_module.c +@@ -9,6 +9,10 @@ + #include <ngx_core.h> + #include <ngx_http.h> + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++#include "ngx_http_upstream_check_module.h" ++#endif ++ + + static ngx_int_t ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r, + ngx_http_upstream_srv_conf_t *us); +@@ -147,6 +151,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data) + continue; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, ++ "get least_conn peer, check_index: %ui", ++ peer->check_index); ++ ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ continue; ++ } ++#endif ++ + if (peer->max_fails + && peer->fails >= peer->max_fails + && now - peer->checked <= peer->fail_timeout) +@@ -202,6 +216,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data) + continue; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, ++ "get least_conn peer, check_index: %ui", ++ peer->check_index); ++ ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ continue; ++ } ++#endif ++ + if (peer->conns * best->weight != best->conns * peer->weight) { + continue; + } +diff --git src/http/ngx_http_upstream_round_robin.c src/http/ngx_http_upstream_round_robin.c +index 0137bf6..99f0923 100644 +--- src/http/ngx_http_upstream_round_robin.c ++++ src/http/ngx_http_upstream_round_robin.c +@@ -9,6 +9,9 @@ + #include <ngx_core.h> + #include <ngx_http.h> + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++#include "ngx_http_upstream_check_module.h" ++#endif + + #define ngx_http_upstream_tries(p) ((p)->number \ + + ((p)->next ? (p)->next->number : 0)) +@@ -97,7 +100,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, + peer[n].fail_timeout = server[i].fail_timeout; + peer[n].down = server[i].down; + peer[n].server = server[i].name; +- ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ if (!server[i].down) { ++ peer[n].check_index = ++ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]); ++ } else { ++ peer[n].check_index = (ngx_uint_t) NGX_ERROR; ++ } ++#endif + *peerp = &peer[n]; + peerp = &peer[n].next; + n++; +@@ -161,7 +171,15 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, + peer[n].fail_timeout = server[i].fail_timeout; + peer[n].down = server[i].down; + peer[n].server = server[i].name; +- ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ if (!server[i].down) { ++ peer[n].check_index = ++ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]); ++ } ++ else { ++ peer[n].check_index = (ngx_uint_t) NGX_ERROR; ++ } ++#endif + *peerp = &peer[n]; + peerp = &peer[n].next; + n++; +@@ -228,6 +246,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, + peer[i].max_conns = 0; + peer[i].max_fails = 1; + peer[i].fail_timeout = 10; ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ peer[i].check_index = (ngx_uint_t) NGX_ERROR; ++#endif + *peerp = &peer[i]; + peerp = &peer[i].next; + } +@@ -344,6 +365,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r, + peer[0].max_conns = 0; + peer[0].max_fails = 1; + peer[0].fail_timeout = 10; ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ peer[0].check_index = (ngx_uint_t) NGX_ERROR; ++#endif + peers->peer = peer; + + } else { +@@ -378,6 +402,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r, + peer[i].max_conns = 0; + peer[i].max_fails = 1; + peer[i].fail_timeout = 10; ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ peer[i].check_index = (ngx_uint_t) NGX_ERROR; ++#endif + *peerp = &peer[i]; + peerp = &peer[i].next; + } +@@ -443,6 +470,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data) + goto failed; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ goto failed; ++ } ++#endif ++ + rrp->current = peer; + + } else { +@@ -537,6 +570,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp) + continue; + } + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ if (ngx_http_upstream_check_peer_down(peer->check_index)) { ++ continue; ++ } ++#endif ++ + if (peer->max_fails + && peer->fails >= peer->max_fails + && now - peer->checked <= peer->fail_timeout) +diff --git src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_upstream_round_robin.h +index 45f258d..dee91d0 100644 +--- src/http/ngx_http_upstream_round_robin.h ++++ src/http/ngx_http_upstream_round_robin.h +@@ -38,6 +38,10 @@ struct ngx_http_upstream_rr_peer_s { + ngx_msec_t slow_start; + ngx_msec_t start_time; + ++#if (NGX_HTTP_UPSTREAM_CHECK) ++ ngx_uint_t check_index; ++#endif ++ + ngx_uint_t down; + + #if (NGX_HTTP_SSL || NGX_COMPAT) diff --git a/www-servers/nginx/files/nginx-1.4.1-fix-perl-install-path.patch b/www-servers/nginx/files/nginx-1.4.1-fix-perl-install-path.patch new file mode 100644 index 000000000000..601a79ba8a0f --- /dev/null +++ b/www-servers/nginx/files/nginx-1.4.1-fix-perl-install-path.patch @@ -0,0 +1,13 @@ +diff --git a/auto/lib/perl/make b/auto/lib/perl/make +index 260bd95..857ece6 100644 +--- a/auto/lib/perl/make ++++ b/auto/lib/perl/make +@@ -35,6 +35,8 @@ $NGX_OBJS/src/http/modules/perl/Makefile: \\ + NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\ + $NGX_PERL Makefile.PL \\ + LIB=$NGX_PERL_MODULES \\ ++ PREFIX=$NGX_PREFIX \\ ++ INSTALLDIRS=vendor \\ + INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN + + END diff --git a/www-servers/nginx/files/nginx-httpoxy-mitigation-r1.patch b/www-servers/nginx/files/nginx-httpoxy-mitigation-r1.patch new file mode 100644 index 000000000000..4a6372ad05f1 --- /dev/null +++ b/www-servers/nginx/files/nginx-httpoxy-mitigation-r1.patch @@ -0,0 +1,54 @@ +httpoxy mitigation + +See https://httpoxy.org/ and https://www.nginx.com/blog/?p=41962 for details. +--- + conf/fastcgi.conf | 3 +++ + conf/fastcgi_params | 3 +++ + conf/scgi_params | 3 +++ + conf/uwsgi_params | 3 +++ + 4 files changed, 12 insertions(+) + +diff --git a/conf/fastcgi.conf b/conf/fastcgi.conf +index 091738c..9f7e192 100644 +--- a/conf/fastcgi.conf ++++ b/conf/fastcgi.conf +@@ -24,3 +24,6 @@ fastcgi_param SERVER_NAME $server_name; + + # PHP only, required if PHP was built with --enable-force-cgi-redirect + fastcgi_param REDIRECT_STATUS 200; ++ ++# httpoxy mitigation (https://httpoxy.org/ https://www.nginx.com/blog/?p=41962) ++fastcgi_param HTTP_PROXY ""; +diff --git a/conf/fastcgi_params b/conf/fastcgi_params +index 28decb9..3be3a95 100644 +--- a/conf/fastcgi_params ++++ b/conf/fastcgi_params +@@ -23,3 +23,6 @@ fastcgi_param SERVER_NAME $server_name; + + # PHP only, required if PHP was built with --enable-force-cgi-redirect + fastcgi_param REDIRECT_STATUS 200; ++ ++# httpoxy mitigation (https://httpoxy.org/ https://www.nginx.com/blog/?p=41962) ++fastcgi_param HTTP_PROXY ""; +diff --git a/conf/scgi_params b/conf/scgi_params +index 6d4ce4f..a9da34f 100644 +--- a/conf/scgi_params ++++ b/conf/scgi_params +@@ -15,3 +15,6 @@ scgi_param REMOTE_ADDR $remote_addr; + scgi_param REMOTE_PORT $remote_port; + scgi_param SERVER_PORT $server_port; + scgi_param SERVER_NAME $server_name; ++ ++# httpoxy mitigation (https://httpoxy.org/ https://www.nginx.com/blog/?p=41962) ++scgi_param HTTP_PROXY ""; +diff --git a/conf/uwsgi_params b/conf/uwsgi_params +index 09c732c..9d67d3d 100644 +--- a/conf/uwsgi_params ++++ b/conf/uwsgi_params +@@ -15,3 +15,6 @@ uwsgi_param REMOTE_ADDR $remote_addr; + uwsgi_param REMOTE_PORT $remote_port; + uwsgi_param SERVER_PORT $server_port; + uwsgi_param SERVER_NAME $server_name; ++ ++# httpoxy mitigation (https://httpoxy.org/ https://www.nginx.com/blog/?p=41962) ++uwsgi_param HTTP_PROXY ""; diff --git a/www-servers/nginx/files/nginx.conf-r2 b/www-servers/nginx/files/nginx.conf-r2 new file mode 100644 index 000000000000..917c6c1700fb --- /dev/null +++ b/www-servers/nginx/files/nginx.conf-r2 @@ -0,0 +1,69 @@ +user nginx nginx; +worker_processes 1; + +error_log /var/log/nginx/error_log info; + +events { + worker_connections 1024; + use epoll; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main + '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $bytes_sent ' + '"$http_referer" "$http_user_agent" ' + '"$gzip_ratio"'; + + client_header_timeout 10m; + client_body_timeout 10m; + send_timeout 10m; + + connection_pool_size 256; + client_header_buffer_size 1k; + large_client_header_buffers 4 2k; + request_pool_size 4k; + + gzip off; + + output_buffers 1 32k; + postpone_output 1460; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + + keepalive_timeout 75 20; + + ignore_invalid_headers on; + + index index.html; + + server { + listen 127.0.0.1; + server_name localhost; + + access_log /var/log/nginx/localhost.access_log main; + error_log /var/log/nginx/localhost.error_log info; + + root /var/www/localhost/htdocs; + } + + # SSL example + #server { + # listen 127.0.0.1:443; + # server_name localhost; + + # ssl on; + # ssl_certificate /etc/ssl/nginx/nginx.pem; + # ssl_certificate_key /etc/ssl/nginx/nginx.key; + + # access_log /var/log/nginx/localhost.ssl_access_log main; + # error_log /var/log/nginx/localhost.ssl_error_log info; + + # root /var/www/localhost/htdocs; + #} +} diff --git a/www-servers/nginx/files/nginx.confd b/www-servers/nginx/files/nginx.confd new file mode 100644 index 000000000000..f4b804375e92 --- /dev/null +++ b/www-servers/nginx/files/nginx.confd @@ -0,0 +1,32 @@ +# /etc/conf.d/nginx + +# Configuration file +#NGINX_CONFIGFILE="/etc/nginx/nginx.conf" + +# PID file +# If you should ever change this, remember to update +# "/etc/logrotate.d/nginx", too. +#NGINX_PIDFILE="/run/nginx.pid" + +# User to run nginx as +# If you should ever change this, make sure this user has +# execution permission on any of your log directories +# (/var/log/nginx per default) but do NOT forget other log directories +# one of your vhost(s) maybe using or logging after logrotation will +# be broken). +#NGINX_USER="nginx" + +# Group to run nginx as +# See the note above regarding NGINX_USER. +#NGINX_GROUP="nginx" + +# You can use this configuration option to pass additional options to the +# start-stop-daemon, see start-stop-daemon(8) for more details. +# Per default we wait 1000ms after we have started the service to ensure +# that the daemon is really up and running. +#NGINX_SSDARGS="--wait 1000" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (60 + 5 seconds +# per default) when you are stopping the service. +#NGINX_TERMTIMEOUT="TERM/60/KILL/5" diff --git a/www-servers/nginx/files/nginx.initd-r4 b/www-servers/nginx/files/nginx.initd-r4 new file mode 100644 index 000000000000..31f79baa099b --- /dev/null +++ b/www-servers/nginx/files/nginx.initd-r4 @@ -0,0 +1,92 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configtest" +extra_started_commands="upgrade reload" + +description="Robust, small and high performance http and reverse proxy server" +description_configtest="Run nginx' internal config check." +description_upgrade="Upgrade the nginx binary without losing connections." +description_reload="Reload the nginx configuration without losing connections." + +NGINX_CONFIGFILE=${NGINX_CONFIGFILE:-/etc/nginx/nginx.conf} + +command="/usr/sbin/nginx" +command_args="-c \"${NGINX_CONFIGFILE}\"" +start_stop_daemon_args=${NGINX_SSDARGS:-"--wait 1000"} +pidfile=${NGINX_PIDFILE:-/run/nginx.pid} +user=${NGINX_USER:-nginx} +group=${NGINX_GROUP:-nginx} +retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"} + +depend() { + need net + use dns logger netmount +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + configtest || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi +} + +stop_post() { + rm -f ${pidfile} +} + +reload() { + configtest || return 1 + ebegin "Refreshing nginx' configuration" + start-stop-daemon --signal SIGHUP --pidfile "${pidfile}" + eend $? "Failed to reload nginx" +} + +upgrade() { + configtest || return 1 + ebegin "Upgrading nginx" + + einfo "Sending USR2 to old binary" + start-stop-daemon --signal SIGUSR2 --pidfile "${pidfile}" + + einfo "Sleeping 3 seconds before pid-files checking" + sleep 3 + + if [ ! -f "${pidfile}.oldbin" ]; then + eerror "File with old pid not found" + return 1 + fi + + if [ ! -f "${pidfile}" ]; then + eerror "New binary failed to start" + return 1 + fi + + einfo "Sleeping 3 seconds before WINCH" + sleep 3 + # Cannot send "WINCH" using start-stop-daemon yet, https://bugs.gentoo.org/604986 + kill -WINCH $(cat "${pidfile}.oldbin") + + einfo "Sending QUIT to old binary" + start-stop-daemon --signal SIGQUIT --pidfile "${pidfile}.oldbin" + + einfo "Upgrade completed" + eend $? "Upgrade failed" +} + +configtest() { + ebegin "Checking nginx' configuration" + ${command} -c "${NGINX_CONFIGFILE}" -t -q + + if [ $? -ne 0 ]; then + ${command} -c "${NGINX_CONFIGFILE}" -t + fi + + eend $? "failed, please correct errors above" +} diff --git a/www-servers/nginx/files/nginx.logrotate-r1 b/www-servers/nginx/files/nginx.logrotate-r1 new file mode 100644 index 000000000000..bc9d87a09a91 --- /dev/null +++ b/www-servers/nginx/files/nginx.logrotate-r1 @@ -0,0 +1,11 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +/var/log/nginx/*_log { + missingok + delaycompress + sharedscripts + postrotate + test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid` + endscript +} diff --git a/www-servers/nginx/files/nginx.service-r1 b/www-servers/nginx/files/nginx.service-r1 new file mode 100644 index 000000000000..797c7edffafa --- /dev/null +++ b/www-servers/nginx/files/nginx.service-r1 @@ -0,0 +1,14 @@ +[Unit] +Description=The nginx HTTP and reverse proxy server +After=network.target remote-fs.target nss-lookup.target + +[Service] +Type=forking +PIDFile=/run/nginx.pid +ExecStartPre=/usr/sbin/nginx -t +ExecStart=/usr/sbin/nginx +ExecReload=/bin/kill -HUP $MAINPID +ExecStop=/bin/kill -QUIT $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/nginx/metadata.xml b/www-servers/nginx/metadata.xml new file mode 100644 index 000000000000..2721de505ade --- /dev/null +++ b/www-servers/nginx/metadata.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>whissi@gentoo.org</email> + <name>Thomas Deutschmann</name> + </maintainer> + <maintainer type="person"> + <email>dev-zero@gentoo.org</email> + <name>Tiziano Müller</name> + </maintainer> + <maintainer type="person"> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Co-maintainer, CC on bugs.</description> + </maintainer> + <use> + <flag name="aio">Enables file AIO support</flag> + <flag name="http">Enable HTTP core support</flag> + <flag name="http2">Enable HTTP2 module support</flag> + <flag name="http-cache">Enable HTTP cache support</flag> + <flag name="libatomic">Use libatomic instead of builtin atomic operations</flag> + <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg> for lua support when building the lua http module.</flag> + <flag name="pcre-jit">Enable JIT for pcre</flag> + <flag name="ssl">Enable HTTPS module for http. Enable SSL/TLS support for POP3/IMAP/SMTP for mail.</flag> + <flag name="rtmp">NGINX-based Media Streaming Server</flag> + </use> + <upstream> + <changelog>http://nginx.org/en/CHANGES</changelog> + <remote-id type="github">openresty/memc-nginx-module</remote-id> + <remote-id type="bitbucket">nginx-goodies/nginx-sticky-module-ng</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/nginx/nginx-1.12.1.ebuild b/www-servers/nginx/nginx-1.12.1.ebuild new file mode 100644 index 000000000000..5c7b643f4370 --- /dev/null +++ b/www-servers/nginx/nginx-1.12.1.ebuild @@ -0,0 +1,1015 @@ +# Copyright 1999-2017 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.1" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" + +# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.10.8" +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz" +HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" + +# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) +HTTP_AUTH_PAM_MODULE_PV="1.5.1" +HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" +HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" +HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" + +# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) +HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0-10-gf3bdb7b" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.55.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.0.3" +HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" +HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" +HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" + +# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) +HTTP_ECHO_MODULE_PV="0.60" +HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" +HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" +HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" + +# mod_security for nginx (https://modsecurity.org/, Apache-2.0) +# keep the MODULE_P here consistent with upstream to avoid tarball duplication +HTTP_SECURITY_MODULE_PV="2.9.1" +HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" +HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" +HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" + +# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) +HTTP_PUSH_STREAM_MODULE_PV="0.5.2" +HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" +HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" +HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" + +# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) +HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" +HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" +HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" +HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" + +# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) +HTTP_MOGILEFS_MODULE_PV="1.0.4" +HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" +HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" +HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" + +# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) +HTTP_MEMC_MODULE_PV="0.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_echo; then + cd "${HTTP_ECHO_MODULE_WD}" || die + eapply "${FILESDIR}"/http_echo-nginx-1.11.11+.patch + cd "${S}" || die + fi + + if use nginx_modules_http_upstream_check; then + #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_lua; then + cd "${HTTP_LUA_MODULE_WD}" || die + eapply -p1 "${FILESDIR}"/http_lua_nginx-1.11.11+-r1.patch + cd "${S}" || die + sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die + fi + + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + eapply "${FILESDIR}"/http_security-pr_1158.patch + eapply "${FILESDIR}"/http_security-pr_1373.patch + + eautoreconf + + if use luajit ; then + sed -i \ + -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \ + configure || die + fi + + cd "${S}" || die + fi + + if use nginx_modules_http_upload_progress; then + cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die + eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.patch + cd "${S}" || die + fi + + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die + + # don't install to /etc/nginx/ if not in use + local module + for module in fastcgi scgi uwsgi ; do + if ! use nginx_modules_http_${module}; then + sed -i -e "/${module}/d" auto/install || die + fi + done + + eapply_user +} + +src_configure() { + # mod_security needs to generate nginx/modsecurity/config before including it + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + ./configure \ + --enable-standalone-module \ + --disable-mlogc \ + --with-ssdeep=no \ + $(use_enable pcre-jit) \ + $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" + + cd "${S}" || die + fi + + local myconf=() http_enabled= mail_enabled= stream_enabled= + + use aio && myconf+=( --with-file-aio ) + use debug && myconf+=( --with-debug ) + use http2 && myconf+=( --with-http_v2_module ) + use libatomic && myconf+=( --with-libatomic ) + use pcre && myconf+=( --with-pcre ) + use pcre-jit && myconf+=( --with-pcre-jit ) + use threads && myconf+=( --with-threads ) + + # HTTP modules + for mod in $NGINX_MODULES_STD; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + else + myconf+=( --without-http_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_OPT; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + myconf+=( --with-http_${mod}_module ) + fi + done + + if use nginx_modules_http_fastcgi; then + myconf+=( --with-http_realip_module ) + fi + + # third-party modules + if use nginx_modules_http_upload_progress; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} ) + fi + + if use nginx_modules_http_headers_more; then + http_enabled=1 + myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} ) + fi + + if use nginx_modules_http_cache_purge; then + http_enabled=1 + myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} ) + fi + + if use nginx_modules_http_slowfs_cache; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} ) + fi + + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} ) + fi + + if use nginx_modules_http_lua; then + http_enabled=1 + if use luajit; then + export LUAJIT_LIB=$(pkg-config --variable libdir luajit) + export LUAJIT_INC=$(pkg-config --variable includedir luajit) + else + export LUA_LIB=$(pkg-config --variable libdir lua) + export LUA_INC=$(pkg-config --variable includedir lua) + fi + myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} ) + myconf+=( --add-module=${HTTP_LUA_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_pam; then + http_enabled=1 + myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} ) + fi + + if use nginx_modules_http_upstream_check; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} ) + fi + + if use nginx_modules_http_metrics; then + http_enabled=1 + myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} ) + fi + + if use nginx_modules_http_naxsi ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} ) + fi + + if use rtmp ; then + http_enabled=1 + myconf+=( --add-module=${RTMP_MODULE_WD} ) + fi + + if use nginx_modules_http_dav_ext ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} ) + fi + + if use nginx_modules_http_echo ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} ) + fi + + if use nginx_modules_http_security ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity ) + fi + + if use nginx_modules_http_push_stream ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) + fi + + if use nginx_modules_http_sticky ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) + fi + + if use nginx_modules_http_mogilefs ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) + fi + + if use nginx_modules_http_memc ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_ldap; then + http_enabled=1 + myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) + fi + + if use http || use http-cache || use http2; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=( --without-http-cache ) + use ssl && myconf+=( --with-http_ssl_module ) + else + myconf+=( --without-http --without-http-cache ) + fi + + # Stream modules + for mod in $NGINX_MODULES_STREAM_STD; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + else + myconf+=( --without-stream_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_STREAM_OPT; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + myconf+=( --with-stream_${mod}_module ) + fi + done + + if [ $stream_enabled ]; then + myconf+=( --with-stream ) + use ssl && myconf+=( --with-stream_ssl_module ) + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=( --without-mail_${mod}_module ) + fi + done + + if [ $mail_enabled ]; then + myconf+=( --with-mail ) + use ssl && myconf+=( --with-mail_ssl_module ) + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=( --add-module=${mod} ) + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export CC + + if ! use prefix; then + myconf+=( --user=${PN} ) + myconf+=( --group=${PN} ) + fi + + local WITHOUT_IPV6= + if ! use ipv6; then + WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" + fi + + ./configure \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/run/${PN}.pid \ + --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ + --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \ + --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ + --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ + --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ + --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ + --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ + --with-compat \ + "${myconf[@]}" || die "configure failed" + + # A purely cosmetic change that makes nginx -V more readable. This can be + # good if people outside the gentoo community would troubleshoot and + # question the users setup. + sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die +} + +src_compile() { + use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D%/}" install + + cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die + + newinitd "${FILESDIR}"/nginx.initd-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 + 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.13.3.ebuild b/www-servers/nginx/nginx-1.13.3.ebuild new file mode 100644 index 000000000000..95f97cf6a402 --- /dev/null +++ b/www-servers/nginx/nginx-1.13.3.ebuild @@ -0,0 +1,1015 @@ +# Copyright 1999-2017 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.1" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" + +# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.10.8" +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz" +HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" + +# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) +HTTP_AUTH_PAM_MODULE_PV="1.5.1" +HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" +HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" +HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" + +# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) +HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0-10-gf3bdb7b" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.55.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.0.3" +HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" +HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" +HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" + +# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) +HTTP_ECHO_MODULE_PV="0.60" +HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" +HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" +HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" + +# mod_security for nginx (https://modsecurity.org/, Apache-2.0) +# keep the MODULE_P here consistent with upstream to avoid tarball duplication +HTTP_SECURITY_MODULE_PV="2.9.1" +HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" +HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" +HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" + +# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) +HTTP_PUSH_STREAM_MODULE_PV="0.5.2" +HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" +HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" +HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" + +# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) +HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" +HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" +HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" +HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" + +# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) +HTTP_MOGILEFS_MODULE_PV="1.0.4" +HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" +HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" +HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" + +# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) +HTTP_MEMC_MODULE_PV="0.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="mainline" +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:0" +DEPEND="${CDEPEND} + nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} ) + arm? ( dev-libs/libatomic_ops ) + libatomic? ( dev-libs/libatomic_ops )" +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" + +REQUIRED_USE="pcre-jit? ( pcre ) + nginx_modules_http_lua? ( nginx_modules_http_rewrite ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) + nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) + nginx_modules_http_security? ( pcre ) + nginx_modules_http_push_stream? ( ssl )" + +pkg_setup() { + NGINX_HOME="/var/lib/nginx" + NGINX_HOME_TMP="${NGINX_HOME}/tmp" + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi + + if use nginx_modules_http_mogilefs && use threads; then + eerror "mogilefs won't compile with threads support." + eerror "Please disable either flag and try again." + die "Can't compile mogilefs with threads support" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" + eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" + + if use nginx_modules_http_echo; then + cd "${HTTP_ECHO_MODULE_WD}" || die + eapply "${FILESDIR}"/http_echo-nginx-1.11.11+.patch + cd "${S}" || die + fi + + if use nginx_modules_http_upstream_check; then + #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_lua; then + cd "${HTTP_LUA_MODULE_WD}" || die + eapply -p1 "${FILESDIR}"/http_lua_nginx-1.11.11+-r1.patch + cd "${S}" || die + sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die + fi + + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + eapply "${FILESDIR}"/http_security-pr_1158.patch + eapply "${FILESDIR}"/http_security-pr_1373.patch + + eautoreconf + + if use luajit ; then + sed -i \ + -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \ + configure || die + fi + + cd "${S}" || die + fi + + if use nginx_modules_http_upload_progress; then + cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die + eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.patch + cd "${S}" || die + fi + + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die + + # don't install to /etc/nginx/ if not in use + local module + for module in fastcgi scgi uwsgi ; do + if ! use nginx_modules_http_${module}; then + sed -i -e "/${module}/d" auto/install || die + fi + done + + eapply_user +} + +src_configure() { + # mod_security needs to generate nginx/modsecurity/config before including it + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + ./configure \ + --enable-standalone-module \ + --disable-mlogc \ + --with-ssdeep=no \ + $(use_enable pcre-jit) \ + $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" + + cd "${S}" || die + fi + + local myconf=() http_enabled= mail_enabled= stream_enabled= + + use aio && myconf+=( --with-file-aio ) + use debug && myconf+=( --with-debug ) + use http2 && myconf+=( --with-http_v2_module ) + use libatomic && myconf+=( --with-libatomic ) + use pcre && myconf+=( --with-pcre ) + use pcre-jit && myconf+=( --with-pcre-jit ) + use threads && myconf+=( --with-threads ) + + # HTTP modules + for mod in $NGINX_MODULES_STD; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + else + myconf+=( --without-http_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_OPT; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + myconf+=( --with-http_${mod}_module ) + fi + done + + if use nginx_modules_http_fastcgi; then + myconf+=( --with-http_realip_module ) + fi + + # third-party modules + if use nginx_modules_http_upload_progress; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} ) + fi + + if use nginx_modules_http_headers_more; then + http_enabled=1 + myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} ) + fi + + if use nginx_modules_http_cache_purge; then + http_enabled=1 + myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} ) + fi + + if use nginx_modules_http_slowfs_cache; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} ) + fi + + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} ) + fi + + if use nginx_modules_http_lua; then + http_enabled=1 + if use luajit; then + export LUAJIT_LIB=$(pkg-config --variable libdir luajit) + export LUAJIT_INC=$(pkg-config --variable includedir luajit) + else + export LUA_LIB=$(pkg-config --variable libdir lua) + export LUA_INC=$(pkg-config --variable includedir lua) + fi + myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} ) + myconf+=( --add-module=${HTTP_LUA_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_pam; then + http_enabled=1 + myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} ) + fi + + if use nginx_modules_http_upstream_check; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} ) + fi + + if use nginx_modules_http_metrics; then + http_enabled=1 + myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} ) + fi + + if use nginx_modules_http_naxsi ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} ) + fi + + if use rtmp ; then + http_enabled=1 + myconf+=( --add-module=${RTMP_MODULE_WD} ) + fi + + if use nginx_modules_http_dav_ext ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} ) + fi + + if use nginx_modules_http_echo ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} ) + fi + + if use nginx_modules_http_security ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity ) + fi + + if use nginx_modules_http_push_stream ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) + fi + + if use nginx_modules_http_sticky ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) + fi + + if use nginx_modules_http_mogilefs ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) + fi + + if use nginx_modules_http_memc ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_ldap; then + http_enabled=1 + myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) + fi + + if use http || use http-cache || use http2; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=( --without-http-cache ) + use ssl && myconf+=( --with-http_ssl_module ) + else + myconf+=( --without-http --without-http-cache ) + fi + + # Stream modules + for mod in $NGINX_MODULES_STREAM_STD; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + else + myconf+=( --without-stream_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_STREAM_OPT; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + myconf+=( --with-stream_${mod}_module ) + fi + done + + if [ $stream_enabled ]; then + myconf+=( --with-stream ) + use ssl && myconf+=( --with-stream_ssl_module ) + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=( --without-mail_${mod}_module ) + fi + done + + if [ $mail_enabled ]; then + myconf+=( --with-mail ) + use ssl && myconf+=( --with-mail_ssl_module ) + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=( --add-module=${mod} ) + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export CC + + if ! use prefix; then + myconf+=( --user=${PN} ) + myconf+=( --group=${PN} ) + fi + + local WITHOUT_IPV6= + if ! use ipv6; then + WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" + fi + + ./configure \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/run/${PN}.pid \ + --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ + --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \ + --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ + --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ + --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ + --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ + --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ + --with-compat \ + "${myconf[@]}" || die "configure failed" + + # A purely cosmetic change that makes nginx -V more readable. This can be + # good if people outside the gentoo community would troubleshoot and + # question the users setup. + sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die +} + +src_compile() { + use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D%/}" install + + cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die + + newinitd "${FILESDIR}"/nginx.initd-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 + 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.13.4.ebuild b/www-servers/nginx/nginx-1.13.4.ebuild new file mode 100644 index 000000000000..fd6ca7601cf7 --- /dev/null +++ b/www-servers/nginx/nginx-1.13.4.ebuild @@ -0,0 +1,1000 @@ +# Copyright 1999-2017 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.1" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" + +# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.10.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="0.3.0-10-gf3bdb7b" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.55.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="mainline" +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 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_upload_progress + http_headers_more + http_cache_purge + http_slowfs_cache + http_fancyindex + http_lua + http_auth_pam + http_upstream_check + http_metrics + http_naxsi + http_dav_ext + http_echo + http_security + http_push_stream + http_sticky + http_mogilefs + http_memc + http_auth_ldap" + +IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +pcre + pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax" + +for mod in $NGINX_MODULES_STD; do + IUSE="${IUSE} +nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_OPT; do + IUSE="${IUSE} nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_STD; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_OPT; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_MAIL; do + IUSE="${IUSE} nginx_modules_mail_${mod}" +done + +for mod in $NGINX_MODULES_3RD; do + IUSE="${IUSE} nginx_modules_${mod}" +done + +# Add so we can warn users updating about config changes +# @TODO: jbergstroem: remove on next release series +IUSE="${IUSE} nginx_modules_http_spdy" + +CDEPEND=" + pcre? ( dev-libs/libpcre:= ) + pcre-jit? ( dev-libs/libpcre:=[jit] ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http2? ( + !libressl? ( >=dev-libs/openssl-1.0.1c:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http-cache? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_geoip? ( dev-libs/geoip ) + nginx_modules_http_gunzip? ( sys-libs/zlib ) + nginx_modules_http_gzip? ( sys-libs/zlib ) + nginx_modules_http_gzip_static? ( sys-libs/zlib ) + nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) + nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) + nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) + nginx_modules_http_secure_link? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) + nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) ) + nginx_modules_http_auth_pam? ( virtual/pam ) + nginx_modules_http_metrics? ( dev-libs/yajl:= ) + nginx_modules_http_dav_ext? ( dev-libs/expat ) + nginx_modules_http_security? ( + dev-libs/apr:= + dev-libs/apr-util:= + dev-libs/libxml2:= + net-misc/curl + www-servers/apache + ) + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nginx ) + !www-servers/nginx:0" +DEPEND="${CDEPEND} + nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} ) + arm? ( dev-libs/libatomic_ops ) + libatomic? ( dev-libs/libatomic_ops )" +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" + +REQUIRED_USE="pcre-jit? ( pcre ) + nginx_modules_http_lua? ( nginx_modules_http_rewrite ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) + nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) + nginx_modules_http_security? ( pcre ) + nginx_modules_http_push_stream? ( ssl )" + +pkg_setup() { + NGINX_HOME="/var/lib/nginx" + NGINX_HOME_TMP="${NGINX_HOME}/tmp" + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi + + if use nginx_modules_http_mogilefs && use threads; then + eerror "mogilefs won't compile with threads support." + eerror "Please disable either flag and try again." + die "Can't compile mogilefs with threads support" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" + eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" + + if use nginx_modules_http_upstream_check; then + #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_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.13.5.ebuild b/www-servers/nginx/nginx-1.13.5.ebuild new file mode 100644 index 000000000000..96e741f7f538 --- /dev/null +++ b/www-servers/nginx/nginx-1.13.5.ebuild @@ -0,0 +1,1000 @@ +# Copyright 1999-2017 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="0.3.0-10-gf3bdb7b" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306c1d021ee76da2f5" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.55.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="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 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_upload_progress + http_headers_more + http_cache_purge + http_slowfs_cache + http_fancyindex + http_lua + http_auth_pam + http_upstream_check + http_metrics + http_naxsi + http_dav_ext + http_echo + http_security + http_push_stream + http_sticky + http_mogilefs + http_memc + http_auth_ldap" + +IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +pcre + pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax" + +for mod in $NGINX_MODULES_STD; do + IUSE="${IUSE} +nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_OPT; do + IUSE="${IUSE} nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_STD; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_OPT; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_MAIL; do + IUSE="${IUSE} nginx_modules_mail_${mod}" +done + +for mod in $NGINX_MODULES_3RD; do + IUSE="${IUSE} nginx_modules_${mod}" +done + +# Add so we can warn users updating about config changes +# @TODO: jbergstroem: remove on next release series +IUSE="${IUSE} nginx_modules_http_spdy" + +CDEPEND=" + pcre? ( dev-libs/libpcre:= ) + pcre-jit? ( dev-libs/libpcre:=[jit] ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http2? ( + !libressl? ( >=dev-libs/openssl-1.0.1c:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http-cache? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_geoip? ( dev-libs/geoip ) + nginx_modules_http_gunzip? ( sys-libs/zlib ) + nginx_modules_http_gzip? ( sys-libs/zlib ) + nginx_modules_http_gzip_static? ( sys-libs/zlib ) + nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) + nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) + nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) + nginx_modules_http_secure_link? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) + nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) ) + nginx_modules_http_auth_pam? ( virtual/pam ) + nginx_modules_http_metrics? ( dev-libs/yajl:= ) + nginx_modules_http_dav_ext? ( dev-libs/expat ) + nginx_modules_http_security? ( + dev-libs/apr:= + dev-libs/apr-util:= + dev-libs/libxml2:= + net-misc/curl + www-servers/apache + ) + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nginx ) + !www-servers/nginx:0" +DEPEND="${CDEPEND} + nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} ) + arm? ( dev-libs/libatomic_ops ) + libatomic? ( dev-libs/libatomic_ops )" +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" + +REQUIRED_USE="pcre-jit? ( pcre ) + nginx_modules_http_lua? ( nginx_modules_http_rewrite ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) + nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) + nginx_modules_http_security? ( pcre ) + nginx_modules_http_push_stream? ( ssl )" + +pkg_setup() { + NGINX_HOME="/var/lib/nginx" + NGINX_HOME_TMP="${NGINX_HOME}/tmp" + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi + + if use nginx_modules_http_mogilefs && use threads; then + eerror "mogilefs won't compile with threads support." + eerror "Please disable either flag and try again." + die "Can't compile mogilefs with threads support" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" + eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" + + if use nginx_modules_http_upstream_check; then + #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_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/ocsigenserver/Manifest b/www-servers/ocsigenserver/Manifest new file mode 100644 index 000000000000..4b203cf3a30b --- /dev/null +++ b/www-servers/ocsigenserver/Manifest @@ -0,0 +1,9 @@ +AUX lwt3.patch 2699 SHA256 b98b0cfc8382de8c6a48d668dc136e94469fda37582c1368bcc94cd4938e27e6 SHA512 cd628dd3ec62a23d8f57eb49e20f748725ca7a120e8ebecdbfda024235dc5a003c2c01d21f61061e717f1642038c8d02be4af2b1da1c29da56ce62e4a18a80ab WHIRLPOOL dd20dd90adc531a53ae09360b8318b283ddcac273a5d3c18c8a0a9d5b697a240db15ae5cc445f7ef61680c6f8f827012fb411c0d5e24f345330121fd3047aedf +AUX ocsigenserver.confd 491 SHA256 c41f56ac7d4e0b0920d4a561ab855da20e1369c17fa5af49bf37e38e64d1fe04 SHA512 c48a502565eb0dbba52508227cfd45d1aa6cb4db04a7ad16af714eb7d7ddec7699a3bbb5b8c188a34d159c4c98c9961f862abf34cd0576341c4d2069c3b371ec WHIRLPOOL fae02a7ebd2e553c3e04752e119cb914505df178f6e262c1082a565c4ae07c9baced0bf28e829a1ae3ae20b5834d1559a68a5e69d830fd12d6ea656745b0b4f9 +AUX ocsigenserver.initd 1108 SHA256 e8d374303f964da1930e51f4a7c1c593b15290176c9627b5fef14bf84ae2682b SHA512 087fc49090e39c5b3f554119edbf785bfa12fe3d1b95561fa4a1e08da28bc16efba0d1b0d6ead5b39bf39390f678f63ccd2d637b53ad74a2a7b12e6c3b2c73c4 WHIRLPOOL bbc04ea7fd3f55e181a3df55f3e97b7ad76768a4f07e022ec1d688e43d4110cd0265d60aa815f106b65a15bda32f1c1ab6738c0d64b3b4fa596341b7bf138b2d +DIST ocsigenserver-2.8.tar.gz 1265240 SHA256 5e9766089c23397a9af60642d80f6d9a2be722fe9f426f230ef1b41ec5c684ec SHA512 80d5125a93239c73756b03a0f50d83e691810f93a15525daef2f7ccd69279e348f03486c26319a9511c1a746f375317082a89ba37ce0ba22872d6db7d3fddf1b WHIRLPOOL d56d62e7effc94e5e5477e7b2d8de0733a74348a10f14473e47314d4fdcdce0f4ff47458e4a817e43de4269b72a6bd1171a4eb1570d7ef4c7e86a8c02e7afe1d +EBUILD ocsigenserver-2.8.ebuild 2279 SHA256 4da77dda5cf11612cb3ec278810bd43f409987ef68280c25432befacc023bad2 SHA512 8ce16324296163724806ece8de74fc3dabe950b7d1cb53d0a39d53e1b772a718d78b227819b9c2b6926629bd52bc61a6be4fbdd055de444b87e128e368c4d996 WHIRLPOOL 6afb7e211e5157410c227e6927feb915de480870fca6fde2936cfb65eb4add55f88b5f85f53201448b126857f614d09e2894d33b4152558205e42cb74031cdd0 +EBUILD ocsigenserver-9999.ebuild 2279 SHA256 4da77dda5cf11612cb3ec278810bd43f409987ef68280c25432befacc023bad2 SHA512 8ce16324296163724806ece8de74fc3dabe950b7d1cb53d0a39d53e1b772a718d78b227819b9c2b6926629bd52bc61a6be4fbdd055de444b87e128e368c4d996 WHIRLPOOL 6afb7e211e5157410c227e6927feb915de480870fca6fde2936cfb65eb4add55f88b5f85f53201448b126857f614d09e2894d33b4152558205e42cb74031cdd0 +MISC ChangeLog 5022 SHA256 b91991795f4f2f83c20bd05c74549a0ee3e4e031919416ca3235814d37cb6fc1 SHA512 4909a8f8c4bec988cabf24b9348fbb6dfc6339503ab1c1d5ecef21f931221ea1318e5710d77f6d970ab2040595f91c7b5b8f52942dcf03620166dc1effc383e4 WHIRLPOOL 796d9bf8bfdf3197b04619451566ffb4b86366cae8b4f430d2a8288522b0371049dfb605f49974b0a9e8c08c5a51088643a72117810b138a89804f98baab4287 +MISC ChangeLog-2015 2726 SHA256 789587469f8d505db3936602bf657dd2cff3a741813edd5371733fcb88a7addb SHA512 41c1f6f65e0e800442716d45b84efa007c4751fb8fe6366df34ef8f5d7f2db06e23756127a255ce4c3fb5e918b486fc33180d070ca3c5d7b46b4a6b3c664929a WHIRLPOOL 24310cb39b71da2399d0c75efdebb3dd5def4f8ff9e1f7ba03e75a1b46c3e42380be45fc718b59b16eaa54672cafd220759116d773e6c0644a99f8ce8d2e9c30 +MISC metadata.xml 333 SHA256 0c2bffe91f748df7c6e399de453714f5eb52387b93a5974d88f8096391680d4d SHA512 70cbc55fce7942753a6d1c2e2959c27b9834a18918b77cc208c14121c7fcc16d93b8daaaf5f27fe7023d10f1b0848d1dcf7c847f452022080b356c6e9c6d9f55 WHIRLPOOL 53f5b9f511df65bf7d7d3f1c1291751c1ecd2766b6acccefa01ac9ec27e06e0e14c03f3f429acecd2a79e02a7c14a8ab0cb01e87ceb1cf0893da07920795e24b diff --git a/www-servers/ocsigenserver/files/lwt3.patch b/www-servers/ocsigenserver/files/lwt3.patch new file mode 100644 index 000000000000..3fb6b9d8e7a6 --- /dev/null +++ b/www-servers/ocsigenserver/files/lwt3.patch @@ -0,0 +1,78 @@ +Index: ocsigenserver-2.8/Makefile.options +=================================================================== +--- ocsigenserver-2.8.orig/Makefile.options ++++ ocsigenserver-2.8/Makefile.options +@@ -30,7 +30,7 @@ endif + + BASE_PACKAGE := lwt ipaddr bytes + +-SERVER_PACKAGE := lwt.ssl \ ++SERVER_PACKAGE := lwt_ssl \ + bytes \ + ${LWT_PREEMPTIVE_PACKAGE} \ + ipaddr \ +Index: ocsigenserver-2.8/configure +=================================================================== +--- ocsigenserver-2.8.orig/configure ++++ ocsigenserver-2.8/configure +@@ -410,8 +410,8 @@ check_library ssl "See: http://sourcefor + + check_library lwt "See: http://ocsigen.org/lwt" + check_library lwt.unix "Missing support for 'unix' in lwt." +-check_library lwt.react "Missing support for 'react' in lwt." +-check_library lwt.ssl "Missing support for 'ssl' in lwt." ++check_library lwt_react "Missing support for 'react' in lwt." ++check_library lwt_ssl "Missing support for 'ssl' in lwt." + check_library lwt.preemptive "Missing support for 'preemptive' in lwt." + + check_library netstring \ +Index: ocsigenserver-2.8/src/extensions/Makefile +=================================================================== +--- ocsigenserver-2.8.orig/src/extensions/Makefile ++++ ocsigenserver-2.8/src/extensions/Makefile +@@ -4,8 +4,8 @@ PACKAGE := \ + bytes \ + lwt.unix \ + ipaddr \ +- lwt.ssl \ +- lwt.react \ ++ lwt_ssl \ ++ lwt_react \ + netstring \ + netstring-pcre \ + tyxml.parser +Index: ocsigenserver-2.8/src/files/META.in +=================================================================== +--- ocsigenserver-2.8.orig/src/files/META.in ++++ ocsigenserver-2.8/src/files/META.in +@@ -37,7 +37,7 @@ package "baselib" ( + ) + + package "http" ( +- requires = "%%NAME%%.baselib,lwt.ssl,tyxml" ++ requires = "%%NAME%%.baselib,lwt_ssl,tyxml" + version = "[distributed with Ocsigen server]" + description = "HTTP library for Ocsigen server" + archive(byte) = "http.cma" +@@ -188,7 +188,7 @@ package "ext" ( + + package "comet" ( + exists_if = "ocsigen_comet.cmo,ocsigen_comet.cmx" +- requires = "ocsigenserver,lwt.react" ++ requires = "ocsigenserver,lwt_react" + version = "[distributed with Ocsigen server]" + description = "Comet server-to-client communication" + archive(byte) = "ocsigen_comet.cmo" +Index: ocsigenserver-2.8/src/http/Makefile +=================================================================== +--- ocsigenserver-2.8.orig/src/http/Makefile ++++ ocsigenserver-2.8/src/http/Makefile +@@ -3,7 +3,7 @@ PACKAGE := \ + bytes \ + netstring \ + netstring-pcre \ +- lwt.ssl \ ++ lwt_ssl \ + tyxml + + LIBS := -I ../baselib ${addprefix -package ,${PACKAGE}} diff --git a/www-servers/ocsigenserver/files/ocsigenserver.confd b/www-servers/ocsigenserver/files/ocsigenserver.confd new file mode 100644 index 000000000000..70638b7c8709 --- /dev/null +++ b/www-servers/ocsigenserver/files/ocsigenserver.confd @@ -0,0 +1,25 @@ +# /etc/conf.d/ocsigenserver : config file for /etc/init.d/ocsigenserver + +# Path for the ocsigen binary (add opt for native executable) + +#DAEMON=/usr/bin/ocsigenserver.opt +DAEMON=/usr/bin/ocsigenserver + +# Name for ocsigen daemon + +NAME=ocsigenserver + +# Locstion of Ocsigen config file + +CONF=/etc/$NAME/ocsigenserver.conf + +# PID file location + +PIDFILE=/var/run/$NAME.pid + +# Add here any additional aptions for ocsigen + +OCSIGEN_OPTS="" + +# Command pipe +COMMANDPIPE=/var/run/ocsigenserver_command diff --git a/www-servers/ocsigenserver/files/ocsigenserver.initd b/www-servers/ocsigenserver/files/ocsigenserver.initd new file mode 100644 index 000000000000..57d3343159f5 --- /dev/null +++ b/www-servers/ocsigenserver/files/ocsigenserver.initd @@ -0,0 +1,59 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="depend checkconfig reload" + +depend() { + need net + use logger + after bootmist +} + + +checkconfig() { + if [ ! -f "$DAEMON" ] ; then + ewarn "Unable to find $DAEMON" + return 1 + fi + if [ ! -f "$CONF" ] ; then + ewarn $CONF " does not exist." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Creating command pipe (${COMMANDPIPE})" + mkfifo -m 660 "${COMMANDPIPE}" + chown ocsigenserver:ocsigenserver "${COMMANDPIPE}" + eend $? + + ebegin "Starting ocsigen" + start-stop-daemon --start --exec $DAEMON -- \ + --pidfile $PIDFILE \ + --daemon \ + $OCSIGEN_OPTS + eend $? +} + +stop() { + ebegin "Stopping ocsigen" + start-stop-daemon --stop --pidfile $PIDFILE + eend $? + ebegin "Removing command pipe (${COMMANDPIPE})" + rm -f "${COMMANDPIPE}" + eend $? +} + +reload() { + if [ ! -f "$PIDFILE" ] ; then + ewarn "$PIDFILE not found!!" + ewarn "Ocsigen is not running. Not reloading." + return 1 + fi + ebegin "Reloading ocsigen" + echo reload > /var/run/ocsigen_command + eend $? +} diff --git a/www-servers/ocsigenserver/metadata.xml b/www-servers/ocsigenserver/metadata.xml new file mode 100644 index 000000000000..f1c393459113 --- /dev/null +++ b/www-servers/ocsigenserver/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ml@gentoo.org</email> + <name>Gentoo ML Project</name> + </maintainer> + <upstream> + <remote-id type="github">ocsigen/ocsigenserver</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/ocsigenserver/ocsigenserver-2.8.ebuild b/www-servers/ocsigenserver/ocsigenserver-2.8.ebuild new file mode 100644 index 000000000000..6f80dda9a2fd --- /dev/null +++ b/www-servers/ocsigenserver/ocsigenserver-2.8.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib findlib user + +if [ "${PV#9999}" != "${PV}" ] ; then + inherit git-r3 + SRC_URI="" + EGIT_REPO_URI="https://github.com/ocsigen/ocsigenserver" + KEYWORDS="" +else + SRC_URI="https://github.com/ocsigen/ocsigenserver/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Ocaml-powered webserver and framework for dynamic web programming" +HOMEPAGE="http://www.ocsigen.org" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0/${PV}" +IUSE="debug doc dbm +ocamlopt +sqlite zlib postgres" +REQUIRED_USE="|| ( sqlite dbm postgres )" +RESTRICT="strip installsources" + +DEPEND=">=dev-ml/lwt-2.5.0:=[camlp4(+)] + dev-ml/lwt_react:= + dev-ml/lwt_ssl:= + >=dev-ml/react-0.9.3:= + zlib? ( >=dev-ml/camlzip-1.03-r1:= ) + dev-ml/cryptokit:= + >=dev-ml/ocamlnet-3.6:=[pcre] + >=dev-ml/pcre-ocaml-6.2.5:= + >=dev-ml/tyxml-4:=[camlp4(+)] + >=dev-lang/ocaml-3.12:=[ocamlopt?] + dev-ml/ocaml-ipaddr:= + postgres? ( dev-ml/pgocaml:=[camlp4(+)] ) + dbm? ( dev-ml/camldbm:= ) + sqlite? ( dev-ml/ocaml-sqlite3:= )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup ocsigenserver + enewuser ocsigenserver -1 -1 /var/www ocsigenserver +} + +src_prepare() { + epatch "${FILESDIR}/lwt3.patch" +} + +src_configure() { + sh configure \ + --prefix /usr \ + --temproot "${ED}" \ + --bindir /usr/bin \ + --docdir /usr/share/doc/${PF} \ + --mandir /usr/share/man/man1 \ + --libdir /usr/$(get_libdir)/ocaml \ + $(use_enable debug) \ + $(use_with zlib camlzip) \ + $(use_with sqlite) \ + $(use_with dbm) \ + $(use_with postgres pgsql) \ + --with-preempt \ + --ocsigen-group ocsigenserver \ + --ocsigen-user ocsigenserver \ + --name ocsigenserver \ + || die "Error : configure failed!" +} + +src_compile() { + if use ocamlopt; then + emake + else + emake byte + fi + use doc && emake doc +} + +src_install() { + findlib_src_preinst + if use ocamlopt; then + emake install + else + emake install.byte + fi + if use doc ; then + emake install.doc + fi + emake logrotate + + newinitd "${FILESDIR}"/ocsigenserver.initd ocsigenserver || die + newconfd "${FILESDIR}"/ocsigenserver.confd ocsigenserver || die + + dodoc README.md + + # We create it at runtime + rm -f "${ED}/var/run/ocsigenserver_command" || die +} diff --git a/www-servers/ocsigenserver/ocsigenserver-9999.ebuild b/www-servers/ocsigenserver/ocsigenserver-9999.ebuild new file mode 100644 index 000000000000..6f80dda9a2fd --- /dev/null +++ b/www-servers/ocsigenserver/ocsigenserver-9999.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib findlib user + +if [ "${PV#9999}" != "${PV}" ] ; then + inherit git-r3 + SRC_URI="" + EGIT_REPO_URI="https://github.com/ocsigen/ocsigenserver" + KEYWORDS="" +else + SRC_URI="https://github.com/ocsigen/ocsigenserver/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Ocaml-powered webserver and framework for dynamic web programming" +HOMEPAGE="http://www.ocsigen.org" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0/${PV}" +IUSE="debug doc dbm +ocamlopt +sqlite zlib postgres" +REQUIRED_USE="|| ( sqlite dbm postgres )" +RESTRICT="strip installsources" + +DEPEND=">=dev-ml/lwt-2.5.0:=[camlp4(+)] + dev-ml/lwt_react:= + dev-ml/lwt_ssl:= + >=dev-ml/react-0.9.3:= + zlib? ( >=dev-ml/camlzip-1.03-r1:= ) + dev-ml/cryptokit:= + >=dev-ml/ocamlnet-3.6:=[pcre] + >=dev-ml/pcre-ocaml-6.2.5:= + >=dev-ml/tyxml-4:=[camlp4(+)] + >=dev-lang/ocaml-3.12:=[ocamlopt?] + dev-ml/ocaml-ipaddr:= + postgres? ( dev-ml/pgocaml:=[camlp4(+)] ) + dbm? ( dev-ml/camldbm:= ) + sqlite? ( dev-ml/ocaml-sqlite3:= )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup ocsigenserver + enewuser ocsigenserver -1 -1 /var/www ocsigenserver +} + +src_prepare() { + epatch "${FILESDIR}/lwt3.patch" +} + +src_configure() { + sh configure \ + --prefix /usr \ + --temproot "${ED}" \ + --bindir /usr/bin \ + --docdir /usr/share/doc/${PF} \ + --mandir /usr/share/man/man1 \ + --libdir /usr/$(get_libdir)/ocaml \ + $(use_enable debug) \ + $(use_with zlib camlzip) \ + $(use_with sqlite) \ + $(use_with dbm) \ + $(use_with postgres pgsql) \ + --with-preempt \ + --ocsigen-group ocsigenserver \ + --ocsigen-user ocsigenserver \ + --name ocsigenserver \ + || die "Error : configure failed!" +} + +src_compile() { + if use ocamlopt; then + emake + else + emake byte + fi + use doc && emake doc +} + +src_install() { + findlib_src_preinst + if use ocamlopt; then + emake install + else + emake install.byte + fi + if use doc ; then + emake install.doc + fi + emake logrotate + + newinitd "${FILESDIR}"/ocsigenserver.initd ocsigenserver || die + newconfd "${FILESDIR}"/ocsigenserver.confd ocsigenserver || die + + dodoc README.md + + # We create it at runtime + rm -f "${ED}/var/run/ocsigenserver_command" || die +} diff --git a/www-servers/pathod/Manifest b/www-servers/pathod/Manifest new file mode 100644 index 000000000000..7643a8096e88 --- /dev/null +++ b/www-servers/pathod/Manifest @@ -0,0 +1,9 @@ +DIST pathod-0.10.tar.gz 245837 SHA256 54170dcb03b1e5d693be87c0c069c16f6a794b64f86c9abb96996b13f2382ebf SHA512 c096268cdd459ffaf2ced67699be57bdcdc51db271ce141734d4984795d045ef24a7301f18d67af9b48d802b5107d246ec891b5eed5dace52d0835c2c7dbb336 WHIRLPOOL 09aecc68e43f5948aaded63bbcc5c705f2584dbf3aba207ed24a3975586b6fd1ed860d73e364f8f37dd0addabd74b5d4fc65bc78656597d70e617dc27f79c68a +DIST pathod-0.11.1.tar.gz 271616 SHA256 69d91a494a8ac71e8d1e2c0cc7140fc52be0a04aa37f7fc8560ca3b168479058 SHA512 8fa4957bd7f25492a9db58eec7e83a67cd998bda17f93224435ef3f75ed6723bec96d24e20956069d148af3708d81f04d9089c2302d260d3ba95c1993ee0954e WHIRLPOOL 4120b9fa4471529201de98345be86cbbdd2cded9ca7d6dace51ea2bae47ea48e6e542367bd8594a4213982b2e5635c83cf9df3581e8496467fc56efdc20baff6 +DIST pathod-0.12.0.tar.gz 228515 SHA256 4c43a442f77dc1fae9bad8c22380661a80563c0d367e51772df7f37293bce001 SHA512 5273736b972670e009d24b610ff1e43d1296ae5e5a42e360fdd7ea3aa355016c02ceccd8b6d342e99b754b5fbd9f7beca92852607b9dd3af9d395128453fd0af WHIRLPOOL f32f917df02a11aa0f6fad02e15dcb0b3476aa00889747f1e29f389d6a727d2fb3c4c6a3ebb9eac2b8eba5d14065fd2bec17dbd427a927dd6af38ec1764af3b6 +EBUILD pathod-0.10.ebuild 687 SHA256 5256ad045f7d1167ea029d64eda41464703057729e1c1e737d3f80cf26661e50 SHA512 5c702931a50a9b1b8dc6def8297171eda11e23fbf5ed4e621ee4f21931d0efa943d378772d6fd2b087a0897f9af5930c48fcb76f30fa49d0f8f692f5401ca6b1 WHIRLPOOL 2d6721c7963aba9beabf0c05ac675655a652477e891aca5dea2e02a43e021245c4b43bf0c55953f2237a83b928bd86011c6b6918f52c6dd937f753f073de6c1c +EBUILD pathod-0.11.1.ebuild 866 SHA256 d40d6db19397f72ed8be7cb28e0e3c741d06ceb7c62de2de7adccd8204e41b16 SHA512 abce9113d3843705e5dc1cf372ca78935a685c47c90a51eda08d664a35e2bb9f50d33a3d900263b0b370d42e15f84cf2c004cdfe705d7f3f9f9e83800b5242bb WHIRLPOOL 0fb1f34825fbf95e6d03f7af11175397d11e51ab17d541d94caaf0dc05caa3be30de63010d83509a04e41f3d14d27694a81f21e7c5f552cbef198297712258c7 +EBUILD pathod-0.12.0.ebuild 859 SHA256 0f970209c33bfb543436c5825ae9eeaa307ccdd4cdcc422010c89624a2952553 SHA512 a9ba21b3c1e7a6ed37b34289785fc821165417dfd751e776124aaaa1e0544b70ea0f2e8b2318b4e8b30fa502f6f297a4cc59a833c7e7dc3dc438f1b6f1672ed3 WHIRLPOOL 0a442b3f539d86f41ea192ef0ebca6751cfa450a4a0be9c0fb9b3908c8c2cdcc9ba881ae43e6830a1a911ad452243dda78cf972dcc52dd8341db7073bd663d2b +MISC ChangeLog 2278 SHA256 64329daa84386a603aef71a71595e19c61cb57c489b42b03e94a9506ff7f2f59 SHA512 cdd213519b169d312aedbfe0c2803e661298beb2c6280ad83be1bb311a16f4f11ecc81b8dd6d50980c91c67cd525d26defb14abc47dc31c3d467bf01e6955313 WHIRLPOOL 3b405f136d5cc3d20b63bfdab247c8bbf4e2ec174935488e79fa06ebef62a8879296986f41f7f01b74962751a362115fcfb1ea4b13be10a58944adc1588b7550 +MISC ChangeLog-2015 1452 SHA256 0894364e9844aa93a4b418675748be882435f3e1c4a4f41efce369d09df0db76 SHA512 de60dfd13664f607087c7ce1dd9e4f9b72e527ea3e8ded5c705e08e557ad6cdc4af8c2a6794aa85a6e4c671322a3c41a201c61f2d95d5908a1604b15a6428cdf WHIRLPOOL 9833bb8fc1cd66e9e71bc485d900c3ea349c3b6188b8303fab346770fb10d214f974e71b9fa26140d15f0f29d6862ddd7520d7af6af6522cf5a63b467b011aa4 +MISC metadata.xml 315 SHA256 0ee8abccee02024be8453eb6e1625349d3de7bdfe8578e43012df870b74e0fe3 SHA512 b02fa957ae01e6f61b4b12d9f4a999963c0614046837f7eed5482424e37b3c6b6d0d4c0cb4cf02ec6b217c5c4b61f584f118d6f2d3d0cad85c8f4829c733696c WHIRLPOOL 818fa0cb701c738a460006b3b0a49fe3f9beec6f4ba80223ce6f77b2ffe6baf6badcb8019eafc6a49abfd4ed58a2bc9faf0980407962a4ddebe4f42cff5195d8 diff --git a/www-servers/pathod/metadata.xml b/www-servers/pathod/metadata.xml new file mode 100644 index 000000000000..68ff95d14148 --- /dev/null +++ b/www-servers/pathod/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <upstream> + <remote-id type="pypi">pathod</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/pathod/pathod-0.10.ebuild b/www-servers/pathod/pathod-0.10.ebuild new file mode 100644 index 000000000000..06b6884e12e1 --- /dev/null +++ b/www-servers/pathod/pathod-0.10.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="A collection of pathological tools for testing and torturing HTTP clients and servers" +HOMEPAGE="http://pathod.net/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=">=dev-python/netlib-${PV}[${PYTHON_USEDEP}] + >=dev-python/requests-1.1.0[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( >=dev-python/nose-1.3.0[${PYTHON_USEDEP}] )" + +python_test() { + nosetests -v || die "Tests fail with ${EPYTHON}" +} diff --git a/www-servers/pathod/pathod-0.11.1.ebuild b/www-servers/pathod/pathod-0.11.1.ebuild new file mode 100644 index 000000000000..c2f72d70b67e --- /dev/null +++ b/www-servers/pathod/pathod-0.11.1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="A collection of pathological tools for testing and torturing HTTP clients and servers" +HOMEPAGE="http://pathod.net/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=">=dev-python/netlib-${PV}[${PYTHON_USEDEP}] + >=dev-python/requests-2.4.1[${PYTHON_USEDEP}] + >=dev-python/flask-0.10.1[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( >=dev-python/nose-1.3.0[${PYTHON_USEDEP}] )" + +python_prepare_all() { + distutils-r1_python_prepare_all + + # remove bundled netlib + rm -r netlib || die + + # remove unnecessary pip dep + sed -i '/pip/d' setup.py || die +} + +python_test() { + nosetests -v || die "Tests fail with ${EPYTHON}" +} diff --git a/www-servers/pathod/pathod-0.12.0.ebuild b/www-servers/pathod/pathod-0.12.0.ebuild new file mode 100644 index 000000000000..55b80d96c493 --- /dev/null +++ b/www-servers/pathod/pathod-0.12.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="A collection of pathological tools for testing and torturing HTTP clients and servers" +HOMEPAGE="http://pathod.net/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=">=dev-python/netlib-${PV}[${PYTHON_USEDEP}] + >=dev-python/requests-2.4.1[${PYTHON_USEDEP}] + >=dev-python/flask-0.10.1[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( >=dev-python/nose-1.3.0[${PYTHON_USEDEP}] )" + +python_prepare_all() { + distutils-r1_python_prepare_all + + # remove unnecessary pip dep + sed -i '/pip/d' setup.py || die +} + +python_test() { + nosetests -v || die "Tests fail with ${EPYTHON}" +} diff --git a/www-servers/pound/Manifest b/www-servers/pound/Manifest new file mode 100644 index 000000000000..dfc7428e1c1e --- /dev/null +++ b/www-servers/pound/Manifest @@ -0,0 +1,12 @@ +AUX pound-2.2.cfg 906 SHA256 e13a68731464472f4fc1f86c688b3697fe304e77811f01a0c9fa9fe186cc047c SHA512 9471e5abe3e0ee83165ed01a7081a4d14075c6c21b9f9d7c3fb239aa78c38eae74394a7c7e7e7753d218a7ce5cae388823570d19b702a829baa93e949a8946b8 WHIRLPOOL 4e9aa05214f0c9d7a9c9873a80e8b734063a3dafdf13337fb208cb461c861bd946715311668dafeca38169c06ac101af33caba2d9dd2b60c28222af3723a442e +AUX pound.init-1.9 495 SHA256 4fed475cd93ea9234571aae44f2548d3ed109afa25ea463dbf7c52655de7d55d SHA512 fab1936ce907bdb5b215eada2c05025bd4dd158d0dfb0cdeb9f32ec4284bcdc75625ed7933913d080c3c26edbd8dcbbd197a729fa9c130fbff12d7bfdfd8d41f WHIRLPOOL 88c0eabd9839a7f7e7867b43f17fc6e12c87447c6b845e201f4842b7f94e11305ced245e8daf0923d930648d65dde6c1f2d298b8c34823a6a9bee2f0ca217cc8 +DIST Pound-2.6.tgz 180595 SHA256 0ad25e3652e22117abbc17a70b5d8913e05991318a5506bc7437e662616fdf21 SHA512 ec397740672ab3784322136e9e0ab7ac059c888453f2bdaf00cf64795a0ff9985d9d60a77a78491f64f2d0a63cce0b18a5df4f9b74a97ab9065a591ac046ad36 WHIRLPOOL e67340e6200de6d22bc65734ccf518ce25b168f9c2f7672f3682ccac15cd837484a7fa2b8cc3b9d6490a20c1994ac92c316820d1273c55156a201392e07273a5 +DIST Pound-2.7d.tgz 184801 SHA256 4eabba4b0139c09c58a3eb0a6c91c0487f429eb5a322a75d76d67a49aa8b09b8 SHA512 3a64a910327c3acbc43daaaca28612fe5f98f89937612844fc2a4de9d638499465783b09782daceda0a10f8cfdf396d233fa231fb967b7889213898078015416 WHIRLPOOL bcc58f1978a8b0d0150430759198ef4e860b74c1c151503b2ba62033ba789706d69dd080d22be9ed682ed610e6fc6e41ca3a70692135cd341030f14c2edd6d7a +DIST Pound-2.7f.tgz 186719 SHA256 0aba1a8b152f85c1521e7e0ca1b3d4258bd7a74382d4b64eb5e812a7704a9375 SHA512 292f4f7b4363365829f204b687080eae9e17b9a67ae7eb6021eb5a028321191d97abd9633d5664db5ebca6467795f73a787be4a0bd29360d737865930ff81830 WHIRLPOOL b5d5a0b7479f12428ace3e6f1d85e82dbcea222701de5031f5499b29acd911637193764d534020f6f5a365162201eb6601b1f766371ed039ca480ce9d583e2df +EBUILD pound-2.6.ebuild 1286 SHA256 a94ad2ba6f50b15ace5a494b92b6222003dcf654c966682340acd755f6445a5d SHA512 79256196c2bf358baedac43f7522be90e734ac4dff8c6c3f41c9d5aff0b355312346959ed2f2987dd7a9f751167eaa0621c510ce30fb5c6fefa033709e508e03 WHIRLPOOL d776a47ea18e469c68fbd1bc3571b55277c60c6d757a799d23c05e1322c6fdd1af527ab4c5aa60c0a5668bc02e39b5a20d11afb08b5915cb5427829d04c73c60 +EBUILD pound-2.7d.ebuild 1222 SHA256 2a35bd01374a5f6e8cac3bc679aa88b8426c013c31ef787b78687fb95fc24201 SHA512 b5d3c6f85a75762738bd0e1973d9adec12d560583eb3569a16f68aac68346640def51c74a780aaf8fbee723ff2c115fa822aae8991d0ec9a883eecf01e04523c WHIRLPOOL 16b1741d8036969b025bad22f568e7c321fcd9efa2367be25bbe35441da17514a00b49a6c5702253b733f97fa7bdb791028a8296cce2e5546257c5f042156028 +EBUILD pound-2.7f-r1.ebuild 1280 SHA256 8006647ccc8c70ec384cca446e1110fdc2a6cab1482f3fc7bbba60a22a2236ce SHA512 9a0624df66498f18bc36dbd9f0e9f964948e38419b23b9730b37dc38e900d84266a089c7f7e2f5c6ee7330b70cc2c95a36edc034543317339eaf03a4ca60de7d WHIRLPOOL 497a5d089657dfc32751e610f971406db1966e2681e1cd21a1b29f97c7944cdf3707f3794361a675f8292f45c3a3403ff424e0adff42078b0faf000aea4e4980 +EBUILD pound-2.7f.ebuild 1222 SHA256 2a35bd01374a5f6e8cac3bc679aa88b8426c013c31ef787b78687fb95fc24201 SHA512 b5d3c6f85a75762738bd0e1973d9adec12d560583eb3569a16f68aac68346640def51c74a780aaf8fbee723ff2c115fa822aae8991d0ec9a883eecf01e04523c WHIRLPOOL 16b1741d8036969b025bad22f568e7c321fcd9efa2367be25bbe35441da17514a00b49a6c5702253b733f97fa7bdb791028a8296cce2e5546257c5f042156028 +MISC ChangeLog 3035 SHA256 9c00589ec08a85cc1ecad4c61b28dc86f203df671ca7fb38720fe73e3f35f9e3 SHA512 e62eb0df0d77660b2ec6c346ba9c6f4ddb3eacd955ec7fb6a81c0af50c911d76115acb5ead48f139cf1360f56c8dd62226a8be9771cd916829ddc30dd5b77afc WHIRLPOOL dfdb7a3a4ec91fb1e10a16888530521d75d8957a8a2674e5fa8ad8fa1746febdd96f5123fc617aea9d920d877b89964476f212568f240f8c6365c2feacd66654 +MISC ChangeLog-2015 8846 SHA256 7dfc12138f6997f49a9453c9c7810d4b696b6e903fe48e7f7125b60c564f7e1f SHA512 43092ba7707668a1c33bad6085719686b9a24346356ae0a70fe2258d71a1091f8a7a5e1e364d849893e34a845b1f78d07f2bedcbefb794d3fffba9fbb3a29065 WHIRLPOOL 18caa7fe789aade046f7657fa76a1de84041f1620b33a79d626d477ccc86129d7d4b36e5588ca655076fb16cafd13b1f782dc5ecd3b9dfc77196646af16cf199 +MISC metadata.xml 777 SHA256 07d5e8754a44b7c9618a18b7b6d4f5c155602279dcfa7c7681d32393b4c85c28 SHA512 e08c001a038ad8d4a7870afa9334d66eeddadff33629c764c4aefdc107f7b53693d09c32e4ad2886afecab7991302506fc2b714aa669f1b4b398ab5dddbb11a3 WHIRLPOOL 298f112cb28cf6cc9a7d3a506b8bd4497f7e05dcb36d54939e56dd34dc938ea4a5b9fbd783ffa7cf4aa2fa2eb449acb430c1b25dd031fe3f33979cd88e8dc7be diff --git a/www-servers/pound/files/pound-2.2.cfg b/www-servers/pound/files/pound-2.2.cfg new file mode 100644 index 000000000000..664ea53c9edd --- /dev/null +++ b/www-servers/pound/files/pound-2.2.cfg @@ -0,0 +1,54 @@ +## Minimal sample pound.cfg +## +## see pound(8) for details + + +###################################################################### +## global options: + +User "nobody" +Group "nobody" +#RootJail /chroot/pound + +## Logging: (goes to syslog by default) +## 0 no logging +## 1 normal +## 2 extended +## 3 Apache-style (common log format) +LogLevel 1 + +## check backend every X secs: +Alive 30 + +## use hardware-accelleration card supported by openssl(1): +#SSLEngine <hw> + + +###################################################################### +## listen, redirect and ... to: + +## redirect all requests on port 8888 ("ListenHTTP") to the local webserver see "UrlGroup" below): +ListenHTTP +Address 127.0.0.1 +Port 8888 + +## allow PUT and DELETE also (by default only GET, POST and HEAD)?: +xHTTP 0 + +Service +URL ".*" + +BackEnd +Address 127.0.0.1 +Port 80 +Priority 1 + +## End Backend +End + +## End Service +End + +## End listener +End + diff --git a/www-servers/pound/files/pound.init-1.9 b/www-servers/pound/files/pound.init-1.9 new file mode 100644 index 000000000000..905c97b78a81 --- /dev/null +++ b/www-servers/pound/files/pound.init-1.9 @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting pound" + if [ ! -f "/etc/pound.cfg" ]; then + eend 1 "configfile /etc/pound.cfg not found." + fi + start-stop-daemon --quiet --start --exec /usr/sbin/pound -- -f /etc/pound.cfg -p /var/run/pound.pid + eend $? +} + +stop() { + ebegin "Stopping pound" + start-stop-daemon --quiet --stop --pidfile /var/run/pound.pid + eend $? +} diff --git a/www-servers/pound/metadata.xml b/www-servers/pound/metadata.xml new file mode 100644 index 000000000000..3b154386945a --- /dev/null +++ b/www-servers/pound/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> +</maintainer> +<longdescription lang="en">The Pound program is a reverse proxy, load balancer + and HTTPS front-end for Web server(s). Pound was developed to enable + distributing the load among several Web-servers and to allow for a convenient + SSL wrapper for those Web servers that do not offer it natively. Pound is + distributed under the GPL - no warranty, it's free to use, copy and give away. +</longdescription> +<use> + <flag name="dynscaler">Enable dynamic rescaling of back-end + priorities</flag> +</use> +</pkgmetadata> diff --git a/www-servers/pound/pound-2.6.ebuild b/www-servers/pound/pound-2.6.ebuild new file mode 100644 index 000000000000..d7d176e63a5e --- /dev/null +++ b/www-servers/pound/pound-2.6.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit eutils + +MY_P=${P/p/P} +DESCRIPTION="A http/https reverse-proxy and load-balancer" +HOMEPAGE="http://www.apsis.ch/pound/" +SRC_URI="http://www.apsis.ch/pound/${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc x86" +IUSE="dynscaler" + +DEPEND="dev-libs/libpcre + dev-libs/openssl" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + econf \ + $(use_enable dynscaler) +} + +src_install() { + dodir /usr/sbin + cp "${S}"/pound "${D}"/usr/sbin/ + cp "${S}"/poundctl "${D}"/usr/sbin/ + + doman pound.8 + doman poundctl.8 + dodoc README FAQ + + dodir /etc/init.d + newinitd "${FILESDIR}"/pound.init-1.9 pound + + insinto /etc + newins "${FILESDIR}"/pound-2.2.cfg pound.cfg +} + +pkg_postinst() { + elog "No demo-/sample-configfile is included in the distribution -" + elog "read the man-page for more info." + elog "A sample (localhost:8888 -> localhost:80) for gentoo is given in \"/etc/pound.cfg\"." + echo + ewarn "You will have to upgrade you configuration file, if you are" + ewarn "upgrading from a version <= 2.0." + echo + ewarn "The 'WebDAV' config statement is no longer supported!" + ewarn "Please adjust your configuration, if necessary." + echo +} diff --git a/www-servers/pound/pound-2.7d.ebuild b/www-servers/pound/pound-2.7d.ebuild new file mode 100644 index 000000000000..79e7d10fc790 --- /dev/null +++ b/www-servers/pound/pound-2.7d.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +MY_P=${P/p/P} +DESCRIPTION="A http/https reverse-proxy and load-balancer" +HOMEPAGE="http://www.apsis.ch/pound/" +SRC_URI="http://www.apsis.ch/pound/${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="dev-libs/libpcre + dev-libs/openssl" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_install() { + dodir /usr/sbin + cp "${S}"/pound "${D}"/usr/sbin/ + cp "${S}"/poundctl "${D}"/usr/sbin/ + + doman pound.8 + doman poundctl.8 + dodoc README FAQ + + dodir /etc/init.d + newinitd "${FILESDIR}"/pound.init-1.9 pound + + insinto /etc + newins "${FILESDIR}"/pound-2.2.cfg pound.cfg +} + +pkg_postinst() { + elog "No demo-/sample-configfile is included in the distribution -" + elog "read the man-page for more info." + elog "A sample (localhost:8888 -> localhost:80) for gentoo is given in \"/etc/pound.cfg\"." + echo + ewarn "You will have to upgrade you configuration file, if you are" + ewarn "upgrading from a version <= 2.0." + echo + ewarn "The 'WebDAV' config statement is no longer supported!" + ewarn "Please adjust your configuration, if necessary." + echo +} diff --git a/www-servers/pound/pound-2.7f-r1.ebuild b/www-servers/pound/pound-2.7f-r1.ebuild new file mode 100644 index 000000000000..2b7160a260ad --- /dev/null +++ b/www-servers/pound/pound-2.7f-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +MY_P=${P/p/P} +DESCRIPTION="A http/https reverse-proxy and load-balancer" +HOMEPAGE="http://www.apsis.ch/pound/" +SRC_URI="http://www.apsis.ch/pound/${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="libressl" + +DEPEND="dev-libs/libpcre + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl )" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_install() { + dodir /usr/sbin + cp "${S}"/pound "${D}"/usr/sbin/ + cp "${S}"/poundctl "${D}"/usr/sbin/ + + doman pound.8 + doman poundctl.8 + dodoc README FAQ + + dodir /etc/init.d + newinitd "${FILESDIR}"/pound.init-1.9 pound + + insinto /etc + newins "${FILESDIR}"/pound-2.2.cfg pound.cfg +} + +pkg_postinst() { + elog "No demo-/sample-configfile is included in the distribution -" + elog "read the man-page for more info." + elog "A sample (localhost:8888 -> localhost:80) for gentoo is given in \"/etc/pound.cfg\"." + echo + ewarn "You will have to upgrade you configuration file, if you are" + ewarn "upgrading from a version <= 2.0." + echo + ewarn "The 'WebDAV' config statement is no longer supported!" + ewarn "Please adjust your configuration, if necessary." + echo +} diff --git a/www-servers/pound/pound-2.7f.ebuild b/www-servers/pound/pound-2.7f.ebuild new file mode 100644 index 000000000000..79e7d10fc790 --- /dev/null +++ b/www-servers/pound/pound-2.7f.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +MY_P=${P/p/P} +DESCRIPTION="A http/https reverse-proxy and load-balancer" +HOMEPAGE="http://www.apsis.ch/pound/" +SRC_URI="http://www.apsis.ch/pound/${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="dev-libs/libpcre + dev-libs/openssl" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_install() { + dodir /usr/sbin + cp "${S}"/pound "${D}"/usr/sbin/ + cp "${S}"/poundctl "${D}"/usr/sbin/ + + doman pound.8 + doman poundctl.8 + dodoc README FAQ + + dodir /etc/init.d + newinitd "${FILESDIR}"/pound.init-1.9 pound + + insinto /etc + newins "${FILESDIR}"/pound-2.2.cfg pound.cfg +} + +pkg_postinst() { + elog "No demo-/sample-configfile is included in the distribution -" + elog "read the man-page for more info." + elog "A sample (localhost:8888 -> localhost:80) for gentoo is given in \"/etc/pound.cfg\"." + echo + ewarn "You will have to upgrade you configuration file, if you are" + ewarn "upgrading from a version <= 2.0." + echo + ewarn "The 'WebDAV' config statement is no longer supported!" + ewarn "Please adjust your configuration, if necessary." + echo +} diff --git a/www-servers/pshs/Manifest b/www-servers/pshs/Manifest new file mode 100644 index 000000000000..9efe0ef1f76b --- /dev/null +++ b/www-servers/pshs/Manifest @@ -0,0 +1,6 @@ +DIST pshs-0.3.2.tar.bz2 80103 SHA256 a46ff74422c27eb50e4885d519275b0c410c5e38707bc15e6bea84e5594ac32d SHA512 82eb0e0ff76ad6d5651b789ca59b654558562501f9f4b89a562773f5c60e80c6d43a86fca35a41a313952d8134b83fe6a11d1085c8c35cb9bbffd6d2a243964a WHIRLPOOL 4acb5d2538e47b57d29aa1b7c43c228da532354d7dac9278c0db09b0c0004fc747134cf4b2e0388b27cd2f814f5d802cd068ab26e467c489b21a66686d4aa0a0 +EBUILD pshs-0.3.2.ebuild 971 SHA256 01e00aa4cc98bc27f54e69b8c9836cf28c89f5f2fff72663f4f6af5e8a74139f SHA512 573eea1ae593f6d0a8429c683a2f54efb90276bedc1091ed38c4bcb02ca9ed62dd8876bd78626d9c8205251931251a238a4dad97d03d3c388e38672ffeb3f544 WHIRLPOOL a5a8e519286b483a39fea2e856b35d1f7f009433edff14cad0251dc73b579413df33f1af86d1d2ba25ccbdb6a7213f8a3bc87638c29cb17077a95831358929fc +EBUILD pshs-9999.ebuild 1011 SHA256 c7d36ceae1c3d576d6b3428a75ccff7fe6a03517a56c515584ca53a85f6dd83e SHA512 831f63979c59d8aefa9d1b41f98e4eded021b437f1607218c34143687f22668dbd7dd7435bb2688d128699712ed9b5fa2e30536511dd4da9d39ab7b43d9f4b5f WHIRLPOOL 00128bc8b4d0500528d15f8631ebcbf677462886e787b0dd02204b88e9219175aedd799220a2276d45c4aff62cd75e58b38311380025fd577e675a33d140ad6f +MISC ChangeLog 3615 SHA256 4082dbb73f6dd687bb433a3c584447d9e89a2ffa57f4e808b4f56accaaff4bed SHA512 c20132c49011bfcaf6713340e80f01dc44cfa05efc7201568a7fb6c805a36f766ea9889894b9b0ec0e7a56b31d11a9316b25cb7079ccb9241f090e5126989849 WHIRLPOOL 99d5d785e029ff5c02ec343ec7a70f315be8e3df7e614305355d3a0011007b77b7215be5baf3a949f79b3977c518c2b4e97936fb542afacf3fd68a95fe437813 +MISC ChangeLog-2015 2590 SHA256 b944e691e00a71a58e3760813f390f602eb982123b90298f663f5e37382a3c12 SHA512 f6771af959a0e3e6db8b0ea1767fb8901b8fbcbc017cbb265471a63a1ebfae243b8fef7275179c155e5afa8cb6a77fc471129614ec6d00cdcfe2df42aed0ade9 WHIRLPOOL d313b471974902e8ed0eaa67b1242ac45880ad53b65af494d3717ba558f8f9dda176dabaed26c99a5953a7801d34b532aa4b0df7c6a1f52f1d436b1b32c4aff8 +MISC metadata.xml 812 SHA256 00961681e1642e0fb28b78a0a5d178551c2c10bc13d4c56ea35b2d04302f5f6e SHA512 9e58734863a46f1f6d8d4b0c2666fc0d596d45d924a60fc5a19a173018e3ca881c20862a3e879a63b9ccfab6dc6018ba122b3537e408336db26672b02374cdb2 WHIRLPOOL 508cc45e6561a83d76c3244cf36c93be8d90e4e87a7098b5bd31faa27f76d892bd364646a1df399effb2a2bbde734b47a207d2b92a0e83490966d1d0a0541560 diff --git a/www-servers/pshs/metadata.xml b/www-servers/pshs/metadata.xml new file mode 100644 index 000000000000..f2777ef196ca --- /dev/null +++ b/www-servers/pshs/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <use> + <flag name="magic">Enable automatic detection of Content-Type + using libmagic (<pkg>sys-apps/file</pkg>)</flag> + <flag name="netlink">Use libnetlink (<pkg>sys-apps/iproute2</pkg>) to + get network interface addresses</flag> + <flag name="qrcode">Enable generating QRCodes for server URL</flag> + </use> + <upstream> + <maintainer status="active"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <bugs-to>https://github.com/mgorny/pshs/issues/</bugs-to> + <remote-id type="github">mgorny/pshs</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/pshs/pshs-0.3.2.ebuild b/www-servers/pshs/pshs-0.3.2.ebuild new file mode 100644 index 000000000000..fc0cb0facdc0 --- /dev/null +++ b/www-servers/pshs/pshs-0.3.2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Pretty small HTTP server -- a command-line tool to share files" +HOMEPAGE="https://github.com/mgorny/pshs/" +SRC_URI="https://github.com/mgorny/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +magic +netlink qrcode ssl upnp" + +RDEPEND=">=dev-libs/libevent-2:0= + magic? ( sys-apps/file:0= ) + qrcode? ( media-gfx/qrencode:0= ) + ssl? ( >=dev-libs/libevent-2.1:0=[ssl] + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + upnp? ( net-libs/miniupnpc:0= )" +DEPEND="${RDEPEND} + netlink? ( sys-apps/iproute2 + >=sys-kernel/linux-headers-2.6.27 )" +# libnetlink is static only ATM + +src_configure() { + local myconf=( + $(use_enable magic libmagic) + $(use_enable netlink) + $(use_enable qrcode qrencode) + $(use_enable ssl) + $(use_enable upnp) + ) + + econf "${myconf[@]}" +} diff --git a/www-servers/pshs/pshs-9999.ebuild b/www-servers/pshs/pshs-9999.ebuild new file mode 100644 index 000000000000..7f31015204b0 --- /dev/null +++ b/www-servers/pshs/pshs-9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGIT_REPO_URI="https://github.com/mgorny/${PN}.git" + +inherit autotools git-r3 + +DESCRIPTION="Pretty small HTTP server -- a command-line tool to share files" +HOMEPAGE="https://github.com/mgorny/pshs/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="libressl +magic +netlink qrcode ssl upnp" + +RDEPEND=">=dev-libs/libevent-2:0= + magic? ( sys-apps/file:0= ) + qrcode? ( media-gfx/qrencode:0= ) + ssl? ( >=dev-libs/libevent-2.1:0=[ssl] + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + upnp? ( net-libs/miniupnpc:0= )" +DEPEND="${RDEPEND} + netlink? ( sys-apps/iproute2 + >=sys-kernel/linux-headers-2.6.27 )" +# libnetlink is static only ATM + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myconf=( + $(use_enable magic libmagic) + $(use_enable netlink) + $(use_enable qrcode qrencode) + $(use_enable ssl) + $(use_enable upnp) + ) + + econf "${myconf[@]}" +} diff --git a/www-servers/puma/Manifest b/www-servers/puma/Manifest new file mode 100644 index 000000000000..4a277dc4732b --- /dev/null +++ b/www-servers/puma/Manifest @@ -0,0 +1,8 @@ +DIST puma-3.10.0.tar.gz 158843 SHA256 c2f3f10061ee5206e8f2b2e95a3e447ec0b9acb54a70495892df1648c2bcdcc7 SHA512 a0a97c75408c8e9ab108b0d2edaa955bf0052d0d0ba7641be52f645ffaf61d9c647f863910e084319a705de7b27a763209f5aeda50e29db94442d9ac59866813 WHIRLPOOL b06fabcaf19ee9c9440288b0fdb61a171dba443a93fe490eeeaa6b110a80f2c2ce969a8d6ccda7af8f27f1fe60584b91b2bbe69984e8df2a7f1b64969bfc2b4e +DIST puma-3.6.2.tar.gz 152250 SHA256 c3963d0f8600aa83fdeaa65d0ab4baff543c755dccd26218b53fafc48f380c7e SHA512 d80138f37b22753f2fefeba1c6bd315d8a6ded0e718df84ede6979b7634b6ebae1c4a2aa98bf233e8bc2d0113201f0e9c752e4d128ce4b812897680694f1ce9f WHIRLPOOL a98e125eee7c7da770e88c66b67dca8083ee9317572b9d96cc2e3e34b39049b86f2cdd49455971a3757e6d9da71bce32db1f50542501075ef57cf0fce236e052 +DIST puma-3.9.1.tar.gz 156801 SHA256 bd75f67928b819d7fef2ab81e77565032e2f2252f16d02f33a010682d473f10e SHA512 612e4dda7e3ead5c71df113031856d1ff2f001bfeaff448a81afa373b4b84a37c98e4f73ab8c2a763dd70e55a03fd60b9cafad134367989a90781d91ef0214a7 WHIRLPOOL a17e2f0cec113d8597069e704ed5f9d4e7c61a333efb322c7de2033fdb5eb78f560a41e3965a8d825986a8ff25f53c504e041af26c0d97084bdb913b71b26cfb +EBUILD puma-3.10.0.ebuild 1984 SHA256 22e364dce209f0b7e9e82613e251cc7a961e0d5e1e531a4498f354666cf2b5a4 SHA512 71dba8b8bfdcb5ec415d903e8bf90617cd40ae027fe0459036818b3af239225f3989031fd3bf51e417f18c4b411d54355c2d4c1df0e27f335f7881e3c061b4ba WHIRLPOOL 78ba8746219c9b4392ab5d7a32764dde84756fe71e5afeb1a87cef7b4161e7944b2c5a4f621d26ae3db5c863f74cf4c5579feaae320e4adc550be797e3db69e9 +EBUILD puma-3.6.2.ebuild 1562 SHA256 ddd416d96219dba1ef938d92fd143c8271fe302b0802d987c2434d0c6945f247 SHA512 24d34f792c97867baf1b5c91f5679e8b8d7921f11e04df5b302ab161c2bae85a63a812066aee85bcbff2f3116b3b1385cfc9009ba7279505c6f846b5c4a5b95b WHIRLPOOL e3f2f45bb6a6685e02eeb6becd56ecd574d0a61195fd1d90989167a73240f313e6e5e8a8a5e773150cf5bd26f0105d9aa539b9797ace021e266cf378d8d6d332 +EBUILD puma-3.9.1.ebuild 1984 SHA256 22e364dce209f0b7e9e82613e251cc7a961e0d5e1e531a4498f354666cf2b5a4 SHA512 71dba8b8bfdcb5ec415d903e8bf90617cd40ae027fe0459036818b3af239225f3989031fd3bf51e417f18c4b411d54355c2d4c1df0e27f335f7881e3c061b4ba WHIRLPOOL 78ba8746219c9b4392ab5d7a32764dde84756fe71e5afeb1a87cef7b4161e7944b2c5a4f621d26ae3db5c863f74cf4c5579feaae320e4adc550be797e3db69e9 +MISC ChangeLog 1197 SHA256 2ff67c216eb5b5a5804296d4f8a13cd4bace2ebe9f22d81ebcfee4e510c77c0e SHA512 cef9b8c09895e3b03366654b80f4bc5c900f6916990612daaddfda7bebc590c2da3b60f54779b2218be1a8bb906b41aa8e80aaa0b0502b26697bb8468c0d487c WHIRLPOOL 2ef102b30d71f1698008b6f2843a8a730f14dacde8fcb81d25fde6e4b6c5e0f18b07545c65fc334410e73ff9710ed8d538106cf858efce47345a27433c2f3060 +MISC metadata.xml 698 SHA256 ac1efda99c0a9907f968af0fa7c988194474c2f0c2d04e93c24ee3b14f276b46 SHA512 85fe4b390fe3623ab1ef99c683f1114a0189af25dace79eec1e629fc62502abd54525c50aba0813d63a556e18ec149570eb0d829f6ac615a9b3dd5b727ea920c WHIRLPOOL 426dbae82bc3fe1c60c1c108eeff9f7b676f32d3d4cd81c1ba0b9397b48f795ae91c94a2d2d892cf4cca0b3ebc39bae091b61e2171725247d794e27775f74ad6 diff --git a/www-servers/puma/metadata.xml b/www-servers/puma/metadata.xml new file mode 100644 index 000000000000..aa7df3539e92 --- /dev/null +++ b/www-servers/puma/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ruby@gentoo.org</email> + <name>Gentoo Ruby Project</name> + </maintainer> + <longdescription> + Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 + server for Ruby/Rack applications. Puma is intended for use in + both development and production environments. In order to get the + best throughput, it is highly recommended that you use a Ruby + implementation with real threads like Rubinius or JRuby. + </longdescription> + <upstream> + <remote-id type="github">puma/puma</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/puma/puma-3.10.0.ebuild b/www-servers/puma/puma-3.10.0.ebuild new file mode 100644 index 000000000000..118aa44cbc3d --- /dev/null +++ b/www-servers/puma/puma-3.10.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby21 ruby22 ruby23 ruby24" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" + +inherit multilib ruby-fakegem + +DESCRIPTION="a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack" +HOMEPAGE="http://puma.io/" +SRC_URI="https://github.com/puma/puma/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="" + +DEPEND+=" dev-libs/openssl:0 test? ( net-misc/curl )" +RDEPEND+=" dev-libs/openssl:0" + +ruby_add_bdepend "virtual/ruby-ssl + test? ( dev-ruby/rack >=dev-ruby/minitest-5.9:5 >=dev-ruby/test-unit-3.0:2 )" + +all_ruby_prepare() { + sed -i -e '/bundler/ s:^:#:' test/helper.rb || die + + # Avoid test failing inconsistently + sed -i -e '/phased_restart_via_pumactl/,/^ end/ s:^:#:' test/test_integration.rb || die + + # Avoid test we did not run previously that is failing + rm -f test/test_cli.rb || die + + # Avoid test that trigger a bug in ruby very easily and lead to + # failure. This affects all current puma versions in combination + # with the latest ruby versions, so we add this new version anyway + # while allowing these tests to fail. + # https://github.com/puma/puma/pull/1345 + rm -f test/test_{persistent,puma_server,puma_server_ssl}.rb || die +} + +each_ruby_prepare() { + sed -i -e 's:ruby -rubygems:'${RUBY}' -rubygems:' \ + -e 's/localhost/127.0.0.1/' test/shell/* || die + sed -i -e '1ilog_requests' test/shell/t{1,2}_conf.rb || die +} + +each_ruby_configure() { + ${RUBY} -Cext/puma_http11 extconf.rb || die +} + +each_ruby_compile() { + emake V=1 -Cext/puma_http11 + cp ext/puma_http11/puma_http11$(get_modname) lib/puma/ || die +} + +each_ruby_test() { + einfo "Running test suite" + ${RUBY} -Ilib:.:test -e "gem 'minitest', '~>5.9'; gem 'test-unit', '~>3.0'; require 'minitest/autorun'; Dir['test/**/*test_*.rb'].each{|f| require f}" || die + + einfo "Running integration tests" + pushd test/shell + #sh run.sh || die + popd +} diff --git a/www-servers/puma/puma-3.6.2.ebuild b/www-servers/puma/puma-3.6.2.ebuild new file mode 100644 index 000000000000..f3905616d94f --- /dev/null +++ b/www-servers/puma/puma-3.6.2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +USE_RUBY="ruby21 ruby22 ruby23" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" + +inherit multilib ruby-fakegem + +DESCRIPTION="a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack" +HOMEPAGE="http://puma.io/" +SRC_URI="https://github.com/puma/puma/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~amd64" +IUSE="" + +DEPEND+=" dev-libs/openssl:0 test? ( net-misc/curl )" +RDEPEND+=" dev-libs/openssl:0" + +ruby_add_bdepend "virtual/ruby-ssl + test? ( dev-ruby/rack >=dev-ruby/minitest-5.8:5 >=dev-ruby/test-unit-3.0:2 )" + +all_ruby_prepare() { + # Avoid test failing inconsistently + sed -i -e '/phased_restart_via_pumactl/,/^ end/ s:^:#:' test/test_integration.rb || die + + # Avoid test we did not run previously that is failing + rm -f test/test_cli.rb || die +} + +each_ruby_prepare() { + sed -i -e 's:ruby -rubygems:'${RUBY}' -rubygems:' \ + -e 's/localhost/127.0.0.1/' test/shell/* || die + sed -i -e '1ilog_requests' test/shell/t{1,2}_conf.rb || die +} + +each_ruby_configure() { + ${RUBY} -Cext/puma_http11 extconf.rb || die +} + +each_ruby_compile() { + emake V=1 -Cext/puma_http11 + cp ext/puma_http11/puma_http11$(get_modname) lib/puma/ || die +} + +each_ruby_test() { + einfo "Running test suite" + ${RUBY} -Ilib:.:test -e "gem 'minitest', '~>5.8'; gem 'test-unit', '~>3.0'; require 'minitest/autorun'; Dir['test/**/*test_*.rb'].each{|f| require f}" || die + + einfo "Running integration tests" + pushd test/shell + sh run.sh || die + popd +} diff --git a/www-servers/puma/puma-3.9.1.ebuild b/www-servers/puma/puma-3.9.1.ebuild new file mode 100644 index 000000000000..118aa44cbc3d --- /dev/null +++ b/www-servers/puma/puma-3.9.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby21 ruby22 ruby23 ruby24" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" + +inherit multilib ruby-fakegem + +DESCRIPTION="a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack" +HOMEPAGE="http://puma.io/" +SRC_URI="https://github.com/puma/puma/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="" + +DEPEND+=" dev-libs/openssl:0 test? ( net-misc/curl )" +RDEPEND+=" dev-libs/openssl:0" + +ruby_add_bdepend "virtual/ruby-ssl + test? ( dev-ruby/rack >=dev-ruby/minitest-5.9:5 >=dev-ruby/test-unit-3.0:2 )" + +all_ruby_prepare() { + sed -i -e '/bundler/ s:^:#:' test/helper.rb || die + + # Avoid test failing inconsistently + sed -i -e '/phased_restart_via_pumactl/,/^ end/ s:^:#:' test/test_integration.rb || die + + # Avoid test we did not run previously that is failing + rm -f test/test_cli.rb || die + + # Avoid test that trigger a bug in ruby very easily and lead to + # failure. This affects all current puma versions in combination + # with the latest ruby versions, so we add this new version anyway + # while allowing these tests to fail. + # https://github.com/puma/puma/pull/1345 + rm -f test/test_{persistent,puma_server,puma_server_ssl}.rb || die +} + +each_ruby_prepare() { + sed -i -e 's:ruby -rubygems:'${RUBY}' -rubygems:' \ + -e 's/localhost/127.0.0.1/' test/shell/* || die + sed -i -e '1ilog_requests' test/shell/t{1,2}_conf.rb || die +} + +each_ruby_configure() { + ${RUBY} -Cext/puma_http11 extconf.rb || die +} + +each_ruby_compile() { + emake V=1 -Cext/puma_http11 + cp ext/puma_http11/puma_http11$(get_modname) lib/puma/ || die +} + +each_ruby_test() { + einfo "Running test suite" + ${RUBY} -Ilib:.:test -e "gem 'minitest', '~>5.9'; gem 'test-unit', '~>3.0'; require 'minitest/autorun'; Dir['test/**/*test_*.rb'].each{|f| require f}" || die + + einfo "Running integration tests" + pushd test/shell + #sh run.sh || die + popd +} diff --git a/www-servers/resin/Manifest b/www-servers/resin/Manifest new file mode 100644 index 000000000000..0c1dfbd8bba7 --- /dev/null +++ b/www-servers/resin/Manifest @@ -0,0 +1,14 @@ +AUX 4.0.46/build.xml.patch 2259 SHA256 80f3f9c3677b4c2e114485490409f5328f1855ff3d331f372557e4ad12909404 SHA512 a1792fa2afd100238967c3d93fbe14a276a647ea5902d7fbabe70fe2d2416233486bdb604a879bd0fe8564289c5d20fb4dba3b9a8dd3eadb51c5ae0ef635de93 WHIRLPOOL 6a2503a33495b7d348e029a4dbd0a7808f0d2f27ddd0b7936eb4cc9fd27b82be3f23c0739ece0912aaf74a3eaca1c9114a16485621953e679c6eca87031260f6 +AUX 4.0.46/resin.conf 542 SHA256 d240091b3306ae4562c82cfcaf016e1d21e8abbd92a927a069beecd74383bd1e SHA512 61b34c022712f31d3cadcf8e78095900085c8cde5ba5b8cc46d603019f461ae3271fc41a9f6b63d89aeb675de9fb72b27123fc6c6774eaee5349d37cc2c9693f WHIRLPOOL 39f0ea78e56c67a9d8c7129a10e19c4b7113ed5c5b4c1ca62b847f867ecbbbd1795c39a7b7febd261142fd725d47466083cf45f37fb22b90dc8181056922f1af +AUX 4.0.46/resin.init 791 SHA256 c372aeb73935e8e3a72a20312e2bbf2f5be917d2811f4e659525cdaad8f80939 SHA512 2072f837bad7c1cf8aa54f5ca8929151837caa60c71804c71050a94902d954c7d04899e0ab91a960e608066fc237fd0c3adbc04ec57ab7851f0b48cd1faeb957 WHIRLPOOL c1959050a780dd3b437a6580fb79a4666733d7e4e5627bc969bbb7838d677e00d70397d974db488bd02f9e9af6e07509988c284fdf744c798939f52f861cf9cf +AUX 4.0.48/build.xml.patch 2259 SHA256 80f3f9c3677b4c2e114485490409f5328f1855ff3d331f372557e4ad12909404 SHA512 a1792fa2afd100238967c3d93fbe14a276a647ea5902d7fbabe70fe2d2416233486bdb604a879bd0fe8564289c5d20fb4dba3b9a8dd3eadb51c5ae0ef635de93 WHIRLPOOL 6a2503a33495b7d348e029a4dbd0a7808f0d2f27ddd0b7936eb4cc9fd27b82be3f23c0739ece0912aaf74a3eaca1c9114a16485621953e679c6eca87031260f6 +AUX 4.0.48/resin.conf 542 SHA256 d240091b3306ae4562c82cfcaf016e1d21e8abbd92a927a069beecd74383bd1e SHA512 61b34c022712f31d3cadcf8e78095900085c8cde5ba5b8cc46d603019f461ae3271fc41a9f6b63d89aeb675de9fb72b27123fc6c6774eaee5349d37cc2c9693f WHIRLPOOL 39f0ea78e56c67a9d8c7129a10e19c4b7113ed5c5b4c1ca62b847f867ecbbbd1795c39a7b7febd261142fd725d47466083cf45f37fb22b90dc8181056922f1af +AUX 4.0.48/resin.init 791 SHA256 c372aeb73935e8e3a72a20312e2bbf2f5be917d2811f4e659525cdaad8f80939 SHA512 2072f837bad7c1cf8aa54f5ca8929151837caa60c71804c71050a94902d954c7d04899e0ab91a960e608066fc237fd0c3adbc04ec57ab7851f0b48cd1faeb957 WHIRLPOOL c1959050a780dd3b437a6580fb79a4666733d7e4e5627bc969bbb7838d677e00d70397d974db488bd02f9e9af6e07509988c284fdf744c798939f52f861cf9cf +DIST resin-4.0.46-src.zip 40400255 SHA256 e762506c432dc12f5100903993220b7ace6ff98ce1ed2c17a53737d04f47ebcf SHA512 49f468706a3269f851a6b359d6020b01dadb312890c97208b1a66353fb82b2d95625947a472d8d3e535d0c52ec6ad3e110eb4d227014fe7a89f313ae1df6970f WHIRLPOOL a3d12e09e2596a1e705d4cd1b1870e411080ca6371411574e7830d48ec0058463944fded005e94fc929a0635403cba27d78fc379bf1f222b0e953828ae280238 +DIST resin-4.0.48-src.zip 40883010 SHA256 f14b4c77fe5003ab11be1e87884a897c09bafb3a5e321f4813305f8192f7f161 SHA512 a992ebbff8af9f10e825a259e831dc340f9d74c5a117033a7eda2eb59a453d9e7d0e5e6feaf7bb36526ac65c8a7e1f55f737bb68af3e7e9647381ada995542ee WHIRLPOOL 099aa3cc480863322bed35c876b0e58fd481475d38b7970db02545f69338cc0fbf41719f0c22b8778009b337559c22eaca862634e3d75d896d34eff45d305c8e +EBUILD resin-4.0.46.ebuild 4627 SHA256 dcf25eb8325b0af2e50a378b8507b2a5817d8e8aca532c285e06e807d3351dd3 SHA512 c8df57773159194651a50bc2df0684dfb9246828e046b3e492f2707e8ec6005ee1ae1601a621f4cb0327fec31d9cd9261d79b0958385bf32feda82b2371518d1 WHIRLPOOL a380216285f9d7f73ea0938bee03adea190668fcfc3b252018822cfa50e91a74256ff21a13e5430a7f2a179a49a10a35464b894c846d303084cafc8e161c62e3 +EBUILD resin-4.0.48-r1.ebuild 4273 SHA256 30693b09cf76aba5943ffa40c95ef2bfbae4b491e80812a1b41a2eda66dd32a2 SHA512 e6977c524525d8e5299aa30ae7df0a2df7224ffbe4baab3d684ed6535fbc643912cc48726964fddfc43be98a7e87ec37603bc51c05f39975fca31cfc2e6fa501 WHIRLPOOL 627c702f0c2f73198a5484f04e2b90aa3cdeb7cbeafe26a93ded4ff021005ae8dea53577a1afceeae5a7501444fae8006b141d3d07800888e175edebf26c7a5f +EBUILD resin-4.0.48.ebuild 4266 SHA256 d18d2a999ec66b1f1fc31b395e9555b6c85ebccb463f16d2831b92415fcc5bf8 SHA512 ec04ac87fe24ffdb86ad2767a2410620cb575b9bd2d1c06e067ad083404e0f25c65718a03a3d75af1f83c23801c2a0d223effb654c2279fc45b7f2a410862c50 WHIRLPOOL 2ff8ab01dc7a6d49c67226cfe5b5827813695d431b3073a0c7a83a9e82e852715603632b0a4ad2325c081b0f6a73ab069bcb88020db9fb03fc8b9b32429a2731 +MISC ChangeLog 8290 SHA256 cb0eb8257a9099db9bcd3b6cce6dc2c52f33baa2d69e7008da79ad3d7db31713 SHA512 27626694b432d4d8759b42cb6869f5d3d98d407ccb15622073bafe40ec5b9ed7bda11c60b17f7d9aa56b300ac331829a35fdf54801af137f0109758752f66cdd WHIRLPOOL a4a301dab2d713029bb71b4e2f4786f7de2a72630718390ca754faa1a243fd7efbc0b93284ff4012f13f524b337aa0e0521d719f72f8678374bebd93284c6700 +MISC ChangeLog-2015 22242 SHA256 1f459878766899ae094d51aa9ed2a000983f4038817be13567ee0973f329b636 SHA512 6540168f3dc33a70794dab9247d06e72fdcd3b92529101594c0e6d4fc4c9da56610fcebb6d0191e4766fa8c15f175bcd7bebd8dd0a52dd3f568e81c5c6abcd24 WHIRLPOOL 06a22d8a9ebc4c7b6acf15651f58a9e0d18fe1ec239924e22f45f128cda24818e22bfbb458a347cd01fd537107ddad7da4fcaca30862da2c8921cd288ec743e5 +MISC metadata.xml 312 SHA256 389c2a96dceb04d693b80e6b040d4fdf54372a898985764eb921367d1b25558a SHA512 78545c35d5e1ecd50072d95fcb1b48ccab327775e7dc1f708a95d6cfebd5bac2fb086079b0dba81979dd6b648095b9cccf19019bf7df9e049dabb082ad9222c2 WHIRLPOOL 31ba1cca4559dd73cdc71ef25dafe79a4127ebf61dfb36758163511a7340c1e19f963a8189445677459d54f16b936ff87f1b2cc1df8454f5d5e97ec10932ffb6 diff --git a/www-servers/resin/files/4.0.46/build.xml.patch b/www-servers/resin/files/4.0.46/build.xml.patch new file mode 100644 index 000000000000..dc3a413fc0bf --- /dev/null +++ b/www-servers/resin/files/4.0.46/build.xml.patch @@ -0,0 +1,59 @@ +--- build.xml.orig 2015-08-12 23:14:20.302000000 +0000 ++++ build.xml 2015-08-12 23:14:47.909000000 +0000 +@@ -12,7 +12,7 @@ + <property name="eclipse.home" value="${user.home}/eclipse"/> + + <target name="compile" +- depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, resin-eclipselink, gae, jasper"> ++ depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, gae"> + </target> + + <!-- +@@ -27,10 +27,6 @@ + </antcall> + </target> + --> +- <target name="resin-eclipselink" depends="eclipselink"> +- <copy file="modules/eclipselink/dist/resin-eclipselink.jar" +- todir="${resin.lib}"/> +- </target> + + <target name="richfaces" depends="init"> + <antcall target="artifact" inheritRefs="true"> +@@ -92,13 +88,6 @@ + </antcall> + </target> + +- <target name="eclipselink" depends="init"> +- <antcall target="module" inheritRefs="true"> +- <param name="module.name" value="eclipselink"/> +- <param name="module.jar" value="resin-eclipselink.jar"/> +- </antcall> +- </target> +- + <!-- gae APIs for quercus testing --> + <target name="gae" depends="init"> + <antcall target="module" inheritRefs="true"> +@@ -437,13 +426,6 @@ + </antcall> + </target> + +- <target name="jasper" depends="init"> +- <antcall target="module" inheritRefs="true"> +- <param name="module.name" value="jasper"/> +- <param name="module.jar" value="resin-jasper.jar"/> +- </antcall> +- </target> +- + <target name="version"> + <copy file="${resin.modules}/kernel/src/com/caucho/Version.tmpl" + tofile="${resin.modules}/kernel/src/com/caucho/Version.java" +@@ -903,7 +885,7 @@ + <delete dir="${dist}/${dist.name}"/> + </target> + +- <target name="dist" depends="dist.clean, configure, compile, update, junit, eclipselink, artifacts, resin.dist.build, dist.package, quercus.war"/> ++ <target name="dist" depends="dist.clean, configure, compile, update, junit, artifacts, resin.dist.build, dist.package, quercus.war"/> + + <target name="configure" depends="init"> + <copy tofile="modules/c/src/resin/Makefile.in" diff --git a/www-servers/resin/files/4.0.46/resin.conf b/www-servers/resin/files/4.0.46/resin.conf new file mode 100644 index 000000000000..a48840b5e9f2 --- /dev/null +++ b/www-servers/resin/files/4.0.46/resin.conf @@ -0,0 +1,16 @@ +# JVM Runtime +# Using the default setting, it will determine your JVM from the system-vm +# set using java-config. +# See java-config(1) manual page for assistance in determining this value. + +# You can override this value with whatever JDK you want. +# For a list of valid values for GENTOO_VM see output of +# java-config -L +#GENTOO_VM=sun-jdk-1.5 + +# Verbose starting and stopping? (yes/no, defaults to no) +#VERBOSE="yes" + +# Select which server will be started, this is an advanced feature, please refer +# to Resin documentation. +SERVER_ID="" diff --git a/www-servers/resin/files/4.0.46/resin.init b/www-servers/resin/files/4.0.46/resin.init new file mode 100644 index 000000000000..2ce1af068f93 --- /dev/null +++ b/www-servers/resin/files/4.0.46/resin.init @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use dns logger mysql postgresql +} + +runResin() { + JAVA_HOME=$(java-config -O) + [ -n "${GENTOO_VM}" ] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O) + export JAVA_HOME + + local extraArgs= + if [ "${VERBOSE}" = "yes" ]; then + extraArgs="-verbose" + fi + + local msg="${1}" + shift + + local cmdline="${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar -conf /etc/resin/resin.xml -server \"${SERVER_ID}\" -resin-home __RESIN_HOME__ -root-directory __RESIN_HOME__ ${extraArgs} ${@}" + + ebegin "${msg}" + su - resin -c "${cmdline}" + eend $? +} + +start() { + runResin "Starting Resin" "start" +} + +stop() { + runResin "Stopping Resin" "shutdown" +} diff --git a/www-servers/resin/files/4.0.48/build.xml.patch b/www-servers/resin/files/4.0.48/build.xml.patch new file mode 100644 index 000000000000..dc3a413fc0bf --- /dev/null +++ b/www-servers/resin/files/4.0.48/build.xml.patch @@ -0,0 +1,59 @@ +--- build.xml.orig 2015-08-12 23:14:20.302000000 +0000 ++++ build.xml 2015-08-12 23:14:47.909000000 +0000 +@@ -12,7 +12,7 @@ + <property name="eclipse.home" value="${user.home}/eclipse"/> + + <target name="compile" +- depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, resin-eclipselink, gae, jasper"> ++ depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, gae"> + </target> + + <!-- +@@ -27,10 +27,6 @@ + </antcall> + </target> + --> +- <target name="resin-eclipselink" depends="eclipselink"> +- <copy file="modules/eclipselink/dist/resin-eclipselink.jar" +- todir="${resin.lib}"/> +- </target> + + <target name="richfaces" depends="init"> + <antcall target="artifact" inheritRefs="true"> +@@ -92,13 +88,6 @@ + </antcall> + </target> + +- <target name="eclipselink" depends="init"> +- <antcall target="module" inheritRefs="true"> +- <param name="module.name" value="eclipselink"/> +- <param name="module.jar" value="resin-eclipselink.jar"/> +- </antcall> +- </target> +- + <!-- gae APIs for quercus testing --> + <target name="gae" depends="init"> + <antcall target="module" inheritRefs="true"> +@@ -437,13 +426,6 @@ + </antcall> + </target> + +- <target name="jasper" depends="init"> +- <antcall target="module" inheritRefs="true"> +- <param name="module.name" value="jasper"/> +- <param name="module.jar" value="resin-jasper.jar"/> +- </antcall> +- </target> +- + <target name="version"> + <copy file="${resin.modules}/kernel/src/com/caucho/Version.tmpl" + tofile="${resin.modules}/kernel/src/com/caucho/Version.java" +@@ -903,7 +885,7 @@ + <delete dir="${dist}/${dist.name}"/> + </target> + +- <target name="dist" depends="dist.clean, configure, compile, update, junit, eclipselink, artifacts, resin.dist.build, dist.package, quercus.war"/> ++ <target name="dist" depends="dist.clean, configure, compile, update, junit, artifacts, resin.dist.build, dist.package, quercus.war"/> + + <target name="configure" depends="init"> + <copy tofile="modules/c/src/resin/Makefile.in" diff --git a/www-servers/resin/files/4.0.48/resin.conf b/www-servers/resin/files/4.0.48/resin.conf new file mode 100644 index 000000000000..a48840b5e9f2 --- /dev/null +++ b/www-servers/resin/files/4.0.48/resin.conf @@ -0,0 +1,16 @@ +# JVM Runtime +# Using the default setting, it will determine your JVM from the system-vm +# set using java-config. +# See java-config(1) manual page for assistance in determining this value. + +# You can override this value with whatever JDK you want. +# For a list of valid values for GENTOO_VM see output of +# java-config -L +#GENTOO_VM=sun-jdk-1.5 + +# Verbose starting and stopping? (yes/no, defaults to no) +#VERBOSE="yes" + +# Select which server will be started, this is an advanced feature, please refer +# to Resin documentation. +SERVER_ID="" diff --git a/www-servers/resin/files/4.0.48/resin.init b/www-servers/resin/files/4.0.48/resin.init new file mode 100644 index 000000000000..2ce1af068f93 --- /dev/null +++ b/www-servers/resin/files/4.0.48/resin.init @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use dns logger mysql postgresql +} + +runResin() { + JAVA_HOME=$(java-config -O) + [ -n "${GENTOO_VM}" ] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O) + export JAVA_HOME + + local extraArgs= + if [ "${VERBOSE}" = "yes" ]; then + extraArgs="-verbose" + fi + + local msg="${1}" + shift + + local cmdline="${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar -conf /etc/resin/resin.xml -server \"${SERVER_ID}\" -resin-home __RESIN_HOME__ -root-directory __RESIN_HOME__ ${extraArgs} ${@}" + + ebegin "${msg}" + su - resin -c "${cmdline}" + eend $? +} + +start() { + runResin "Starting Resin" "start" +} + +stop() { + runResin "Stopping Resin" "shutdown" +} diff --git a/www-servers/resin/metadata.xml b/www-servers/resin/metadata.xml new file mode 100644 index 000000000000..d0b51e930c61 --- /dev/null +++ b/www-servers/resin/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <use> + <flag name="admin">Enable Resin admin webapp</flag> + </use> +</pkgmetadata> diff --git a/www-servers/resin/resin-4.0.46.ebuild b/www-servers/resin/resin-4.0.46.ebuild new file mode 100644 index 000000000000..1143cbb5c629 --- /dev/null +++ b/www-servers/resin/resin-4.0.46.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="source" + +inherit java-pkg-2 java-ant-2 eutils flag-o-matic multilib user + +DESCRIPTION="A fast Servlet and JSP engine" +HOMEPAGE="http://www.caucho.com" +SRC_URI="http://www.caucho.com/download/${P}-src.zip" + +LICENSE="GPL-2" +SLOT="0" +IUSE="admin doc" + +KEYWORDS="~amd64 ~x86" + +CDEPEND=" + dev-java/jsr101:0 + dev-java/mojarra:2.2 + dev-java/oracle-javamail:0 + dev-java/validation-api:1.0 + dev-java/resin-servlet-api:3.1 + dev-java/glassfish-xmlrpc-api:0 + dev-java/glassfish-deployment-api:1.2" + +RDEPEND=">=virtual/jre-1.6 + ${CDEPEND}" +DEPEND=">=virtual/jdk-1.6 + app-arch/unzip + dev-libs/openssl + dev-java/ant-core:0 + ${CDEPEND}" + +RESIN_HOME="/usr/$(get_libdir)/resin" + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +EANT_GENTOO_CLASSPATH=" +jsr101 +mojarra-2.2 +oracle-javamail +validation-api-1.0 +glassfish-xmlrpc-api +resin-servlet-api-3.1 +glassfish-deployment-api-1.2" + +PATCHES=( + "${FILESDIR}"/"${PV}"/build.xml.patch +) + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup resin + enewuser resin -1 /bin/bash ${RESIN_HOME} resin +} + +src_prepare() { + epatch "${PATCHES[@]}" + + # No bundled JARs! + rm -f "${S}/modules/ext/"*.jar || die + rm -rf "${S}/project-jars" || die + + java-ant_bsfix_one "${S}/build.xml" + java-ant_bsfix_one "${S}/build-common.xml" + + rm -rf lib/* || die + + ln -s $(java-config --jdk-home)/lib/tools.jar || die +} + +src_configure() { + append-flags -fPIC -DPIC + + chmod 755 "${S}/configure" || die + econf --prefix=${RESIN_HOME} || die "econf failed" +} + +src_compile() { + einfo "Building libraries..." + emake || die "make failed" + + einfo "Building jars..." + eant || die "ant failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" + + einfo "Moving configuration to /etc ..." + dodir /etc/ + mv "${D}/${RESIN_HOME}/conf" "${D}/etc/resin" || die "mv of conf failed" + dosym /etc/resin ${RESIN_HOME}/conf + + einfo "Rewriting resin.xml ..." + sed -i \ + -e 's,${resin.root}/doc/resin-doc,webapps/resin-doc,' \ + -e 's,${resin.root}/doc/admin,webapps/admin,' \ + "${D}/etc/resin/resin.xml" || die + + einfo "Fixing log directory ..." + rm -rf "${D}/${RESIN_HOME}/log" || die + keepdir /var/log/resin + dosym /var/log/resin ${RESIN_HOME}/log + + einfo "Installing basic documentation ..." + dodoc README "${S}"/conf/*.xml + + einfo "Installing init.d script ..." + newinitd "${FILESDIR}/${PV}/resin.init" resin + newconfd "${FILESDIR}/${PV}/resin.conf" resin + + sed -i -e "s,__RESIN_HOME__,${RESIN_HOME},g" "${D}/etc/init.d/resin" || die + + einfo "Fixing location of jars ..." + rm -f "${S}/lib/tools.jar" || die + java-pkg_dojar "${S}"/lib/*.jar + rm -fr "${D}/${RESIN_HOME}/lib" || die + dosym /usr/share/resin/lib ${RESIN_HOME}/lib + + einfo "Symlinking directories from /var/lib/resin ..." + rm -rf "${D}/${RESIN_HOME}/resin-data" || die + rm -rf "${D}/${RESIN_HOME}/watchdog-data" || die + dodir /var/lib/resin/webapps + keepdir /var/lib/resin/hosts + keepdir /var/lib/resin/resin-data + keepdir /var/lib/resin/watchdog-data + mv "${D}"/${RESIN_HOME}/webapps/* "${D}/var/lib/resin/webapps" || \ + die "mv of webapps failed" + rm -rf "${D}/${RESIN_HOME}/webapps" || die + dosym /var/lib/resin/webapps ${RESIN_HOME}/webapps + dosym /var/lib/resin/hosts ${RESIN_HOME}/hosts + dosym /var/lib/resin/resin-data ${RESIN_HOME}/resin-data + dosym /var/lib/resin/watchdog-data ${RESIN_HOME}/watchdog-data + + dosym \ + "$(java-pkg_getjar resin-servlet-api-3.1 resin-servlet-api.jar)" \ + "${JAVA_PKG_JARDEST}/resin-servlet-api.jar" + + use admin && { + einfo "Installing administration app ..." + cp -a "${S}/doc/admin" "${D}/var/lib/resin/webapps/" || die + } + use doc && { + einfo "Installing documentation app ..." + cp -a "${S}/doc/resin-doc" "${D}/var/lib/resin/webapps/" || die + } + + use source && { + einfo "Installing sources ..." + java-pkg_dosrc "${S}"/modules/*/src/* > /dev/null + } + + einfo "Removing stale directories ..." + rm -fr "${D}/${RESIN_HOME}/bin" || die + rm -fr "${D}/${RESIN_HOME}/doc" || die + rm -fr "${D}/${RESIN_HOME}/keys" || die + rm -fr "${D}/${RESIN_HOME}/licenses" || die + rm -fr "${D}/etc/resin/"*.orig || die + + einfo "Fixing ownerships and permissions ..." + fowners -R 0:root / + fowners -R resin:resin /etc/resin + fowners -R resin:resin /var/lib/resin + fowners -R resin:resin /var/log/resin + + fperms 644 /etc/conf.d/resin + fperms 755 /etc/init.d/resin + fperms 750 /var/lib/resin + fperms 750 /etc/resin +} + +pkg_postinst() { + elog + elog " User and group 'resin' have been added." + elog + elog " By default, Resin runs on port 8080. You can change this" + elog " value by editing /etc/resin/resin.properties." + elog +} diff --git a/www-servers/resin/resin-4.0.48-r1.ebuild b/www-servers/resin/resin-4.0.48-r1.ebuild new file mode 100644 index 000000000000..ea6a53c71fd4 --- /dev/null +++ b/www-servers/resin/resin-4.0.48-r1.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="source" + +inherit java-pkg-2 java-ant-2 eutils flag-o-matic multilib user + +DESCRIPTION="A fast Servlet and JSP engine" +HOMEPAGE="http://www.caucho.com" +SRC_URI="http://www.caucho.com/download/${P}-src.zip" + +LICENSE="GPL-2" +SLOT="0" +IUSE="admin doc" + +KEYWORDS="~amd64 ~x86" + +CDEPEND=" + dev-java/jsr101:0 + dev-java/mojarra:2.2 + dev-java/oracle-javamail:0 + dev-java/validation-api:1.0 + dev-java/resin-servlet-api:3.1 + dev-java/glassfish-xmlrpc-api:0 + dev-java/glassfish-deployment-api:1.2" + +RDEPEND=" + ${CDEPEND} + >=virtual/jre-1.6" + +DEPEND=" + ${CDEPEND} + app-arch/unzip + dev-libs/openssl + >=virtual/jdk-1.6 + dev-java/ant-core:0" + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +EANT_GENTOO_CLASSPATH=" + jsr101 + mojarra-2.2 + oracle-javamail + validation-api-1.0 + glassfish-xmlrpc-api + resin-servlet-api-3.1 + glassfish-deployment-api-1.2 +" + +PATCHES=( + "${FILESDIR}"/"${PV}"/build.xml.patch +) + +pkg_setup() { + export RESIN_HOME="/usr/$(get_libdir)/resin" + java-pkg-2_pkg_setup + enewgroup resin + enewuser resin -1 /bin/bash "${RESIN_HOME}" resin +} + +src_prepare() { + epatch "${PATCHES[@]}" + + # No bundled JARs! + rm -rv "${S}"/modules/ext/*.jar "${S}"/project-jars || die + + java-ant_bsfix_one "${S}/build.xml" + java-ant_bsfix_one "${S}/build-common.xml" + + rm -rv lib/* || die + + ln -s $(java-config --jdk-home)/lib/tools.jar || die +} + +src_configure() { + append-flags -fPIC -DPIC + + chmod 755 "${S}/configure" || die + econf --prefix=${RESIN_HOME} || die "econf failed" +} + +src_compile() { + einfo "Building libraries..." + emake + + einfo "Building jars..." + eant || die "ant failed" +} + +src_install() { + emake DESTDIR="${D}" install + + einfo "Moving configuration to /etc ..." + dodir /etc/ + mv "${D}/${RESIN_HOME}/conf" "${D}/etc/resin" || die + dosym /etc/resin ${RESIN_HOME}/conf + + einfo "Rewriting resin.xml ..." + sed -i \ + -e 's,${resin.root}/doc/resin-doc,webapps/resin-doc,' \ + -e 's,${resin.root}/doc/admin,webapps/admin,' \ + "${D}/etc/resin/resin.xml" || die + + einfo "Fixing log directory ..." + rm -rv "${D}/${RESIN_HOME}"/log || die + keepdir /var/log/resin + dosym /var/log/resin ${RESIN_HOME}/log + + einfo "Installing basic documentation ..." + dodoc README "${S}"/conf/*.xml + + einfo "Installing init.d script ..." + newinitd "${FILESDIR}/${PV}/resin.init" resin + newconfd "${FILESDIR}/${PV}/resin.conf" resin + + sed -i -e "s,__RESIN_HOME__,${RESIN_HOME},g" "${D}/etc/init.d/resin" || die + + einfo "Fixing location of jars ..." + #rm -v "${S}"/lib/tools.jar || die + java-pkg_dojar "${S}"/lib/*.jar + rm -rv "${D}/${RESIN_HOME}"/lib || die + dosym /usr/share/resin/lib ${RESIN_HOME}/lib + + dodir /var/lib/resin/webapps + keepdir /var/lib/resin/hosts + keepdir /var/lib/resin/resin-data + keepdir /var/lib/resin/watchdog-data + + mv "${D}"/${RESIN_HOME}/webapps/* "${D}/var/lib/resin/webapps" || die + rm -rv "${D}/${RESIN_HOME}"/webapps || die + dosym /var/lib/resin/webapps ${RESIN_HOME}/webapps + dosym /var/lib/resin/hosts ${RESIN_HOME}/hosts + dosym /var/lib/resin/resin-data ${RESIN_HOME}/resin-data + dosym /var/lib/resin/watchdog-data ${RESIN_HOME}/watchdog-data + + dosym \ + "$(java-pkg_getjar resin-servlet-api-3.1 resin-servlet-api.jar)" \ + "${JAVA_PKG_JARDEST}/resin-servlet-api.jar" + + use admin && { + einfo "Installing administration app ..." + cp -a "${S}/doc/admin" "${D}/var/lib/resin/webapps/" || die + } + use doc && { + einfo "Installing documentation app ..." + cp -a "${S}/doc/resin-doc" "${D}/var/lib/resin/webapps/" || die + } + + use source && { + einfo "Installing sources ..." + java-pkg_dosrc "${S}"/modules/*/src/* > /dev/null + } + + einfo "Removing stale directories ..." + rm -rv "${D}/${RESIN_HOME}"/{bin,doc} || die + #rm -rv "${D}"/etc/resin/*.orig || die + + einfo "Fixing ownerships and permissions ..." + fowners -R 0:root / + fowners -R resin:resin /etc/resin + fowners -R resin:resin /var/lib/resin + fowners -R resin:resin /var/log/resin + + fperms 644 /etc/conf.d/resin + fperms 755 /etc/init.d/resin + fperms 750 /var/lib/resin + fperms 750 /etc/resin +} + +pkg_postinst() { + elog + elog " User and group 'resin' have been added." + elog + elog " By default, Resin runs on port 8080. You can change this" + elog " value by editing /etc/resin/resin.properties." + elog +} diff --git a/www-servers/resin/resin-4.0.48.ebuild b/www-servers/resin/resin-4.0.48.ebuild new file mode 100644 index 000000000000..228b75bbb0b1 --- /dev/null +++ b/www-servers/resin/resin-4.0.48.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="source" + +inherit java-pkg-2 java-ant-2 eutils flag-o-matic multilib user + +DESCRIPTION="A fast Servlet and JSP engine" +HOMEPAGE="http://www.caucho.com" +SRC_URI="http://www.caucho.com/download/${P}-src.zip" + +LICENSE="GPL-2" +SLOT="0" +IUSE="admin doc" + +KEYWORDS="~amd64 ~x86" + +CDEPEND=" + dev-java/jsr101:0 + dev-java/mojarra:2.2 + dev-java/oracle-javamail:0 + dev-java/validation-api:1.0 + dev-java/resin-servlet-api:3.1 + dev-java/glassfish-xmlrpc-api:0 + dev-java/glassfish-deployment-api:1.2" + +RDEPEND=" + ${CDEPEND} + >=virtual/jre-1.6" + +DEPEND=" + ${CDEPEND} + app-arch/unzip + dev-libs/openssl + >=virtual/jdk-1.6 + dev-java/ant-core:0" + +RESIN_HOME="/usr/$(get_libdir)/resin" + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +EANT_GENTOO_CLASSPATH=" + jsr101 + mojarra-2.2 + oracle-javamail + validation-api-1.0 + glassfish-xmlrpc-api + resin-servlet-api-3.1 + glassfish-deployment-api-1.2 +" + +PATCHES=( + "${FILESDIR}"/"${PV}"/build.xml.patch +) + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup resin + enewuser resin -1 /bin/bash "${RESIN_HOME}" resin +} + +src_prepare() { + epatch "${PATCHES[@]}" + + # No bundled JARs! + rm -rv "${S}"/modules/ext/*.jar "${S}"/project-jars || die + + java-ant_bsfix_one "${S}/build.xml" + java-ant_bsfix_one "${S}/build-common.xml" + + rm -rv lib/* || die + + ln -s $(java-config --jdk-home)/lib/tools.jar || die +} + +src_configure() { + append-flags -fPIC -DPIC + + chmod 755 "${S}/configure" || die + econf --prefix=${RESIN_HOME} || die "econf failed" +} + +src_compile() { + einfo "Building libraries..." + emake + + einfo "Building jars..." + eant || die "ant failed" +} + +src_install() { + emake DESTDIR="${D}" install + + einfo "Moving configuration to /etc ..." + dodir /etc/ + mv "${D}/${RESIN_HOME}/conf" "${D}/etc/resin" || die + dosym /etc/resin ${RESIN_HOME}/conf + + einfo "Rewriting resin.xml ..." + sed -i \ + -e 's,${resin.root}/doc/resin-doc,webapps/resin-doc,' \ + -e 's,${resin.root}/doc/admin,webapps/admin,' \ + "${D}/etc/resin/resin.xml" || die + + einfo "Fixing log directory ..." + rm -rv "${D}/${RESIN_HOME}"/log || die + keepdir /var/log/resin + dosym /var/log/resin ${RESIN_HOME}/log + + einfo "Installing basic documentation ..." + dodoc README "${S}"/conf/*.xml + + einfo "Installing init.d script ..." + newinitd "${FILESDIR}/${PV}/resin.init" resin + newconfd "${FILESDIR}/${PV}/resin.conf" resin + + sed -i -e "s,__RESIN_HOME__,${RESIN_HOME},g" "${D}/etc/init.d/resin" || die + + einfo "Fixing location of jars ..." + #rm -v "${S}"/lib/tools.jar || die + java-pkg_dojar "${S}"/lib/*.jar + rm -rv "${D}/${RESIN_HOME}"/lib || die + dosym /usr/share/resin/lib ${RESIN_HOME}/lib + + dodir /var/lib/resin/webapps + keepdir /var/lib/resin/hosts + keepdir /var/lib/resin/resin-data + keepdir /var/lib/resin/watchdog-data + + mv "${D}"/${RESIN_HOME}/webapps/* "${D}/var/lib/resin/webapps" || die + rm -rv "${D}/${RESIN_HOME}"/webapps || die + dosym /var/lib/resin/webapps ${RESIN_HOME}/webapps + dosym /var/lib/resin/hosts ${RESIN_HOME}/hosts + dosym /var/lib/resin/resin-data ${RESIN_HOME}/resin-data + dosym /var/lib/resin/watchdog-data ${RESIN_HOME}/watchdog-data + + dosym \ + "$(java-pkg_getjar resin-servlet-api-3.1 resin-servlet-api.jar)" \ + "${JAVA_PKG_JARDEST}/resin-servlet-api.jar" + + use admin && { + einfo "Installing administration app ..." + cp -a "${S}/doc/admin" "${D}/var/lib/resin/webapps/" || die + } + use doc && { + einfo "Installing documentation app ..." + cp -a "${S}/doc/resin-doc" "${D}/var/lib/resin/webapps/" || die + } + + use source && { + einfo "Installing sources ..." + java-pkg_dosrc "${S}"/modules/*/src/* > /dev/null + } + + einfo "Removing stale directories ..." + rm -rv "${D}/${RESIN_HOME}"/{bin,doc} || die + #rm -rv "${D}"/etc/resin/*.orig || die + + einfo "Fixing ownerships and permissions ..." + fowners -R 0:root / + fowners -R resin:resin /etc/resin + fowners -R resin:resin /var/lib/resin + fowners -R resin:resin /var/log/resin + + fperms 644 /etc/conf.d/resin + fperms 755 /etc/init.d/resin + fperms 750 /var/lib/resin + fperms 750 /etc/resin +} + +pkg_postinst() { + elog + elog " User and group 'resin' have been added." + elog + elog " By default, Resin runs on port 8080. You can change this" + elog " value by editing /etc/resin/resin.properties." + elog +} diff --git a/www-servers/servefile/Manifest b/www-servers/servefile/Manifest new file mode 100644 index 000000000000..2464ff883657 --- /dev/null +++ b/www-servers/servefile/Manifest @@ -0,0 +1,5 @@ +DIST servefile-0.4.4.tar.gz 14219 SHA256 8b43c1158df1a575a06077e334dba271cc4541b1f25cba1c132241c18bbe2bc2 SHA512 31ce200db7c8deee9f135c2151565a41fa791dcaa969d9096e6aae2c6975673fd409320be09b7ca20b544326293ed73369f3bd77f379a2ec5f94642d4ef3e1f4 WHIRLPOOL e04a82e1b6cfb7ecc293e5e544fcd8d15128296c63dd6e76966a731b7f1107f6d98557ba292c33fd141dd9de5dda7b31686c586b40e1857b7c2cfb6e26826990 +EBUILD servefile-0.4.4.ebuild 575 SHA256 6c38a93e1be640c1824d12b8e4f4ca5e9a703ac9192213a38945d7de502beb11 SHA512 de03fe5c46451f19dacc7da2255de44ba2105ed42d5a94f8cfa06c3f936aeaaa488fe02e75e60581fe81afa696d62f6ecda9272d279dea0c9dff0d4a8843c525 WHIRLPOOL 682062bb2543c4481007892917c964a2170f2143d54cb0a2fb933168a91bd34e7aad950bea6fb587dfa4a2ab9b90a475d6887a174d0cdafa0d3c5f725d99acb3 +MISC ChangeLog 2635 SHA256 300be5e55d27437250fc5e580009fc0001ecbc288fcac10a002ed41899b70f53 SHA512 740b8eb2e17d0144e34d675aa091eb35a5efaed99e0f1150c94e279b71435e1ac78480d30ccff180645db0a5acb4777944d2d9c6d5f2ad1dba484f5886befc31 WHIRLPOOL 43fae87a35a5f0d4d5849124a9aec42b92d68e76c62e3c56b4be90f4f1aa62d170aae737dd966c3fdfe7ecb4e9c324e0bbe2fa462d49fb7132db68c8f1e17071 +MISC ChangeLog-2015 1055 SHA256 28aa9a69dba1724d7929de7dd0fdb6a9156eabb4e8eb0a9d5e78b32bf2c45822 SHA512 e5bc4491756423670e218744c8d1b6afa3e86788513e84899195c5af0bb001022010cb3cd5841f24c508cea089c74f7d7b4006034d923290788de32a75edffe6 WHIRLPOOL 35fd6079051859950cfc2655d7692f4d25012348fd95983add4d593d7d64f2aeb0b6337451d9ab0f244b1ef8b5b672acf28c36af8c1d0ec46416da0ad1c1ab05 +MISC metadata.xml 249 SHA256 abaf8c3d7632caaacd242fc7f4d5b1377778c50c7bfa5c356b35773f377d4f69 SHA512 334ac61f9acc5c4917fd29afb3b420b1689b39be80cada419bed1db033e64130866d0995abe5f1c75eb1290f51734e9ad4c8d06fd8b49c288ecf617a0693d273 WHIRLPOOL cb6e12eeeb412f25a85ebc6322f4b22a14c7c23fc7d49a46e8168cdbf425e121a276fc4e915c4626ed9b64d7f7aef50ee11c428ed149126999d277adbea1f57f diff --git a/www-servers/servefile/metadata.xml b/www-servers/servefile/metadata.xml new file mode 100644 index 000000000000..6d2298876faa --- /dev/null +++ b/www-servers/servefile/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sping@gentoo.org</email> + <name>Sebastian Pipping</name> + </maintainer> +</pkgmetadata> diff --git a/www-servers/servefile/servefile-0.4.4.ebuild b/www-servers/servefile/servefile-0.4.4.ebuild new file mode 100644 index 000000000000..268ad61c03c7 --- /dev/null +++ b/www-servers/servefile/servefile-0.4.4.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="Serve a single file via HTTP" +HOMEPAGE="http://seba-geek.de/stuff/servefile/" +SRC_URI="http://seba-geek.de/proj/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +RDEPEND=" + ssl? ( dev-python/pyopenssl ) + sys-apps/grep + sys-apps/iproute2 + sys-apps/net-tools + sys-apps/sed" + +src_install() { + distutils-r1_src_install + + dodoc ChangeLog || die + doman ${PN}.1 || die +} diff --git a/www-servers/sniproxy/Manifest b/www-servers/sniproxy/Manifest new file mode 100644 index 000000000000..5f29dedd699c --- /dev/null +++ b/www-servers/sniproxy/Manifest @@ -0,0 +1,4 @@ +AUX sniproxy.init 493 SHA256 06e340db11a20102c227a3a8cd80e870c5363091455832f59802dc4000b43c33 SHA512 6dc6ba017c18cc5c4b15b2085e95157c396c44b8d368b6ee28c559c9d4072460604afca3a20c46c639c5b095a3da65e3b2b15fc20d738e41651cc77615dd3ca0 WHIRLPOOL 45b11da0d66cd86b5b4043892cd44337a304bf563bffc1b537a4cf0700641045e1e29ca23b443957f70f59941c653ac65be1333e5d4e653aeb5a5946374b759f +DIST sniproxy-0.5.0.tar.gz 72654 SHA256 0b8dd06f9aa9e1c4151b572caf645ffceacdd35a139ded16a7fb0035452c17e5 SHA512 52dbb217193d2b7bf9dea37b13fde395b5c56d0a6627508a245f2807920deb282aae3c1ae7e6b5fa68432990e48998989fd28027b65cb7310f214b29f98e5e5d WHIRLPOOL c353326d5a25123da9c6fbfb85c2a9435f036792f8442adb6650b91b9d51d8916eaded75aa68fdf05768db72bc4f9cccf5dae256e21559d7b5d26ccff6c48b41 +EBUILD sniproxy-0.5.0.ebuild 1358 SHA256 82e3583226286ec9a5205a36af25298e708704a3cf0fbe1b1cd327eb856e72bc SHA512 0f0e254ce173b2c8f563db051cc2647cdad62b09d5fcabf82a43e172c11cdf3406146eb18da087a6ee306fef7299f115592c6d394f2cbcdfb95782b696a2c769 WHIRLPOOL 75c56aeb68ad370afa583a044f192da7d5dcdb59180a1f4811920bcf13e58a1ebb17d6c277391249ac17a134317c66ef83a5328a5e68de3ccf452114be66c0cb +MISC metadata.xml 630 SHA256 737c49cb3f53fe0ed05458003c7f081058dfa521011a566f2da18f38e2aa7b60 SHA512 263e1b4f405a67f6e402cd842d95640664c9f961ee29c614022787be76a2d83b5dcb3c4e784bef4369424680bdf1888d440eeb0a195dd8dfa65132c137a2fb55 WHIRLPOOL 4e5a4aa7f9d370f5674c554d3f79fd7cb9a6b7f6ed01d70b24f41021e54495e9f02decf2718dd0e893ba9d467322627d2f9a8c53d003f01aaf770043e137d379 diff --git a/www-servers/sniproxy/files/sniproxy.init b/www-servers/sniproxy/files/sniproxy.init new file mode 100644 index 000000000000..db9c99bfabeb --- /dev/null +++ b/www-servers/sniproxy/files/sniproxy.init @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +name="sniproxy daemon" +description="Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request." + +SNIPROXY_CONFFILE=${SNIPROXY_CONFFILE:-/etc/sniproxy/${SVCNAME}.conf} + +command="/usr/sbin/sniproxy" +command_args="-c \"${SNIPROXY_CONFFILE}\"" +pidfile=${SNIPROXY_PIDFILE:-/var/run/sniproxy.pid} + +depend() { + need net + use logger +} diff --git a/www-servers/sniproxy/metadata.xml b/www-servers/sniproxy/metadata.xml new file mode 100644 index 000000000000..9a5095f6d430 --- /dev/null +++ b/www-servers/sniproxy/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>nemunaire@nemunai.re</email> + <name>Pierre-Olivier Mercier</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="dns"> + Enable DNS resolver via net-libs/udns + </flag> + <flag name="largefile"> + Enable large file support (so we can log more than 2GB) + </flag> + <flag name="rfc3339"> + Use RFC3339 timestamp format in log. + </flag> + </use> +</pkgmetadata> diff --git a/www-servers/sniproxy/sniproxy-0.5.0.ebuild b/www-servers/sniproxy/sniproxy-0.5.0.ebuild new file mode 100644 index 000000000000..c5b9a45f2ea7 --- /dev/null +++ b/www-servers/sniproxy/sniproxy-0.5.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools user + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git" + EGIT_BRANCH="master" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/dlundquist/sniproxy/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Proxies incoming HTTP and TLS connections based on the hostname" +HOMEPAGE="https://github.com/dlundquist/sniproxy" + +LICENSE="BSD-2" +SLOT="0" +IUSE="+dns +largefile rfc3339" + +RDEPEND=" + dev-libs/libev + >=dev-libs/libpcre-3 + dns? ( net-libs/udns ) +" +DEPEND="${RDEPEND}" + +src_prepare() { + default + eautoreconf + + sed -i "/user/s/daemon/sniproxy/" debian/sniproxy.conf || die "Unable to replace configuration" + sed -i "/create/s/daemon/sniproxy/" debian/logrotate.conf || die "Unable to replace logrotate configuration" +} + +src_install() { + default + + newinitd "${FILESDIR}/sniproxy.init" sniproxy + + insinto /etc/sniproxy + doins debian/sniproxy.conf + + keepdir /var/log/sniproxy + + insinto /etc/logrotate.d + newins debian/logrotate.conf sniproxy + + dodoc ARCHITECTURE.md AUTHORS README.md + doman man/sniproxy.8 + doman man/sniproxy.conf.5 +} + +src_test() { + emake -j1 check +} + +pkg_postinst() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/sniproxy ${PN} +} diff --git a/www-servers/spawn-fcgi/Manifest b/www-servers/spawn-fcgi/Manifest new file mode 100644 index 000000000000..24d09ea04df5 --- /dev/null +++ b/www-servers/spawn-fcgi/Manifest @@ -0,0 +1,11 @@ +AUX spawn-fcgi.confd 2238 SHA256 8f2a0ff785f4a857d855471b5eee9120c9d7a0efd69988bb2d66d09664b5b0ed SHA512 0b0d5754de17dd691ead380a93526aa7fbdd432359b248ce06f030daefb1ad96e4a81fe5319557fb66602baccb45a0febf6417ec7b79eee91e1e070d9a852b90 WHIRLPOOL 6ae197ada539a6b426db84b60fca25a81cca8d55344cffdec60167f138e599887b30e355d9b356880ea4985c4ea14baba3fe6492e35648280ba6a701709b8e00 +AUX spawn-fcgi.initd-r1 3090 SHA256 19679a0a40f956f4e70d786280c713ba9c0c5d36d2c06cadfae8556f092db492 SHA512 e7336da885a19497247648c9b2e04044005285f8b989386d6d5441dbf284ebffa9df062e6e23cd0ae635232abaa2d41ff408b0c913683a6240929c5d1ec8a624 WHIRLPOOL d1f61b2d90b7d700cd53e30878182ddeb0bf59750e8d90a7baae74c60fb7f2b8008438c3acb980be9b4a5e846a1668490af339205e981ee88b65f60d5ab8b10e +AUX spawn-fcgi.initd-r2 3082 SHA256 6bda1dcf17b26f1dd20f67828004c57b308f54befbbb4772374623ab541f4c1d SHA512 86a82debd752709af3abd6056b31839a87d4dd14e990e5256a97e40b25c2293c113fc672b24ef7f2122b3d7b43de0d3434248240bf56c616ea2cbafcb5c82a29 WHIRLPOOL 251cc5d3fcbf48acb8561341fc51d89c71cd2ab1d375491f6f7be0f248430f4ab01c3993f4d7741165d790f2f7e82c91356a676f16cb27621d948b819b70d9d7 +DIST spawn-fcgi-1.6.3.tar.bz2 77607 SHA256 e6721dc0fa59bb00e05f160406815d53c95e81ac28f7e52fbd36497584f846cd SHA512 136a198cbcda0d3ae4e445eac2ccdcc5483801514ce77542c630d615a7a19a68864b9d7d79733adb16347ba64c833afbf2a18df82937107a6bc8467f630b03b4 WHIRLPOOL c424426e39f5151de29491b6e0900a546fcf7fb31a7b226c7246a79a5af62357d7dfddc9179aceb02d993fa09529e973794f70ece961336bb760763663080176 +DIST spawn-fcgi-1.6.4.tar.xz 79944 SHA256 423b0c317e0084773b483985cc21930c4b8dfcb411f7353d6ee6fc41d9cb9d45 SHA512 e2b317997b56f852ad644b80fe36fa08376ae81f93566e181c31a3b6764de2eeb32a2e10e420136d8536487c575678ca52a33f7cb3488aadf7185fbd0196bee0 WHIRLPOOL c62857e0f534c09d67bf8d0c7bd16e9931827453778b56b7e6fe4383570e46452027ad4e982778b558dcc08bf0af25178c2205048f494aba9690ed3ad1baeff2 +EBUILD spawn-fcgi-1.6.3-r1.ebuild 784 SHA256 fbedf662972870bd64ab635dc9b975b509588a55108a9182821befc994987228 SHA512 402d57c189dfb2bdf1181f84ddc52cacfe31b663cf56fc80c7dac1a5d41f33e81df242ba752acd3d3822214f9a11ae38b4acd283a4e95f3fa7801d163065087c WHIRLPOOL 4d4ee3fee6d92ff3ad456fbec8a92d0528d9c46a73b11d2ec3ba5c38441c295065cd7192f6c8fea3150aac3c17fd4b6eeed78dc09cba02b16c1ab66d49b4f201 +EBUILD spawn-fcgi-1.6.3-r2.ebuild 756 SHA256 7be347b22ba9db03220c3f9bc694f318ce6cbc737c6633b4422100a2ba7cdef2 SHA512 b249896cdf9ae55680803f1b7a91bb08d106e2ea084e529ff9312eb45755d1c0d095121752e13eb95d45e991316a80831d08665c459a83f5537e8f272b089e94 WHIRLPOOL 1550f6f64c829033d65e878a5c1268e2205fdc9b83bf845beba534029575b700faa93e63d482c28de82005b81d42aca5c1250ea41954149cf95787b5fe818263 +EBUILD spawn-fcgi-1.6.4.ebuild 755 SHA256 fdf3a7bc64410dc576be0eeb8e5e4362abc3d9535487241e9c198228d1866f07 SHA512 48019e1e463067b5164e2e5557be78217cdf636bffdea8af0fdeeeef5b5231f7a51a7d71f40ae187bcab99c94201a536da92666e466174f1cc558ff30d997525 WHIRLPOOL 30b0bf9c74429b9204bc326acbc3c7f6d5a09c8b9cfb677fb31d574d77259154bfbf439bc288f138ec9dea7e30c224537e8d0538497a18c2c25afda005723ebd +MISC ChangeLog 2566 SHA256 59029f0f2886c016ba375a14ac0b05fd5d4056f66ef9b46cb4036a11c7a11838 SHA512 c10d04c396eb7323e6273e968a839392b6d4f6c025d5af077d6f82b14a171fb458e85bd352073b0edb7f85265eb34e24dbec51e7d7181bdb8ab348cf3be90f2d WHIRLPOOL 2627c8a56b18f65f4e9b337015851385c549aba7c5030ee0907a4110eca3e70aeb633796042b19214f4ab6ec4a3bbe0f98afe9f3eba650c603e63b2c050dbf30 +MISC ChangeLog-2015 5884 SHA256 b109f041397f6da7bf934596f74032c55438eff830bc842bb66dbbcdf4805c56 SHA512 a9d6d3fe9c2edbf4b85257ff710f37818ef7087813111614931f3a57e7137c694db0cec427202af680294eeafd0fb981d4bbcb1d7f64ffe3210d5ff64b499fe0 WHIRLPOOL 997544fc665d3e13194a8b89e86332f3780eb0124edf083c810efc615407d6e0ccec445bcbfc945b00306d5a7566bf56d91e80024845f698945c721a26460bf6 +MISC metadata.xml 455 SHA256 9d368d9a4b11a1a7e615df9e75620c4c8a76f4273eebfe63b0c354ce24e5494f SHA512 df0148838ae2d49436a428059e56e35618eda77cbf6cb95e39b58384556650664ac56a125c8c244ae2804c48d3433a384c274426a943bae15420aee2a808e439 WHIRLPOOL 686394c2309343c8381bef96a0eb4b4a6be343ccea260d3735e39c163e1be680085447a28aee3e0b759cacda6b91b3c0ba80274334bf9908f32e0c584ae54009 diff --git a/www-servers/spawn-fcgi/files/spawn-fcgi.confd b/www-servers/spawn-fcgi/files/spawn-fcgi.confd new file mode 100644 index 000000000000..3e7f103a8fe2 --- /dev/null +++ b/www-servers/spawn-fcgi/files/spawn-fcgi.confd @@ -0,0 +1,73 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# DO NOT MODIFY THIS FILE DIRECTLY! CREATE A COPY AND MODIFY THAT INSTEAD! + +# The FCGI process can be made available through a filesystem socket or +# through a inet socket. One and only one of the two types must be choosen. +# Default is the inet socket. + +# The filename specified by +# FCGI_SOCKET will be suffixed with a number for each child process, for +# example, fcgi.socket-1. +# Leave empty to use an IP socket (default). See below. Enabling this, +# disables the IP socket. +# +FCGI_SOCKET= + +# When using FCGI_PORT, connections will only be accepted from the following +# address. The default is 127.0.0.1. Use 0.0.0.0 to bind to all addresses. +# +FCGI_ADDRESS=127.0.0.1 + +# The port specified by FCGI_PORT is the port used +# by the first child process. If this is set to 1234 then subsequent child +# processes will use 1235, 1236, etc. +# +FCGI_PORT=1234 + +# The path to your FastCGI application. These sometimes carry the .fcgi +# extension but not always. For PHP, you should usually point this to +# /usr/bin/php-cgi. +# +#FCGI_PROGRAM=/usr/bin/php-cgi +FCGI_PROGRAM= + +# The number of child processes to spawn. The default is 1. +# +FCGI_CHILDREN=1 + +# If you want to run your application inside a chroot then specify the +# directory here. Leave this blank otherwise. +# +FCGI_CHROOT= + +# If you want to run your application from a specific directiory specify +# it here. Leave this blank otherwise. +# +FCGI_CHDIR= + +# The user and group to run your application as. If you do not specify these, +# the application will be run as root:root. +# +FCGI_USER= +FCGI_GROUP= + +# Additional options you might want to pass to spawn-fcgi +# +#FCGI_EXTRA_OPTIONS= + +# If your application requires additional environment variables, you may +# specify them here. See PHP example below. +# +ALLOWED_ENV="PATH" + +# PHP ONLY :: These two options are specific to PHP. The first is the number +# of child processes to spawn. The second is the number of requests to be +# served by a single PHP process before it is restarted. +# +#PHP_FCGI_CHILDREN=5 +#PHP_FCGI_MAX_REQUESTS=500 +# +# For this to work you would set +# ALLOWED_ENV="PATH PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS" diff --git a/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r1 b/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r1 new file mode 100644 index 000000000000..74879c2eb6fc --- /dev/null +++ b/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r1 @@ -0,0 +1,116 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PROGNAME=${SVCNAME#*.} +SPAWNFCGI=/usr/bin/spawn-fcgi +PIDPATH=/var/run/spawn-fcgi +PIDFILE=${PIDPATH}/${PROGNAME} + +depend() { + need net +} + +start() { + local X E OPTIONS i RETVAL FCGI_PROGRAM_EXEC + FCGI_PROGRAM_EXEC=$(echo ${FCGI_PROGRAM} | awk "{print \$1}") + + if [ "${SVCNAME}" = "spawn-fcgi" ]; then + eerror "You are not supposed to run this script directly. Create a symlink" + eerror "for the FastCGI application you want to run as well as a copy of the" + eerror "configuration file and modify it appropriately like so..." + eerror + eerror " ln -s spawn-fcgi /etc/init.d/spawn-fcgi.trac" + eerror " cp /etc/conf.d/spawn-fcgi /etc/conf.d/spawn-fcgi.trac" + eerror " `basename "${EDITOR}"` /etc/conf.d/spawn-fcgi.trac" + eerror + return 1 + fi + + if [ ! -z "${FCGI_SOCKET}" ] && [ ! -z "${FCGI_PORT}" ]; then + eerror "Only one of the two may be defined:" + eerror " FCGI_SOCKET=${FCGI_SOCKET}" + eerror " FCGI_PORT=${FCGI_PORT}" + return 1 + fi + + if [ -z "${FCGI_PROGRAM}" ]; then + eerror "You need to specify which \$FCGI_PROGRAM" + eerror "you want to start." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" + return 1 + fi + + if [ ! -x "${FCGI_PROGRAM_EXEC}" ]; then + eerror "The file specified as \$FCGI_PROGRAM" + eerror "does not exist or is not executable." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" + return 1 + fi + + if [ -z "${FCGI_ADDRESS}" ]; then + FCGI_ADDRESS=127.0.0.1 + fi + + if [ -z "${FCGI_CHILDREN}" ]; then + FCGI_CHILDREN=1 + fi + + if [ -n "${FCGI_CHROOT}" ]; then + OPTIONS="${OPTIONS} -c ${FCGI_CHROOT}" + fi + + if [ -n "${FCGI_DIR}" ]; then + OPTIONS="${OPTIONS} -d ${FCGI_DIR}" + fi + + if [ -n "${FCGI_USER}" ] && [ "${FCGI_USER}" != "root" ]; then + OPTIONS="${OPTIONS} -u ${FCGI_USER}" + fi + + if [ -n "${FCGI_GROUP}" ] && [ "${FCGI_GROUP}" != "root" ]; then + OPTIONS="${OPTIONS} -g ${FCGI_GROUP}" + fi + + if [ -n "${FCGI_EXTRA_OPTIONS}" ]; then + OPTIONS="${OPTIONS} ${FCGI_EXTRA_OPTIONS}" + fi + + unset E + for i in ${ALLOWED_ENV}; do + local j + eval j=$(echo \$"$i") + [ -n "${j}" ] && E="${E} ${i}=${j}" + done + + ebegin "Starting FastCGI application ${PROGNAME}" + checkpath -q -d -m 700 /var/run/spawn-fcgi + X=0 + while [ $X -lt ${FCGI_CHILDREN} ]; do + X=$(($X+1)) + local P SOCKET_OPTION INET_OPTION + P=${PIDFILE}-${X}.pid + [ -n "${FCGI_SOCKET}" ] && SOCKET_OPTION="-s ${FCGI_SOCKET}-${X}" + [ -n "${FCGI_PORT}" ] && INET_OPTION="-a ${FCGI_ADDRESS} -p $((${FCGI_PORT} + ${X} - 1))" + + env -i ${E} /sbin/start-stop-daemon --start --pidfile ${P} --exec ${SPAWNFCGI} \ + --name ${FCGI_PROGRAM_EXEC} -- ${SOCKET_OPTION} ${INET_OPTION} \ + -P ${P} ${OPTIONS} -- ${FCGI_PROGRAM} + RETVAL=$? + + # Stop on error. Don't want to spawn a mess! + [ "${RETVAL}" != "0" ] && break + done + eend ${RETVAL} +} + +stop() { + local X RETVAL=0 + + ebegin "Stopping FastCGI application ${PROGNAME}" + for X in ${PIDFILE}-[0-9]*.pid ; do + start-stop-daemon --stop --pidfile ${X} || \ + { RETVAL=$? && break ; } + done + eend ${RETVAL} +} diff --git a/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r2 b/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r2 new file mode 100644 index 000000000000..e7941a125a58 --- /dev/null +++ b/www-servers/spawn-fcgi/files/spawn-fcgi.initd-r2 @@ -0,0 +1,116 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PROGNAME=${SVCNAME#*.} +SPAWNFCGI=/usr/bin/spawn-fcgi +PIDPATH=/run/spawn-fcgi +PIDFILE=${PIDPATH}/${PROGNAME} + +depend() { + need net +} + +start() { + local X E OPTIONS i RETVAL FCGI_PROGRAM_EXEC + FCGI_PROGRAM_EXEC=$(echo ${FCGI_PROGRAM} | awk "{print \$1}") + + if [ "${SVCNAME}" = "spawn-fcgi" ]; then + eerror "You are not supposed to run this script directly. Create a symlink" + eerror "for the FastCGI application you want to run as well as a copy of the" + eerror "configuration file and modify it appropriately like so..." + eerror + eerror " ln -s spawn-fcgi /etc/init.d/spawn-fcgi.trac" + eerror " cp /etc/conf.d/spawn-fcgi /etc/conf.d/spawn-fcgi.trac" + eerror " `basename "${EDITOR}"` /etc/conf.d/spawn-fcgi.trac" + eerror + return 1 + fi + + if [ ! -z "${FCGI_SOCKET}" ] && [ ! -z "${FCGI_PORT}" ]; then + eerror "Only one of the two may be defined:" + eerror " FCGI_SOCKET=${FCGI_SOCKET}" + eerror " FCGI_PORT=${FCGI_PORT}" + return 1 + fi + + if [ -z "${FCGI_PROGRAM}" ]; then + eerror "You need to specify which \$FCGI_PROGRAM" + eerror "you want to start." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" + return 1 + fi + + if [ ! -x "${FCGI_PROGRAM_EXEC}" ]; then + eerror "The file specified as \$FCGI_PROGRAM" + eerror "does not exist or is not executable." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" + return 1 + fi + + if [ -z "${FCGI_ADDRESS}" ]; then + FCGI_ADDRESS=127.0.0.1 + fi + + if [ -z "${FCGI_CHILDREN}" ]; then + FCGI_CHILDREN=1 + fi + + if [ -n "${FCGI_CHROOT}" ]; then + OPTIONS="${OPTIONS} -c ${FCGI_CHROOT}" + fi + + if [ -n "${FCGI_DIR}" ]; then + OPTIONS="${OPTIONS} -d ${FCGI_DIR}" + fi + + if [ -n "${FCGI_USER}" ] && [ "${FCGI_USER}" != "root" ]; then + OPTIONS="${OPTIONS} -u ${FCGI_USER}" + fi + + if [ -n "${FCGI_GROUP}" ] && [ "${FCGI_GROUP}" != "root" ]; then + OPTIONS="${OPTIONS} -g ${FCGI_GROUP}" + fi + + if [ -n "${FCGI_EXTRA_OPTIONS}" ]; then + OPTIONS="${OPTIONS} ${FCGI_EXTRA_OPTIONS}" + fi + + unset E + for i in ${ALLOWED_ENV}; do + local j + eval j=$(echo \$"$i") + [ -n "${j}" ] && E="${E} ${i}=${j}" + done + + ebegin "Starting FastCGI application ${PROGNAME}" + checkpath -q -d -m 700 /run/spawn-fcgi + X=0 + while [ $X -lt ${FCGI_CHILDREN} ]; do + X=$(($X+1)) + local P SOCKET_OPTION INET_OPTION + P=${PIDFILE}-${X}.pid + [ -n "${FCGI_SOCKET}" ] && SOCKET_OPTION="-s ${FCGI_SOCKET}-${X}" + [ -n "${FCGI_PORT}" ] && INET_OPTION="-a ${FCGI_ADDRESS} -p $((${FCGI_PORT} + ${X} - 1))" + + env -i ${E} /sbin/start-stop-daemon --start --pidfile ${P} --exec ${SPAWNFCGI} \ + --name ${FCGI_PROGRAM_EXEC} -- ${SOCKET_OPTION} ${INET_OPTION} \ + -P ${P} ${OPTIONS} -- ${FCGI_PROGRAM} + RETVAL=$? + + # Stop on error. Don't want to spawn a mess! + [ "${RETVAL}" != "0" ] && break + done + eend ${RETVAL} +} + +stop() { + local X RETVAL=0 + + ebegin "Stopping FastCGI application ${PROGNAME}" + for X in ${PIDFILE}-[0-9]*.pid ; do + start-stop-daemon --stop --pidfile ${X} || \ + { RETVAL=$? && break ; } + done + eend ${RETVAL} +} diff --git a/www-servers/spawn-fcgi/metadata.xml b/www-servers/spawn-fcgi/metadata.xml new file mode 100644 index 000000000000..27f1ebb9d05d --- /dev/null +++ b/www-servers/spawn-fcgi/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en">spawn-fcgi is used to spawn FastCGI applications + + Features + -------- + - binds to IPv4 and Unix domain sockets + - supports privilege separation: chmod/chown socket, drop to uid/gid + - supports chroot + - supports daemontools supervise + </longdescription> +</pkgmetadata> diff --git a/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r1.ebuild b/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r1.ebuild new file mode 100644 index 000000000000..7fba4ede0c9a --- /dev/null +++ b/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +DESCRIPTION="A FCGI spawner for lighttpd and cherokee and other webservers" +HOMEPAGE="http://redmine.lighttpd.net/projects/spawn-fcgi" +SRC_URI="http://www.lighttpd.net/download/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" +IUSE="ipv6" + +DEPEND="" +RDEPEND="!<=www-servers/lighttpd-1.4.20 + !<=www-servers/cherokee-0.98.1" + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README NEWS + + newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi + newinitd "${FILESDIR}"/spawn-fcgi.initd-r1 spawn-fcgi + + docinto examples + dodoc doc/run-generic doc/run-php doc/run-rails +} diff --git a/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r2.ebuild b/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r2.ebuild new file mode 100644 index 000000000000..a19ec429e424 --- /dev/null +++ b/www-servers/spawn-fcgi/spawn-fcgi-1.6.3-r2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="A FCGI spawner for lighttpd and cherokee and other webservers" +HOMEPAGE="http://redmine.lighttpd.net/projects/spawn-fcgi" +SRC_URI="http://www.lighttpd.net/download/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="ipv6" + +DEPEND="" +RDEPEND=" + !<=www-servers/lighttpd-1.4.20 + !<=www-servers/cherokee-0.98.1" + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi + newinitd "${FILESDIR}"/spawn-fcgi.initd-r2 spawn-fcgi + + docinto examples + dodoc doc/run-generic doc/run-php doc/run-rails +} diff --git a/www-servers/spawn-fcgi/spawn-fcgi-1.6.4.ebuild b/www-servers/spawn-fcgi/spawn-fcgi-1.6.4.ebuild new file mode 100644 index 000000000000..4068e674e390 --- /dev/null +++ b/www-servers/spawn-fcgi/spawn-fcgi-1.6.4.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="A FCGI spawner for lighttpd and cherokee and other webservers" +HOMEPAGE="http://redmine.lighttpd.net/projects/spawn-fcgi" +SRC_URI="http://www.lighttpd.net/download/${P}.tar.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="ipv6" + +DEPEND="" +RDEPEND=" + !<=www-servers/lighttpd-1.4.20 + !<=www-servers/cherokee-0.98.1" + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi + newinitd "${FILESDIR}"/spawn-fcgi.initd-r2 spawn-fcgi + + docinto examples + dodoc doc/run-generic doc/run-php doc/run-rails +} diff --git a/www-servers/thin/Manifest b/www-servers/thin/Manifest new file mode 100644 index 000000000000..2a079676c55c --- /dev/null +++ b/www-servers/thin/Manifest @@ -0,0 +1,11 @@ +AUX thin.confd-2 1251 SHA256 36ade83707fa363434485e83ede77379fb55300f7e00a3b4bbc8f11cf1249c18 SHA512 b3e02dd2c13871068f47241a73ac4d9f0a98932fc263303913a48dbd5d4b95148dcdb7ebced7ac5f2d853e33c1a9214467375b72b3fbee0bc0354f97f96f6891 WHIRLPOOL 15bb001460aa34c03c1ebde665f0c17d50c491d9ee6ffba4d5462cd67ca3699ee4b0443ec2bbe730e736aa8d3cd9987a893d5c9a54ad11bcb9e18cba41eca83a +AUX thin.initd-r4 1828 SHA256 2c0f060ad193074c559e02b9c9a7803b18fd823a1c796267c21c06af7341d8fb SHA512 e953b9c3edc8a881eadba3ea3cadb63e67e8361847ede72678cc4c2730b30aaf1664ffdbe86e21b1524fc9753afe912c8f1466158d088f97ab6318cdd798c110 WHIRLPOOL 5575527b0a64fe59b097410e7a462a5ac0668c7ef40029fd0009b4651362c9961965e777cc7036f448c8e01a17b589325f28e7375ab773eb0249f9dd6631ae72 +DIST thin-1.7.0.tar.gz 180791 SHA256 8574ea81e50fc6b46bf48c147cce26eb698f60b554228498daba88f65b043927 SHA512 a41ffb8792f5dbc732696af4914e5121e83f21d18e5aae64676dc5d035f84c0e13d352565c5004ba7ac2e42c701522a6aa6a9250303877c3ac566c30336df2c3 WHIRLPOOL 029fde0ec69b4c1bbd57cd98e483c6fa8ec2ae82e4e80c43b0d328a8c424867737b9d8db7a5f642e70b6946092c26b6594d06d884efd2a5efe98b1f387ff9fec +DIST thin-1.7.1.tar.gz 179998 SHA256 2b9dbf80d7e2982ed166582af04b0a60dce176461a2547617839610630428120 SHA512 7a5e3ccef263e5ba15cf53f38d7a8ae6ff974a4cfee2844cc15f9e6afb155b73b43e8c2ba49e177cad20eb9a728f4ddbe0d88417ad7f1c11ca2a535745da73ef WHIRLPOOL ad60616ed1d0d3ef162e63baf187b13757197022ef4646c8a9cfabcfff750cf325511f2153404dd1e92b4a35bde4aac3f5a6b80ab0eb142a9915508b195cd401 +DIST thin-1.7.2.tar.gz 180169 SHA256 667a78697331b917ad0f14974537c000c6e06d67a0d9b2a6592791adfed2c48f SHA512 2c3c831eed4444d42fc88fc2c46e557284748b6b6bf331d6fd827073918cc3a869e5a60bf7db19ba82add28e07c8a8c92dac609a56cda82b41b37ddfb247e7bf WHIRLPOOL 58af305497cfb6a59f84efbb6b6565e66ef97113efd6aa82e9d794fa5d6e919c6805da278639845eb0c9b2d263c6703ef81b8edc9904acb74db475c68d10b99b +EBUILD thin-1.7.0-r1.ebuild 2528 SHA256 c7e994b5cb19c5bef56e0b495d812a927f1205352fe585308f8fd602e909a221 SHA512 5624279a8d84d726b8eb40d9d4bd527b98a1df269f673c7afa1dc6ae0d1cab8b4495ba1edba9e152db5cc03a17b230b037f87ef83b01327f047edf06e3fe8384 WHIRLPOOL 5fda26b60e446f753faba4f0546b80bd468d9b5200c6a0b7f36555fbd8c74305504fa8cd6339d30f0b44d7eb1984c5c623904dc0a18aa54f7e1e6a39dfacb041 +EBUILD thin-1.7.1.ebuild 2528 SHA256 9caebf9a9aa2add82f36456bc304e61f4c9630fcafe6865e2065f775afaaeeca SHA512 ee062a4462fd648bb653cfbe7dad4f1459f733682fa2f8c864f1009fd17e0ec8f4ab16e5f1f67636f30e1dff59a8c6952d0ab6329c7cb6c042fe293639b5988a WHIRLPOOL dca070b9aafdf6dd7a010ab786aa05bf21e6df7252aa35753502830e548ef4eaad5d5a7ac0eeda990855826a27b4d2894ad829745ae9ea98602b53bda2fcbdf0 +EBUILD thin-1.7.2.ebuild 2528 SHA256 9caebf9a9aa2add82f36456bc304e61f4c9630fcafe6865e2065f775afaaeeca SHA512 ee062a4462fd648bb653cfbe7dad4f1459f733682fa2f8c864f1009fd17e0ec8f4ab16e5f1f67636f30e1dff59a8c6952d0ab6329c7cb6c042fe293639b5988a WHIRLPOOL dca070b9aafdf6dd7a010ab786aa05bf21e6df7252aa35753502830e548ef4eaad5d5a7ac0eeda990855826a27b4d2894ad829745ae9ea98602b53bda2fcbdf0 +MISC ChangeLog 4256 SHA256 50c09db662d38ee927fcce87b4693f43985c3995d90dd79cd4549ab29facda5d SHA512 e46597767890cdeba4bd3d5c9ff900e47440165938d624e2159c27d6cde7fe9459e84763e729e128bbcbc47b0da31ddf9573601bbfc9bb10e93099bdb40d923f WHIRLPOOL c6bee0b654537512fcb36c4f09727df386b06f84eb78ad3f665afb4eef06c6fd1c2dcffc618bf88d24dec7890907decc14772e484c9c0e220de1a0673289de39 +MISC ChangeLog-2015 5333 SHA256 46893ee18b5b3de7389e6e5aa95e802addb97011a4f12c26a37189b15ffcbba7 SHA512 5b7022bfeb4cbadda1aff9da08e3f6947a3a4ee8dacbce8e0ce2d0fc3cf6c65ee35134693d3bf093dc0002e3061f43b0ec9fee73dfc9c6b46b58ee03874d4441 WHIRLPOOL 777fb8f419b94294ccdc40449d8da0eb86304e7269629d3a9ba0f977b4cffa2981dfa88183164b7b3ca169da7de2f1e6c06a9d6be6a5f112d5449dbf0f02ba9e +MISC metadata.xml 605 SHA256 9bc727cc0ea3eaea700fab2cf58b546e1a8c1119bc2fc0338c2aa98acbad866d SHA512 df6cb1ce64273629695d5f6a5b2a56957b853d73c75ce2d0cb51abf7a9980783d4370e2f3f1a0813ed03cf77ffc8119bcdf7d20465de64c3d8300e6cc1a2cb3c WHIRLPOOL df4cca502f096464dcf5c8c2ecd20920f9ca91a17c3a09756adaf93a751e97dbd984960d1aaef62168a74d4e18682f41fb05f926089ac1e39281bd81b4dabbba diff --git a/www-servers/thin/files/thin.confd-2 b/www-servers/thin/files/thin.confd-2 new file mode 100644 index 000000000000..ca89c44cfd0e --- /dev/null +++ b/www-servers/thin/files/thin.confd-2 @@ -0,0 +1,39 @@ +# /etc/conf.d/thin: Configuration for /etc/init.d/thin* +# Copy this file to /etc/conf.d/thin.SERVERNAME for server specific options. + +# Set the configuration file location. +# In start-all mode (/etc/init.d/thin), this must point to the directory where +# all the thin configurations are located. +# When starting a specific server (/etc/init.d/thin.SERVER), point to the exact +# location of the .yml configuration file. +# CONFIG="/etc/thin/${SVCNAME#*.}.yml" + +# Disable looking for a configuration file. +# You can use THIN_OPTS instead for setting command line options. +# NOCONFIG=0 + +# Set the Ruby interpreter to use. +# RUBY="/usr/bin/ruby" + +# Whether to start thin using `bundle exec' +# DO_BUNDLER=0 + +# What directory to cd into before starting thin +# (useful for DO_BUNDLER) +# CHDIR= + +# Set the user for this instance. +# (Should mirror "user" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_USER= + +# Set the group for this instance. +# (Should mirror "group" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_GROUP= + +# Set the pidfile for this instance. +# (Should mirror "pid" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_PID= + +# Set command line options to pass to thin. +# In specific server mode, '--tag SERVER_NAME' is automatically appended. +# THIN_OPTS= diff --git a/www-servers/thin/files/thin.initd-r4 b/www-servers/thin/files/thin.initd-r4 new file mode 100644 index 000000000000..9885a830e73e --- /dev/null +++ b/www-servers/thin/files/thin.initd-r4 @@ -0,0 +1,87 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +SERVER=${SVCNAME#*.} +if [ ${SERVER} != thin ]; then + CONFIG=${CONFIG:-/etc/thin/${SERVER}.yml} +else + CONFIG=${CONFIG:-/etc/thin/} +fi +NOCONFIG=${NOCONFIG:-0} +RUBY=${RUBY:-/usr/bin/ruby} +DO_BUNDLER=${DO_BUNDLER:-0} +CHDIR=${CHDIR:-} +THIN_USER=${THIN_USER:-root} +THIN_GROUP=${THIN_GROUP:-root} +THIN_PID=${THIN_PID:-/var/run/thin/thin.pid} +THIN_OPTS=${THIN_OPTS:-} + +depend() { + need localmount +} + +checkconfig() { + if [ -n ${CHDIR} ]; then + cd "${CHDIR}" + + if [ $? -ne 0 ]; then + eerror "Cannot cd into requested directory" + return 1 + fi + fi + + [ ${SERVER} = thin -o ${NOCONFIG} != 0 ] && return 0 + + if [ ! -f ${CONFIG} ]; then + eerror "Unable to find the server configuration." + eerror "Please set the CONFIG variable in /etc/conf.d/${SVCNAME} or" + eerror "set NOCONFIG there to 1 to disable looking for a config file." + return 1 + fi +} + +buildargs() { + if [ ${NOCONFIG} = 0 -a ${SERVER} != thin ]; then + echo -n "-C ${CONFIG} " + fi + + echo -n "${THIN_OPTS}" +} + +action() { + checkconfig || return 1 + + [ ${DO_BUNDLER} -ne 0 ] && RUBY="${RUBY} /usr/bin/bundle exec" + + if [ ${SERVER} = thin ]; then + ebegin "$2 all thin servers in ${CONFIG}" + ${RUBY} /usr/bin/thin $1 $(buildargs) --all ${CONFIG} + eend $? + else + ebegin "$2 thin server ${SERVER}" + ${RUBY} /usr/bin/thin $(buildargs) --tag ${SERVER} $1 + eend $? + fi +} + +start() { + action start 'Starting' +} + +stop() { + action stop 'Stopping' +} + +restart() { + action restart 'Restarting' +} + +start_pre() { + # If the path to the pidfile is /var/run/thin/foo/thin.pid + # then checkpath will fail if /var/run/thin/ does not exist. + # This caught infra... + d=$(dirname ${THIN_PID}) + mkdir -p "$d" + checkpath -d -m 0775 -o ${THIN_USER}:${THIN_GROUP} "$d" +} diff --git a/www-servers/thin/metadata.xml b/www-servers/thin/metadata.xml new file mode 100644 index 000000000000..70ae99a48a27 --- /dev/null +++ b/www-servers/thin/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ruby@gentoo.org</email> + <name>Gentoo Ruby Project</name> + </maintainer> + <longdescription> +Thin is a very simple web server written in Ruby. It's single-threaded, which +means it can only serve one request at a time. This simplicity affords increased +speed and decreased memory usage for singled-threaded framework like Rails. +</longdescription> + <upstream> + <remote-id type="github">macournoyer/thin</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/thin/thin-1.7.0-r1.ebuild b/www-servers/thin/thin-1.7.0-r1.ebuild new file mode 100644 index 000000000000..48f44ec1c598 --- /dev/null +++ b/www-servers/thin/thin-1.7.0-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +USE_RUBY="ruby21 ruby22 ruby23" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A fast and very simple Ruby web server" +HOMEPAGE="http://code.macournoyer.com/thin/" +SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Ruby" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="doc test" + +DEPEND="${DEPEND} + dev-util/ragel" +RDEPEND="${RDEPEND}" + +# The runtime dependencies are used at build-time as well since the +# Rakefile loads thin! +mydeps=">=dev-ruby/daemons-1.0.9 + >=dev-ruby/rack-1.0.0:* <dev-ruby/rack-3:* + >=dev-ruby/eventmachine-1.0.4:0 + virtual/ruby-ssl" + +ruby_add_rdepend "${mydeps}" +ruby_add_bdepend "${mydeps} + dev-ruby/rake-compiler" + +all_ruby_prepare() { + # Fix Ragel-based parser generation (uses a *very* old syntax that + # is not supported in Gentoo) + sed -i -e 's: | rlgen-cd::' Rakefile || die + + # Fix specs' dependencies so that the extension is not rebuilt + # when running tests + rm tasks/spec.rake || die + + # Fix rspec version to allow newer 2.x versions + sed -i -e '/gem "rspec"/ s/1.2.9/2.0/' spec/spec_helper.rb || die + + # Avoid CLEAN since it may not be available and we don't need it. + sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die + + # Disable a test that is known for freezing the testsuite, + # reported upstream. In thin 1.5.1 this just fails. + sed -i \ + -e '/should force kill process in pid file/,/^ end/ s:^:#:' \ + spec/daemonizing_spec.rb || die + + sed -i \ + -e '/tracing routines (with NO custom logger)/,/^ end/ s:^:#:'\ + spec/logging_spec.rb || die + + find spec/perf -name "*_spec.rb" -exec \ + sed -i '/be_faster_then/ i \ pending' {} \; + + sed -i -e "s/Spec::Runner/Rspec/" spec/spec_helper.rb || die + # nasty but too complex to fix up for now :( + use doc || rm tasks/rdoc.rake +} + +each_ruby_compile() { + ${RUBY} -S rake compile || die "rake compile failed" +} + +all_ruby_install() { + all_fakegem_install + + keepdir /etc/thin + newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-2 ${PN} + + einfo + elog "Thin is now shipped with init scripts." + elog "The default script (/etc/init.d/thin) will start all servers that have" + elog "configuration files in /etc/thin/. You can symlink the init script to" + elog "files of the format 'thin.SERVER' to be able to start individual servers." + elog "See /etc/conf.d/thin for more configuration options." + einfo +} diff --git a/www-servers/thin/thin-1.7.1.ebuild b/www-servers/thin/thin-1.7.1.ebuild new file mode 100644 index 000000000000..b57be6e1536c --- /dev/null +++ b/www-servers/thin/thin-1.7.1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby21 ruby22 ruby23" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A fast and very simple Ruby web server" +HOMEPAGE="http://code.macournoyer.com/thin/" +SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Ruby" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="doc test" + +DEPEND="${DEPEND} + dev-util/ragel" +RDEPEND="${RDEPEND}" + +# The runtime dependencies are used at build-time as well since the +# Rakefile loads thin! +mydeps=">=dev-ruby/daemons-1.0.9 + >=dev-ruby/rack-1.0.0:* <dev-ruby/rack-3:* + >=dev-ruby/eventmachine-1.0.4:0 + virtual/ruby-ssl" + +ruby_add_rdepend "${mydeps}" +ruby_add_bdepend "${mydeps} + dev-ruby/rake-compiler" + +all_ruby_prepare() { + # Fix Ragel-based parser generation (uses a *very* old syntax that + # is not supported in Gentoo) + sed -i -e 's: | rlgen-cd::' Rakefile || die + + # Fix specs' dependencies so that the extension is not rebuilt + # when running tests + rm tasks/spec.rake || die + + # Fix rspec version to allow newer 2.x versions + sed -i -e '/gem "rspec"/ s/1.2.9/2.0/' spec/spec_helper.rb || die + + # Avoid CLEAN since it may not be available and we don't need it. + sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die + + # Disable a test that is known for freezing the testsuite, + # reported upstream. In thin 1.5.1 this just fails. + sed -i \ + -e '/should force kill process in pid file/,/^ end/ s:^:#:' \ + spec/daemonizing_spec.rb || die + + sed -i \ + -e '/tracing routines (with NO custom logger)/,/^ end/ s:^:#:'\ + spec/logging_spec.rb || die + + find spec/perf -name "*_spec.rb" -exec \ + sed -i '/be_faster_then/ i \ pending' {} \; + + sed -i -e "s/Spec::Runner/Rspec/" spec/spec_helper.rb || die + # nasty but too complex to fix up for now :( + use doc || rm tasks/rdoc.rake +} + +each_ruby_compile() { + ${RUBY} -S rake compile || die "rake compile failed" +} + +all_ruby_install() { + all_fakegem_install + + keepdir /etc/thin + newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-2 ${PN} + + einfo + elog "Thin is now shipped with init scripts." + elog "The default script (/etc/init.d/thin) will start all servers that have" + elog "configuration files in /etc/thin/. You can symlink the init script to" + elog "files of the format 'thin.SERVER' to be able to start individual servers." + elog "See /etc/conf.d/thin for more configuration options." + einfo +} diff --git a/www-servers/thin/thin-1.7.2.ebuild b/www-servers/thin/thin-1.7.2.ebuild new file mode 100644 index 000000000000..b57be6e1536c --- /dev/null +++ b/www-servers/thin/thin-1.7.2.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby21 ruby22 ruby23" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A fast and very simple Ruby web server" +HOMEPAGE="http://code.macournoyer.com/thin/" +SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Ruby" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="doc test" + +DEPEND="${DEPEND} + dev-util/ragel" +RDEPEND="${RDEPEND}" + +# The runtime dependencies are used at build-time as well since the +# Rakefile loads thin! +mydeps=">=dev-ruby/daemons-1.0.9 + >=dev-ruby/rack-1.0.0:* <dev-ruby/rack-3:* + >=dev-ruby/eventmachine-1.0.4:0 + virtual/ruby-ssl" + +ruby_add_rdepend "${mydeps}" +ruby_add_bdepend "${mydeps} + dev-ruby/rake-compiler" + +all_ruby_prepare() { + # Fix Ragel-based parser generation (uses a *very* old syntax that + # is not supported in Gentoo) + sed -i -e 's: | rlgen-cd::' Rakefile || die + + # Fix specs' dependencies so that the extension is not rebuilt + # when running tests + rm tasks/spec.rake || die + + # Fix rspec version to allow newer 2.x versions + sed -i -e '/gem "rspec"/ s/1.2.9/2.0/' spec/spec_helper.rb || die + + # Avoid CLEAN since it may not be available and we don't need it. + sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die + + # Disable a test that is known for freezing the testsuite, + # reported upstream. In thin 1.5.1 this just fails. + sed -i \ + -e '/should force kill process in pid file/,/^ end/ s:^:#:' \ + spec/daemonizing_spec.rb || die + + sed -i \ + -e '/tracing routines (with NO custom logger)/,/^ end/ s:^:#:'\ + spec/logging_spec.rb || die + + find spec/perf -name "*_spec.rb" -exec \ + sed -i '/be_faster_then/ i \ pending' {} \; + + sed -i -e "s/Spec::Runner/Rspec/" spec/spec_helper.rb || die + # nasty but too complex to fix up for now :( + use doc || rm tasks/rdoc.rake +} + +each_ruby_compile() { + ${RUBY} -S rake compile || die "rake compile failed" +} + +all_ruby_install() { + all_fakegem_install + + keepdir /etc/thin + newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-2 ${PN} + + einfo + elog "Thin is now shipped with init scripts." + elog "The default script (/etc/init.d/thin) will start all servers that have" + elog "configuration files in /etc/thin/. You can symlink the init script to" + elog "files of the format 'thin.SERVER' to be able to start individual servers." + elog "See /etc/conf.d/thin for more configuration options." + einfo +} diff --git a/www-servers/thttpd/Manifest b/www-servers/thttpd/Manifest new file mode 100644 index 000000000000..30633955db29 --- /dev/null +++ b/www-servers/thttpd/Manifest @@ -0,0 +1,11 @@ +AUX thttpd-renamed-htpasswd.patch 3387 SHA256 d07df194217af30c1ae774a102b304814630cc5b7b1909482426e6ff921745f3 SHA512 0f0622ab8548ea3d3ba5f25d92d4d31f17bcd9baee3a8d0dc0d6c227b708e36bae681ace984e94f1c5e7def264866d27196a0b4c54af612ff0479d7a39a43475 WHIRLPOOL 1c3f52dd43681a0872807d09a61c0b38bed1b6ef04cd431acad26ee45597199f69a6dddd58aa2e61fda0c8272e084561a67014ed90f93fa50efb99e7607501bb +AUX thttpd.conf.sample 670 SHA256 abdf9f7c6685f846ee2bd482d60b8f8cedc3747cbc3d32c0dd21d6ca8a4dd8de SHA512 97c8582438518bf528b6d419fdb7bd94668e91e6b7033a3ed5cda4afb3539e38bf24aea5ae4b138ff2c561c95003e7f85cfa7ce88cd97e8cbbf558bc4147d2c6 WHIRLPOOL 3831498f048ea44e3969e97d9436f6a61d4afc88e95e3aa5910fb3f8a3fc8acde9f1ff63f935eba0c0636e6f592c2f8c441044666322888a2ac7f257ec6925a3 +AUX thttpd.confd.1 1263 SHA256 79e5cb1fba2b80c1c7970093861f8afe7e09d723faf8e044fc540742abdc37bc SHA512 83b8d5aebf180c398e27695bcfc9b847f6535302b4521be460ffd2e867b20fcf1083bcacdb605e557038c54631546a7ee1ba928611a6a23d786fb9f6ef9e0ee0 WHIRLPOOL a8bec5f119ac3e3856938c1753f8bde1f8d1839c94f3a1f4180d29932f2c79066e64b696f18babf847367bb4f96c9267567a0a6db9239bbc0ce1946738781ca8 +AUX thttpd.init.1 735 SHA256 902b95b9e39b72e06b4abe0b18ea8e4ecb245204040d3a2b361350ab734789fe SHA512 991b8153fa030026e3fadc0b838b26fda75ab706e4fdaf1195931ed63be15dde290e4e3653951c78f41ec70464ed2d3dd984dc10bee4551cbf069435d447bea1 WHIRLPOOL 441944bb8b0f0e40cd8c44d48fbd5046225af64de87ef110d1e42e806c121acab5372ffda0388dd7daca5364aa688f9826bb3bdfbd6202bfce8e48b268a0c027 +AUX thttpd.logrotate 197 SHA256 0399d9fdc31a5555307d33c4744b21271e9d7d4d6ded78573fb9b2210f593bc6 SHA512 a481c8c2d3a4526b04d6c95873336e46368e32e6f254f7453f5ccefe38cb11104ecacd7829caa7881df81c0d36c1dd4f60a91bbc7696fa349ed9c2cc7ddc84cd WHIRLPOOL 79577136bbfdf6b2b6026f1e114d4af8a66712abd0efc892f96f5ac0c084341621a3f413102764a750bf101237b9ae52424a2cd6f1b0b92b4430037faf954a6b +DIST thttpd-2.27.1.tar.gz 96430 SHA256 a1ee2806432eaf5b5dd267a0523701f9f1fa00fefd499d5bec42165a41e05846 SHA512 5d42e32652eb2310c7379d2c4373ad8f54b33bd7c2b444f06d1756eb4ed296774ce3144d91bbba85c6ad604e575128dc7199b797dc8d1b4849b0249054ba5d24 WHIRLPOOL e64b132e83b459fb0ab6da6f3a15c4a603f8d4f53f123cabccc82077506a258c616c2703992b671e9193c26c452bd3b6908ebfadfb15301f1e34f8925303f625 +EBUILD thttpd-2.27.1.ebuild 1935 SHA256 202090bb7440c8ba7376b59d65b4ddc8d6d844dde710c8f65dac593a493d006a SHA512 cd44e16fc8b68caeed14d0656fcbe6b290c2216dfd92feaba5d481a533d32967ae77d4fed989b83625fb5ab8bcbb676aee8d1e45b2cebda607d1ff59dfd0976f WHIRLPOOL fdde5dc20ba7c72f410b65dcfbbbe756e307c4b6c50360ef8ec6bea653254b1875a7eb167f823d7cff997d748e2fb1ea1d081f1cb4817d0d7d97b8373b669301 +EBUILD thttpd-9999.ebuild 1912 SHA256 6f28872fb9d9404f67d80c744b8f92319b02841bddaf58ce1c6d55c5e90d1810 SHA512 11f45a8320120741c3a2e67f179ba2f1d944e39a840a179ea87062a8e8a786ca71df10b2a9566217ae3b4606d358b65996ba124282094ea31fdcf3359e93a2cf WHIRLPOOL fb14d7998442d8898414ad66ac077d28ba7363bd0bc7c2105841d57f4c29abf0d74be27e31827759b5f3f8228ddd9a0dc5809616ad3391a7d3c0daba2b38183d +MISC ChangeLog 2624 SHA256 4e4aaf44fc6e8e4b3b7595046aaf4f626a42e2782a2e2a2c719cdc49e46055a3 SHA512 98704ac344936eeb31ae8663c0844d3ad46252aa9e66b167de502a898644c19324c6583b7238d9516190e899e9dd90e15cc91531b290e1cf8320a711dd0773be WHIRLPOOL a4a32eed191129dd80a1b58592aa1bd7f6365720d65c0081ec6c09475fbd633ac8f97dd22f444d43ded9a365ae51c50a94f149bd9dc2a32bbfcfe5893187003f +MISC ChangeLog-2015 14547 SHA256 c56b076367a6c756f1c4b9b77d1de3922e2c1a18cdd988505cee0c889cf769b2 SHA512 4563d35f27a2d2fea9d528e6c0085a6e3ed29f1d2ce6ad7187dbb6262ff9bc36f41e9c9c01cf727f90971b2f06f6a7e837c4005f1ece3b06132a3e78496aa4c0 WHIRLPOOL 0adab865c89a5433acfd001d9c6d91d46184d5319981cb45d392ee3918d3ed1e3ce030e2581a38dc089005c35e904f4b84319aa715bfbbbb13ae723dfbe77f31 +MISC metadata.xml 248 SHA256 4b929f10c2798c343335d4dc1d8f92c69e54c8b15a6240b748c4b8bc2cc70e9d SHA512 5a0cba98b94cc06306b0e352d40ff113de69408752b14e1ba9efdce3f564c9bd11f8f65e89fc24d2e2056056edef5b77ab1ca8aa33e7faad5d0eaef40b895c85 WHIRLPOOL 370154a5df414715176a741210d80d93fb60ea31d135c902a85f46af3b6683b0c5c6be956f28df349db79e1237bd496b34c5e05a0aa35d0c3e4b6728cc758627 diff --git a/www-servers/thttpd/files/thttpd-renamed-htpasswd.patch b/www-servers/thttpd/files/thttpd-renamed-htpasswd.patch new file mode 100644 index 000000000000..31e68429dbd6 --- /dev/null +++ b/www-servers/thttpd/files/thttpd-renamed-htpasswd.patch @@ -0,0 +1,108 @@ +diff --git a/configure.ac b/configure.ac +index 2c2dfae..e028a0d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,12 +42,6 @@ if test "x${WEBDIR}" = "x" ; then + WEBDIR='/usr/local/www' + fi + +-AC_ARG_VAR(WEBGROUP, [The group that the web server will run as]) +- +-if test "x${WEBGROUP}" = "x" ; then +- WEBGROUP='thttpd' +-fi +- + AC_CONFIG_FILES([Makefile + docs/Makefile + extras/Makefile +diff --git a/docs/Makefile.am b/docs/Makefile.am +index 303c25f..2823290 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -1 +1 @@ +-dist_man_MANS = htpasswd.1 makeweb.1 redirect.8 ssi.8 syslogtocern.8 thttpd.8 ++dist_man_MANS = th_htpasswd.1 makeweb.1 redirect.8 ssi.8 syslogtocern.8 thttpd.8 +diff --git a/docs/htpasswd.1 b/docs/htpasswd.1 +deleted file mode 100644 +index 1124b02..0000000 +--- a/docs/htpasswd.1 ++++ /dev/null +@@ -1,16 +0,0 @@ +-.TH htpasswd 1 "05 May 1998" +-.SH NAME +-htpasswd - manipulate HTTP-server password files +-.SH SYNOPSIS +-.B htpasswd +-.RB [ -c ] +-.I passwordfile +-.I username +-.SH DESCRIPTION +-.PP +-Sets a user's password in an httpd-style password file. +-The -c flag creates a new file. +-.SH AUTHOR +-Rob McCool. +-Modified 29aug97 by Jef Poskanzer to accept new password on stdin, +-if stdin is a pipe or file. This is necessary for use from CGI. +diff --git a/docs/th_htpasswd.1 b/docs/th_htpasswd.1 +new file mode 100644 +index 0000000..f524af9 +--- /dev/null ++++ b/docs/th_htpasswd.1 +@@ -0,0 +1,16 @@ ++.TH th_htpasswd 1 "05 May 1998" ++.SH NAME ++th_htpasswd - manipulate HTTP-server password files ++.SH SYNOPSIS ++.B th_htpasswd ++.RB [ -c ] ++.I passwordfile ++.I username ++.SH DESCRIPTION ++.PP ++Sets a user's password in an httpd-style password file. ++The -c flag creates a new file. ++.SH AUTHOR ++Rob McCool. ++Modified 29aug97 by Jef Poskanzer to accept new password on stdin, ++if stdin is a pipe or file. This is necessary for use from CGI. +diff --git a/docs/thttpd.8 b/docs/thttpd.8 +index a0fd334..78af884 100644 +--- a/docs/thttpd.8 ++++ b/docs/thttpd.8 +@@ -270,7 +270,7 @@ called .htpasswd by default. + This file is formatted as the familiar colon-separated + username/encrypted-password pair, records delimited by newlines. + The protection does not carry over to subdirectories. +-The utility program htpasswd(1) is included to help create and ++The utility program th_htpasswd(1) is included to help create and + modify .htpasswd files. + .PP + Relevant thttpd.h option: AUTH_FILE +@@ -562,7 +562,7 @@ This is a little tricky to set up correctly, for instance if you are using + chroot() then the log file must be within the chroot tree, but it's + definitely doable. + .SH "SEE ALSO" +-redirect(8), ssi(8), makeweb(1), htpasswd(1), syslogtocern(8), weblog_parse(1), http_get(1) ++redirect(8), ssi(8), makeweb(1), th_htpasswd(1), syslogtocern(8), weblog_parse(1), http_get(1) + .SH THANKS + .PP + Many thanks to contributors, reviewers, testers: +diff --git a/extras/Makefile.am b/extras/Makefile.am +index b1f3b4d..ffd19d7 100644 +--- a/extras/Makefile.am ++++ b/extras/Makefile.am +@@ -1,11 +1,7 @@ + AM_CPPFLAGS = -DWEBDIR='"$(WEBDIR)"' + +-sbin_PROGRAMS = makeweb htpasswd ++sbin_PROGRAMS = makeweb th_htpasswd + makeweb_SOURCES = makeweb.c +-htpasswd_SOURCES = htpasswd.c ++th_htpasswd_SOURCES = th_htpasswd.c + + dist_sbin_SCRIPTS = syslogtocern +- +-install-exec-hook: +- chgrp $(WEBGROUP) $(DESTDIR)$(sbindir)/makeweb +- chmod 2751 $(DESTDIR)$(sbindir)/makeweb diff --git a/www-servers/thttpd/files/thttpd.conf.sample b/www-servers/thttpd/files/thttpd.conf.sample new file mode 100644 index 000000000000..462bd0c198d0 --- /dev/null +++ b/www-servers/thttpd/files/thttpd.conf.sample @@ -0,0 +1,38 @@ +## /etc/thttpd.conf +## +## do not leave empty lines in here! +## format is: key=value +## +## run in debug-mode? +#debug +## +## what interface to bind to? +## (default is binding to any interface) +#host=www.example.org +port=80 +user=thttpd +## +## CGI: +## ? match a single char +## * matches any string excluding "/" +## ** matches any string including "/" +## separate multiple patterns with "|" +#cgipat=**.sh|**.cgi +## +## chroot: +chroot +#nochroot +## +logfile=/var/log/thttpd.log +pidfile=/var/run/thttpd.pid +## +charset=iso-8859-1 +## +## control the caching: (in secs) +#maxage 60 +## +## virtual hosting: +#vhost +## +## cache-control: send this "max-age" in all HTTP-responses: +#max-age=0 diff --git a/www-servers/thttpd/files/thttpd.confd.1 b/www-servers/thttpd/files/thttpd.confd.1 new file mode 100644 index 000000000000..b5f630e7ecc2 --- /dev/null +++ b/www-servers/thttpd/files/thttpd.confd.1 @@ -0,0 +1,35 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +## Config file for /etc/init.d/thttpd + +## the startup-dir of thttpd is the docroot, so we specify it here +## and the init-script does a "cd" prior to startup: +THTTPD_DOCROOT="/var/www/localhost" + +## There are 2 ways to configure thttpd: +## 1) specify all params on the cmd-line +## 2) use a config-file (and start with "-C <conf-file>") + +## For additional thttpd instances, run: +# ln -s /etc/init.d/thttpd /etc/init.d/thttpd.$NAME +# cp /etc/conf.d/thttpd /etc/conf.d/thttpd.$NAME + +## Note: 1) and 2) can be mixed but +## the init-script set PID (option -i) to +## /var/run/thttpd.$NAME.run +## and logfile (option -l) to +## /var/log/thttpd.$NAME.log +## +## We choose 1) here -- if you have a more complicated setup read +## thttpd(8) for details on 2). + +THTTPD_OPTS="-p 80 -u thttpd -r" + +## For a more complex setup (e.g. cgi-support) use an external configfile: +## comment the THTTPD_OPTS line above und use the one below. +#THTTPD_OPTS="-C /etc/thttpd/thttpd.conf" + +## If you know what you are doing you can add cgi-support with the line below; +## but you _should_ use the extern-configfile version! +#THTTPD_OPTS="$THTTPD_OPTS -c **.cgi|**.sh" diff --git a/www-servers/thttpd/files/thttpd.init.1 b/www-servers/thttpd/files/thttpd.init.1 new file mode 100644 index 000000000000..3b7756eae19a --- /dev/null +++ b/www-servers/thttpd/files/thttpd.init.1 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v3 or later + +depend() { + need net + use dns logger netmount + after sshd +} + +checkconfig() { + if [ ! -d "$THTTPD_DOCROOT" ]; then + eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/${SVCNAME}" + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + + checkconfig || return 1 + + start-stop-daemon --quiet --start --exec /usr/sbin/thttpd \ + --pidfile /var/run/${SVCNAME}.pid --chdir "$THTTPD_DOCROOT" -- \ + -i /var/run/${SVCNAME}.pid \ + -l /var/log/${SVCNAME}.log \ + ${THTTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --quiet --stop --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/www-servers/thttpd/files/thttpd.logrotate b/www-servers/thttpd/files/thttpd.logrotate new file mode 100644 index 000000000000..7e75c813524a --- /dev/null +++ b/www-servers/thttpd/files/thttpd.logrotate @@ -0,0 +1,12 @@ +/var/log/thttpd.log { + daily + rotate 5 + compress + delaycompress + missingok + notifempty + sharedscripts + postrotate + kill -HUP `cat /var/run/thttpd.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/www-servers/thttpd/metadata.xml b/www-servers/thttpd/metadata.xml new file mode 100644 index 000000000000..d728f56aa6ae --- /dev/null +++ b/www-servers/thttpd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> +</maintainer> +</pkgmetadata> diff --git a/www-servers/thttpd/thttpd-2.27.1.ebuild b/www-servers/thttpd/thttpd-2.27.1.ebuild new file mode 100644 index 000000000000..2ff4c358e0e9 --- /dev/null +++ b/www-servers/thttpd/thttpd-2.27.1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools flag-o-matic toolchain-funcs user + +if [[ ${PV} = 9999* ]] +then + EGIT_REPO_URI="https://github.com/blueness/sthttpd.git" + inherit git-r3 + KEYWORDS="amd64 arm ppc ppc64 sparc x86" +else + MY_P="s${P}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/blueness/sthttpd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 arm ~hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux" +fi + +DESCRIPTION="Fork of thttpd, a small, fast, multiplexing webserver" +HOMEPAGE="http://opensource.dyc.edu/sthttpd" + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="" + +RDEPEND="" +DEPEND="" + +WEBROOT="/var/www/localhost" + +THTTPD_USER=thttpd +THTTPD_GROUP=thttpd +THTTPD_DOCROOT="${EPREFIX}${WEBROOT}/htdocs" + +DOCS=( TODO ) + +pkg_setup() { + ebegin "Creating thttpd user and group" + enewgroup ${THTTPD_GROUP} + enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP} +} + +src_prepare() { + eapply "${FILESDIR}"/thttpd-renamed-htpasswd.patch + mv "${S}"/extras/{htpasswd.c,th_htpasswd.c} || die + eapply_user + eautoreconf -f -i +} + +src_configure() { + econf WEBDIR=${THTTPD_DOCROOT} +} + +src_install () { + default + + newinitd "${FILESDIR}"/thttpd.init.1 thttpd + newconfd "${FILESDIR}"/thttpd.confd.1 thttpd + + insinto /etc/logrotate.d + newins "${FILESDIR}/thttpd.logrotate" thttpd + + insinto /etc/thttpd + doins "${FILESDIR}"/thttpd.conf.sample + + #move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${ED}"${WEBROOT}/htdocs \ + "${ED}"/usr/share/doc/"${PF}"/htdocs.dist || die + mkdir "${ED}"${WEBROOT}/htdocs || die + + keepdir ${WEBROOT}/htdocs + + chown root:${THTTPD_GROUP} "${ED}/usr/sbin/makeweb" \ + || die "Failed chown makeweb" + chmod 2751 "${ED}/usr/sbin/makeweb" \ + || die "Failed chmod makeweb" + chmod 755 "${ED}/usr/share/doc/${PF}/htdocs.dist/cgi-bin/printenv" \ + || die "Failed chmod printenv" +} diff --git a/www-servers/thttpd/thttpd-9999.ebuild b/www-servers/thttpd/thttpd-9999.ebuild new file mode 100644 index 000000000000..de37464fa183 --- /dev/null +++ b/www-servers/thttpd/thttpd-9999.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools flag-o-matic toolchain-funcs user + +if [[ ${PV} = 9999* ]] +then + EGIT_REPO_URI="https://github.com/blueness/sthttpd.git" + inherit git-r3 + KEYWORDS="" +else + MY_P="s${P}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/blueness/sthttpd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux" +fi + +DESCRIPTION="Fork of thttpd, a small, fast, multiplexing webserver" +HOMEPAGE="http://opensource.dyc.edu/sthttpd" + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="" + +RDEPEND="" +DEPEND="" + +WEBROOT="/var/www/localhost" + +THTTPD_USER=thttpd +THTTPD_GROUP=thttpd +THTTPD_DOCROOT="${EPREFIX}${WEBROOT}/htdocs" + +DOCS=( TODO ) + +pkg_setup() { + ebegin "Creating thttpd user and group" + enewgroup ${THTTPD_GROUP} + enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP} +} + +src_prepare() { + eapply "${FILESDIR}"/thttpd-renamed-htpasswd.patch + mv "${S}"/extras/{htpasswd.c,th_htpasswd.c} || die + eapply_user + eautoreconf -f -i +} + +src_configure() { + econf WEBDIR=${THTTPD_DOCROOT} +} + +src_install () { + default + + newinitd "${FILESDIR}"/thttpd.init.1 thttpd + newconfd "${FILESDIR}"/thttpd.confd.1 thttpd + + insinto /etc/logrotate.d + newins "${FILESDIR}/thttpd.logrotate" thttpd + + insinto /etc/thttpd + doins "${FILESDIR}"/thttpd.conf.sample + + #move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${ED}"${WEBROOT}/htdocs \ + "${ED}"/usr/share/doc/"${PF}"/htdocs.dist || die + mkdir "${ED}"${WEBROOT}/htdocs || die + + keepdir ${WEBROOT}/htdocs + + chown root:${THTTPD_GROUP} "${ED}/usr/sbin/makeweb" \ + || die "Failed chown makeweb" + chmod 2751 "${ED}/usr/sbin/makeweb" \ + || die "Failed chmod makeweb" + chmod 755 "${ED}/usr/share/doc/${PF}/htdocs.dist/cgi-bin/printenv" \ + || die "Failed chmod printenv" +} diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest new file mode 100644 index 000000000000..1280937c7b60 --- /dev/null +++ b/www-servers/tomcat/Manifest @@ -0,0 +1,25 @@ +AUX tomcat-7.0.79-build.xml.patch 5271 SHA256 e680116c918918aafdec9dd7d022c9d8bfca63f7b0b19904c8ab2c92bc61e1b8 SHA512 160c0117e89a2ef5caae95004b426d155c64e19e6c708a9cc11a53308cba037799a60e4f901c3a5bb5af2d2ca8452246d7dd66283b91fad4a339004026148fe4 WHIRLPOOL 6a04f539b5c5798f8014b1e044eec682c61deac904fd1c9cb5d859c12c89f9191ac4a904f68644ecba1ccbd01f9c668540811f35bacf03415d81175c79109116 +AUX tomcat-7.0.81-build.xml.patch 5271 SHA256 e680116c918918aafdec9dd7d022c9d8bfca63f7b0b19904c8ab2c92bc61e1b8 SHA512 160c0117e89a2ef5caae95004b426d155c64e19e6c708a9cc11a53308cba037799a60e4f901c3a5bb5af2d2ca8452246d7dd66283b91fad4a339004026148fe4 WHIRLPOOL 6a04f539b5c5798f8014b1e044eec682c61deac904fd1c9cb5d859c12c89f9191ac4a904f68644ecba1ccbd01f9c668540811f35bacf03415d81175c79109116 +AUX tomcat-8.0.45-build.xml.patch 10753 SHA256 e1d6ca8eb6cbdb172d8d99d6d4d95b2d72d5f0d7275db80589e39fbb6fb60993 SHA512 205d25cc93712f255021bed6d544a3a5a71fb7367756851b71fdb59696368eab6960085e9abe9337699359cd3ddc55c595e1242bac8675a3f6a666aaf4e7c351 WHIRLPOOL 4e658dd4bc8d5719ee5a26136055f970e74906358989619397b7cb94e34c80c800d3c357dd60a4c7be2d035b490472bfd9f426177cbefe8f57d7bd32a58a7f49 +AUX tomcat-8.0.46-build.xml.patch 10753 SHA256 e1d6ca8eb6cbdb172d8d99d6d4d95b2d72d5f0d7275db80589e39fbb6fb60993 SHA512 205d25cc93712f255021bed6d544a3a5a71fb7367756851b71fdb59696368eab6960085e9abe9337699359cd3ddc55c595e1242bac8675a3f6a666aaf4e7c351 WHIRLPOOL 4e658dd4bc8d5719ee5a26136055f970e74906358989619397b7cb94e34c80c800d3c357dd60a4c7be2d035b490472bfd9f426177cbefe8f57d7bd32a58a7f49 +AUX tomcat-8.5.20-build.xml.patch 10369 SHA256 73f7cbe2f8ab48308cba515b209b4f9fa29803e93e1c980e0385355736cb100c SHA512 571e53427840be6c5a20b94239f7288c3b276190f8d4cf7a33a3b67c54cf9879f0a810c7a09abc4712228c21366bf83642c984234e472fb7a6c6bcc0faba66a0 WHIRLPOOL e5dc309194fe0f5f8c60dae438a64317925195c52ac484bfad79fb7011a9e54cb65931062bdfb5a951fec4b6a8f00f40432dc9df41624d02e83bd3cef91f9e4b +AUX tomcat-9.0.0_alpha26-build.xml.patch 10381 SHA256 edea97610d66367e66b6562b28773eda4ae45dfd3266769e3f0f1358231a87f8 SHA512 89a3413671b6b1446fd203798124395d12c50ced414fe773aa511bff4b147e3167694f11ec94da69494ad7bafcc182c7da7b38f5ed81af2477b9d3bfb7dab4b2 WHIRLPOOL fbdd8bb8ffad81849d6bba057cdd77bd4e09a22cdf12e241de26338051228df0e268509e7524f05fc3e262b0e24a484db2125b1210e59db0f68270f53acce83b +AUX tomcat-instance-manager-r1.bash 6451 SHA256 28990e664007e6eab91d1f90f58009457f683c4c9d37ef78f9065b4b6c87add2 SHA512 3c8f994519d1ca5ff24229798786ad3d75dd20dbf8b3b81f6c0ccd121b978d2cb12633270f463a39ed5c4097e5869b1a4bfbf867994a64c5e41916e378038570 WHIRLPOOL 3be20ac95b1b2e80d62cecbd5e47d0b7c768e78ec38c5ec5661e4d563962196eb45fae82d54349a9202323f5a464ac922930b1b01e197ed6e83f03a3d38f79af +AUX tomcat-instance-manager-r2.bash 6999 SHA256 cdd0465eac2ba108f4b10dec6331c1660b2bdaa5d379cd2964b3c6118646fe1b SHA512 c30c156cbf2b53cf8498288bacaedd48872dce52f461ff32071310b438bdb5015c1cd1d512a2905c4db01e2b22342590e1b8aeadbd44f29062606fabbb2f2fed WHIRLPOOL 468db420f25653111bd20fa49df780187fa117661d5d884f5e1a5f010b22208bea295ec1d7b15b6d6b1cf777334a1e5ab1b6bc133e654837f4ce51266a03d0fb +AUX tomcat-r1.init 3200 SHA256 dda32538287e0075e10857b1e60b0be5b5c8db55849fda753d39ed346c808377 SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab WHIRLPOOL 4281ce1b7e05f19ebb47ae27eb4ed07fca535617122326ddbb0a8ed69121bac30c33a247681157620c7f8b536adda5cd7b611a23b98bfda326f080815cd38a27 +AUX tomcat.conf 1811 SHA256 95db09ae4066bb12cc5932ac4a20d608a473c86d4ade2c617158c444c57c1b2a SHA512 0747dd2fdad6c68123425adce39f625d34924ae3e7c9d5a00361565a593047d7a4d01dee64c1ef831e5ad79b51750babaf642b0588d4b5948bbed441d53d654d WHIRLPOOL 22825ff55b28f991f9afbc9bd58be1fdad4d35acbf36d373d6f3acfe7e82c652ce6f1e52904e4a86cd56edb57a742af70db439c5e38b81a2c659aa0492124f6f +DIST apache-tomcat-7.0.79-src.tar.gz 4682119 SHA256 b5373951afe41ffd27348bb57cff80bc7d86a5669bdedb0b4bbe1d567009dc32 SHA512 75c29fd7de8c245502cae4db845a508f320739625d726fe892924b639e7333b76b3446f36cb67b9ad9500e95823b5eadaf056c4cb6bea962a59eb5491696e0b2 WHIRLPOOL 5db799cfbd061a199270b0ebb971c4fe43632522a23f590b7a46e021af5c8b0bce4a711e16bd0416b5baa6f2556cf8178bf14abadf4d493ece44c9eb2c4cdae2 +DIST apache-tomcat-7.0.81-src.tar.gz 4689428 SHA256 fca79afb210cfbc8f9ebcdebdd048ecb7ea370ac0f94040cbcc0287fe5d85e66 SHA512 25e237aa7189cf9a9617badf8936fd7ec64550bcac3bab2e2afe51d5e199eddfe17e0d6d27ac7ebf3543d1601467fcd8362ddf9a5b708c50b223d7c8d18bbb3b WHIRLPOOL 1016a02b4a30b7e02eb2f7fad3080153012dd3e3f84df34d006c89bc2c89b7b3d370334800170008482d3dbf339c62f249064eb48ab24ca17588026ba515d487 +DIST apache-tomcat-8.0.45-src.tar.gz 4978313 SHA256 450fd2890b12e56692cb203f95651f9a873dce056b7b4362e142bc817032b291 SHA512 80e4281f5b6e4d6bf607179840bc6cb923ea9f57ec8231a451c3b5a1f8938f72ec1097290059afba0ef7b56edeb56d63636849517b69b91c7093cb15ff0eaa04 WHIRLPOOL c893cd5c26637f8881c19353e269145e33fa11e02eb10ef93a41590ad2e1e6c6ffa1b3f6c3c7c318630765f666be07447fd3a21c70c2c381e75c458b60383ea0 +DIST apache-tomcat-8.0.46-src.tar.gz 4985079 SHA256 b5b9e560b3f75dd68b3103915c754ac47cf526f26f18cd6e9baba9580be25161 SHA512 9adbea9faf61f782ede1c657e833dea55ad1b4a874a1eb9801eab82ac9999de847e7f08ff7a49b3389b9d0683d185c6d4981f9f8d2f607f68c077a682af508d5 WHIRLPOOL eafb2768555261836b04f12f95ba2755d2a7ef98754a5a009099e377220dff1251c6ad1cbe672764787c485b3f922bf1fda8db663890db36e356e7a5139b83e9 +DIST apache-tomcat-8.5.20-src.tar.gz 5063310 SHA256 6bc40ae61b77906325bf8bdb2b0767aeb96f4c5a7a9b618aa496db59387d6610 SHA512 dea3095792de76a3a56bd6fd6c9ed5702ca539856d0e07a5de2600f456e7255929d14748a2dc9b3c626b3a67aaac8795ef3f5a6a1351991a0e89443e0c9d0807 WHIRLPOOL 1924f12c5068574424587d5b8b7261efb7496dbc53915d8cb2558b4a643aedecc98823ac7dec238fe7cb1a1874734e05de2dc6b7b28e48ffdae9e8c5c586e895 +DIST apache-tomcat-9.0.0.M26-src.tar.gz 5011957 SHA256 02ba2c9a3a2d78994fc14f2b304c3b3f46615538a48a9193e475b08565cb9b7e SHA512 8c25932aa244edb46eee26aa837636e78c8104ca6617cb5ba924e0e45c2f9dbcd7d196ddf69ee2f1c1b6053dda818a3b92f8f46c156f3048c46cee919fc22c13 WHIRLPOOL 11e00a6e6a5822bd4e357e375b026dd732bf33319e30dde25f11bc1b99994617be3ce6d4976870f725e56646e5ffee92acb6fc23f46b53a46ebbf6c53707ea07 +EBUILD tomcat-7.0.79.ebuild 4277 SHA256 6fe27e4ad83139012dfc38a223f41fa92386d11444e2e661ca3aecc3bcbde66d SHA512 587c011ceac66d3f8cd7789ce891c9ccf9cfed8a8dcbddf8a2b62db48f5f481c6406ceb1645a1288fa07892409ddbb255b45f8c3edadb8eda55e4bce53800dfc WHIRLPOOL 5da2e08c809c4d73dedd1feab499420434db0b4493e885a662cadecaca91059d328cc59b39ef2edb867cc783f70d3c72e69790a381fc44da6f12323d99a6cc44 +EBUILD tomcat-7.0.81.ebuild 4278 SHA256 2564c796b7c24c58dcf6f76c98a4ece41668427d198303b51189cbf4afd592bb SHA512 c09066b72cefed346687999a52f7243a1fd050ecef0cbd8bd0dc6d5f5f758ff815fd4eb0009c5ea3591b792a90a20010a4b0517fbc504a320f06b97834d59404 WHIRLPOOL 428304d9afe8c9f8f781cd31f64bdb502b1f9561b06d7c0cab9671d345df57b61b5f06f6d5bebf58271031cee2314aaa3956d56ba7a8a6bcf88a314c7a50208a +EBUILD tomcat-8.0.45.ebuild 4469 SHA256 018b246f0f044399fa8f54111f824e055110bbcbec3a2a025298c228b635836a SHA512 71536b2dc1d12ccc4c5756014ffe78b4849cf237405c21c667a2484106962a3be05a9299723b30b611f552c8f9315c1542e3ea1ea6ae9eb4f8b3b42817fe6e14 WHIRLPOOL 06876a98afabcbf64d988738eb9172d0545f97f2cca24f5f04f18c29c4d6e7dcb9057d429f6c658a5a06f6d3f6697d0447c8286e71e5cd049766f4cde1078a2c +EBUILD tomcat-8.0.46.ebuild 4472 SHA256 1730ca77b5ada123b193b4a0cd23c409efdcfe0fcf847160ad7eb9165390870c SHA512 6eb897fb6fd1692b778bb8c80ea2e879690aee6d12af0db1b1dbd3a8fbdb01443af9e404694a35613a3be68e53ecbe5b259cc06feeee94c10d8460495d36c620 WHIRLPOOL 0feb0864162ab3a5c246a7aeb1fa313a42af3e6df7ee803f2bfd1154aa5a464f1c5d7f54d048d8346862e0e59f62ffc559b6af2901852512efa5c79959f87d93 +EBUILD tomcat-8.5.20.ebuild 4493 SHA256 6676d000efae3a0cbda2cd292f39777355a50bcd17c42df67540b806cac37b69 SHA512 a66ec0c604c03d3cb4f3c411153ee828edadc74be3779a4860db47b0c51d5e20d8747846117f823f0ce1d5a97ae85e410e6d37a97a25cd0a18ac032946ece344 WHIRLPOOL 2a95579aae815556c51dd931885f113b72bf7865be5807cb976030415709f491c7bfee4a0ebde9fcb077cdfc12f48a542d1ce1302dcda78f8175c5268d7f60cf +EBUILD tomcat-9.0.0_alpha26.ebuild 4529 SHA256 e0a0f85ec6a225faa2b340358390bf12627e729823a19f49fe9917751ca71fc5 SHA512 404e670d0387a392dc28b79efaa630f5885c16baa83225e227a29b0f0f73abb5546347d73c80f3b28a96bdea43de2e5d0c9b6cf03bf474025dbbb0a4b9f6eece WHIRLPOOL 1c23029392c630909649f6fbfadc1ee138bd915f1498bb021dce53d840ca280df2c9207272fc964db456950cdbd23eb43296c06ae074c99bdf384f3e15a52310 +MISC ChangeLog 23709 SHA256 69787b6934873b8d5181a4adabbae3837afd2b90ba9a1d97f05f1e237b689ec1 SHA512 95ca8b3a20e2d2a4e7faafb21aa172e2a9f2440d74a8e68c155b161912ae1cd480e522cf36c58356fe81a26ca9b07078654fd41b1f69ff3020a75465e4ad7895 WHIRLPOOL db15e61ff1f3856b4ee873a0bdedb0bba4ead6bd3cdf849a6f479166ad0c361208767fdcb448791a764f87515dc3b52a92aac23c34540ab0992dd8130455e129 +MISC ChangeLog-2015 86707 SHA256 573994c7c1bfb96c06a98636b5268a15ce73043b6903916365143eedc73b712b SHA512 d9c8bb2023377860f30ff0c9dbd83393c4569729cdc75506da6c7bdb320d69bb3ed65835746429ec73de02c683cf7bb7e667883ea7c6bd9ded17eeeec80ef071 WHIRLPOOL ccf7e8088ca9502b6dab16f12b804a314e62abfa95a2a0e734df0d805fb4c5fbaff6b72c922e6c5d58b8109d85d942f05ce1c52693bbdc3fc9041c21fdbe19cb +MISC metadata.xml 735 SHA256 92d90d5e0f4ea5092c910632a7281ac937789b7da4860aa23c1d6cde68ea270c SHA512 f1f9894fadd399aa791d4b6befa1366ef2be350ff28bdfb9e24c9ff03de4f01c016c654dbd3b5bd23d0580d8515a3866a645aff0357ff37a177abfefe27158a6 WHIRLPOOL 3ae0d573a611a706342d9473584c840aa50710f2f76bd6785884f59789883aa65884eac137294bd5e27adba27e713c11f2dc976e383605de4560fc054d63245a diff --git a/www-servers/tomcat/files/tomcat-7.0.79-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.79-build.xml.patch new file mode 100644 index 000000000000..481591fb6ff5 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-7.0.79-build.xml.patch @@ -0,0 +1,149 @@ +diff -Naur apache-tomcat-7.0.63-src.orig/build.xml apache-tomcat-7.0.63-src/build.xml +--- apache-tomcat-7.0.63-src.orig/build.xml 2015-06-30 09:15:44.000000000 +0100 ++++ apache-tomcat-7.0.63-src/build.xml 2015-08-22 21:13:12.453038827 +0100 +@@ -660,12 +660,14 @@ + </fileset> + </copy> + <!-- Copy JSP Schemas and DTDs to be packed into servlet-api.jar --> ++<!-- + <copy todir="${tomcat.classes}/javax/servlet/resources" encoding="ISO-8859-1"> + <fileset dir="${tomcat.classes}/javax/servlet/jsp/resources"> + <include name="*" /> + <exclude name="jspxml*" /> + </fileset> + </copy> ++--> + + </target> + +@@ -721,26 +723,32 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> ++--> + + <!-- JSP 2.2 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" + notice="${tomcat.manifests}/jsp-api.jar.notice" + license="${tomcat.manifests}/jsp-api.jar.license" /> ++--> + + <!-- JSP 2.2 EL Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- Bootstrap JAR File --> + <jarIt jarfile="${bootstrap.jar}" +@@ -986,12 +994,14 @@ + <target name="deploy" depends="package,build-docs,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> + ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> ++--> + + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> +@@ -1051,14 +1061,15 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> ++<!-- + <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> +- ++--> + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +- ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib" + failonerror="false"/> +- ++--> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1681,7 +1692,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1886,6 +1897,7 @@ + description="Create the Tomcat javadoc" > + <fail unless="java.7.home" + message="The java.7.home property must be set for javadoc build"/> ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1947,6 +1959,7 @@ + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -1985,9 +1998,11 @@ + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2642,7 +2657,7 @@ + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2699,7 +2714,7 @@ + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2727,7 +2742,7 @@ + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> diff --git a/www-servers/tomcat/files/tomcat-7.0.81-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.81-build.xml.patch new file mode 100644 index 000000000000..481591fb6ff5 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-7.0.81-build.xml.patch @@ -0,0 +1,149 @@ +diff -Naur apache-tomcat-7.0.63-src.orig/build.xml apache-tomcat-7.0.63-src/build.xml +--- apache-tomcat-7.0.63-src.orig/build.xml 2015-06-30 09:15:44.000000000 +0100 ++++ apache-tomcat-7.0.63-src/build.xml 2015-08-22 21:13:12.453038827 +0100 +@@ -660,12 +660,14 @@ + </fileset> + </copy> + <!-- Copy JSP Schemas and DTDs to be packed into servlet-api.jar --> ++<!-- + <copy todir="${tomcat.classes}/javax/servlet/resources" encoding="ISO-8859-1"> + <fileset dir="${tomcat.classes}/javax/servlet/jsp/resources"> + <include name="*" /> + <exclude name="jspxml*" /> + </fileset> + </copy> ++--> + + </target> + +@@ -721,26 +723,32 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> ++--> + + <!-- JSP 2.2 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" + notice="${tomcat.manifests}/jsp-api.jar.notice" + license="${tomcat.manifests}/jsp-api.jar.license" /> ++--> + + <!-- JSP 2.2 EL Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- Bootstrap JAR File --> + <jarIt jarfile="${bootstrap.jar}" +@@ -986,12 +994,14 @@ + <target name="deploy" depends="package,build-docs,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> + ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> ++--> + + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> +@@ -1051,14 +1061,15 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> ++<!-- + <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> +- ++--> + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +- ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib" + failonerror="false"/> +- ++--> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1681,7 +1692,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1886,6 +1897,7 @@ + description="Create the Tomcat javadoc" > + <fail unless="java.7.home" + message="The java.7.home property must be set for javadoc build"/> ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1947,6 +1959,7 @@ + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -1985,9 +1998,11 @@ + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2642,7 +2657,7 @@ + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2699,7 +2714,7 @@ + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2727,7 +2742,7 @@ + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> diff --git a/www-servers/tomcat/files/tomcat-8.0.45-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.45-build.xml.patch new file mode 100644 index 000000000000..cefd59f55ae3 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.0.45-build.xml.patch @@ -0,0 +1,259 @@ +diff --git a/apache-tomcat-8.0.36-src/build.xml b/apache-tomcat-8.0.36-src/build.xml +index 1ba0dae..81a0a2c 100644 +--- a/apache-tomcat-8.0.36-src/build.xml ++++ b/apache-tomcat-8.0.36-src/build.xml +@@ -701,24 +701,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 3.1 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> +- ++--> + <!-- JSP 2.3 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> ++--> + + <!-- EL 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- WebSocket 1.1 API JAR File --> + <jarIt jarfile="${websocket-api.jar}" +@@ -986,14 +991,14 @@ + + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> +- ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> +- ++--> + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> + <fileset dir="bin"> +@@ -1053,7 +1058,7 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> + + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +@@ -1087,7 +1092,7 @@ + </javac> + </target> + +- <target name="build-tomcat-jdbc" depends="package"> ++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1102,7 +1107,7 @@ + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> + </target> + +- <target name="build-tomcat-jdbc-src"> ++ <target name="build-tomcat-jdbc-src" unless="noget"> + <!-- build the jdbc-pool source jar--> + <echo message="Building Tomcat JDBC pool src JAR"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1206,10 +1211,11 @@ + + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" + failonerror="false"/> + <copy file="${jdt.jar}" todir="${tomcat.embed}" /> +- ++--> + <!-- Note the meta-inf below will work as long as there is only one JAR + that needs to add entries. If there is more than one a more complex + solution will be required. --> +@@ -1594,7 +1600,7 @@ + + <target name="extras-commons-logging-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/> +@@ -1733,7 +1739,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1928,6 +1934,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + <target name="javadoc" depends="dist-source,extras-webservices-prepare" + description="Create the Tomcat javadoc" > ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1989,6 +1996,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -2027,9 +2035,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2757,7 +2767,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2791,7 +2801,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2848,7 +2858,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> +@@ -2874,18 +2884,18 @@ skip.installer property in build.properties" /> + + <!-- =============== Utility Targets to support downloads ================ --> + +- <target name="setproxy" if="${proxy.use}"> ++ <target name="setproxy" if="${proxy.use}" unless="noget"> + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" + proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> + </target> + +- <target name="testexist"> ++ <target name="testexist" unless="noget"> + <echo message="Testing for ${destfile}"/> + <available file="${destfile}" property="exist"/> + </target> + +- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2897,7 +2907,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadgz-2" unless="exist" depends="testexist"> ++ <target name="downloadgz-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2916,7 +2926,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2927,7 +2937,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadzip-2" unless="exist" depends="testexist"> ++ <target name="downloadzip-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2945,7 +2955,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> + <!-- Download the file --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2955,7 +2965,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="downloadfile-2" unless="exist" depends="testexist"> ++ <target name="downloadfile-2" unless="noget" depends="testexist"> + <!-- Download the file from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2978,7 +2988,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="trydownload.check" depends="setproxy"> ++ <target name="trydownload.check" depends="setproxy" unless="noget"> + <condition property="trydownload.run"> + <and> + <not> +@@ -2989,7 +2999,7 @@ skip.installer property in build.properties" /> + </condition> + </target> + +- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> + <!-- Downloads a file if not yet downloaded and the source URL is available --> + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> + </target> +@@ -3000,7 +3010,7 @@ skip.installer property in build.properties" /> + + <target name="ide-eclipse" + depends="download-compile, extras-webservices-prepare, download-test-compile" +- description="Prepares the source tree to be built in Eclipse"> ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + <!-- Copy the sample project files into the root directory --> + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> diff --git a/www-servers/tomcat/files/tomcat-8.0.46-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.46-build.xml.patch new file mode 100644 index 000000000000..cefd59f55ae3 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.0.46-build.xml.patch @@ -0,0 +1,259 @@ +diff --git a/apache-tomcat-8.0.36-src/build.xml b/apache-tomcat-8.0.36-src/build.xml +index 1ba0dae..81a0a2c 100644 +--- a/apache-tomcat-8.0.36-src/build.xml ++++ b/apache-tomcat-8.0.36-src/build.xml +@@ -701,24 +701,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 3.1 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> +- ++--> + <!-- JSP 2.3 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> ++--> + + <!-- EL 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- WebSocket 1.1 API JAR File --> + <jarIt jarfile="${websocket-api.jar}" +@@ -986,14 +991,14 @@ + + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> +- ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> +- ++--> + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> + <fileset dir="bin"> +@@ -1053,7 +1058,7 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> + + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +@@ -1087,7 +1092,7 @@ + </javac> + </target> + +- <target name="build-tomcat-jdbc" depends="package"> ++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1102,7 +1107,7 @@ + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> + </target> + +- <target name="build-tomcat-jdbc-src"> ++ <target name="build-tomcat-jdbc-src" unless="noget"> + <!-- build the jdbc-pool source jar--> + <echo message="Building Tomcat JDBC pool src JAR"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1206,10 +1211,11 @@ + + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" + failonerror="false"/> + <copy file="${jdt.jar}" todir="${tomcat.embed}" /> +- ++--> + <!-- Note the meta-inf below will work as long as there is only one JAR + that needs to add entries. If there is more than one a more complex + solution will be required. --> +@@ -1594,7 +1600,7 @@ + + <target name="extras-commons-logging-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/> +@@ -1733,7 +1739,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1928,6 +1934,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + <target name="javadoc" depends="dist-source,extras-webservices-prepare" + description="Create the Tomcat javadoc" > ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1989,6 +1996,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -2027,9 +2035,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2757,7 +2767,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2791,7 +2801,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2848,7 +2858,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> +@@ -2874,18 +2884,18 @@ skip.installer property in build.properties" /> + + <!-- =============== Utility Targets to support downloads ================ --> + +- <target name="setproxy" if="${proxy.use}"> ++ <target name="setproxy" if="${proxy.use}" unless="noget"> + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" + proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> + </target> + +- <target name="testexist"> ++ <target name="testexist" unless="noget"> + <echo message="Testing for ${destfile}"/> + <available file="${destfile}" property="exist"/> + </target> + +- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2897,7 +2907,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadgz-2" unless="exist" depends="testexist"> ++ <target name="downloadgz-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2916,7 +2926,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2927,7 +2937,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadzip-2" unless="exist" depends="testexist"> ++ <target name="downloadzip-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2945,7 +2955,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> + <!-- Download the file --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2955,7 +2965,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="downloadfile-2" unless="exist" depends="testexist"> ++ <target name="downloadfile-2" unless="noget" depends="testexist"> + <!-- Download the file from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2978,7 +2988,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="trydownload.check" depends="setproxy"> ++ <target name="trydownload.check" depends="setproxy" unless="noget"> + <condition property="trydownload.run"> + <and> + <not> +@@ -2989,7 +2999,7 @@ skip.installer property in build.properties" /> + </condition> + </target> + +- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> + <!-- Downloads a file if not yet downloaded and the source URL is available --> + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> + </target> +@@ -3000,7 +3010,7 @@ skip.installer property in build.properties" /> + + <target name="ide-eclipse" + depends="download-compile, extras-webservices-prepare, download-test-compile" +- description="Prepares the source tree to be built in Eclipse"> ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + <!-- Copy the sample project files into the root directory --> + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> diff --git a/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch new file mode 100644 index 000000000000..611c99d7a0ec --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch @@ -0,0 +1,250 @@ +diff --git a/apache-tomcat-8.5.4-src/build.xml b/apache-tomcat-8.5.4-src/build.xml +index 655e379..b973b7f 100644 +--- a/apache-tomcat-8.5.4-src/build.xml ++++ b/apache-tomcat-8.5.4-src/build.xml +@@ -691,24 +691,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 3.1 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> +- ++--> + <!-- JSP 2.3 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> ++--> + + <!-- EL 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- WebSocket 1.1 API JAR File --> + <jarIt jarfile="${websocket-api.jar}" +@@ -982,14 +987,14 @@ + + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> +- ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> +- ++--> + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> + <fileset dir="bin"> +@@ -1049,7 +1054,7 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> + + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +@@ -1083,7 +1088,7 @@ + </javac> + </target> + +- <target name="build-tomcat-jdbc" depends="package"> ++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1098,7 +1103,7 @@ + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> + </target> + +- <target name="build-tomcat-jdbc-src"> ++ <target name="build-tomcat-jdbc-src" unless="noget"> + <!-- build the jdbc-pool source jar--> + <echo message="Building Tomcat JDBC pool src JAR"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1202,10 +1207,11 @@ + + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" + failonerror="false"/> + <copy file="${jdt.jar}" todir="${tomcat.embed}" /> +- ++--> + <!-- Note the meta-inf below will work as long as there is only one JAR + that needs to add entries. If there is more than one a more complex + solution will be required. --> +@@ -1579,7 +1585,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1727,6 +1733,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + <target name="javadoc" depends="dist-source,extras-webservices-prepare" + description="Create the Tomcat javadoc" > ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1791,6 +1798,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -1831,9 +1839,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2574,7 +2584,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2608,7 +2618,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2665,7 +2675,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> +@@ -2691,18 +2701,18 @@ skip.installer property in build.properties" /> + + <!-- =============== Utility Targets to support downloads ================ --> + +- <target name="setproxy" if="${proxy.use}"> ++ <target name="setproxy" if="${proxy.use}" unless="noget"> + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" + proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> + </target> + +- <target name="testexist"> ++ <target name="testexist" unless="noget"> + <echo message="Testing for ${destfile}"/> + <available file="${destfile}" property="exist"/> + </target> + +- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2714,7 +2724,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadgz-2" unless="exist" depends="testexist"> ++ <target name="downloadgz-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2733,7 +2743,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2744,7 +2754,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadzip-2" unless="exist" depends="testexist"> ++ <target name="downloadzip-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2762,7 +2772,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> + <!-- Download the file --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2772,7 +2782,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="downloadfile-2" unless="exist" depends="testexist"> ++ <target name="downloadfile-2" unless="noget" depends="testexist"> + <!-- Download the file from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2795,7 +2805,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="trydownload.check" depends="setproxy"> ++ <target name="trydownload.check" depends="setproxy" unless="noget"> + <condition property="trydownload.run"> + <and> + <not> +@@ -2806,7 +2816,7 @@ skip.installer property in build.properties" /> + </condition> + </target> + +- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> + <!-- Downloads a file if not yet downloaded and the source URL is available --> + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> + </target> +@@ -2817,7 +2827,7 @@ skip.installer property in build.properties" /> + + <target name="ide-eclipse" + depends="download-compile, extras-webservices-prepare, download-test-compile" +- description="Prepares the source tree to be built in Eclipse"> ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + <!-- Copy the sample project files into the root directory --> + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> diff --git a/www-servers/tomcat/files/tomcat-9.0.0_alpha26-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.0_alpha26-build.xml.patch new file mode 100644 index 000000000000..3c4e5c2a9d45 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-9.0.0_alpha26-build.xml.patch @@ -0,0 +1,250 @@ +diff --git a/apache-tomcat-9.0.0.M8-src/build.xml b/apache-tomcat-9.0.0.M8-src/build.xml +index dfec1f7..4dfc5d8 100644 +--- a/apache-tomcat-9.0.0.M8-src/build.xml ++++ b/apache-tomcat-9.0.0.M8-src/build.xml +@@ -695,24 +695,30 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + <!-- Servlet 4.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${servlet-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.servlet-api" + manifest="${tomcat.manifests}/servlet-api.jar.manifest" + notice="${tomcat.manifests}/servlet-api.jar.notice" + license="${tomcat.manifests}/servlet-api.jar.license" /> ++--> + + <!-- JSP 2.3 Implementation JAR File --> ++<!-- + <jarIt jarfile="${jsp-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.jsp-api" + manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> ++--> + + <!-- EL 3.0 Implementation JAR File --> ++<!-- + <jarIt jarfile="${el-api.jar}" + filesDir="${tomcat.classes}" + filesId="files.el-api" + manifest="${tomcat.manifests}/el-api.jar.manifest" /> ++--> + + <!-- WebSocket 1.1 API JAR File --> + <jarIt jarfile="${websocket-api.jar}" +@@ -986,14 +992,14 @@ + + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> +- ++<!-- + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> + + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> +- ++--> + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> + <fileset dir="bin"> +@@ -1053,7 +1059,7 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> + + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +@@ -1087,7 +1093,7 @@ + </javac> + </target> + +- <target name="build-tomcat-jdbc" depends="package"> ++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> + <!-- build the jdbc-pool jar and source jar--> + <echo message="Building Tomcat JDBC pool libraries"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1102,7 +1108,7 @@ + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> + </target> + +- <target name="build-tomcat-jdbc-src"> ++ <target name="build-tomcat-jdbc-src" unless="noget"> + <!-- build the jdbc-pool source jar--> + <echo message="Building Tomcat JDBC pool src JAR"/> + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" +@@ -1206,10 +1212,11 @@ + + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> ++<!-- + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" + failonerror="false"/> + <copy file="${jdt.jar}" todir="${tomcat.embed}" /> +- ++--> + <!-- Note the meta-inf below will work as long as there is only one JAR + that needs to add entries. If there is more than one a more complex + solution will be required. --> +@@ -1583,7 +1590,7 @@ + + <target name="extras-webservices-prepare" + depends="extras-prepare" +- description="Prepare to build web services extras package"> ++ description="Prepare to build web services extras package" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> +@@ -1731,6 +1738,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + <target name="javadoc" depends="dist-source,extras-webservices-prepare" + description="Create the Tomcat javadoc" > ++<!-- + <javadoc packagenames="javax.servlet.*" + excludepackagenames="javax.servlet.jsp.*" + sourcepath="${tomcat.dist}/src/java" +@@ -1795,6 +1803,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path location="${ant.core.lib}"/> + </classpath> + </javadoc> ++--> + <javadoc packagenames="javax.websocket.*" + sourcepath="${tomcat.dist}/src/java" + destdir="${tomcat.dist}/webapps/docs/websocketapi" +@@ -1835,9 +1844,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <path refid="tomcat.webservices.classpath"/> + <path location="${ant.core.lib}"/> + </classpath> ++<!-- + <link href="../servletapi"/> + <link href="../jspapi"/> + <link href="../elapi"/> ++--> + <link href="../websocketapi"/> + <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> +@@ -2578,7 +2589,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-compile" +- description="Download (and build) components necessary to compile" > ++ description="Download (and build) components necessary to compile" unless="noget"> + + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> +@@ -2612,7 +2623,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-test-compile" +- description="Download additional components for the tests" > ++ description="Download additional components for the tests" unless="noget"> + + <antcall target="downloadfile"> + <param name="sourcefile" value="${junit.loc}"/> +@@ -2669,7 +2680,7 @@ skip.installer property in build.properties" /> + </target> + + <target name="download-dist" +- description="Download additional components for a distribution" > ++ description="Download additional components for a distribution" unless="noget"> + + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${tomcat-native.win.1}"/> +@@ -2695,18 +2706,18 @@ skip.installer property in build.properties" /> + + <!-- =============== Utility Targets to support downloads ================ --> + +- <target name="setproxy" if="${proxy.use}"> ++ <target name="setproxy" if="${proxy.use}" unless="noget"> + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" + proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> + </target> + +- <target name="testexist"> ++ <target name="testexist" unless="noget"> + <echo message="Testing for ${destfile}"/> + <available file="${destfile}" property="exist"/> + </target> + +- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2718,7 +2729,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadgz-2" unless="exist" depends="testexist"> ++ <target name="downloadgz-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2737,7 +2748,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}.tar.gz"/> + </target> + +- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> + <!-- Download and extract the package --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2748,7 +2759,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadzip-2" unless="exist" depends="testexist"> ++ <target name="downloadzip-2" unless="noget" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2766,7 +2777,7 @@ skip.installer property in build.properties" /> + <delete file="${temp.file}"/> + </target> + +- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> + <!-- Download the file --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2776,7 +2787,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="downloadfile-2" unless="exist" depends="testexist"> ++ <target name="downloadfile-2" unless="noget" depends="testexist"> + <!-- Download the file from the two alternative locations --> + <local name="temp.file"/> + <mkdir dir="${base.path}"/> +@@ -2799,7 +2810,7 @@ skip.installer property in build.properties" /> + <move file="${temp.file}" tofile="${destfile}"/> + </target> + +- <target name="trydownload.check" depends="setproxy"> ++ <target name="trydownload.check" depends="setproxy" unless="noget"> + <condition property="trydownload.run"> + <and> + <not> +@@ -2810,7 +2821,7 @@ skip.installer property in build.properties" /> + </condition> + </target> + +- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> + <!-- Downloads a file if not yet downloaded and the source URL is available --> + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> + </target> +@@ -2821,7 +2832,7 @@ skip.installer property in build.properties" /> + + <target name="ide-eclipse" + depends="download-compile, extras-webservices-prepare, download-test-compile" +- description="Prepares the source tree to be built in Eclipse"> ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + <!-- Copy the sample project files into the root directory --> + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> diff --git a/www-servers/tomcat/files/tomcat-instance-manager-r1.bash b/www-servers/tomcat/files/tomcat-instance-manager-r1.bash new file mode 100644 index 000000000000..de5152198b3e --- /dev/null +++ b/www-servers/tomcat/files/tomcat-instance-manager-r1.bash @@ -0,0 +1,240 @@ +#!/bin/bash +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Author: Ralph Sennhauser <sera@gentoo.org> + +die() { + echo "${@}" + exit 1 +} + +usage() { + cat <<EOL +Usage: ${BASH_SOURCE} <--create|--remove|--help> [--suffix s][--user u][--group g] + + Options: + --help: + show this text. + --create: + create a new instance + --remove: + remove an existing instance. + --suffix SUFFIX: + a suffix for this instance. the suffix may not collide with an already + existing instance, defaults to empty. + --user USER: + the user for which to configure this instance for. The user needs to + exist already. defaults to tomcat. + --group GROUP: + the group for which to configure this instance for. The group needs to + exist already. defaults to tomcat. + + Examples: + ${BASH_SOURCE} --create --suffix testing --user tacmot --group tacmot + ${BASH_SOURCE} --remove --suffix testing +EOL +} + +parse_argv() { + action="not specified" + instance_name="tomcat-@SLOT@" + instance_user="tomcat" + instance_group="tomcat" + + while [[ -n $1 ]]; do + case $1 in + --help) + usage + exit 0;; + --suffix) + instance_name+="-$2" + shift; shift;; + --user) + instance_user="$2" + shift; shift;; + --group) + instance_group="$2" + shift; shift;; + --create) + action=create + shift;; + --remove) + action=remove + shift;; + --backup) + action=backup + shift;; + --restore) + action=restore + shift;; + --update) + action=update + shift;; + *) + echo "Invalid option '$1'" + usage + exit 2;; + esac + done + + tomcat_home="/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@" + instance_base="/@GENTOO_PORTAGE_EPREFIX@var/lib/${instance_name}" + instance_conf="/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}" + instance_logs="/@GENTOO_PORTAGE_EPREFIX@var/log/${instance_name}" + instance_temp="/@GENTOO_PORTAGE_EPREFIX@var/tmp/${instance_name}" + + all_targets=( + "${instance_base}" + "${instance_logs}" + "${instance_temp}" + "/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}" + "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" + "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" + ) +} + +test_can_deploy() { + local no_deploy target + for target in "${all_targets[@]}"; do + if [[ -e "${target}" ]]; then + echo "Error: '${target}' already exists." + no_deploy=yes + fi + done + if [[ -n "${no_deploy}" ]]; then + cat <<-EOL + + To protect an existing installation no new instance was deployed. You can use + '${BASH_SOURCE} --remove' + to remove an existing instance first or run + '${BASH_SOURCE} --create --sufix <instance_suffix>' + to deploy an instance under a different name + + EOL + usage + exit 1 + fi + + if ! getent passwd | cut -d: -f1 | grep -Fx "${instance_user}" > /dev/null; then + echo "Error: user '${instance_user}' doesn't exist." + exit 1 + fi + + if ! getent group | cut -d: -f1 | grep -Fx "${instance_group}" > /dev/null; then + echo "Error: group '${instance_group}' doesn't exist." + exit 1 + fi +} + +deploy_instance() { + test_can_deploy + + mkdir -p "${instance_base}"/{work,webapps} || die + mkdir -p "${instance_logs}" || die + mkdir -p "${instance_temp}" || die + + cp -r "${tomcat_home}"/webapps/ROOT "${instance_base}"/webapps || die + + chown -R "${instance_user}":"${instance_group}" \ + "${instance_base}" "${instance_logs}" "${instance_temp}" || die + + find "${instance_base}"/webapps -type d -exec chmod 750 {} + || die + find "${instance_base}"/webapps -type f -exec chmod 640 {} + || die + + # initial config # + + cp -r "${tomcat_home}"/conf "${instance_conf}" || die + + sed -i -e "s|\${catalina.base}/logs|${instance_logs}|" \ + "${instance_conf}"/logging.properties || die + sed -i -e "s|directory=\"logs\"|directory=\"${instance_logs}\"|" \ + "${instance_conf}"/server.xml || die + + mkdir -p "${instance_conf}"/Catalina/localhost || die + cat > "${instance_conf}"/Catalina/localhost/host-manager.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/host-manager" + antiResourceLocking="false" privileged="true" /> + EOF + + cat > "${instance_conf}"/Catalina/localhost/manager.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/manager" + antiResourceLocking="false" privileged="true" /> + EOF + + if [[ -d "${tomcat_home}"/webapps/docs ]]; then + cat > "${instance_conf}"/Catalina/localhost/docs.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/docs" /> + EOF + fi + + if [[ -d "${tomcat_home}"/webapps/examples ]]; then + cat > "${instance_conf}"/Catalina/localhost/examples.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/examples" /> + EOF + fi + + chown -R "${instance_user}":"${instance_group}" "${instance_conf}" || die + find "${instance_conf}" -type d -exec chmod 750 {} + || die + find "${instance_conf}" -type f -exec chmod 640 {} + || die + + # rc script # + + cp "${tomcat_home}"/gentoo/tomcat.init \ + "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" || die + + sed -e "s|@INSTANCE_NAME@|${instance_name}|g" \ + -e "s|@INSTANCE_USER@|${instance_user}|g" \ + -e "s|@INSTANCE_GROUP@|${instance_group}|g" \ + "${tomcat_home}"/gentoo/tomcat.conf \ + > "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" || die + + # some symlinks for tomcat and netbeans # + + ln -s "${instance_conf}" "${instance_base}"/conf || die + ln -s "${instance_temp}" "${instance_base}"/temp || die + + # a note to update the default configuration # + + cat <<-EOL + Successfully created instance '${instance_name}' + It's strongly recommended for production systems to go carefully through the + configuration files at '${instance_conf}'. + The generated initial configuration is close to upstreams default which + favours the demo aspect over hardening. + EOL +} + +remove_instance() { + echo "The following files will be removed permanently:" + local target; for target in "${all_targets[@]}"; do + find ${target} + done + + echo "Type 'yes' to continue" + read + if [[ ${REPLY} == yes ]]; then + rm -rv "${all_targets[@]}" + else + echo "Aborting as requested ..." + fi +} + +parse_argv "$@" + +if [[ ${action} == create ]]; then + deploy_instance +elif [[ ${action} == remove ]]; then + remove_instance +elif [[ ${action} == "not specified" ]]; then + echo "No action specified!" + usage + exit 1 +else + echo "${action} not yet implemented!" + usage + exit 1 +fi diff --git a/www-servers/tomcat/files/tomcat-instance-manager-r2.bash b/www-servers/tomcat/files/tomcat-instance-manager-r2.bash new file mode 100644 index 000000000000..b3b1a0221bc3 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-instance-manager-r2.bash @@ -0,0 +1,270 @@ +#!/bin/bash +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Author: Ralph Sennhauser <sera@gentoo.org> + +die() { + echo "${@}" + exit 1 +} + +dir_is_empty() { + # usage: + # dir_is_empty <some-dir> + # + # returns 2 if the dir does not even exist + # returns 1 if the dir is not empty + # returns 0 (success) if the dir exists and is empty + + local dir=$1 + local files + + if [[ ! -e ${dir} ]] ; then + return 2 + fi + + shopt -s nullglob dotglob # To include hidden files + files=( "${dir}"/* ) + shopt -u nullglob dotglob + + if [[ ${#files[@]} -eq 0 ]]; then + return 0 + else + return 1 + fi + +} + +usage() { + cat <<EOL +Usage: ${BASH_SOURCE} <--create|--remove|--help> [--suffix s][--user u][--group g] + + Options: + --help: + show this text. + --create: + create a new instance + --remove: + remove an existing instance. + --suffix SUFFIX: + a suffix for this instance. the suffix may not collide with an already + existing instance, defaults to empty. + --user USER: + the user for which to configure this instance for. The user needs to + exist already. defaults to tomcat. + --group GROUP: + the group for which to configure this instance for. The group needs to + exist already. defaults to tomcat. + + Examples: + ${BASH_SOURCE} --create --suffix testing --user tacmot --group tacmot + ${BASH_SOURCE} --remove --suffix testing +EOL +} + +parse_argv() { + action="not specified" + instance_name="tomcat-@SLOT@" + instance_user="tomcat" + instance_group="tomcat" + + while [[ -n $1 ]]; do + case $1 in + --help) + usage + exit 0;; + --suffix) + instance_name+="-$2" + shift; shift;; + --user) + instance_user="$2" + shift; shift;; + --group) + instance_group="$2" + shift; shift;; + --create) + action=create + shift;; + --remove) + action=remove + shift;; + --backup) + action=backup + shift;; + --restore) + action=restore + shift;; + --update) + action=update + shift;; + *) + echo "Invalid option '$1'" + usage + exit 2;; + esac + done + + tomcat_home="/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@" + instance_base="/@GENTOO_PORTAGE_EPREFIX@var/lib/${instance_name}" + instance_conf="/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}" + instance_logs="/@GENTOO_PORTAGE_EPREFIX@var/log/${instance_name}" + instance_temp="/@GENTOO_PORTAGE_EPREFIX@var/tmp/${instance_name}" + + all_targets=( + "${instance_base}" + "${instance_logs}" + "${instance_temp}" + "/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}" + "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" + "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" + ) +} + +test_can_deploy() { + local no_deploy target + for target in "${all_targets[@]}"; do + if [[ -e "${target}" ]]; then + if ! dir_is_empty "${target}" ; then + echo "Error: '${target}' already exists and is not empty." + no_deploy=yes + fi + fi + done + if [[ -n "${no_deploy}" ]]; then + cat <<-EOL + + To protect an existing installation no new instance was deployed. You can use + '${BASH_SOURCE} --remove' + to remove an existing instance first or run + '${BASH_SOURCE} --create --sufix <instance_suffix>' + to deploy an instance under a different name + + EOL + usage + exit 1 + fi + + if ! getent passwd | cut -d: -f1 | grep -Fx "${instance_user}" > /dev/null; then + echo "Error: user '${instance_user}' doesn't exist." + exit 1 + fi + + if ! getent group | cut -d: -f1 | grep -Fx "${instance_group}" > /dev/null; then + echo "Error: group '${instance_group}' doesn't exist." + exit 1 + fi +} + +deploy_instance() { + test_can_deploy + + mkdir -p "${instance_base}"/{work,webapps} || die + mkdir -p "${instance_logs}" || die + mkdir -p "${instance_temp}" || die + mkdir -p "${instance_conf}" || die + + cp -r "${tomcat_home}"/webapps/ROOT "${instance_base}"/webapps || die + + chown -R "${instance_user}":"${instance_group}" \ + "${instance_base}" "${instance_logs}" "${instance_temp}" || die + + find "${instance_base}"/webapps -type d -exec chmod 750 {} + || die + find "${instance_base}"/webapps -type f -exec chmod 640 {} + || die + + # initial config # + + cp -r "${tomcat_home}"/conf/* "${instance_conf}"/ || die + + sed -i -e "s|\${catalina.base}/logs|${instance_logs}|" \ + "${instance_conf}"/logging.properties || die + sed -i -e "s|directory=\"logs\"|directory=\"${instance_logs}\"|" \ + "${instance_conf}"/server.xml || die + + mkdir -p "${instance_conf}"/Catalina/localhost || die + cat > "${instance_conf}"/Catalina/localhost/host-manager.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/host-manager" + antiResourceLocking="false" privileged="true" /> + EOF + + cat > "${instance_conf}"/Catalina/localhost/manager.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/manager" + antiResourceLocking="false" privileged="true" /> + EOF + + if [[ -d "${tomcat_home}"/webapps/docs ]]; then + cat > "${instance_conf}"/Catalina/localhost/docs.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/docs" /> + EOF + fi + + if [[ -d "${tomcat_home}"/webapps/examples ]]; then + cat > "${instance_conf}"/Catalina/localhost/examples.xml <<-'EOF' + <?xml version="1.0" encoding="UTF-8"?> + <Context docBase="${catalina.home}/webapps/examples" /> + EOF + fi + + chown -R "${instance_user}":"${instance_group}" "${instance_conf}" || die + find "${instance_conf}" -type d -exec chmod 750 {} + || die + find "${instance_conf}" -type f -exec chmod 640 {} + || die + + # rc script # + + cp "${tomcat_home}"/gentoo/tomcat.init \ + "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" || die + + sed -e "s|@INSTANCE_NAME@|${instance_name}|g" \ + -e "s|@INSTANCE_USER@|${instance_user}|g" \ + -e "s|@INSTANCE_GROUP@|${instance_group}|g" \ + "${tomcat_home}"/gentoo/tomcat.conf \ + > "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" || die + + # some symlinks for tomcat and netbeans # + + ln -s "${instance_conf}" "${instance_base}"/conf || die + ln -s "${instance_temp}" "${instance_base}"/temp || die + + # a note to update the default configuration # + + cat <<-EOL + Successfully created instance '${instance_name}' + It's strongly recommended for production systems to go carefully through the + configuration files at '${instance_conf}'. + The generated initial configuration is close to upstreams default which + favours the demo aspect over hardening. + EOL +} + +remove_instance() { + echo "The following files will be removed permanently:" + local target; for target in "${all_targets[@]}"; do + find ${target} + done + + echo "Type 'yes' to continue" + read + if [[ ${REPLY} == yes ]]; then + rm -rv "${all_targets[@]}" + else + echo "Aborting as requested ..." + fi +} + +parse_argv "$@" + +if [[ ${action} == create ]]; then + deploy_instance +elif [[ ${action} == remove ]]; then + remove_instance +elif [[ ${action} == "not specified" ]]; then + echo "No action specified!" + usage + exit 1 +else + echo "${action} not yet implemented!" + usage + exit 1 +fi diff --git a/www-servers/tomcat/files/tomcat-r1.init b/www-servers/tomcat/files/tomcat-r1.init new file mode 100644 index 000000000000..13c3e548a2d4 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-r1.init @@ -0,0 +1,110 @@ +#!/@GENTOO_PORTAGE_EPREFIX@sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="forcestop" + +PIDFILE=/@GENTOO_PORTAGE_EPREFIX@var/run/${RC_SVCNAME}.pid + +: ${CATALINA_HOME:=/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@} +: ${CATALINA_BASE:=/@GENTOO_PORTAGE_EPREFIX@var/lib/${RC_SVCNAME}} +: ${CATALINA_TMPDIR:=/@GENTOO_PORTAGE_EPREFIX@var/tmp/${RC_SVCNAME}} +: ${CATALINA_USER:=tomcat} +: ${CATALINA_GROUP:=tomcat} + +: ${TOMCAT_START:=start} + +: ${JPDA_TRANSPORT:="dt_socket"} +: ${JPDA_ADDRESS:="8000"} +: ${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"} + +export JAVA_HOME=`java-config ${TOMCAT_JVM:+--select-vm ${TOMCAT_JVM}} --jre-home` +export CLASSPATH="${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar" + +depend() { + use dns logger net +} + +start() { + ebegin "Starting ${RC_SVCNAME}" + + if [ ! -e "${CATALINA_TMPDIR}" ]; then + eerror "CATALINA_TMPDIR does not exist. Unable to start tomcat." + eerror "Please see /@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${RC_SVCNAME} for more information." + eend 1 + fi + + local DEPEND=$(java-config --query DEPEND --package tomcat-@SLOT@):${TOMCAT_EXTRA_JARS} + DEPEND=${DEPEND%:} + + local GCLASSPATH=$(java-config --with-dependencies --classpath "${DEPEND//:/,}"):${TOMCAT_EXTRA_CLASSPATH} + GCLASSPATH=${GCLASSPATH%:} + + local cmd=java args= + if [ "${TOMCAT_START}" = "debug" ] || [ "${TOMCAT_START}" = "-security debug" ] ; then + cmd=jdb + args="${args} -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share" + fi + if [ "${TOMCAT_START}" = "-security debug" ] || [ "${TOMCAT_START}" = "-security start" ]; then + args="${args} -Djava.security.manager" + args="${args} -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy" + fi + if [ "${TOMCAT_START}" = "jpda start" ] ; then + args="${args} ${JPDA_OPTS}" + fi + if [ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]; then + args="${args} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ + -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties" + fi + + start-stop-daemon --start \ + --quiet --background \ + --chdir "${CATALINA_TMPDIR}" \ + --user ${CATALINA_USER}:${CATALINA_GROUP} \ + --make-pidfile --pidfile ${PIDFILE} \ + --exec ${JAVA_HOME}/bin/${cmd} \ + -- \ + ${JAVA_OPTS} \ + ${args} \ + -Dcatalina.base="${CATALINA_BASE}" \ + -Dcatalina.home="${CATALINA_HOME}" \ + -Djava.io.tmpdir="${CATALINA_TMPDIR}" \ + -Dgentoo.classpath="${GCLASSPATH//:/,}" \ + -classpath "${CLASSPATH}" \ + org.apache.catalina.startup.Bootstrap \ + ${CATALINA_OPTS} \ + ${TOMCAT_START} + + eend $? +} + +stop() { + ebegin "Stopping '${RC_SVCNAME}'" + + start-stop-daemon --stop \ + --quiet --retry=60 \ + --pidfile ${PIDFILE} \ + --exec ${JAVA_HOME}/bin/java \ + -- \ + ${JAVA_OPTS} \ + -classpath "${CLASSPATH}" \ + ${CATALINA_OPTS} \ + stop ${STD_OUT} + + eend $? +} + +forcestop() { + ebegin "Forcing '${RC_SVCNAME}' to stop" + + start-stop-daemon --stop \ + --quiet --retry=60 \ + --pidfile ${PIDFILE} \ + --signal=9 + + if service_started "${RC_SVCNAME}"; then + mark_service_stopped "${RC_SVCNAME}" + fi + + eend $? +} diff --git a/www-servers/tomcat/files/tomcat.conf b/www-servers/tomcat/files/tomcat.conf new file mode 100644 index 000000000000..376af44adef6 --- /dev/null +++ b/www-servers/tomcat/files/tomcat.conf @@ -0,0 +1,57 @@ +# Set the handle of the JVM to use. If unset uses the system-vm. +# run 'eselect java-vm list' to get possible values. +# +#TOMCAT_JVM="icedtea-7" + +# Additional options to pass to the JVM. +# Example to set library path for tomcat-native: +# JAVA_OPTS="-Djava.library.path=/usr/lib" +# +#JAVA_OPTS="" + +# Additional packages to put on the default classpath. +# jakarta-jstl is needed for some of the examples. +# Note: The extra jars listed here will be visible to webapps. +# Example: +# TOMCAT_EXTRA_JARS="jakarta-jstl,xerces-2" +# +#TOMCAT_EXTRA_JARS="" + +# Additional paths to put on the default classpath. +# These should be separated by the : character. +# Note: The extra jars listed here will be visible to webapps. +# Example: +# TOMCAT_EXTRA_CLASSPATH="/path/to/foo.jar:/path/to/bar.jar" +# +#TOMCAT_EXTRA_CLASSPATH="" + +# User/Group of this instance. +CATALINA_USER=@INSTANCE_USER@ +CATALINA_GROUP=@INSTANCE_GROUP@ + +# Directory path location of temporary directory the JVM should +# use (java.io.tmpdir). +# Note: This directory must exist and be read/writable by tomcat. +# See #246362 as an example where /var/tmp was deleted on shutdown. +# +#CATALINA_TMPDIR="/@GENTOO_PORTAGE_EPREFIX@var/tmp/@INSTANCE_NAME@" + +# TOMCAT STARTUP +# debug Start Catalina in a debugger +# -security debug Debug Catalina with a security manager +# jpda start Start Catalina under JPDA debugger +# start Start Catalina in a separate window +# -security start Start in a separate window with security manager +# +#TOMCAT_START="start" + +# Java Platform Debugger Architecture (JPDA) +# http://java.sun.com/products/jpda/ +# Override default JPDA address and transport for the "jpda start" command. +# +#JPDA_ADDRESS="8000" +#JPDA_TRANSPORT="dt_socket" + +# Additional options to pass to catalina +# +#CATALINA_OPTS="" diff --git a/www-servers/tomcat/metadata.xml b/www-servers/tomcat/metadata.xml new file mode 100644 index 000000000000..82f98407b56a --- /dev/null +++ b/www-servers/tomcat/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <longdescription> + Tomcat is the servlet container that is used in the official Reference + Implementation for the Java Servlet and JavaServer Pages technologies. + The Java Servlet and JavaServer Pages specifications are developed by + Sun under the Java Community Process. + </longdescription> + <use> + <flag name="extra-webapps">Build also the docs and examples webapp</flag> + <flag name="websockets">Builds websockets api and implementation (requires java 7)</flag> + </use> +</pkgmetadata> diff --git a/www-servers/tomcat/tomcat-7.0.79.ebuild b/www-servers/tomcat/tomcat-7.0.79.ebuild new file mode 100644 index 000000000000..0d01aa49b311 --- /dev/null +++ b/www-servers/tomcat/tomcat-7.0.79.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="7" +KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps websockets" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + websockets? ( >=virtual/jre-1.7 ) + !websockets? ( >=virtual/jre-1.6 ) + !<dev-java/tomcat-native-1.1.24" +DEPEND="${COMMON_DEP} + websockets? ( >=virtual/jdk-1.7 ) + !websockets? ( >=virtual/jdk-1.6 ) + test? ( dev-java/ant-junit:0 )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + java-pkg_clean + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r1" +INIT_REV="-r1" + +src_compile() { + use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}" + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-7.0.81.ebuild b/www-servers/tomcat/tomcat-7.0.81.ebuild new file mode 100644 index 000000000000..f583bb614aaf --- /dev/null +++ b/www-servers/tomcat/tomcat-7.0.81.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="7" +KEYWORDS="amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps websockets" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + websockets? ( >=virtual/jre-1.7 ) + !websockets? ( >=virtual/jre-1.6 ) + !<dev-java/tomcat-native-1.1.24" +DEPEND="${COMMON_DEP} + websockets? ( >=virtual/jdk-1.7 ) + !websockets? ( >=virtual/jdk-1.6 ) + test? ( dev-java/ant-junit:0 )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + java-pkg_clean + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r1" +INIT_REV="-r1" + +src_compile() { + use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}" + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-8.0.45.ebuild b/www-servers/tomcat/tomcat-8.0.45.ebuild new file mode 100644 index 000000000000..1e01093d2591 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.0.45.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="8" +KEYWORDS="amd64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !<dev-java/tomcat-native-1.1.24 + >=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-8.0.46.ebuild b/www-servers/tomcat/tomcat-8.0.46.ebuild new file mode 100644 index 000000000000..424ec1de47d9 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.0.46.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="8" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !<dev-java/tomcat-native-1.1.24 + >=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-8.5.20.ebuild b/www-servers/tomcat/tomcat-8.5.20.ebuild new file mode 100644 index 000000000000..94c1abd6a554 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.5.20.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="8.5" +KEYWORDS="amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !<dev-java/tomcat-native-1.1.24 + >=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-9.0.0_alpha26.ebuild b/www-servers/tomcat/tomcat-9.0.0_alpha26.ebuild new file mode 100644 index 000000000000..8090b4f5c011 --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.0_alpha26.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_PV="${PV/_alpha/.M}" +MY_P="apache-${PN}-${MY_PV}-src" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${MY_PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="9" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="4.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + =dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !<dev-java/tomcat-native-1.1.24 + >=virtual/jre-1.8" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.8 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tornado/Manifest b/www-servers/tornado/Manifest new file mode 100644 index 000000000000..9c3efb671156 --- /dev/null +++ b/www-servers/tornado/Manifest @@ -0,0 +1,10 @@ +AUX 4.4-drop-intersphinx.patch 935 SHA256 69fbb60d35904690200abd8c1157656a716eeb326ca367122de3bb6690bdea51 SHA512 457a78af92b57b91186bbc06386e4db167b291c50f453dafc58cd4c3245994263cdefb560d29d97ffd027117f6c571c1d373b7e6f9762dcc79ba4ad8abcdafcf WHIRLPOOL e5e735b7eed5d1b1f048fad6f121609bac811f531c4253060dc48ce8f1b9a8f4d3fa07daabf428ae7c5d84d16f25983be42e2d346583b8ec5494e4eb1147751a +AUX 4.4.1-options-test.patch 651 SHA256 f676251b534a39266f1aa4c56668ac22e65702f344b4f1ebbef36dbb7c37e1af SHA512 b92b14f723afe290e6d42cd490f901fd389e8fe4752dcb9e28f8df24bc1c40db53035b89636f379a1d0b20af33c950a00970e033983cfd8440361552bb424cde WHIRLPOOL 61a87787e0011a477b6b7a7d8c7788de264b80c111fb95bf4d5eb43fc544a84b23598d4f59dbc754351bfe9893ca5e3e60e3d276889517494cc41ceed9761029 +AUX 4.5.1-drop-intersphinx.patch 717 SHA256 5cf329a22effdcc9e6fbbdf3e7b5c765c1f2585fd8478e546743e14e73af9279 SHA512 1959062a395544a9557ff8603debb58e73cbd146e501b4d9f9e04bb4a1d9531899a8cfe5cbd41c474638245755e040cd10156a3b1874f66489757447a1af815e WHIRLPOOL 62be10d8d436118e89ee8b0a9caf7efbacfea8dc0d2bd5c0dad8e875b061a7ff75de75a3d2d81deff19e2d5f19ca5ed86ec13d9773669ada55a35d21101e4aee +DIST tornado-4.4.2.tar.gz 460193 SHA256 2898f992f898cd41eeb8d53b6df75495f2f423b6672890aadaf196ea1448edcc SHA512 f330bc62433576708e3c566577cede07c54c19996f374df82d5abc19a669ade549e7b6c27dcae3d421921fec506fae39473443cdb04692553c5ea2f8ec11a327 WHIRLPOOL df04a35ed30f9bbaff87be06c96de7a9038e1535b21d40906eb92a5beeaaf6ac4ea1b14b4f16df1527b9a07d41a5ee4c04ec141a068e3acfb4b6717019ff5fdd +DIST tornado-4.5.1.tar.gz 483225 SHA256 db0904a28253cfe53e7dedc765c71596f3c53bb8a866ae50123320ec1a7b73fd SHA512 b31b3572bf58df8b758694c32b2233c547d6600b0c27f56cff3521abaad38a1646a528d2c2dfcf13214159bf5ba0f59470ba3d538edf16dc014a8b03f0d3bb87 WHIRLPOOL 31e2bb974c938979b430cdc1a873bd1f5f2b6d5fdec61ef8901e7ea83ec2d6801e004202042dc5070ac4083b6d8fec35166b12aaa0664e0775cb1b7af43c148d +EBUILD tornado-4.4.2-r1.ebuild 1861 SHA256 6c6155c155a3e4737e997b3885262e4e6b39b0d075c8d89db9d3ef2190557237 SHA512 12d2fa8ad9f1e08c0e5e278aa91565c94585009cade64f1f4db2cc968b68e8719ba98288d87d753de7924d71fa98bc810f1b2026b55f2366e3608cbac02318a3 WHIRLPOOL db30bff0ba197bd1019e32f9fb39746acef13b788253842435b63ae64963e576285bcc4e8e36b427a95a2d10ea493f8a6a7ae6810241e1b3c8bf94cb72924447 +EBUILD tornado-4.5.1.ebuild 1856 SHA256 1d891ac27b83122dd6e16383dd929b0ea943ec034873dfb52685cae76fce9928 SHA512 d85325a283fd8ec51ada90450eb38b0eb39347f72b90645e02fbaa67eb04c3024651dcca98de65a5cf45aa8bfcee3ca6491203a855bd6260d6d82ff66ec7134e WHIRLPOOL e0b76daae0d78759a8a759e46b92c99a2e170e670483f2cf1e56b42979da0e0c0e45846da2461cfa8c09d7cf5ead5bccfd9b6e2119b6476cf2080156dd279fa4 +MISC ChangeLog 10667 SHA256 f6963f0e95f856eb427ecdc97d1fa42c3a512d5f16f039a7b51c8aa3ed0bc436 SHA512 a615cead1b492be0da4d354f0d22a6804a4d05bdd42babebe42e15ccb93e348a66dc302f5b26e54e7596b5c9713a6b7511afe1230a77fb2755d3fc8a48ec54bc WHIRLPOOL 85d5ad6907ff35bccbd21b16cc6ab8dc714d0fc71c9a2df934a4a57d6a9d2aee64df9bd2ab7a4410e0dc75cbcea1e48406ea98821faf2d4ce0c7c7ccb159a4c7 +MISC ChangeLog-2015 11271 SHA256 2b4ba9c0415648cf89fa64a85418ac89d12db876bdcaad2718b3bffb8eb0a9f8 SHA512 6e33633a78e26b530295f4566e878b3d6bc1138d71df9fd35680494f9fc07c5a6d6b67c385404273ea4f1f2a9eff828bce83208f06b63c5b6087ec5576aaa2fc WHIRLPOOL a021268a4399e19f7ce2023a726d6a09d1e22e04d66ee883886f786cfab456f0d89a19dcfb7c2a900f4ec758ea2ba638225c009c61a86a6febc96f606beeffca +MISC metadata.xml 493 SHA256 5794aa18c3676853dd88268e019487c0a21bf977b49d7168a855bfbce3199f9e SHA512 0b5a841c865a3a539ec5592ecb6c725c0f337e0fdf55a0075a27f94364ad6fd8dbf6e344808dcebbbc4953d30e51be34b9a7daaa8a9e75e656a6f74c62664d48 WHIRLPOOL fed2b9583e65d032442aadb881e750f574340c4af4ee96630b1997b798956784f8372c6885f13fb1d28c65a01e5f5d30ad50d83c5ccffab0769b5fba4327b352 diff --git a/www-servers/tornado/files/4.4-drop-intersphinx.patch b/www-servers/tornado/files/4.4-drop-intersphinx.patch new file mode 100644 index 000000000000..cec403e772fb --- /dev/null +++ b/www-servers/tornado/files/4.4-drop-intersphinx.patch @@ -0,0 +1,36 @@ +diff --git a/docs/Makefile b/docs/Makefile +index 7001b80..ab2ffdd 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -3,7 +3,7 @@ all: sphinx + + # No -W for doctests because that disallows tests with empty output. + SPHINX_DOCTEST_OPTS=-n -d build/doctress . +-SPHINXOPTS=-n -W -d build/doctrees . ++SPHINXOPTS=-n -d build/doctrees . + + .PHONY: sphinx + sphinx: +diff --git a/docs/conf.py b/docs/conf.py +index 368e4e8..85a276d 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -17,7 +17,6 @@ extensions = [ + "sphinx.ext.coverage", + "sphinx.ext.doctest", + "sphinx.ext.extlinks", +- "sphinx.ext.intersphinx", + "sphinx.ext.viewcode", + ] + +@@ -92,10 +91,6 @@ + 'tornado-%s.tar.g' % version), + } + +-intersphinx_mapping = { +- 'python': ('https://docs.python.org/3.5/', None), +- } +- + on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + + # On RTD we can't import sphinx_rtd_theme, but it will be applied by diff --git a/www-servers/tornado/files/4.4.1-options-test.patch b/www-servers/tornado/files/4.4.1-options-test.patch new file mode 100644 index 000000000000..480362647717 --- /dev/null +++ b/www-servers/tornado/files/4.4.1-options-test.patch @@ -0,0 +1,13 @@ +diff --git a/tornado/test/options_test.py b/tornado/test/options_test.py +index f7b215c..c050cb6 100644 +--- a/tornado/test/options_test.py ++++ b/tornado/test/options_test.py +@@ -36,7 +36,7 @@ class OptionsTest(unittest.TestCase): + options.define("port", default=80) + options.define("username", default='foo') + options.define("my_path") +- config_path = os.path.join(os.path.dirname(__file__), ++ config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), + "options_test.cfg") + options.parse_config_file(config_path) + self.assertEqual(options.port, 443) diff --git a/www-servers/tornado/files/4.5.1-drop-intersphinx.patch b/www-servers/tornado/files/4.5.1-drop-intersphinx.patch new file mode 100644 index 000000000000..606bfc787381 --- /dev/null +++ b/www-servers/tornado/files/4.5.1-drop-intersphinx.patch @@ -0,0 +1,22 @@ +diff -Nur tornado-4.5.1.orig/docs/conf.py tornado-4.5.1/docs/conf.py +--- tornado-4.5.1.orig/docs/conf.py 2017-06-27 17:39:55.881133239 +0000 ++++ tornado-4.5.1/docs/conf.py 2017-06-27 17:40:59.910682166 +0000 +@@ -16,7 +16,6 @@ + "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.doctest", +- "sphinx.ext.intersphinx", + "sphinx.ext.viewcode", + ] + +@@ -81,10 +80,6 @@ + ('index', 'tornado.tex', 'Tornado Documentation', 'The Tornado Authors', 'manual', False), + ] + +-intersphinx_mapping = { +- 'python': ('https://docs.python.org/3.5/', None), +- } +- + on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + + # On RTD we can't import sphinx_rtd_theme, but it will be applied by diff --git a/www-servers/tornado/metadata.xml b/www-servers/tornado/metadata.xml new file mode 100644 index 000000000000..6d6315f45be8 --- /dev/null +++ b/www-servers/tornado/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>alunduil@gentoo.org</email> + <name>Alex Brandt</name> + </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">tornado</remote-id> + <remote-id type="github">tornadoweb/tornado</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/tornado/tornado-4.4.2-r1.ebuild b/www-servers/tornado/tornado-4.4.2-r1.ebuild new file mode 100644 index 000000000000..5321d46eb935 --- /dev/null +++ b/www-servers/tornado/tornado-4.4.2-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Python web framework and asynchronous networking library" +HOMEPAGE="http://www.tornadoweb.org/ https://pypi.python.org/pypi/tornado" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="doc examples test" + +CDEPEND=" + dev-python/certifi[${PYTHON_USEDEP}] + >=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}] + $(python_gen_cond_dep '>=dev-python/backports-ssl-match-hostname-3.5[${PYTHON_USEDEP}]' 'python2_7' 'python3_4') + || ( + >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] + ( $(python_gen_cond_dep 'dev-python/twisted-names[${PYTHON_USEDEP}]' 'python2_7') + $(python_gen_cond_dep 'dev-python/twisted-web[${PYTHON_USEDEP}]' 'python2_7') + ) + ) + virtual/python-backports_abc[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}] + virtual/python-singledispatch[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + test? ( + ${CDEPEND} + dev-python/mock[${PYTHON_USEDEP}] + ) +" +RDEPEND="${CDEPEND}" + +PATCHES=( + "${FILESDIR}"/4.4-drop-intersphinx.patch + "${FILESDIR}"/4.4.1-options-test.patch +) + +python_compile_all() { + use doc && emake -C docs sphinx +} + +python_test() { + "${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r demos/. + docompress -x /usr/share/doc/${PF}/examples +fi + distutils-r1_python_install_all +} diff --git a/www-servers/tornado/tornado-4.5.1.ebuild b/www-servers/tornado/tornado-4.5.1.ebuild new file mode 100644 index 000000000000..23317435e308 --- /dev/null +++ b/www-servers/tornado/tornado-4.5.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Python web framework and asynchronous networking library" +HOMEPAGE="http://www.tornadoweb.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples test" + +CDEPEND=" + dev-python/certifi[${PYTHON_USEDEP}] + >=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}] + $(python_gen_cond_dep '>=dev-python/backports-ssl-match-hostname-3.5[${PYTHON_USEDEP}]' 'python2_7' 'python3_4') + || ( + >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] + ( $(python_gen_cond_dep 'dev-python/twisted-names[${PYTHON_USEDEP}]' 'python2_7') + $(python_gen_cond_dep 'dev-python/twisted-web[${PYTHON_USEDEP}]' 'python2_7') + ) + ) + virtual/python-backports_abc[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}] + virtual/python-singledispatch[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + test? ( + ${CDEPEND} + dev-python/mock[${PYTHON_USEDEP}] + ) +" +RDEPEND="${CDEPEND}" + +# doc without intersphinx does not build (asyncio error) +#PATCHES=( +# "${FILESDIR}"/4.5.1-drop-intersphinx.patch +#) + +python_compile_all() { + use doc && emake -C docs sphinx +} + +python_test() { + "${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r demos/. + docompress -x /usr/share/doc/${PF}/examples +fi + distutils-r1_python_install_all +} diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest new file mode 100644 index 000000000000..08558527573c --- /dev/null +++ b/www-servers/uwsgi/Manifest @@ -0,0 +1,11 @@ +AUX 2.0.14-php-plugin.patch 856 SHA256 612997e70252efaefdfb78a8bd14414a6e56e574828e56c313e4bde242d720b6 SHA512 ccddf94e145dbea4d0d69e45202b062de01b7b8d6b154d496eca6a03450adfe1455b45217dc18612f5a21296e276fbac061de30973aff656b93c6488e0d3359b WHIRLPOOL 4c23a5112ec80085edabff4b01acbcd4fe8cd10ee0af49c26cb1641e098f850a3ea92eafc34894e4fdfb0fb35369dafae9ce6e440ebd05621c824a6a6cc42d65 +AUX 42_mod_uwsgi-r2.conf 254 SHA256 8b0775302d112a3f1959776e89a5cc13a325d80719281db8d3e896a95f5fb691 SHA512 de827913644ff8763d7e9f6907e5dd500bc7d25f861c9e8dd07d6f070e96b9eb39bdacc3a8e7ca0925f2a8ee1cd74bfe22da467bab39e319b7cabee36d31dc70 WHIRLPOOL 2c9238712c10e0e1b0b7fa1c7e802a5ce973d71fc5e2f8eb03831c9b49dce0e98a6ee3acf9d17fcc32de1914f4d9955a9c0a218cf24658d4df5d0449bb211744 +AUX gentoo.buildconf 490 SHA256 a82aeada480a7571181c6767ba2df40f14117e4a3070920961510eee05035a19 SHA512 d5bdc136374aed58ce206ea72cc45c72750f60117eef98960356b5cd64e2152c454af6b5aebb28f03ad46b42ea95a16fbf1e4a6f976ae78744550803ac775fe2 WHIRLPOOL f5f13dc512e470bc32a1d487176cbc82dddb280b7f0b284580f5b0106a9f03aae123b9ac2298f4e61068212cc0afde7b970ff9a4c9f18e11bffb58a4c8d993e4 +AUX uwsgi.confd-r4 1849 SHA256 3c24868fe39a5d7676a5338d57deb82a0138be83f524f6f2a5ff14b104c3fc7e SHA512 041d1bd694fad6f7c5e28944aab6d7ba53b3c7fc990ce6b7c2d97b9f3d6650c46dda8069e545c252a7400e1d825c8e46d7393a289757b1bd665e64241ca3789a WHIRLPOOL e77250ccad44725a8fd8247f3b0166efb01859e6227e8172e76384e6f09653d5d0c7937dc1bc06103e13f312c195d0115b856cbdbd3e3ede8907db129ea9b348 +AUX uwsgi.initd-r7 3746 SHA256 848dc9811bb7954fe72a55f2a07984c9032458733b80f9d08987c3fe2c69195b SHA512 81ed974fb2957e05c890cab29f5b5a75845e6b7de899d2695fb2fa5f49b4545daa437c81c8dc5c735b24a45655cf6320c9256bc8faa7e32ffd7a2d981922def5 WHIRLPOOL 51545fd966deaa03ccee1cbe245be6d6d4313418ed16bc4274df285cbf5e2a31ede25a876aa7f2674e7478bf5927cc88f5ec78e05fed22236fde10598f7a3d4c +DIST uwsgi-2.0.15.tar.gz 794926 SHA256 251f0670628ce9b9f4c2b4288a7ea921e2ddb3d5e886b6aa2358273573e6fdcf SHA512 1a2a82cf99d3e6dfe62fa18fd6f04afd1dc727d61287a1c9f47f1448e76a4858dfd59286118c94672c84ff22bcd8444c0c1568ae46993fdbdb9414ad60474bf4 WHIRLPOOL 1708d010af0bb77082e630d945c2d9d31f887125276a92c3a78d11011242374eeb4e3d361a8b4bc593ebae933cc00510b3f64e42a277508addaf6568285b7eae +EBUILD uwsgi-2.0.15-r1.ebuild 12677 SHA256 219692634d26ee68a9b2918f70cdfc2f3cc5b49624f3a7631ffa4c4b95296cb1 SHA512 602131642d4cc96ffb4ea827a5c837e785911e7574546a6bef677ef532aa3e21c6ef8a95aa78ebfee1bde5e3ffba811b70d3dfe7cb4bb07df34bc13e00198548 WHIRLPOOL 554fb676cca74b0d840082d3b9a90345abe7eac4437656d982bd26bc5cdf3e431e04f13e9456ec77e5317248586826ad4f382d40eba4ab657a5f1234fea94e84 +EBUILD uwsgi-2.0.15.ebuild 12659 SHA256 6b3fcc56eaa3c62d2c35ffd7d7ab36a8d0f2fe94caf69abdf479e658f5fcee0e SHA512 d870f86ca5225ae9807fbf679f77a1d44b01bbced6700a743b5bc734e7092752209066c1839a03514a60a8c7277626fa8e047fbfc949dc148c730582b40ef432 WHIRLPOOL 3dd377f4c915e7e7bbe37b4bf18717eae7370b9db444e446052db3363df825411402b2f92290d4772b9eedcfacf82fa34a491fa5a035d1102eceab58350d6b23 +MISC ChangeLog 6919 SHA256 752d788a058a032bb5933ee81941659ebfd9b882c1084ad115e14a9fade8fbd3 SHA512 6b1f18b32d49aa49dfc4191b7b086a97fcfcf6ffa6be706794ae65588c0bf0af6c69924da16ff66d0d59efe710f2d4d2309a48fe474c61168a213c026c5b68f9 WHIRLPOOL 435392e096a451fb592849ca1950e25d4ba1eb3676fac856a9b8a9e1663b23d5af432573c6874c1f969a1518e9f24cb378c26708d225c9056d18b2055d95a931 +MISC ChangeLog-2015 14548 SHA256 8e432d44c22ae91323898e1a05e432ae642dab995cd5f44b8b04216481efec88 SHA512 cb5fa0d7756ffe866ca9d51a9ab674d2be986793647bb134a6e0b0df9cba294f8d405ae5f632c35e911e0481942ddd4828d038f6695bef469bbd49d998e6092c WHIRLPOOL e80948cfc945797521460b51096528581a5ed1622f4ae450bf1d43a824016c792c042b5b925b5426794bc8519e3e2c4bc4e1b8a9beac1d7c8f751a1ec817118f +MISC metadata.xml 1597 SHA256 2ec7ee7c13de5045c331134e620428cb772660cfdeeaba969b36a8ef4391d387 SHA512 6f31168a12d1c3a95cb140624584214fcefda352b4c4904425d633a6d94a74d30186e7fa25c19b6f97cc0ca6ab0a8253cdbcedd11df3be2a32400a6292f2877b WHIRLPOOL f2b39c0721b4fad17ddde69d2b90ce0a74af70bb6a736df853e6e54d2dae75b552b565a00c698ec780ebbb0128274e3bb9c6cfd756f126705335ed569fe16abb diff --git a/www-servers/uwsgi/files/2.0.14-php-plugin.patch b/www-servers/uwsgi/files/2.0.14-php-plugin.patch new file mode 100644 index 000000000000..f60a6553cfd1 --- /dev/null +++ b/www-servers/uwsgi/files/2.0.14-php-plugin.patch @@ -0,0 +1,22 @@ +From 6b332e6f7e6fc3c267a91ce5b5591684575ea271 Mon Sep 17 00:00:00 2001 +From: Damjan Georgievski <gdamjan@gmail.com> +Date: Thu, 13 Oct 2016 00:55:35 +0200 +Subject: [PATCH] fix issue #1380 - compiling with llvm/freebsd + +--- + plugins/php/php_plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c +index 536ec1a..ef30180 100644 +--- a/plugins/php/php_plugin.c ++++ b/plugins/php/php_plugin.c +@@ -232,7 +232,7 @@ static void sapi_uwsgi_register_variables(zval *track_vars_array TSRMLS_DC) + size_t name_len = equal-usl->value; + char *name = estrndup(usl->value, name_len); + char *strval = equal+1; +- zend_register_string_constant(name, name_len, strval, CONST_CS, 0); ++ zend_register_string_constant(name, name_len, strval, CONST_CS, 0 TSRMLS_CC); + } + usl = usl->next; + } diff --git a/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf b/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf new file mode 100644 index 000000000000..85ede87b037b --- /dev/null +++ b/www-servers/uwsgi/files/42_mod_uwsgi-r2.conf @@ -0,0 +1,9 @@ +<IfDefine PROXY_UWSGI> + LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so +</IfDefine> +<IfDefine RUWSGI> + LoadModule uwsgi_module modules/mod_Ruwsgi.so +</IfDefine> +<IfDefine UWSGI> + LoadModule uwsgi_module modules/mod_uwsgi.so +</IfDefine> diff --git a/www-servers/uwsgi/files/gentoo.buildconf b/www-servers/uwsgi/files/gentoo.buildconf new file mode 100644 index 000000000000..e0c60bc6a5b8 --- /dev/null +++ b/www-servers/uwsgi/files/gentoo.buildconf @@ -0,0 +1,30 @@ +[uwsgi] +xml = VAR_XML +yaml = VAR_YAML +json = VAR_JSON +ssl = VAR_SSL +pcre = VAR_PCRE +zeromq = VAR_ZMQ +routing = VAR_ROUTING +debug = VAR_DEBUG +unbit = false +malloc_implementation = VAR_MALLOC +extras = +plugins = VAR_PLUGINS +bin_name = uwsgi +append_version = +plugin_dir = VAR_PLUGIN_DIR +plugin_build_dir = VAR_BUILD_DIR +embedded_plugins = VAR_EMBEDDED +as_shared_library = false + +locking = auto +event = auto +timer = auto +filemonitor = auto + +blacklist = +whitelist = + +embed_files = +embed_config = diff --git a/www-servers/uwsgi/files/uwsgi.confd-r4 b/www-servers/uwsgi/files/uwsgi.confd-r4 new file mode 100644 index 000000000000..5469c7b875f9 --- /dev/null +++ b/www-servers/uwsgi/files/uwsgi.confd-r4 @@ -0,0 +1,68 @@ +# Distributed under the terms of the GNU General Public License v2 + +# YOU SHOULD ONLY MODIFY THIS FILE IF YOU USE THE UWSGI EMPEROR MODE! +# IF YOU WANT TO RUN A SINGLE APP INSTANCE, CREATE A COPY AND MODIFY THAT INSTEAD! + +# Path (or name) of UNIX/TCP socket to bind to +# Example : UWSGI_SOCKET=127.0.0.1:1234 +UWSGI_SOCKET= + +# Enable threads? (1 = yes, 0 = no). The default is 0 +# +UWSGI_THREADS=0 + +# The path to your uWSGI application. +# +UWSGI_PROGRAM= + +# The path to your uWSGI xml config file. +# +UWSGI_XML_CONFIG= + +# The number of child processes to spawn. The default is 1. +# +UWSGI_PROCESSES=1 + +# The log file path. If empty, log only errors +# +UWSGI_LOG_FILE= + +# If you want to run your application inside a chroot then specify the +# directory here. Leave this blank otherwise. +# +UWSGI_CHROOT= + +# If you want to run your application from a specific directiory specify +# it here. Leave this blank otherwise. +# +UWSGI_DIR= + +# PIDPATH folder mode (/run/uwsgi_${PROGNAME}) +UWSGI_PIDPATH_MODE=0750 + +# The user to run your application as. If you do not specify these, +# the application will be run as user root. +# +UWSGI_USER= + +# The group to run your application as. If you do not specify these, +# the application will be run as group root. +# +UWSGI_GROUP= + +# Run the uwsgi emperor which loads vassals dynamically from this PATH +# see http://projects.unbit.it/uwsgi/wiki/Emperor +# The advised Gentoo folder is /etc/uwsgi.d/ +UWSGI_EMPEROR_PATH= + +# Emperor PIDPATH folder mode (/run/uwsgi) +UWSGI_EMPEROR_PIDPATH_MODE=0770 + +# The group the emperor should run as. This is different from the UWSGI_GROUP +# as you could want your apps share some sockets with other processes such as +# www servers while preserving your emperor logs from being accessible by them. +UWSGI_EMPEROR_GROUP= + +# Additional options you might want to pass to uWSGI +# +UWSGI_EXTRA_OPTIONS= diff --git a/www-servers/uwsgi/files/uwsgi.initd-r7 b/www-servers/uwsgi/files/uwsgi.initd-r7 new file mode 100644 index 000000000000..64dfc7a736ff --- /dev/null +++ b/www-servers/uwsgi/files/uwsgi.initd-r7 @@ -0,0 +1,145 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PROGNAME=${SVCNAME#*.} + +UWSGI_EXEC=/usr/bin/uwsgi +if [ "${SVCNAME}" = "uwsgi" ]; then + PIDPATH=/run/uwsgi +else + PIDPATH="/run/uwsgi_${PROGNAME}" +fi +PIDFILE="${PIDPATH}/${PROGNAME}.pid" + +extra_started_commands="${opts} reload stats" + +depend() { + need net +} + +start_emperor() { + local OPTIONS + OPTIONS="--daemonize" + + if [ -n "${UWSGI_LOG_FILE}" ]; then + OPTIONS="${OPTIONS} ${UWSGI_LOG_FILE}" + else + OPTIONS="${OPTIONS} /dev/null --disable-logging" + fi + + [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/" + [ -z "${UWSGI_USER}" ] && UWSGI_USER="root" + [ -z "${UWSGI_GROUP}" ] && UWSGI_GROUP="root" + [ -z "${UWSGI_EMPEROR_PIDPATH_MODE}" ] && UWSGI_EMPEROR_PIDPATH_MODE=0770 + + if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then + OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}" + fi + + ebegin "Starting uWSGI emperor" + checkpath -d -m ${UWSGI_EMPEROR_PIDPATH_MODE} -o "${UWSGI_USER}":"${UWSGI_EMPEROR_GROUP:-${UWSGI_GROUP}}" "${PIDPATH}" + + cd "${UWSGI_DIR}" && \ + start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}" \ + --group ${UWSGI_EMPEROR_GROUP:-${UWSGI_GROUP}} \ + -- --emperor "${UWSGI_EMPEROR_PATH}" ${OPTIONS} --pidfile "${PIDFILE}" + return $? +} + +start_app() { + local OPTIONS + OPTIONS="--master --daemonize" + + if [ -n "${UWSGI_LOG_FILE}" ]; then + OPTIONS="${OPTIONS} ${UWSGI_LOG_FILE}" + else + OPTIONS="${OPTIONS} /dev/null --disable-logging" + fi + + [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/" + [ -z "${UWSGI_USER}" ] && UWSGI_USER="root" + [ -z "${UWSGI_GROUP}" ] && UWSGI_GROUP="root" + [ -z "${UWSGI_PIDPATH_MODE}" ] && UWSGI_PIDPATH_MODE=0750 + + if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then + OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}" + fi + + if [ "${UWSGI_THREADS}" = "1" ]; then + OPTIONS="${OPTIONS} --enable-threads" + fi + + if [ -n "${UWSGI_SOCKET}" ]; then + OPTIONS="${OPTIONS} --socket ${UWSGI_SOCKET}" + fi + + if [ -n "${UWSGI_PROCESSES}" ]; then + OPTIONS="${OPTIONS} --processes ${UWSGI_PROCESSES}" + fi + + if [ -n "${UWSGI_CHROOT}" ]; then + OPTIONS="${OPTIONS} --chroot ${UWSGI_CHROOT}" + fi + + if [ -n "${UWSGI_PROGRAM}" ]; then + OPTIONS="${OPTIONS} --fileserve-mode ${UWSGI_PROGRAM}" + fi + + if [ -n "${UWSGI_XML_CONFIG}" ]; then + OPTIONS="${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}" + fi + + ebegin "Starting uWSGI application ${PROGNAME}" + checkpath -d -m ${UWSGI_PIDPATH_MODE} -o "${UWSGI_USER}":"${UWSGI_GROUP}" "${PIDPATH}" + + cd "${UWSGI_DIR}" && \ + start-stop-daemon --start --user "${UWSGI_USER}" --group "${UWSGI_GROUP}" \ + --exec "${UWSGI_EXEC}" -- ${OPTIONS} --pidfile "${PIDFILE}" + return $? +} + +start() { + if [ -n "${UWSGI_EMPEROR_PATH}" ]; then + start_emperor + eend $? + else + if [ "${SVCNAME}" = "uwsgi" ]; then + eerror "You are not supposed to run this script directly unless you" + eerror "want to run in Emperor mode. In that case please set the UWSGI_EMPEROR_PATH." + eerror "Otherwise create a symlink for the uwsgi application you want to run as well as" + eerror "a copy of the configuration file and modify it appropriately like so..." + eerror + eerror " ln -s uwsgi /etc/init.d/uwsgi.trac" + eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac" + eerror " nano /etc/conf.d/uwsgi.trac" + eerror + return 1 + else + start_app + eend $? + fi + fi +} + +stop() { + if [ -n "${UWSGI_EMPEROR_PATH}" ]; then + ebegin "Stopping uWSGI emperor" + else + ebegin "Stopping uWSGI application ${PROGNAME}" + fi + start-stop-daemon --stop --signal QUIT --pidfile "${PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading uWSGI" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" + eend $? +} + +stats() { + ebegin "Logging uWSGI statistics" + start-stop-daemon --signal USR1 --pidfile "${PIDFILE}" + eend $? +} diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml new file mode 100644 index 000000000000..498f2a5fb33d --- /dev/null +++ b/www-servers/uwsgi/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ultrabug@gentoo.org</email> + </maintainer> + <use> + <flag name="embedded">Embed plugins instead of building them as real plugins. When disabling this USE flag make sure you specify all used plugins in your uWSGI configuration. Note: Language plugins will always be built as real plugins.</flag> + <flag name="go">Build the gccgo plugin to run Go applications.</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> instead of libc's malloc</flag> + <flag name="json">Support json as a configuration file format.</flag> + <flag name="pypy">Build the pypy plugin to run your code using <pkg>virtual/pypy</pkg>.</flag> + <flag name="python_asyncio">Use the EXPERIMENTAL asyncio (tulip) for python3.4 async request dispatching and as LoopEngine (see http://uwsgi-docs.readthedocs.org/en/latest/asyncio.html).</flag> + <flag name="python_gevent">Use <pkg>dev-python/gevent</pkg> for async request dispatching and as LoopEngine (see http://projects.unbit.it/uwsgi/wiki/Gevent).</flag> + <flag name="routing">Enable routing support</flag> + <flag name="yaml">Support yaml as a configuration file format.</flag> + <flag name="yajl">Use <pkg>dev-libs/yajl</pkg> instead of <pkg>dev-libs/jansson</pkg> for parsing JSON configuration files (if USe=json is set)</flag> + <flag name="zeromq">Enable logging and deployment via ZeroMQ.</flag> + </use> + <upstream> + <remote-id type="github">unbit/uwsgi</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/uwsgi/uwsgi-2.0.15-r1.ebuild b/www-servers/uwsgi/uwsgi-2.0.15-r1.ebuild new file mode 100644 index 000000000000..5043eca69ae1 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.15-r1.ebuild @@ -0,0 +1,413 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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" # deps must be registered separately below + +MY_P="${P/_/-}" + +inherit apache-module eutils flag-o-matic multilib pax-utils php-ext-source-r2 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_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] ) + ) + pypy? ( virtual/pypy ) + python? ( ${PYTHON_DEPS} ) + python_gevent? ( >=dev-python/gevent-1.2.1[${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" + +# FIXME: is this patch still useful? +PATCHES=( + "${FILESDIR}/2.0.14-php-plugin.patch" +) + +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 +} diff --git a/www-servers/uwsgi/uwsgi-2.0.15.ebuild b/www-servers/uwsgi/uwsgi-2.0.15.ebuild new file mode 100644 index 000000000000..f77a797cdf9d --- /dev/null +++ b/www-servers/uwsgi/uwsgi-2.0.15.ebuild @@ -0,0 +1,413 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5} pypy ) +PYTHON_REQ_USE="threads(+)" + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby22 ruby23" + +PHP_EXT_INI="no" +PHP_EXT_NAME="dummy" +PHP_EXT_OPTIONAL_USE="php" +USE_PHP="php5-6 php7-0" # deps must be registered separately below + +MY_P="${P/_/-}" + +inherit apache-module eutils flag-o-matic multilib pax-utils php-ext-source-r2 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 ) + pypy? ( python_targets_python2_7 ) + python? ( ${PYTHON_REQUIRED_USE} ) + python_asyncio? ( python_targets_python3_4 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-2* ) + 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] ) + ) + pypy? ( virtual/pypy ) + python? ( ${PYTHON_DEPS} ) + python_gevent? ( >=dev-python/gevent-1.2.1[${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" + +# FIXME: is this patch still useful? +PATCHES=( + "${FILESDIR}/2.0.14-php-plugin.patch" +) + +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 +} diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest new file mode 100644 index 000000000000..8ce206d8db08 --- /dev/null +++ b/www-servers/varnish/Manifest @@ -0,0 +1,21 @@ +AUX fix-build-x86.patch 871 SHA256 0cb4ce599607498bfd6fe96615b08c2a7043d13190bb04c12384a9dd7d7f1ee8 SHA512 b46ab9cbfc5e7e4a75d1caf624fab453338531a19a8653550347fc233652199977ea907ba79e4db7822cb5c24f12f48aa765e4d582ba1bbd43edaf88d6b05d7c WHIRLPOOL 89d754b014e21948dde20f0c8516493e803873dcf56c047394d2bfc6c212fe1694b3f5a883d0c0ab4b24a8fe690e4bc91f34473262441cb8527987e3aee265f5 +AUX varnishd.confd-r3 589 SHA256 09e039be32bc0fb616925dd5bed8b9d76553f34549034425265afa59da5e861b SHA512 dad4bf5ddcc84a9267ee00ed8b3e36c136674b0b87e686fa5ab1f854cb1a111b3f8943439a3b7a1b20b81f3dfe57879e126434673c6520ccfc6b900e8edc6d9e WHIRLPOOL f17b8d043a6a2439730fead3d527ffa1ce0d8643e7674dfa1562f80368b60cbcfd044fe16b8fe0306bc871cff65d983d8b67b96201579b30882e30322e7b6d7d +AUX varnishd.confd-r4 519 SHA256 bc29e1a65f1712e414479323bfb88833e86ad277e03ac87c892a32d959917a4e SHA512 98c8901e53f3c6adb908b9eb01fd441ea53f3c54d4a79aecb1fb1eddfa2fc93de3d0de403a4464a9baff15873b3a20623837e3a37cb225e924a329e32b9e37d6 WHIRLPOOL 6097071e366ff4b41affe529a63bbc2e5603a32b32a4653cba05e21d490cd0ebe85c7e955d71e6a983922ae57caed029f440f334b53ebf00dd14f08bec548a99 +AUX varnishd.initd-r3 1552 SHA256 a6fad9fb7ff878ac09fc132934cbe1cb75c8b1f90b291493644ccd58c55965fe SHA512 750cae57851c7e1d4ad05f53e66331b04c9a7d594e99514ca3368134cdec540552995360f65cc7e6a727a060c068db26759bae31e1b7792e725fc0142b0993bd WHIRLPOOL fedcf466cabaab5e939c5bc3ebf3355b96a62c835b67da340a27bce4bf8d2e4616dd1dfa1c54e15ae48d31d0f31b765dbfc1dfbea2a2a0965b0128a6c18f888a +AUX varnishd.initd-r4 1573 SHA256 c99dee20979955822fa944c9eae3593a92df3d960aac67a805ee6a4f9cdaabda SHA512 5ac7867e85cbd721f903c524ed4b524423d9dada4acfeefb0e543214a208828df5cc4efe2f012991bea6b38c2b223c24b17d3890ec4ed2c57d2b441b8e5a6900 WHIRLPOOL 0980fb5221d69d5ac457f55be94ecd370e852d6f256a31fbb68d2011d987ea75b1c491d9e2ff8a742d2c53b83f698fcd7e4d78dcf37a518ada236061fc8ad516 +AUX varnishd.logrotate-r2 470 SHA256 4c1b7abf23bfc32a65f65633c0be0d065fb9fee72e4b533feca35c596d9c5a2c SHA512 51cc6d46ff7439de93977ab87dfb0af399458c1e446475696f73342ae7a0c1a8ca8fc6e79e593659f1af30716a5f8a1ee5e3b1f5e7b35df40b45d47e7b0f2ffd WHIRLPOOL f6fa4d5b6e53934d79c83cb2ec683f0aad9ee4ba473c13fe9fa4c4e4105e40397f8677d25103804ea4da60dfca3bf6b9a1f88f75efb8546a1dd87a802d5666b1 +AUX varnishd.service 455 SHA256 2cdb47ce8bc90f94df5b06b2468e8c7f1f20a32910d19fea00b7ccbfbf0f9bc5 SHA512 aa1671e1a0c374c30df31a1bb41248fc28d10ee3e7f062737e13502c8f5282ee4fb2c20255bf943016809b5f3f31d3f16b3c453b8663abf6ad3ce23d6fcaf57a WHIRLPOOL 4f78e9aa471723b3226f78228426cf1edea86e4a2ddfe10f7cbd86518fdac8a41cac9a50b3857cb7e6fbd7f44be347cb527834dcc9f57f2e6bcd3405d4646059 +AUX varnishlog.confd 82 SHA256 e285fe31434addbeee40c6fae7745536574750a0fe658788318acb33943e38d3 SHA512 88fe9b545a2b25d6e6e45f1cfecbeca5f503bc1fbe95856386e568edee41b487b162cddceba8cb152b0a37d8d96635a76c0715fc69d87d6c667ac403ebae0bb7 WHIRLPOOL 4214c022296126d73bcdc98c8c75f8a1c62a31862e521338afdb36d48e5b209889b05bcc949ec2544897193f4e1bd44faeab28627c3407977203dd901b86710e +AUX varnishlog.initd 707 SHA256 83eff5fc7af8b129f86673a3dce88ded71bc025cd73f6b3cd6c2c2b2b6de671b SHA512 c67a7898f40849989edcbe74e1a418e196f48e178ca30126bc13db226e4f4c2c2ba74d9d0650ef68ed88732917fc06b80ef1f62c2d9d2c14a89f26fd25aed0f7 WHIRLPOOL 6159d1fbd8b906ecb18d550709bacb99fbc6a9273a24e2c93997035a8348624c5d34a4250ad6921a7c7ec7eef70fb76a75f2025de752185252e8baa8d7e9c922 +AUX varnishncsa.confd 84 SHA256 60e03274b8d786abf7769be26a4ee6c671a155a761b16ee92d5c8b183491870e SHA512 a5426ff66b89d2afb6273f05e4117b3eec5ce0162a624d52c92b418960f72e58bd01224165613221af76ec241bd98e1eb985b2ef7b83a5b615e9ece67234dcc8 WHIRLPOOL cc83c4093d17e8d80a917486012ddc3946fd644a4d09648c8c6749fa476e7e5080c6d013d5be21418d7c36fcf6e76f8c648bdeb56908f856816fffde70998f6a +AUX varnishncsa.initd 716 SHA256 7616e89960ce44b927cc09cdd4f23f04c52acee4586f86360f5c50549180b9b7 SHA512 1d0c781675ecba5adce02c37a02c431c4b44d64310a0945bff4f6f57f7d0c87cb7dda874311e44d667317d5beda113b62f4ba49c81534a0c078314b3fa15a512 WHIRLPOOL 1afdedc914aaa7bc69228b96e6fe684fc41e8217bcd3cffeb0d6c808b0bf354a1722ffbee3cbb7b6ff8f2996a43f07384b2d824f5c11490f01f95c98c0b5ff26 +AUX varnishncsa.initd-r1 1001 SHA256 b7bf0ea8162f10b87a8c66c04da7bcbdb3d60e99ef73500674a7ab57116318d6 SHA512 e0b7d67bbd710f0a17b77837c581f128e6b746eff2b12e81d03d1ad040037e95bb00fb8007d89bc6dab18cfa659456078f310ac268f104774ef85ad068efecca WHIRLPOOL 48ae9cf0b5eb5b10ab6b51376f186cdec6adc704ae5d67f9f29e1aebd576c1dd0489ed9d5c62f668a425a9420357e7d80bb6419d58c7a869abadb82f7a9032e1 +DIST varnish-4.0.5.tar.gz 1947888 SHA256 d90ffa33902d3ac40742cbb50588a37f467f23797f93e67a261724f4a7fb0aff SHA512 a08259f6f9c6fffa188b26c1f8c630de5e6d2f6d52f6efa9d5d8239cdd8721c53e2be3379f8100efb537e74416eadd6c865f4cc687db1c5a9f757bb3f73abeda WHIRLPOOL feea23e932e4bb422885679f15ddfed8d87976ab129f9658a96a01c81de8b3cd92e747739ad96693477b09025aecc9a5da9ce9170fdb9fdfc04c1d7c4ef8d3f4 +DIST varnish-4.1.8.tar.gz 2254772 SHA256 908e7fbfa0325498717686b2050181134aa0a69d1495c02b2625cd34d35a4ff1 SHA512 c642359118d87e8713d2ccf817da317a454a0f9ae6f7a07da1d10b5076aa7e5d7dcc203ef71ae19d56b7592db0c66b4ca96cb43d5fa0e6aa588d1dc8e03e026e WHIRLPOOL 2e04466f2a7a60cb788177b6328f47a4929767c927c0083da33ccb30bfa2fa39b220ddab965c1093e77c2b222f959798f91090a37e809476781c45e23601fb3e +DIST varnish-5.1.3.tar.gz 2643223 SHA256 7439c93ca581340f3722b8c790160f46dc6c5328188e4c0bc233c42f3f04a54e SHA512 a10c317dc38ddff139ca8153f6388955df449c3abeb4d4f069b632ba2b32064a2827ab05fa8515994b251a68507fc3a7bf4e08eacc991fc03283ab234b9efd0a WHIRLPOOL 7dbd0da80bb9b8de194da83c6e8d198ec2652ae8d17105196b0af76d9df1129cecc67b3fd47a73c53d0f175872782478ee836ec6a75738b343b444ecb1dd1f19 +EBUILD varnish-4.0.5.ebuild 2057 SHA256 7cb589899035cc0216c86fae0fa5df97aab72048a2ee9d0458db24df197ab162 SHA512 6cb433aa628f972b7d86ecc2f0ae537f65cac24c57842c4f22e2805e0038755b06db38bb9079f6a89647c6a5819373dbea487dd0db0a5364edbb882a94572d4f WHIRLPOOL 9c2d68ddd025ae950383a69a02bb83debed27c8398b569237945bc22b36ca7265be3db5182a0c80600a774ca7400c40152d51f0e882fe5106906dfe34b1f1d54 +EBUILD varnish-4.1.8.ebuild 2215 SHA256 eb4a3619d0ceaa400a583cb70026da2068d646d6d396df7282ca8120ff4d51a3 SHA512 54616f3283bba6d40e78e943231d8e5408eca16bbda42dc4ea2816182cbcc7a86164a4e2fa3d0b35bc3705329d80fbe0e6b52ec9cf5cab0f7c4083d440ab6dd7 WHIRLPOOL 0443117c71d4d76d6cdbfb14eb565972a4685af6915884aae0e76e64cd1b08054206452f431b9b07489a1c5f6b808ddf17027141fb7130fa70dcb6aa7220339c +EBUILD varnish-5.1.3.ebuild 2220 SHA256 026726b0ec6111511529a58a340ba5b27792063e9793392b18ddb46bb9694e7f SHA512 e6c7189739a6dfd2ab7413899c0c76cbde4f04a622288891e9b1d4beb4c65f22bac6f90f4d94955cb4c226bfd5bdf32240b2a7146c768d7811233679ea7528b4 WHIRLPOOL 47e11f619b5f35eb351c45429854d87ba61fb349878f8b56195259763589b3c835831747d3bbd7e31e145be1f2fc7ce56a4f61f8fc494a77f037d79b0e9aeb8a +MISC ChangeLog 7102 SHA256 17c72c03d5e005936e705c46feb52d2ae4fb5816838cf2110b235315462d24f4 SHA512 2ceab636943fbe947b531c65bdb0c4d4cdfdac34b26f899bc8f852bd57ac210213bd8905586e930b2801846301946600cb0bc62df13709cb9f38f72985cc612f WHIRLPOOL a52fbe0aa2c926d06fd3434357315895a87e21a7b23013fa75007577b01d63c5959fb0a5d4c5c383a2dea0a38ca13dc13fcbd969a35f3a3d1fbaf46667db3dc5 +MISC ChangeLog-2015 14367 SHA256 bb4566ce5abfd3e41ba2cd9813184edae1680e9b1173dbdfea7b1b4ed4dce905 SHA512 09f34ef2260b993f33472ea76f0240c8622cb01d775f6cd453639c0d7e3622893ff3b3b0ac4ec79f210c380dbfef0a67e02810820be978552dba50d061700d86 WHIRLPOOL f12e0581fae1d7610ba43dbaf778f2b4d541bc0ec84a9fec3b10da3932f66f350d2bd2578b265126fd5272754f2edb8bf84a4d372776aeec10f3b5289e456b2c +MISC metadata.xml 1308 SHA256 24cb97f7d9dd144ce50c6a490ff73f1acf397b5a3fa935857706c5ce377b423f SHA512 fa3f9a9c23cfb4aba84af4c2bad5deca139017b26543ca9a2c2164358beff13d2d91c6863902e9832661790253985859faec6773e70bd9eea86190ba77560356 WHIRLPOOL 8248d97c803eaf56c6a955ab569853f522be76c71cf8b793aceb87124dbf6c6f7b7ffe6b2917773f0aedb9979abfba2548242ba5b79508d4917fc2d2caab72be diff --git a/www-servers/varnish/files/fix-build-x86.patch b/www-servers/varnish/files/fix-build-x86.patch new file mode 100644 index 000000000000..acacd3b9d610 --- /dev/null +++ b/www-servers/varnish/files/fix-build-x86.patch @@ -0,0 +1,25 @@ +See https://bugs.gentoo.org/show_bug.cgi?id=620952 + +From 54b5a09f00c027da280361b30d32a4ff309ba3ab Mon Sep 17 00:00:00 2001 +From: Poul-Henning Kamp <phk@FreeBSD.org> +Date: Tue, 28 Mar 2017 18:44:12 +0000 +Subject: [PATCH] Try to confuse GCC to not doing FP brain-damage. + +Fixes #1875 (maybe) +--- + bin/varnishd/mgt/mgt_param_tweak.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c +index 12a7a52ef..b26581e2e 100644 +--- a/bin/varnishd/mgt/mgt_param_tweak.c ++++ b/bin/varnishd/mgt/mgt_param_tweak.c +@@ -52,7 +52,7 @@ static int + tweak_generic_double(struct vsb *vsb, volatile double *dest, + const char *arg, const char *min, const char *max, const char *fmt) + { +- double u, minv = 0, maxv = 0; ++ volatile double u, minv = 0, maxv = 0; + + if (arg != NULL) { + if (min != NULL) { diff --git a/www-servers/varnish/files/varnishd.confd-r3 b/www-servers/varnish/files/varnishd.confd-r3 new file mode 100644 index 000000000000..c05b8fb7521c --- /dev/null +++ b/www-servers/varnish/files/varnishd.confd-r3 @@ -0,0 +1,22 @@ +# /etc/conf.d/varnishd + +VARNISHD="/usr/sbin/varnishd" +VARNISHADM="/usr/bin/varnishadm" + +#CONFIGFILES="/etc/varnish/${SVCNAME}.vcl" +CONFIGFILE="/etc/varnish/default.vcl" + +# Listen on 127.0.0.1:8080 and connect to backend 127.0.0.1:80 +#VARNISHD_OPTS="-a 127.0.0.1:8080 -a 127.0.0.1:8080" + +# Alternatively, don't listen to a backend +VARNISHD_OPTS="-a 127.0.0.1:8080" + + +# User/Group +VARNISHD_OPTS="${VARNISHD_OPTS} -u varnish -g varnish" + +# You may need to increase the number of open files (-n) +# and the maximum amount off locked memory (-l) +# See bug #459142 +#rc_ulimit="-n 32786 -l 82000" diff --git a/www-servers/varnish/files/varnishd.confd-r4 b/www-servers/varnish/files/varnishd.confd-r4 new file mode 100644 index 000000000000..1a18b648541a --- /dev/null +++ b/www-servers/varnish/files/varnishd.confd-r4 @@ -0,0 +1,18 @@ +# /etc/conf.d/varnishd + +VARNISHD="/usr/sbin/varnishd" +VARNISHADM="/usr/bin/varnishadm" + +#CONFIGFILES="/etc/varnish/${SVCNAME}.vcl" +CONFIGFILE="/etc/varnish/default.vcl" + +# Listen on 127.0.0.1:8080 and connect to backend 127.0.0.1:80 +#VARNISHD_OPTS="-a 127.0.0.1:8080 -a 127.0.0.1:8080" + +# Alternatively, don't listen to a backend +VARNISHD_OPTS="-a 127.0.0.1:8080" + +# You may need to increase the number of open files (-n) +# and the maximum amount off locked memory (-l) +# See bug #459142 +#rc_ulimit="-n 32786 -l 82000" diff --git a/www-servers/varnish/files/varnishd.initd-r3 b/www-servers/varnish/files/varnishd.initd-r3 new file mode 100644 index 000000000000..ff8eaf691ea3 --- /dev/null +++ b/www-servers/varnish/files/varnishd.initd-r3 @@ -0,0 +1,77 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid} +CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}" + +command="${VARNISHD:-/usr/sbin/varnishd}" +command_args="-P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}" +pidfile="${VARNISHD_PID}" + +extra_commands="configtest" +extra_started_commands="reload" + +description_configtest="Run syntax tests for configuration files." +description_reload="Reloads the configuration." + +depend() { + need net +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +checkconfig() { + ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your setup:" + ${VARNISHD} -C -f ${CONFIGFILE} + fi + + return $ret +} + +start_pre() { + checkconfig || return 1 +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading varnish" + + $VARNISHADM vcl.list >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot list configuration" + return 1 + fi + + new_config="reload_$(date +%FT%H:%M:%S)" + $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot load configuration" + return 1 + fi + + $VARNISHADM vcl.use $new_config >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot switch configuration" + return 1 + fi + + eend 0 +} diff --git a/www-servers/varnish/files/varnishd.initd-r4 b/www-servers/varnish/files/varnishd.initd-r4 new file mode 100644 index 000000000000..4bc5061d2356 --- /dev/null +++ b/www-servers/varnish/files/varnishd.initd-r4 @@ -0,0 +1,77 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid} +CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}" + +command="${VARNISHD:-/usr/sbin/varnishd}" +command_args="-j unix,user=varnish -P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}" +pidfile="${VARNISHD_PID}" + +extra_commands="configtest" +extra_started_commands="reload" + +description_configtest="Run syntax tests for configuration files." +description_reload="Reloads the configuration." + +depend() { + need net +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +checkconfig() { + ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your setup:" + ${VARNISHD} -C -f ${CONFIGFILE} + fi + + return $ret +} + +start_pre() { + checkconfig || return 1 +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading varnish" + + $VARNISHADM vcl.list >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot list configuration" + return 1 + fi + + new_config="reload_$(date +%FT%H:%M:%S)" + $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot load configuration" + return 1 + fi + + $VARNISHADM vcl.use $new_config >/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} cannot switch configuration" + return 1 + fi + + eend 0 +} diff --git a/www-servers/varnish/files/varnishd.logrotate-r2 b/www-servers/varnish/files/varnishd.logrotate-r2 new file mode 100644 index 000000000000..e697e428f3dd --- /dev/null +++ b/www-servers/varnish/files/varnishd.logrotate-r2 @@ -0,0 +1,31 @@ +/var/log/varnish/varnishncsa.log { + daily + rotate 31 + copytruncate + dateext + dateyesterday + delaycompress + compress + notifempty + missingok + + prerotate + /etc/init.d/varnishncsa -q status && /etc/init.d/varnishncsa -q flush + endscript +} + +/var/log/varnish/varnishlog.log { + daily + rotate 31 + copytruncate + dateext + dateyesterday + delaycompress + compress + notifempty + missingok + + prerotate + /etc/init.d/varnishlog -q status && /etc/init.d/varnishlog -q flush + endscript +} diff --git a/www-servers/varnish/files/varnishd.service b/www-servers/varnish/files/varnishd.service new file mode 100644 index 000000000000..a45f1e247839 --- /dev/null +++ b/www-servers/varnish/files/varnishd.service @@ -0,0 +1,16 @@ +[Unit] +Description=Varnish is a high-performance HTTP accelerator +After=network.target + +[Service] +Type=forking +LimitNOFILE=32786 +LimitMEMLOCK=82000 +PIDFile=/var/run/varnishd.pid +ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -P /var/run/varnishd.pid + +#If you wish to use a config file, then use the following ExecStart line +#ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl -P /var/run/varnishd.pid + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/varnish/files/varnishlog.confd b/www-servers/varnish/files/varnishlog.confd new file mode 100644 index 000000000000..d7358b1dc898 --- /dev/null +++ b/www-servers/varnish/files/varnishlog.confd @@ -0,0 +1,3 @@ +# /etc/conf.d/varnishlog + +VARNISHLOG_OPTS="-a -w /var/log/varnish/varnishlog.log" diff --git a/www-servers/varnish/files/varnishlog.initd b/www-servers/varnish/files/varnishlog.initd new file mode 100644 index 000000000000..ebbf52ec4da3 --- /dev/null +++ b/www-servers/varnish/files/varnishlog.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VARNISHLOG_PID=${VARNISHLOG_PID:-/run/${SVCNAME}.pid} + +command="${VARNISHLOG:-/usr/bin/varnishlog}" +command_args="-D -P ${VARNISHLOG_PID} ${VARNISHLOG_OPTS}" +pidfile="${VARNISHLOG_PID}" + +extra_started_commands="reload rotate flush" + +description_rotate="Rotate the log file" +description_flush="Flush any outstanding transactions" + +rotate() { + ebegin "Rotating log file" + start-stop-daemon -p ${VARNISHLOG_PID} -s SIGHUP + eend $? +} + +flush() { + ebegin "Flushing any outstanding transactions" + start-stop-daemon -p ${VARNISHLOG_PID} -s SIGUSR1 + eend $? +} + +reload() { + flush + rotate +} diff --git a/www-servers/varnish/files/varnishncsa.confd b/www-servers/varnish/files/varnishncsa.confd new file mode 100644 index 000000000000..f3112fdd532a --- /dev/null +++ b/www-servers/varnish/files/varnishncsa.confd @@ -0,0 +1,3 @@ +# /etc/conf.d/varnishncsa + +VARNISHNCSA_OPTS="-a -w /var/log/varnish/${SVCNAME}.log" diff --git a/www-servers/varnish/files/varnishncsa.initd b/www-servers/varnish/files/varnishncsa.initd new file mode 100644 index 000000000000..e9c0001736eb --- /dev/null +++ b/www-servers/varnish/files/varnishncsa.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid} + +command="${VARNISHNCSA:-/usr/bin/varnishncsa}" +command_args="-D -P ${VARNISHNCSA_PID} ${VARNISHNCSA_OPTS}" +pidfile="${VARNISHNCSA_PID}" + +extra_started_commands="reload rotate flush" + +description_rotate="Rotate the log file" +description_flush="Flush any outstanding transactions" + +rotate() { + ebegin "Rotating log file" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGHUP + eend $? +} + +flush() { + ebegin "Flushing any outstanding transactions" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGUSR1 + eend $? +} + +reload() { + flush + rotate +} diff --git a/www-servers/varnish/files/varnishncsa.initd-r1 b/www-servers/varnish/files/varnishncsa.initd-r1 new file mode 100644 index 000000000000..8a584decc965 --- /dev/null +++ b/www-servers/varnish/files/varnishncsa.initd-r1 @@ -0,0 +1,44 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid} + +command="${VARNISHNCSA:-/usr/bin/varnishncsa}" +command_args="-D -P ${VARNISHNCSA_PID} ${VARNISHNCSA_OPTS}" +pidfile="${VARNISHNCSA_PID}" + +extra_started_commands="reload rotate flush" + +description_rotate="Rotate the log file" +description_flush="Flush any outstanding transactions" + +# We need to make sure varnishd has started first, bug #524284 +start_pre() { + TIMEOUT=${TIMEOUT:-5} + + local i=0 + while [ $i -lt ${TIMEOUT} ]; do + echo status | varnishadm 2>/dev/null | grep -q "Child in state running" + test $? -eq 0 && break + + sleep 1 && i=$(expr $i + 1) + done +} + +rotate() { + ebegin "Rotating log file" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGHUP + eend $? +} + +flush() { + ebegin "Flushing any outstanding transactions" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGUSR1 + eend $? +} + +reload() { + flush + rotate +} diff --git a/www-servers/varnish/metadata.xml b/www-servers/varnish/metadata.xml new file mode 100644 index 000000000000..fa6c19836485 --- /dev/null +++ b/www-servers/varnish/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <maintainer type="person"> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + <description>Secondary maintainer</description> + </maintainer> + <use> + <flag name="jemalloc">Use dev-libs/jemalloc for allocations</flag> + </use> + <longdescription lang="en"> + Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse Proxy) + is an application that stores (caches) documents that have been requested over + the HTTP protocol. + Based on certain criteria the next client requesting the document is either + given the cached document, or a "fresh" document requested from a backend + server. The purpose of this is to minimize the requests going to the backend + server(s) by serving the same document to potentially many users. + + The goal of Varnish is to be a very fast, stable and effective light-weight HTTP + accelerator daemon, by using modern and effective technologies. Ease of + managment and good documentation is also a main goal of the project since the + lack of either one will render Varnish useless. + </longdescription> +</pkgmetadata> diff --git a/www-servers/varnish/varnish-4.0.5.ebuild b/www-servers/varnish/varnish-4.0.5.ebuild new file mode 100644 index 000000000000..5240acf564bf --- /dev/null +++ b/www-servers/varnish/varnish-4.0.5.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python{2_7,3_4} pypy ) + +inherit user autotools systemd python-r1 + +DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator" +HOMEPAGE="http://www.varnish-cache.org/" +SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0" +KEYWORDS="amd64 ~mips x86" +IUSE="jemalloc jit static-libs" + +CDEPEND=" + sys-libs/readline:0= + dev-libs/libpcre[jit?] + jemalloc? ( dev-libs/jemalloc ) + sys-libs/ncurses:0=" + +#varnish compiles stuff at run time +RDEPEND=" + ${PYTHON_DEPS} + ${CDEPEND} + sys-devel/gcc" + +DEPEND=" + ${CDEPEND} + dev-python/docutils + virtual/pkgconfig" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="test" #315725 + +pkg_setup() { + ebegin "Creating varnish user and group" + enewgroup varnish + enewuser varnish -1 -1 /var/lib/varnish varnish + eend $? +} + +src_prepare() { + # Remove bundled libjemalloc. We also fix + # automagic dep in our patches, bug #461638 + rm -rf lib/libjemalloc + + eapply_user + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable jit pcre-jit ) \ + $(use_with jemalloc) +} + +src_install() { + emake DESTDIR="${D}" install + + python_replicate_script "${D}/usr/share/varnish/vmodtool.py" + + newinitd "${FILESDIR}"/varnishlog.initd varnishlog + newconfd "${FILESDIR}"/varnishlog.confd varnishlog + + newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa + newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa + + newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd + newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/varnishd.logrotate-r2" varnishd + + diropts -m750 + + dodir /var/log/varnish/ + + systemd_dounit "${FILESDIR}/${PN}d.service" + + insinto /etc/varnish/ + doins lib/libvmod_std/vmod.vcc + doins etc/example.vcl + + dodoc README + dodoc doc/changes.rst + + fowners root:varnish /etc/varnish/ + fowners varnish:varnish /var/lib/varnish/ + fperms 0750 /var/lib/varnish/ /etc/varnish/ +} diff --git a/www-servers/varnish/varnish-4.1.8.ebuild b/www-servers/varnish/varnish-4.1.8.ebuild new file mode 100644 index 000000000000..dd30bd9dab1b --- /dev/null +++ b/www-servers/varnish/varnish-4.1.8.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python{2_7,3_4} pypy ) + +inherit user autotools systemd python-r1 + +DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator" +HOMEPAGE="http://www.varnish-cache.org/" +SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0" +KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86" +IUSE="jemalloc jit static-libs" + +CDEPEND=" + sys-libs/readline:0= + dev-libs/libpcre[jit?] + jemalloc? ( dev-libs/jemalloc ) + sys-libs/ncurses:0=" + +#varnish compiles stuff at run time +RDEPEND=" + ${PYTHON_DEPS} + ${CDEPEND} + sys-devel/gcc" + +DEPEND=" + ${CDEPEND} + dev-python/docutils + virtual/pkgconfig" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="test" #315725 + +pkg_setup() { + ebegin "Creating varnish user and group" + enewgroup varnish + enewuser varnish -1 -1 /var/lib/varnish varnish + eend $? +} + +src_prepare() { + # Remove bundled libjemalloc. We also fix + # automagic dep in our patches, bug #461638 + rm -rf lib/libjemalloc + + # Fix bug #620952 + eapply "${FILESDIR}"/fix-build-x86.patch + + # Remove -Werror bug #528354 + sed -i -e 's/-Werror\([^=]\)/\1/g' configure.ac + + eapply_user + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable jit pcre-jit ) \ + $(use_with jemalloc) +} + +src_install() { + emake DESTDIR="${D}" install + + python_replicate_script "${D}/usr/share/varnish/vmodtool.py" + + newinitd "${FILESDIR}"/varnishlog.initd varnishlog + newconfd "${FILESDIR}"/varnishlog.confd varnishlog + + newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa + newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa + + newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd + newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/varnishd.logrotate-r2" varnishd + + diropts -m750 + + dodir /var/log/varnish/ + + systemd_dounit "${FILESDIR}/${PN}d.service" + + insinto /etc/varnish/ + doins lib/libvmod_std/vmod.vcc + doins etc/example.vcl + + dodoc README.rst + dodoc doc/changes.rst + + fowners root:varnish /etc/varnish/ + fowners varnish:varnish /var/lib/varnish/ + fperms 0750 /var/lib/varnish/ /etc/varnish/ +} diff --git a/www-servers/varnish/varnish-5.1.3.ebuild b/www-servers/varnish/varnish-5.1.3.ebuild new file mode 100644 index 000000000000..d2bfc697e39f --- /dev/null +++ b/www-servers/varnish/varnish-5.1.3.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy ) + +inherit user autotools systemd python-r1 + +DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator" +HOMEPAGE="http://www.varnish-cache.org/" +SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0" +KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86" +IUSE="jemalloc jit static-libs" + +CDEPEND=" + sys-libs/readline:0= + dev-libs/libpcre[jit?] + jemalloc? ( dev-libs/jemalloc ) + sys-libs/ncurses:0=" + +#varnish compiles stuff at run time +RDEPEND=" + ${PYTHON_DEPS} + ${CDEPEND} + sys-devel/gcc" + +DEPEND=" + ${CDEPEND} + dev-python/docutils + virtual/pkgconfig" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="test" #315725 + +pkg_setup() { + ebegin "Creating varnish user and group" + enewgroup varnish + enewuser varnish -1 -1 /var/lib/varnish varnish + eend $? +} + +src_prepare() { + # Remove -Werror bug #528354 + sed -i -e 's/-Werror\([^=]\)/\1/g' configure.ac + + # Upstream doesn't put varnish.m4 in the m4/ directory + # We link because the Makefiles look for the file in + # the original location + ln -sf ../varnish.m4 m4/varnish.m4 + + eapply_user + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable jit pcre-jit ) \ + $(use_with jemalloc) +} + +src_install() { + emake DESTDIR="${D}" install + + python_replicate_script "${D}/usr/share/varnish/vmodtool.py" + + newinitd "${FILESDIR}"/varnishlog.initd varnishlog + newconfd "${FILESDIR}"/varnishlog.confd varnishlog + + newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa + newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa + + newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd + newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/varnishd.logrotate-r2" varnishd + + diropts -m750 + + dodir /var/log/varnish/ + + systemd_dounit "${FILESDIR}/${PN}d.service" + + insinto /etc/varnish/ + doins lib/libvmod_std/vmod.vcc + doins etc/example.vcl + + dodoc README.rst + dodoc doc/changes.rst + + fowners root:varnish /etc/varnish/ + fowners varnish:varnish /var/lib/varnish/ + fperms 0750 /var/lib/varnish/ /etc/varnish/ +} diff --git a/www-servers/xsp/Manifest b/www-servers/xsp/Manifest new file mode 100644 index 000000000000..1ff9cf67b6f3 --- /dev/null +++ b/www-servers/xsp/Manifest @@ -0,0 +1,12 @@ +AUX 2.2/mod-mono-server-r1.initd 2002 SHA256 9d3e0c627c2411b48cc1cb5731b2992037cdb9ad3573bf7cfa6705b73f64eec5 SHA512 570daa64eb7ade8281f2d874cb7ac24afb52f385360a8a49a9a43141f4c9ea18b87cc897e4daf4c53d2a1b8c0cf45f3e0a06f2908f63cf80c17b26cce5e4df14 WHIRLPOOL 7b5e5e405ce67aa18389662faf58e20e900c6132b21c68660c019315a6d087aa43a5ca48f62def50f763c4174d62c11c3ce55c89a9fd7d4ee1ce4654f001cfb3 +AUX 2.2/mod-mono-server.confd 1214 SHA256 982fff00b95c5231d51cd9df9fe4f9c01860956c4ac092b039e27566365407ff SHA512 1dfffca9e07e9bc0af779be37683beafe40e436d51f80c0b5d5ea0f00e5726b85a9f1265c660799ff76a6ec0261fc0749bb3f94cd5d158b606a55e5d98cc54ce WHIRLPOOL 17b6876335fdaa6fb1190ac7545af2df304ef801121c58984581b3971de8a8359f2b28d35c3e039c682534e841249eb03aa75f8422bbae540e39bf49622c04e2 +AUX 2.2/mod-mono-server.initd 1906 SHA256 b4596d5cca1b58802bee9e71f3e904ce174fd0edba193ffb6e58938c0084451d SHA512 15922bb445f97f084295185a1211692197dda58e8d794fb6c20e44801db4a802547253814d70608a10540bb340e7ac71294c8be58689f7700b9c9faa424b0eb5 WHIRLPOOL 4a644f3b52109ec3e9ae91fece9900c0efc1ccf15cf44a3b4bc23828b71a980c37c9be062902919de1b2b8b02b3493c34b192ff373d76b5f0de003064133f288 +AUX 2.2/xsp.confd 306 SHA256 2e38b8556ffb236ac72c0dcae2c12f42320bdf0639c6c85815cb8b3d6a4eaf1b SHA512 4c82a22b3da305e7b73dde941e30058e7a717c032980ebfd4a99c5be3fd84aec77fd3d6f3787d165503790e07bfde4193c72ed4d2bfb3c08033b964ac933ec9a WHIRLPOOL 7854047539189f99715c65ea610ca3e194fe5f98a3840fa397b19b54a1949c6ccaeeb32efd1c17b89bba5691d486a6e7305d929f9afb40064fd33848aab4d35d +AUX 2.2/xsp.initd 796 SHA256 c758a0bae688f49c3e9323980ce5201274d892e7ded9fae6692d272f1ec66102 SHA512 d28fbce8838c6796362ec7bedcedfedee5e60524758b16ff6a24952ff20acfea658b824f070ffc59b9df381895a0e0346177a7aa1129de59f67543102c581f44 WHIRLPOOL bdf8b3f100b22f27947034297fac4ff885f14e88b9dd39329c0f0083f34cac7f81d7df07c9f4dd4d0e84e11760f6727268354dfda92ecaa086162f04486100f2 +AUX aclocal-fix.patch 299 SHA256 9f85ae96f10f7a5f2ff9543b53dcc2771c41a4c8890b890aca6dfbf6e2991dca SHA512 a315a5e9f59c4d4fd665e7e55977667fc8baf8f232961b939910af5df9e3e869bc50c98ecdc96302155c7b89f94fd3f9b7750ecac1fc430f7b12fe761c7b965b WHIRLPOOL 8757ef07055bf8430ff3979cf1f152cf7d13ca76806d96f6a0f4137dc4fba72eaabb3112c3227e3e1b99c48f6d8049ae314947ab033c3dad9a5e6e380ee18f06 +AUX systemd/mono-xsp4.service 340 SHA256 5eeed3a28a00b2b8a5189dd06d95895725e939c8a8133c07a29eb8007f6df927 SHA512 d4df0cad0ca0c72cf282ecf377409d255375402910a7f762f9d395a407e63eb3c314932cfee69ec733cb9f1cb7cf88af7125fc2723335efc049cc6ebce2756b4 WHIRLPOOL 8087e6a7f29cf8474841ceaaa56330beb971ae2f6a5da28a2a74ab2abd397b6c10e114fb8e5b49ab9b511aae7857bee211ebb49c3731f82ba210fcee74c00a6c +AUX systemd/mono.webapp 315 SHA256 5e791d036242acf1a1f026067af8eab8a71a74c5951342022cb7c6ee919208f1 SHA512 e7b33fa0f36b27854c8a215cacab25760b5ff91f12415dbd9406e1f92cb0faf035bcfb14b8e0b37c22ff73f0a9c31a1cf9ac213c9167e5f8618a943440e0384d WHIRLPOOL 2e5b273da7c9e18376bf8ec8050ded01a9eb8d077773f8ec73876c5e06c467a3e69f4a2d49f7ddf5b3c16ba33478d773af48b2ca06f7e28780b31a2512412e90 +DIST xsp-2014.12.zip 632555 SHA256 1d115e3fe0bbcb3957be20e670e086ebddff3acaa5f641a9c143ea46d12e055c SHA512 a9d298079cfae4bacac1575f04e58c3106f532c1f283cc243a8a6560561c0a6b535320d1d3e925c7383bd1f7510f31f115d8e85506e31623c175d7f3f606ab91 WHIRLPOOL a5e06f72f51717682d80f6ac6554320db72a05d6d6c40439196073d118706607f99bf810d82e8cc68cf9e54bd0f7d176cc882fa74babb8d78308cbe7c4d9d8cc +EBUILD xsp-2014.12-r2014120900.ebuild 2425 SHA256 ba910df107de428b6c6d1b92ba6cb9fa58b2788647a2d183622e164e1f8d6da8 SHA512 75a2d05703c25dc133cbf09f870498d3e3091b062479dfc5ee0622d8b6da85c3f912095a5990995d267205afb12ce3f94a372b99ff5334cca2b7c747af892791 WHIRLPOOL 623b88de45ac621ee0406f323ae7b80879f19391751034b28b182faa7bd5a7b572fab71d299270b9ef32eccf10acf533d299ed5dd74f2197e3d39400fff6bd07 +MISC ChangeLog 2464 SHA256 cb754ed8502bc6b89549cea7aedd08e160e9aabf463f9ed5460eb6330851caa4 SHA512 92f483585169bb8d474ef8e39e229f5c32f447856a1bfd66d304b455e6df93404813d660c2e50769fd7ac8cd2112b80232ac35c9c871cf0861ebc8599ef14d6f WHIRLPOOL 6a1f027a05c7fa2c74463ca2d1ca7e23a4a7a223fe878589d20a1a092b50de782d44f6c4e533595c82d91859bd44f22d5a2613d832325877311eacbb23e26420 +MISC metadata.xml 795 SHA256 1a5453fd278b243e3c5c65efb847f7895188db3ae1c55f2d335bc4cf85c09793 SHA512 668a7b1374a97f3c5711d1b7732898b4b5f80a9f8069f347cf9597512474741da9500a110457e9384cadd7db46805478feeb0878d5be77f5453594a1b588abc0 WHIRLPOOL bd867f0860ab35b08fd511f9de97615d243fd19147516f34ec29fa0948b4d85802b87b8179fb70a739f52cc50532b9ec6892a1eb2c13d565b13ecf1c71af8e98 diff --git a/www-servers/xsp/files/2.2/mod-mono-server-r1.initd b/www-servers/xsp/files/2.2/mod-mono-server-r1.initd new file mode 100644 index 000000000000..22d7ba9af428 --- /dev/null +++ b/www-servers/xsp/files/2.2/mod-mono-server-r1.initd @@ -0,0 +1,82 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net + after dotnet +} + +start() { + [ -z "$MonoServerRootDir" ] && \ + MonoServerRootDir="/usr/lib/xsp/test" + [ -z "$MonoApplications" ] && \ + MonoApplications="/mono:/usr/lib/xsp/test,/:." + [ -z "$UnixSocketFileName" ] && \ + UnixSocketFileName="/tmp/mod_mono_server" + [ -z "$MonoServerAddress" ] && \ + MonoServerAddress=127.0.0.1 + [ -z "$MonoServerPort" ] && \ + MonoServerPort=8080 + [ -z "$MonoServerVersion" ] && \ + MonoServerVersion=1 + + MONO_SERVER_OPTS="--root ${MonoServerRootDir} \ +--applications ${MonoApplications} --nonstop" + + [ -n "$MonoApplicationsConfigDir" ] && \ + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--appconfigdir ${MonoApplicationsConfigDir}" + + case "$MonoServerChannel" in + "tcp" ) + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--address ${MonoServerAddress} --port ${MonoServerPort}" + ;; + + "unix" ) + [ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--filename ${UnixSocketFileName}" + ;; + + * ) + eerror "Please set a valid value for MonoServerChannel" + return 1 + ;; + esac + + if [ ${MonoServerVersion} -eq 1 ]; then + modmonoserverpath=1.0/mod-mono-server.exe + elif [ ${MonoServerVersion} -eq 2 ]; then + modmonoserverpath=2.0/mod-mono-server2.exe + elif [ ${MonoServerVersion} -eq 4 ]; then + modmonoserverpath=4.0/mod-mono-server4.exe + else + eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/mod-mono-server" + return 1 + fi + + export MONO_SHARED_DIR=/tmp + + ebegin "Starting mod-mono-server" + + start-stop-daemon --quiet --start \ + --background \ + --make-pidfile \ + --pidfile /var/run/aspnet/mod-mono-server.pid \ + --user aspnet \ + --exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \ + -- $MONO_SERVER_OPTS + + eend $? +} + +stop() { + ebegin "Stopping mod-mono-server" + + start-stop-daemon --quiet --stop \ + --pidfile /var/run/aspnet/mod-mono-server.pid + + eend $? +} diff --git a/www-servers/xsp/files/2.2/mod-mono-server.confd b/www-servers/xsp/files/2.2/mod-mono-server.confd new file mode 100644 index 000000000000..6c6836b9561b --- /dev/null +++ b/www-servers/xsp/files/2.2/mod-mono-server.confd @@ -0,0 +1,33 @@ +# Config file for /etc/init.d/mod-mono-server + +# Configuration directives for mod-mono-server.exe. For more information on +# these variables, see the man page for xsp(1). + +# This is the document root; trailing slash is not necessary +#MonoServerRootDir="/usr/lib/xsp/test" + +# Directory to search for files with an `.webapp' extension. +#MonoApplicationsConfigDir="/usr/lib/xsp/test" + +# Comma separated list of directories (in the form virtual:real) for all +# applications managed by the server. For example: +# /app1:/var/www/localhost/htdocs/app1,/app2:/var/www/localhost/htdocs/app2 +MonoApplications="/mono:/usr/lib/xsp/test" + +# The communication channel used between mod-mono-server and mod_mono. +# unix - A unix socket +# tcp - A TCP connection +MonoServerChannel="unix" + +# When the comm. channel is "unix", the local filename used by the socket. +UnixSocketFileName="/tmp/mod_mono_server" + +# When the comm. channel is "tcp", IP address for the server to listen on. +#MonoServerAddress=127.0.0.1 + +# When the comm. channel is "tcp", port for the server to listen on. +#MonoServerPort=8080 + +# If you want to host .NET 2.0 applications you have to set this to 2. +# Otherwise, leave it unchaged +MonoServerVersion=1 diff --git a/www-servers/xsp/files/2.2/mod-mono-server.initd b/www-servers/xsp/files/2.2/mod-mono-server.initd new file mode 100644 index 000000000000..fb1c44935e09 --- /dev/null +++ b/www-servers/xsp/files/2.2/mod-mono-server.initd @@ -0,0 +1,80 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net + after dotnet +} + +start() { + [ -z "$MonoServerRootDir" ] && \ + MonoServerRootDir="/usr/lib/xsp/test" + [ -z "$MonoApplications" ] && \ + MonoApplications="/mono:/usr/lib/xsp/test,/:." + [ -z "$UnixSocketFileName" ] && \ + UnixSocketFileName="/tmp/mod_mono_server" + [ -z "$MonoServerAddress" ] && \ + MonoServerAddress=127.0.0.1 + [ -z "$MonoServerPort" ] && \ + MonoServerPort=8080 + [ -z "$MonoServerVersion" ] && \ + MonoServerVersion=1 + + MONO_SERVER_OPTS="--root ${MonoServerRootDir} \ +--applications ${MonoApplications} --nonstop" + + [ -n "$MonoApplicationsConfigDir" ] && \ + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--appconfigdir ${MonoApplicationsConfigDir}" + + case "$MonoServerChannel" in + "tcp" ) + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--address ${MonoServerAddress} --port ${MonoServerPort}" + ;; + + "unix" ) + [ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName + MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ +--filename ${UnixSocketFileName}" + ;; + + * ) + eerror "Please set a valid value for MonoServerChannel" + return 1 + ;; + esac + + if [ ${MonoServerVersion} -eq 1 ]; then + modmonoserverpath=1.0/mod-mono-server.exe + elif [ ${MonoServerVersion} -eq 2 ]; then + modmonoserverpath=2.0/mod-mono-server2.exe + else + eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/xsp" + return 1 + fi + + export MONO_SHARED_DIR=/tmp + + ebegin "Starting mod-mono-server" + + start-stop-daemon --quiet --start \ + --background \ + --make-pidfile \ + --pidfile /var/run/aspnet/mod-mono-server.pid \ + --chuid aspnet \ + --exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \ + -- $MONO_SERVER_OPTS + + eend $? +} + +stop() { + ebegin "Stopping mod-mono-server" + + start-stop-daemon -o --quiet --stop \ + --pidfile /var/run/aspnet/mod-mono-server.pid + + eend $? +} diff --git a/www-servers/xsp/files/2.2/xsp.confd b/www-servers/xsp/files/2.2/xsp.confd new file mode 100644 index 000000000000..e4f79aafa5e5 --- /dev/null +++ b/www-servers/xsp/files/2.2/xsp.confd @@ -0,0 +1,11 @@ +# Config file for /etc/init.d/xsp + +# This is the document root; trailing slash is not necessary +MonoServerRoot=/usr/lib/xsp/test + +# Port for the server to run on +MonoServerPort=8000 + +# If you want to host .NET 2.0 applications you have to set this to 2. +# Otherwise, leave it unchanged +MonoServerVersion=1 diff --git a/www-servers/xsp/files/2.2/xsp.initd b/www-servers/xsp/files/2.2/xsp.initd new file mode 100644 index 000000000000..6ac7bbf87c0b --- /dev/null +++ b/www-servers/xsp/files/2.2/xsp.initd @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + after dotnet +} + +start() { + ebegin "Starting xsp" + + if [ ${MonoServerVersion} -eq 1 ]; then + xsppath=1.0/xsp.exe + elif [ ${MonoServerVersion} -eq 2 ]; then + xsppath=2.0/xsp2.exe + else + eerror "MonoServerVersion was not properly set. Check your config file" + return 1 + fi + + start-stop-daemon --quiet --start \ + --background \ + --make-pidfile \ + --pidfile /var/run/aspnet/xsp.pid \ + --chuid aspnet \ + --exec /usr/bin/mono /usr/lib/mono/${xsppath} -- --root ${MonoServerRoot} --port ${MonoServerPort} --nonstop + eend $? +} + +stop() { + ebegin "Stopping xsp" + start-stop-daemon -o --quiet --stop \ + --pidfile /var/run/aspnet/xsp.pid + eend $? +} + diff --git a/www-servers/xsp/files/aclocal-fix.patch b/www-servers/xsp/files/aclocal-fix.patch new file mode 100644 index 000000000000..49a00050fe8d --- /dev/null +++ b/www-servers/xsp/files/aclocal-fix.patch @@ -0,0 +1,13 @@ +--- Makefile_old.am 2013-07-30 09:11:50.033962122 +0400 ++++ Makefile.am 2013-07-30 09:12:20.843574793 +0400 +@@ -1,10 +1,2 @@ + SUBDIRS=build man src test tools scripts packaging lib + ACLOCAL_AMFLAGS += -I build/m4 +- +-if UNITTESTS +-SUBDIRS += unittests +-endif +- +-if BUILD_DOCS +-SUBDIRS += docs +-endif diff --git a/www-servers/xsp/files/systemd/mono-xsp4.service b/www-servers/xsp/files/systemd/mono-xsp4.service new file mode 100644 index 000000000000..3e5f60291953 --- /dev/null +++ b/www-servers/xsp/files/systemd/mono-xsp4.service @@ -0,0 +1,15 @@ +[Unit] +Description=XSP 4.0 WebServer +Wants=network.target +ConditionFileNotEmpty=/etc/xsp4/mono.webapp +ConditionDirectoryNotEmpty=/etc/xsp4/conf.d + +[Service] +Type=simple +User=aspnet +Group=aspnet +ExecStart=/usr/bin/xsp4 --port 8084 --address 0.0.0.0 --appconfigdir /etc/xsp4 --nonstop +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/xsp/files/systemd/mono.webapp b/www-servers/xsp/files/systemd/mono.webapp new file mode 100644 index 000000000000..3f611b1e2374 --- /dev/null +++ b/www-servers/xsp/files/systemd/mono.webapp @@ -0,0 +1,10 @@ +<web-application> + <name>Root</name> + <vpath>/</vpath> + <path>/usr/lib64/xsp/test</path> + <!-- vhost and port are ignored in xsp.exe --> + <vhost>my.host.name</vhost> + <vport>8084</vport> + <!-- <enabled> is true by default --> + <!-- <enabled>false</enabled> --> +</web-application> diff --git a/www-servers/xsp/metadata.xml b/www-servers/xsp/metadata.xml new file mode 100644 index 000000000000..93662ee6a09d --- /dev/null +++ b/www-servers/xsp/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>dotnet@gentoo.org</email> + <name>Gentoo Dotnet Project</name> + </maintainer> + <longdescription lang="en"> + XSP is a standalone web server written in C# that can be used to run + your ASP.NET applications. + </longdescription> + <use> + <flag name="developer">creates .mdb files for either Release and Debug</flag> + <flag name="net35">use .NET 3.5 Framework</flag> + <flag name="net40">use .NET 4.0 Framework</flag> + <flag name="net45">use .NET 4.5 Framework</flag> + </use> + <upstream> + <remote-id type="github">mono/xsp</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-servers/xsp/xsp-2014.12-r2014120900.ebuild b/www-servers/xsp/xsp-2014.12-r2014120900.ebuild new file mode 100644 index 000000000000..0f2567648c57 --- /dev/null +++ b/www-servers/xsp/xsp-2014.12-r2014120900.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +USE_DOTNET="net35 net40 net45" +PATCHDIR="${FILESDIR}/2.2/" + +inherit base eutils systemd dotnet user autotools autotools-utils + +DESCRIPTION="XSP is a small web server that can host ASP.NET pages" +HOMEPAGE="http://www.mono-project.com/ASP.NET" + +EGIT_COMMIT="e272a2c006211b6b03be2ef5bbb9e3f8fefd0768" +SRC_URI="https://github.com/mono/xsp/archive/${EGIT_COMMIT}.zip -> ${P}.zip" +S="${WORKDIR}/xsp-${EGIT_COMMIT}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc test developer" + +RDEPEND="dev-db/sqlite:3" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}/aclocal-fix.patch" + + if [ -z "$LIBTOOL" ]; then + LIBTOOL=`which glibtool 2>/dev/null` + if [ ! -x "$LIBTOOL" ]; then + LIBTOOL=`which libtool` + fi + fi + eaclocal -I build/m4/shamrock -I build/m4/shave $ACLOCAL_FLAGS + if test -z "$NO_LIBTOOLIZE"; then + ${LIBTOOL}ize --force --copy + fi + eautoconf +} + +src_configure() { + myeconfargs=("--enable-maintainer-mode") + use test && myeconfargs+=("--with_unit_tests") + use doc || myeconfargs+=("--disable-docs") + eautomake --gnu --add-missing --force --copy #nowarn + autotools-utils_src_configure + ./configure || die +} + +METAFILETOBUILD=xsp.sln + +src_compile() { + exbuild xsp.sln + if use developer; then + exbuild /p:DebugSymbols=True ${METAFILETOBUILD} + else + exbuild /p:DebugSymbols=False ${METAFILETOBUILD} + fi +} + +pkg_preinst() { + enewgroup aspnet + enewuser aspnet -1 -1 /tmp aspnet + + # enewuser www-data + # www-data - is from debian, i think it's the same as aspnet here +} + +src_install() { + mv_command="cp -ar" autotools-utils_src_install + newinitd "${PATCHDIR}"/xsp.initd xsp + newinitd "${PATCHDIR}"/mod-mono-server-r1.initd mod-mono-server + newconfd "${PATCHDIR}"/xsp.confd xsp + newconfd "${PATCHDIR}"/mod-mono-server.confd mod-mono-server + + insinto /etc/xsp4 + doins "${FILESDIR}"/systemd/mono.webapp + insinto /etc/xsp4/conf.d + # mono-xsp4.service was original name from + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770458;filename=mono-xsp4.service;att=1;msg=5 + # I think that using the same commands as in debian + # systemctl start mono-xsp4.service + # systemctl start mono-xsp4 + # is better than to have shorter command + # systemctl start xsp + # + # insinto /usr/lib/systemd/system + systemd_dounit "${FILESDIR}"/systemd/mono-xsp4.service + + keepdir /var/run/aspnet +} |