summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Koltsov <maksbotan@gentoo.org>2011-05-31 19:49:07 +0000
committerMaxim Koltsov <maksbotan@gentoo.org>2011-05-31 19:49:07 +0000
commit7517cbd6f7abf1032480f2fecc7d32a9ad177db0 (patch)
treeb207b2cff407a0428478401005b6862e3631e095 /www-servers
parentAdd new ebuild dev-libs/libbtbb, proxy-maintained by zero_chaos. (diff)
downloadgentoo-2-7517cbd6f7abf1032480f2fecc7d32a9ad177db0.tar.gz
gentoo-2-7517cbd6f7abf1032480f2fecc7d32a9ad177db0.tar.bz2
gentoo-2-7517cbd6f7abf1032480f2fecc7d32a9ad177db0.zip
Bump www-servers/uwsgi to 0.9.7.2, #340058
(Portage version: 2.1.9.46/cvs/Linux i686)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/uwsgi/ChangeLog13
-rw-r--r--www-servers/uwsgi/files/uwsgi.confd47
-rw-r--r--www-servers/uwsgi/files/uwsgi.initd101
-rw-r--r--www-servers/uwsgi/metadata.xml7
-rw-r--r--www-servers/uwsgi/uwsgi-0.9.5.ebuild44
-rw-r--r--www-servers/uwsgi/uwsgi-0.9.7.2.ebuild71
6 files changed, 236 insertions, 47 deletions
diff --git a/www-servers/uwsgi/ChangeLog b/www-servers/uwsgi/ChangeLog
index a836c083a4c4..c3e4fb6ad772 100644
--- a/www-servers/uwsgi/ChangeLog
+++ b/www-servers/uwsgi/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for www-servers/uwsgi
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.5 2011/04/19 07:34:42 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.6 2011/05/31 19:49:07 maksbotan Exp $
+
+*uwsgi-0.9.7.2 (31 May 2011)
+
+ 31 May 2011; Maxim Koltsov (maksbotan) <maksbotan@gentoo.org>
+ -uwsgi-0.9.5.ebuild, +uwsgi-0.9.7.2.ebuild, +files/uwsgi.confd,
+ +files/uwsgi.initd, metadata.xml:
+ Bumping to 0.9.7.2 (bug #340058). Added init scripts from that bug.
+ Removed
+ uwsgi-0.9.5 as obsolete. Drop usage of gcc patch in 0.9.7.2 as issue is
+ fixed
+ upstream.
19 Apr 2011; Benedikt Böhm <hollow@gentoo.org> metadata.xml:
remove myself from metadata
diff --git a/www-servers/uwsgi/files/uwsgi.confd b/www-servers/uwsgi/files/uwsgi.confd
new file mode 100644
index 000000000000..11152da5dbf7
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.confd
@@ -0,0 +1,47 @@
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.confd,v 1.1 2011/05/31 19:49:07 maksbotan Exp $
+
+# DO NOT MODIFY THIS FILE DIRECTLY! CREATE A COPY AND MODIFY THAT INSTEAD!
+
+# Path (or name) of UNIX/TCP socket to bind to
+#
+UWSGI_SOCKET=127.0.0.1:1234
+
+# Enable threads?
+#
+UWSGI_THREADS=1
+
+# 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_CHILDREN=1
+
+# The log file path. If empty logging is disabled
+#
+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=
+
+# The user and group to run your application as. If you do not specify these,
+# the application will be run as root:root.
+#
+UWSGI_USER=
+
+# Additional options you might want to pass to uWSGI
+#
+#UWSGI_EXTRA_OPTIONS=
diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/files/uwsgi.initd
new file mode 100644
index 000000000000..3fedecc64f63
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.initd
@@ -0,0 +1,101 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.initd,v 1.1 2011/05/31 19:49:07 maksbotan Exp $
+
+PROGNAME=${SVCNAME#*.}
+
+UWSGI_EXEC=/usr/bin/uwsgi
+PIDPATH=/var/run/uwsgi
+PIDFILE="${PIDPATH}/${PROGNAME}.pid"
+
+depend() {
+ need net
+}
+
+start() {
+ local OPTIONS
+
+ if [ "${SVCNAME}" = "uwsgi" ]; 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 uwsgi /etc/init.d/uwsgi.trac"
+ eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac"
+ eerror " `basename "${EDITOR}"` /etc/conf.d/uwsgi.trac"
+ eerror
+ return 1
+ fi
+
+ if [ -z "${UWSGI_SOCKET}" ]; then
+ eerror "You need to specify path (or name) of UNIX/TCP socket to bind to"
+ eerror "in UWSGI_SOCKET"
+ return 1
+ fi
+
+ if [ -z "${UWSGI_PROGRAM}" ] && [ -z "${UWSGI_XML_CONFIG}" ]; then
+ eerror "You need to specify which \$UWSGI_PROGRAM or \$UWSGI_XML_CONFIG"
+ eerror "you want to start."
+ eerror "Please adjust /etc/conf.d/uwsgi.${PROGNAME}"
+ return 1
+ fi
+
+ if [ -n "${UWSGI_PROGRAM}" ] && [ -n "${UWSGI_XML_CONFIG}" ]; then
+ eerror "Only one of the two may be defined:"
+ eerror " UWSGI_PROGRAM=${UWSGI_PROGRAM}"
+ eerror " UWSGI_XML_CONFIG=${UWSGI_XML_CONFIG}"
+ return 1
+ fi
+
+
+ OPTIONS="--master --daemonize"
+
+ if [ -n "$UWSGI_LOG_FILE" ]; then
+ OPTIONS="${OPTIONS} $UWSGI_LOG_FILE"
+ else
+ OPTIONS="${OPTIONS} /dev/null --disable-logging"
+ 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_CHILDREN}" ]; then
+ OPTIONS="${OPTIONS} --processes ${UWSGI_CHILDREN}"
+ fi
+
+ if [ -n "${UWSGI_CHROOT}" ]; then
+ OPTIONS="${OPTIONS} --chroot ${UWSGI_CHROOT}"
+ fi
+
+ [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/"
+ [ -z "${UWSGI_USER}" ] && UWSGI_USER="root"
+
+ if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then
+ OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}"
+ fi
+
+ if [ -n "${UWSGI_PROGRAM}" ]; then
+ OPTIONS="${OPTIONS} --wsgi-file ${UWSGI_PROGRAM}"
+ fi
+
+ if [ -n "${UWSGI_XML_CONFIG}" ]; then
+ OPTIONS="${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}"
+ fi
+
+ ebegin "Starting uWSGI application ${PROGNAME}"
+ cd "${UWSGI_DIR}" && \
+ start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}" -- ${OPTIONS} --pidfile "${PIDFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uWSGI application ${PROGNAME}"
+ start-stop-daemon --stop --pidfile "${PIDFILE}" --signal 3
+ eend $?
+}
diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml
index 9f3fdee2246b..30792c895c17 100644
--- a/www-servers/uwsgi/metadata.xml
+++ b/www-servers/uwsgi/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>no-herd</herd>
+ <herd>python</herd>
<maintainer>
- <email>maintainer-needed@gentoo.org</email>
+ <email>maksbotan@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>sterkrig@home.se</email>
</maintainer>
</pkgmetadata>
diff --git a/www-servers/uwsgi/uwsgi-0.9.5.ebuild b/www-servers/uwsgi/uwsgi-0.9.5.ebuild
deleted file mode 100644
index ca24328e1fdc..000000000000
--- a/www-servers/uwsgi/uwsgi-0.9.5.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.5.ebuild,v 1.1 2010/05/03 19:24:28 hollow Exp $
-
-EAPI="3"
-PYTHON_DEPEND="*"
-SUPPORT_PYTHON_ABIS="1"
-
-inherit eutils python toolchain-funcs
-
-DESCRIPTION="uWSGI server for Python web applications"
-HOMEPAGE="http://projects.unbit.it/uwsgi/"
-SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="dev-libs/libxml2"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- # Python 3 requires constant indentation.
- epatch "${FILESDIR}/${PN}-0.9.5-fix_uwsgiconfig.py_indentation.patch"
-
- # Respect CC, CFLAGS and LDFLAGS.
- epatch "${FILESDIR}/${PN}-0.9.5-respect_flags.patch"
-
- python_copy_sources
-}
-
-src_compile() {
- python_src_compile CC="$(tc-getCC)"
-}
-
-src_install() {
- installation() {
- newbin uwsgi uwsgi-${PYTHON_ABI}
- }
- python_execute_function -s installation
-
- python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
-}
diff --git a/www-servers/uwsgi/uwsgi-0.9.7.2.ebuild b/www-servers/uwsgi/uwsgi-0.9.7.2.ebuild
new file mode 100644
index 000000000000..9f299d8f4728
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-0.9.7.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-0.9.7.2.ebuild,v 1.1 2011/05/31 19:49:07 maksbotan Exp $
+
+EAPI="3"
+PYTHON_DEPEND="*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils python toolchain-funcs apache-module
+
+DESCRIPTION="uWSGI server for Python web applications"
+HOMEPAGE="http://projects.unbit.it/uwsgi/"
+SRC_URI="http://projects.unbit.it/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2"
+DEPEND="${RDEPEND}"
+
+APXS2_S="${S}/apache2"
+APACHE2_MOD_CONF="42_mod_${PN}"
+want_apache2_2
+
+src_prepare() {
+ python_copy_sources
+}
+
+src_compile() {
+ python_src_compile CC="$(tc-getCC)"
+
+ if use apache2 ; then
+ for m in Ruwsgi uwsgi ; do
+ APXS2_ARGS="-c mod_${m}.c"
+ apache-module_src_compile
+ done
+ fi
+}
+
+src_install() {
+ installation() {
+ newbin uwsgi uwsgi-${PYTHON_ABI}
+ }
+ python_execute_function -s installation
+
+ python_generate_wrapper_scripts "${ED}usr/bin/uwsgi"
+
+ if use apache2; then
+ for m in Ruwsgi uwsgi ; do
+ APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so"
+ apache-module_src_install
+ done
+ fi
+
+ newinitd "${FILESDIR}"/uwsgi.initd uwsgi
+ newconfd "${FILESDIR}"/uwsgi.confd uwsgi
+ mkdir "${ED}"/var/run/uwsgi
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ elog "Two Apache modules have been installed: mod_uwsgi and mod_Ruwsgi."
+ elog "You can enable them with -DUWSGI or -DRUWSGI in /etc/conf.d/apache2."
+ elog "Both 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."
+ fi
+}