diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2012-11-22 07:49:13 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2012-11-22 07:49:13 +0000 |
commit | 822e03409b63eb2fabbf2e048308433797843bef (patch) | |
tree | 0613824efe83ed12ebdc4745b56865b6e16c7014 /www-servers | |
parent | Stable on amd64, wrt bug #444145 (diff) | |
download | historical-822e03409b63eb2fabbf2e048308433797843bef.tar.gz historical-822e03409b63eb2fabbf2e048308433797843bef.tar.bz2 historical-822e03409b63eb2fabbf2e048308433797843bef.zip |
Add support for the postgresql probe plugin.
Package-Manager: portage-2.1.11.20/cvs/Linux x86_64
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/uwsgi/ChangeLog | 8 | ||||
-rw-r--r-- | www-servers/uwsgi/Manifest | 11 | ||||
-rw-r--r-- | www-servers/uwsgi/metadata.xml | 1 | ||||
-rw-r--r-- | www-servers/uwsgi/uwsgi-1.4.1-r2.ebuild | 329 |
4 files changed, 343 insertions, 6 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog index 549a71e1d8d8..d7db9f45eded 100644 --- a/www-servers/uwsgi/ChangeLog +++ b/www-servers/uwsgi/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-servers/uwsgi # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.32 2012/11/21 10:27:20 dev-zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.33 2012/11/22 07:49:13 dev-zero Exp $ + +*uwsgi-1.4.1-r2 (22 Nov 2012) + + 22 Nov 2012; Tiziano Müller <dev-zero@gentoo.org> +uwsgi-1.4.1-r2.ebuild, + metadata.xml: + Add support for the postgresql probe plugin. *uwsgi-1.4.1-r1 (21 Nov 2012) diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index 08e73f582de6..0575dbb4b1e6 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -21,12 +21,13 @@ EBUILD uwsgi-1.2.5.ebuild 8610 SHA256 8bddca1e7fafbd7201c22d0527a1f34c0a9ced7f0e EBUILD uwsgi-1.2.6.ebuild 8658 SHA256 98585a8e43e7af3f9bf516994fc7778e817a1857bca75658eacde9d1389c6033 SHA512 9b53d4ade90665886881c02869b8619e4128fcdeaa3340efec02b8dc645de3f99cba69a827cc4b0273dc8c94af72c2bc9ec0021f7f76616c14f21e6f41275b24 WHIRLPOOL b18455b534307639fe9b37fd54d3047c5ebbbceaa8438688bb6d89f9b4b63ccf4c0b03590e23ba1c6d2fa70224ce5bb5b135c87d74df0389dfb07407784569aa EBUILD uwsgi-1.3-r1.ebuild 8703 SHA256 343134c334d7008d29948db8c942780400e5af5ccccd80476ba3a93e85b224f5 SHA512 f4b48beffba85e1656975228f76a918e8375bc06289b5ae849998cc65e5ea6f5e05cb2d6192b030a13d70427a8978f8e8d200f3355943604f795ccfb1e2c56d8 WHIRLPOOL 67ae830a84477f1bdf3f3458c68213ed930e22dc298f52dbce41e96526ed108586fcad751c779e511db2862a8ede874736997963be4eb2096ca520bfabc786d9 EBUILD uwsgi-1.4.1-r1.ebuild 9102 SHA256 b7b7228c392e898433f085f21ffa7471550e646612573cc0af10c05df7cc704b SHA512 b08ca91d544fca920858d8b42a37ebbf13396a9ce5cc379304a272c1ce4e5d12225662df939c0795aa4cad5bb6e029a3d56dfe0d4d991c9121828fa6c9ad3193 WHIRLPOOL b10f99b8ce689cf173ab47f1c5f05c6ec3e0fa2402859e3e3ac94058ed788b79115183d01c78a8d73e2e2506e648fcaceaaef3d81383fdca5a9dea3c63d8aebb -MISC ChangeLog 6104 SHA256 763eeb36245edffa523178c324d682864b87a05a9d9155eb393987f12a76a4f3 SHA512 ca5369118d29625917080a227992e03f4a2cf3711b9c3dc7b88353b76c9392c720a2b3b0cdbcc4007f29a8082e40a8dc78f22c817c6b61aa72585df45fbe0e5b WHIRLPOOL 00e93fc7446a6d1f64304d1180f0fc305b94cede6b35b5b71dec2d2524ff47c0c188d6970b662ec6a39e74c9336ba794c4175cc97278c89f7da23b04142397e6 -MISC metadata.xml 1741 SHA256 9aeaf0a71eec68f74f9aeb0f5526aa9b504527c4a79486ed184e2ec9fa45fc10 SHA512 615d7b29f89c7441baa0022c7fae48d4b88f9da77b5fcb897d22a21bc92f09ed3492f7111978b97eecb4404b96c0bc5cf3addb9226b678bcfc0788770522249f WHIRLPOOL 478fbc2926280d69388bb2f59f179f89519499bb59fbb8b0f82836707878a5d2428f108cdeb407541f5677f2366fc8059fc567fa46cd56939143caee2fa2d3ec +EBUILD uwsgi-1.4.1-r2.ebuild 9562 SHA256 e7ff83d11c82b7a9c81db6180a8c6280763ee78de68a996d3ee55f294b57ef14 SHA512 2c2c6a067c8ccc4a8caa0420f14807d2a5ee95c6376268336c2c8ec6607260e49839867948f24f0b077cc76bc8be19a6cc93d381c2f4bcb95c8a571307d43b53 WHIRLPOOL d15a128d923414c63b9d7d78343a830a7f4437532c376194757e98cf74b034f31ff4d712cf64fbaac2a9032a5e9a8913553cbb2937eda4a7f5a28462e8db1f0b +MISC ChangeLog 6276 SHA256 113823162c1d95d4d19e43a388098a0ece79eb274d68d88b6f3220968bc5432f SHA512 d341105767e3f2b7f3184fe04b13ab5b15fc05024f3a7a00eeef91ff964c082881e3ea664c1bddf50ef4239f2c2bda487a21b70401a3c27065104f9e8da9f3a5 WHIRLPOOL 2a5b631b876c8d8aa7c8043c2680e9617f15dd4c3cf7c93d24d3517fe52459df4fe150770eb2f273d4e0c567bbd41a11e70f1d0e8cc59e509f559ad7994aa94f +MISC metadata.xml 1857 SHA256 eec5b1ed09980d423c5e6fec1c85ade0459bb589bba1bb863dc378f7f348abcf SHA512 a3e9aee2176ce686259cc4be0166545cc323e5aa17f28f797b80bd6d711ab1af43a64a51480baf0b87ad53b0b6ecd7158c950768dd6154817daf7faf9021bd10 WHIRLPOOL b5383be7268e47688cde206a9635b7d6d52f21986e3274b2d0ed308e56d693f07ada4fed3405c7c82741259ab1f09eaa617bdd5c279ee733918db0b347e06c10 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlCsrIkACgkQGwVqY66cHjBsugCfYdFJ+SqsTLNxB5BHse9+YElo -Tw8An2KyuyDgp6uaBnDw+5Ou5o5AJWmv -=ncu4 +iEYEAREIAAYFAlCt2PoACgkQGwVqY66cHjAZAQCeOf21oK/ljJJqNk3j5uKLM0SK +cswAnRADmFIJ3elAfWKvsMngHnOhY0dB +=QyIg -----END PGP SIGNATURE----- diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml index 830027db1d77..fbc9c7cfbb68 100644 --- a/www-servers/uwsgi/metadata.xml +++ b/www-servers/uwsgi/metadata.xml @@ -13,6 +13,7 @@ <flag name='json'>Support json as a configuration file format.</flag> <flag name='nagios'>Add nagios-friendly logging output (see http://projects.unbit.it/uwsgi/wiki/Nagios).</flag> <flag name='pam'>Add the pam plugin.</flag> + <flag name='probepg'>Add the PostgreSQL probe plugin (see http://projects.unbit.it/uwsgi/wiki/DjangoDBHA).</flag> <flag name='rrdtool'>Enable support for writing requests data in RRD files.</flag> <flag name='rsyslog'>Support direct logging to a <pkg>app-admin/rsyslog</pkg> socket (without going through the syslog interface).</flag> <flag name='spooler'>Build a plugin which gives a network spooler (see http://projects.unbit.it/uwsgi/wiki/Spooler).</flag> diff --git a/www-servers/uwsgi/uwsgi-1.4.1-r2.ebuild b/www-servers/uwsgi/uwsgi-1.4.1-r2.ebuild new file mode 100644 index 000000000000..e5762f899801 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-1.4.1-r2.ebuild @@ -0,0 +1,329 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.1-r2.ebuild,v 1.1 2012/11/22 07:49:13 dev-zero Exp $ + +EAPI="5" +PYTHON_DEPEND="python? *" +PYTHON_MODNAME="uwsgidecorators" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*" +USE_RUBY="ruby18 ree18 ruby19" +RUBY_OPTIONAL="yes" +PHP_EXT_NAME="dummy" +PHP_EXT_INI="no" +USE_PHP="php5-3 php5-4" # deps must be registered separately below +PHP_EXT_OPTIONAL_USE="php" + +MY_P="${P/_/-}" + +inherit apache-module eutils python multilib pax-utils php-ext-source-r2 ruby-ng versionator + +DESCRIPTION="uWSGI server for Python web applications" +HOMEPAGE="http://projects.unbit.it/uwsgi/" +SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apache2 +caps +carbon cgi debug erlang gevent graylog2 json ldap lua +nagios pam perl +pcre php probepg +python rrdtool rsyslog ruby spooler sqlite syslog +xml yaml zeromq" +REQUIRED_USE="|| ( cgi erlang lua perl php python ruby )" + +# util-linux is required for libuuid when requesting zeromq support +CDEPEND="caps? ( sys-libs/libcap ) + json? ( dev-libs/jansson ) + erlang? ( dev-lang/erlang ) + gevent? ( >=dev-python/gevent-1.0_beta2 ) + graylog2? ( sys-libs/zlib ) + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua ) + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl ) + php? ( + php_targets_php5-3? ( dev-lang/php:5.3[embed] ) + php_targets_php5-4? ( dev-lang/php:5.4[embed] ) + ) + probepg? ( dev-db/postgresql-base:= ) + ruby? ( $(ruby_implementations_depend) ) + sqlite? ( dev-db/sqlite:3 ) + rsyslog? ( app-admin/rsyslog ) + xml? ( dev-libs/libxml2 ) + yaml? ( dev-libs/libyaml ) + zeromq? ( net-libs/zeromq sys-apps/util-linux )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + rrdtool? ( net-analyzer/rrdtool )" + +S="${WORKDIR}/${MY_P}" +APXS2_S="${S}/apache2" +APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi" + +want_apache2_2 + +use_true_false() { + if use $1 ; then + echo "true" + else + echo "false" + fi +} + +src_unpack() { + default +} + +pkg_setup() { + depend.apache_pkg_setup + python_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}/1.1.2-threaded-php.patch" \ + "${FILESDIR}/1.2.3-pyerl.patch" + + 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|python\([0-9].[0-9]\)-config|python-config-\1|' \ + plugins/python/uwsgiplugin.py || die "sed failed" + + sed -i \ + -e "s|/lib|/$(get_libdir)|" \ + plugins/php/uwsgiplugin.py || die "sed failed" +} + +src_configure() { + local plugins="" + use carbon && plugins+=", carbon" + use graylog2 && plugins+=", graylog2" + use nagios && plugins+=", nagios" + use pam && plugins+=", pam" + use rrdtool && plugins+=", rrdtool" + use rsyslog && plugins+=", rsyslog" + use syslog && plugins+=", syslog" + + # Notes: + # * the embedded_plugins mostly follows the list of embedded_plugins + # in buildconf/base.ini, make sure you compare the list when bumping uWSGI + # * thus: keep the order in embedded_plugins the same as in the base.ini + cat > "buildconf/gentoo.ini" << EOF +[uwsgi] +xml = $(use_true_false xml) +ini = true +yaml = $(use_true_false yaml) +json = $(use_true_false json) +sqlite3 = $(use_true_false sqlite) +zeromq = $(use_true_false zeromq) +snmp = true +sctp = false +spooler = true +embedded = true +ssl = auto +udp = true +multicast = true +threading = true +sendfile = true +minterpreters = true +async = true +evdis = false +ldap = $(use_true_false ldap) +pcre = $(use_true_false pcre) +routing = auto +alarm = auto +debug = $(use_true_false debug) +unbit = false +xml_implementation = libxml2 +yaml_implementation = libyaml +malloc_implementation = libc +plugins = +bin_name = uwsgi +append_version = +plugin_dir = /usr/$(get_libdir)/uwsgi +plugin_build_dir = ${T}/plugins +embedded_plugins = ping, cache, rpc, corerouter, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter ${plugins} +as_shared_library = false + +locking = auto +event = auto +timer = auto +filemonitor = auto + +embed_files = + +embed_config = +[python] +paste = true +web3 = true +EOF + use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" + use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" + + if use probepg ; then + PGPV="$(best_version dev-db/postgresql-base)" + PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-base-})" + sed -i \ + -e "s|pg_config|pg_config${PGSLOT/.}|" \ + plugins/probepg/uwsgiplugin.py || die "sed failed" + fi +} + +each_ruby_compile() { + cd "${WORKDIR}/${MY_P}" + + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" + + if [[ "${RUBY}" == *ruby19 ]] ; then + UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed" + fi +} + +install_python_lib() { + insinto $(python_get_sitedir) + doins uwsgidecorators.py +} + +src_compile() { + python uwsgiconfig.py --build gentoo || die "building uwsgi failed" + + mkdir -p "${T}/plugins" + + if use erlang ; then + python uwsgiconfig.py --plugin plugins/erlang gentoo || die "building plugin for erlang failed" + fi + + if use lua ; then + # setting LUALIB explicitly since lua is not slotted on Gentoo + # and uwsgi otherwise looks for lua5.1 + UWSGICONFIG_LUALIB="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" + fi + + if use perl ; then + python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl 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 + for a in ${PYTHON_ABIS} ; do + python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.} || die "building plugin for python-${a} failed" + + if use gevent ; then + python${a} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${a/.} || die "building plugin for gevent-support in python-${a} failed" + fi + if use erlang ; then + python${a} uwsgiconfig.py --plugin plugins/pyerl gentoo pyerl${a/.} || die "building plugin for erlang-support in python failed" + fi + done + fi + + if use ruby ; then + ruby-ng_src_compile + fi + + if use spooler ; then + python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building plugin for spooler failed" + fi + + if use cgi ; then + python uwsgiconfig.py --plugin plugins/cgi gentoo || die "building plugin for cgi failed" + fi + + if use probepg ; then + python uwsgiconfig.py --plugin plugins/probepg gentoo || die "building plugin for postgresql probe failed" + 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 erlang && dosym uwsgi /usr/bin/uwsgi_erlang + use lua && dosym uwsgi /usr/bin/uwsgi_lua + 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_execute_function install_python_lib + for a in ${PYTHON_ABIS} ; do + dosym uwsgi /usr/bin/uwsgi_python${a/.} + done + 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-r1 uwsgi + newconfd "${FILESDIR}"/uwsgi.confd-r1 uwsgi + keepdir /etc/"${PN}".d + use 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 the newest and not considered ready for production yet." + fi + + elog "Append the following options to the uwsgi call to load the respective language plugin:" + use cgi && elog " '--plugins cgi' for cgi" + use erlang && elog " '--plugins erlang' for erlang" + use lua && elog " '--plugins lua' for lua" + 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 + + if use python ; then + for a in ${PYTHON_ABIS} ; do + elog " '--plugins python${a/.}' for python-${a}" + use gevent && elog " '--plugins python${a/.},gevent${a/.}' for gevent support in python-${a}" + use erlang && elog " '--plugins python${a/.},erlang,pyerl${a/.}' for erlang support in python-${a}" + done + fi + + if use ruby ; then + for ruby in $USE_RUBY; do + use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}" + if [[ "${ruby}" == *ruby19 ]] ; then + elog " '--plugins fibre' for ruby-1.9 fibres" + fi + done + fi +} |