diff options
author | Alexys Jacob <ultrabug@gentoo.org> | 2012-05-22 09:11:22 +0000 |
---|---|---|
committer | Alexys Jacob <ultrabug@gentoo.org> | 2012-05-22 09:11:22 +0000 |
commit | 51e52c5c0a9c5f68ec2d7cada673546522deacfa (patch) | |
tree | 7778434b10e22a244235bc918fd3b0fab106d8f0 /www-servers | |
parent | Stable for x86, wrt bug #412963 (diff) | |
download | historical-51e52c5c0a9c5f68ec2d7cada673546522deacfa.tar.gz historical-51e52c5c0a9c5f68ec2d7cada673546522deacfa.tar.bz2 historical-51e52c5c0a9c5f68ec2d7cada673546522deacfa.zip |
Corrected init script, fix #416959.
Package-Manager: portage-2.1.10.62/cvs/Linux x86_64
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/uwsgi/ChangeLog | 8 | ||||
-rw-r--r-- | www-servers/uwsgi/Manifest | 13 | ||||
-rw-r--r-- | www-servers/uwsgi/files/uwsgi.initd-r1 | 4 | ||||
-rw-r--r-- | www-servers/uwsgi/uwsgi-1.2.3-r1.ebuild | 300 |
4 files changed, 316 insertions, 9 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog index 740824ed2e61..91b49f5db6e6 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.18 2012/05/20 16:21:51 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.19 2012/05/22 09:11:22 ultrabug Exp $ + +*uwsgi-1.2.3-r1 (22 May 2012) + + 22 May 2012; Ultrabug <ultrabug@gentoo.org> +uwsgi-1.2.3-r1.ebuild, + files/uwsgi.initd-r1: + Fix standalone init script thanks to Brian Wiborg, fix #416959. 20 May 2012; Mike Gilbert <floppym@gentoo.org> uwsgi-1.2.3.ebuild: Simplify PYTHON_DEPEND. diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index 2ca5bac714a8..1a58dab993eb 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -14,7 +14,7 @@ AUX uwsgi-1.0.2.1-no-werror.patch 567 RMD160 c246bd927f5dbe12552cfaa0aeafdd81f4b AUX uwsgi.confd 1116 RMD160 e13ddecb06cf4efaf75216ec657db99a4abbbddf SHA1 9df38c84bc2d612803629a6a2e6bd9a3a5568d33 SHA256 3c238b934f8db9eae87f77dc3d131499e442526d5e45438b5461c0d7590b772f AUX uwsgi.confd-r1 1438 RMD160 b75f46a290f6f3710a1547aa0192180f3d440592 SHA1 874d0c89c7116694c3afa15949bf0613ecbcf7a2 SHA256 baa1522d488523daf67d3d480f9aa5076ae3252ab2731f4c25ef564caba8cfd2 AUX uwsgi.initd 2861 RMD160 9b33ea58fd404f18a80b06721c59e9e1aa5bce1f SHA1 de7046a94d28c53c6fca11d46b03a2631863b218 SHA256 8891e4bebb324a1663aaf994715243346ea9ed2bf73a1296be5646542d77b10e -AUX uwsgi.initd-r1 3302 RMD160 fda20075196ba206f9adbef5dcc3840dcf3dd036 SHA1 32f4cad560d42b8742e71f2b3169832294b20882 SHA256 abd50ba8e2ddb94ba365c5cccdf9a42d1972532757cc47f819dc89b62007bdcc +AUX uwsgi.initd-r1 3312 RMD160 3e0f38eefe608731581ef0217326eb67be443af6 SHA1 715bf439490dddb27eee220de50854e08cd84ff6 SHA256 e6ec9bf40474d16be1e4b5c198c1b4aa3614a8d14f536b147b18068a3a4a9cf8 DIST uwsgi-0.9.7.2.tar.gz 306218 RMD160 a6f0a548d6db46230946ec0a33395d5f5b119a58 SHA1 e279c2c597d349d9cf463bc4d226db7123c43342 SHA256 6eccf3c7ead324c6af9a6196f0d4faf4c8472ca3b728a01a0070b472b0784bba DIST uwsgi-0.9.8.tar.gz 335000 RMD160 424e9ec7c4bd24e2db256c92f84c0a3881ec3aaa SHA1 2ab2fd822fc966efe32c6be5a97efd7299d0cd01 SHA256 63a33006ea93f87aa24aaffda9e8b3bfc2d598b1d7bc4d9cd13c587f25500899 DIST uwsgi-1.0.2.1.tar.gz 465250 RMD160 e882e19ea072af06cb477c9fe5d580f3a5127d27 SHA1 b383b2d3d9d2b8fa3fef9d5449d151dde89e5ead SHA256 78280b57a970db7842e4481f8b00f13d011f27b340c869dc1ad28d564d716439 @@ -22,13 +22,14 @@ DIST uwsgi-1.2.3.tar.gz 512385 RMD160 816a2970b1ba57a25fe0e12fde2ebb49092408c1 S EBUILD uwsgi-0.9.7.2.ebuild 1888 RMD160 16f57da2f2976e5ec8b2222945d584fe730924e3 SHA1 33f1c6620baa2998ad08b0c99d81e398bf412ed3 SHA256 ce8aaddc6934c7a378c9489f22d57e56112d352f8eb4f2061c4317a8bcec9f8e EBUILD uwsgi-0.9.8.ebuild 1886 RMD160 bb225d80a1399b5bcff842863d3ed346c2222595 SHA1 31ebf86b9eb91c0986ae18954278a8b770c64f88 SHA256 9ffd7fb4dc39ff59b1336c5e1a0f631b80c68401cff37bd368fdd3c93bd32581 EBUILD uwsgi-1.0.2.1.ebuild 1891 RMD160 f8867961f4962fedab8d4a44b34bd3e5a5e1f9bf SHA1 b3700e8a83567180a1225ef53504cf3f66248346 SHA256 1078d427a2cd4abe8a7ed4a5ec4a477fea989c2b75e20d5a27128032359c61d5 +EBUILD uwsgi-1.2.3-r1.ebuild 8260 RMD160 2c8199c42c691cc66757ac4b0f81c0cb8afa359c SHA1 1e1275d3daa5a928ca728c762f379064b6616321 SHA256 3bc879fb2771cae8abac6ffe1b4d3c3790eb730fe5374f993095ca7ab9100259 EBUILD uwsgi-1.2.3.ebuild 8256 RMD160 edce342eb5a2c85b5bb7a6e116576d0e46d350c4 SHA1 a123664e57e1d461fda4d3e5a44f3f857c7df0f2 SHA256 d44448ce612967be3be3becb0dbc35b5a7c1587889ea28320cbf292c6aa98cb6 -MISC ChangeLog 3494 RMD160 dcef62e47d41372cdb09693280a97a587056111f SHA1 ab70b788c58bad56940c4604106c6e34b2896f27 SHA256 947da759cb8b0881bf08d8aeb6802e6bad9cead409ae1f8352e7f5600d9cd62d +MISC ChangeLog 3687 RMD160 4d3e177975159b4bf03fc31ade0575065fada78a SHA1 0e966a16ce1316b620db3734edf59d6cc55de56a SHA256 1b847a09a8446e9255c3fac52b850b64484f9079d2317e1554a0201551370183 MISC metadata.xml 1535 RMD160 c73711fafc1086f242d5616ebf77087c3565585c SHA1 e22535081a369055a95878361f9908d2785a25c9 SHA256 ad2aad1cf6b844879a0012076e6677ed01ece11e42cc8df8de736546052baaf2 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) +Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAk+5GiUACgkQC77qH+pIQ6Rv9gEAyZoRIPCXrOaZmXBuWt/gZQF0 -Y2FD/nQ0NxU+Yc1hzv0A/jSLVqPLfRaxdGAHqpnTD67lrCToBpvrZ025syDqQBcE -=NGCl +iF4EAREIAAYFAk+7WEQACgkQKiQSS7ZY+hM7hwEAgp9V4geuDYAFcOUWCxoAa/WF +Rc86T4otuzEzoHQAwd4A/RWDiboox0jOGzdR7eQDDGAmK/HKOFeIjQ33IRKbkcBF +=gm56 -----END PGP SIGNATURE----- diff --git a/www-servers/uwsgi/files/uwsgi.initd-r1 b/www-servers/uwsgi/files/uwsgi.initd-r1 index db44890fa968..a62ff3fc50da 100644 --- a/www-servers/uwsgi/files/uwsgi.initd-r1 +++ b/www-servers/uwsgi/files/uwsgi.initd-r1 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.initd-r1,v 1.1 2012/05/15 06:45:08 dev-zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.initd-r1,v 1.2 2012/05/22 09:11:22 ultrabug Exp $ PROGNAME=${SVCNAME#*.} @@ -73,7 +73,7 @@ start_app() { fi if [ -n "${UWSGI_PROGRAM}" ]; then - OPTIONS="${OPTIONS} --file ${UWSGI_PROGRAM}" + OPTIONS="${OPTIONS} --fileserve-mode ${UWSGI_PROGRAM}" fi if [ -n "${UWSGI_XML_CONFIG}" ]; then diff --git a/www-servers/uwsgi/uwsgi-1.2.3-r1.ebuild b/www-servers/uwsgi/uwsgi-1.2.3-r1.ebuild new file mode 100644 index 000000000000..1c5ba2647d47 --- /dev/null +++ b/www-servers/uwsgi/uwsgi-1.2.3-r1.ebuild @@ -0,0 +1,300 @@ +# 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.2.3-r1.ebuild,v 1.1 2012/05/22 09:11:22 ultrabug Exp $ + +EAPI="4" +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 + +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 graylog2 json ldap lua +nagios perl +pcre php 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 ) + 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] ) + ) + 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}/${PV}-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 rrdtool && plugins+=", rrdtool" + use rsyslog && plugins+=", rsyslog" + use syslog && plugins+=", syslog" + + 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 +udp = true +multicast = true +threading = true +sendfile = true +minterpreters = true +async = true +evdis = false +ldap = $(use_true_false ldap) +pcre = $(use_true_false pcre) +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, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog ${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" +} + +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 + 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 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 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 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 +} |