summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2016-05-13 17:56:58 +0200
committerUltrabug <ultrabug@gentoo.org>2016-05-13 17:57:13 +0200
commit89a125886d8e24af223914487f057beaded611ac (patch)
tree169452d900711ce8847cce12430c2bbe960a9938 /www-servers/uwsgi
parentmedia-sound/tomahawk: Use subslot on net-libs/gnutls (diff)
downloadgentoo-89a125886d8e24af223914487f057beaded611ac.tar.gz
gentoo-89a125886d8e24af223914487f057beaded611ac.tar.bz2
gentoo-89a125886d8e24af223914487f057beaded611ac.zip
www-servers/uwsgi: version bump, add go support, make pid path mode configurable, drop broken release
Package-Manager: portage-2.2.27
Diffstat (limited to 'www-servers/uwsgi')
-rw-r--r--www-servers/uwsgi/Manifest2
-rw-r--r--www-servers/uwsgi/files/uwsgi.confd-r469
-rw-r--r--www-servers/uwsgi/files/uwsgi.initd-r7144
-rw-r--r--www-servers/uwsgi/metadata.xml1
-rw-r--r--www-servers/uwsgi/uwsgi-2.0.13.1.ebuild (renamed from www-servers/uwsgi/uwsgi-2.0.13.ebuild)13
5 files changed, 224 insertions, 5 deletions
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 66288d828c3a..efcf2d165640 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,4 +1,4 @@
DIST uwsgi-2.0.11.2.tar.gz 782133 SHA256 0b889b0b4d2dd3f6625df28cb0b86ec44a68d074ede2d0dfad0b91e88914885c SHA512 627759ec9cccc8de74016c245b19069dc7e6970c398be95e707c2c9e36fa06438249f130d0c2bdee16f585b123094a9dd4977de5be276a065ddce30a9698da9a WHIRLPOOL 314a397bc678aefe59df8b6a87584768d19b5d52cfd894d518ebe3e9019fb74232c9139c9cc5af00da8b1bc21c369c7a84e9d424b7c5986e6ece65172f3cca27
DIST uwsgi-2.0.12.tar.gz 784048 SHA256 306b51db97648d6d23bb7eacd76e5a413434575f220dac1de231c8c26d33e409 SHA512 3178d140d8365d4f876002490f138c1586fdffa1dbd1a9ec2279097535fcdf5e6bac16acf5d409b51b54c003e0533b724a95a57a213b7310a624ee02bf5c1796 WHIRLPOOL 64bbd21a74ec493a3e48981988a76c9c424b406e48784244717567c3842f954229a503d41f36e651634668be5117a533c15e0e51473e99c831676e483cd7d87a
-DIST uwsgi-2.0.13.tar.gz 784971 SHA256 74219b483e6244eba3b9c48cde043ea4f2fc6db3f952c160aae5498a2d8ddefd SHA512 59695a92e277aa853a291958d715620e195ab6460fd94ebbb8fe5b23b35d2e220efb95e266bcfb38f9360122b42cf635f56da8632d9ed71ed93cdd821e73623a WHIRLPOOL efe1e5475d9c3cc60da88c6130aea03ba31eb2068a6d4e744154148697e743706d040c1f3770658402197d1a0e4c8ccb7f3f0e1c37ccf1642918a82897a1e4c8
+DIST uwsgi-2.0.13.1.tar.gz 784937 SHA256 da32a4438c623a5f7129d1ebeefa3e13eccc2be220af36475fb3461734fe539b SHA512 9cc7936faf4898401268803d1294896a4d60bc8f1c8ecf3177b16f5e873e69b88d6b8d28cd020a6bf319e6c1e7de65caf29e85207633a5b60f423ffbdaf116e5 WHIRLPOOL 9246bdf85cd22b2f01789e8cc06f035ae7d15d4213d7e40e88dd9cd4f1152fb9c4205c32ee8749d0fc174b116453887dbdb2b01ed42c0be897d8e011913f4199
DIST uwsgi-2.0.9.tar.gz 779244 SHA256 fe0489bca0a8b95653908be2297e35699fb9e992f728e382224587ee6b918295 SHA512 8afb6ca51aa2113e2c9fc0b90e11ce8c1aeddb38f41c7b0d5da6811d7ef93aa8b9e015abfd29b1ced35b0f6a00fd7285b8140b855fc3ee79804e2513e94a9fb5 WHIRLPOOL 362abe240b9a3f170409b850d9ae5186701b137159cd91d2e689b5f3d43dfe779f13d9e4554b60b82efd534a00751394a7982130912f7f106ac6e7c6dbde88d6
diff --git a/www-servers/uwsgi/files/uwsgi.confd-r4 b/www-servers/uwsgi/files/uwsgi.confd-r4
new file mode 100644
index 000000000000..f56240302af1
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.confd-r4
@@ -0,0 +1,69 @@
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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..f7cff44f242b
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.initd-r7
@@ -0,0 +1,144 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+
+ 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"
+
+ 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
index c0eca5a47c6c..c5f1ce0aa8fe 100644
--- a/www-servers/uwsgi/metadata.xml
+++ b/www-servers/uwsgi/metadata.xml
@@ -10,6 +10,7 @@
</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>
diff --git a/www-servers/uwsgi/uwsgi-2.0.13.ebuild b/www-servers/uwsgi/uwsgi-2.0.13.1.ebuild
index 466791afbb63..13b6a5a42ff4 100644
--- a/www-servers/uwsgi/uwsgi-2.0.13.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.13.1.ebuild
@@ -43,7 +43,7 @@ UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
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=( lua php pypy python python_asyncio python_gevent ruby )
+LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby )
# plugins to be ignored (for now):
# cheaper_backlog2: example plugin
@@ -52,7 +52,6 @@ LANG_SUPPORT_EXTENDED=( lua php pypy python python_asyncio python_gevent ruby )
# dummy: no idea
# example: example plugin
# exception_log: example plugin
-# *go*: TODO
# *java*: TODO
# v8: TODO
# matheval: TODO
@@ -109,6 +108,7 @@ CDEPEND="sys-libs/zlib
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:= )
@@ -275,6 +275,10 @@ src_compile() {
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
@@ -311,6 +315,7 @@ src_install() {
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
@@ -333,8 +338,8 @@ src_install() {
done
fi
- newinitd "${FILESDIR}"/uwsgi.initd-r6 uwsgi
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi
+ newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi
+ newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi
keepdir /etc/"${PN}".d
use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}"
}