diff options
author | Vlad Glagolev | 2019-08-30 22:49:53 +0000 |
---|---|---|
committer | Vlad Glagolev | 2019-08-30 22:49:53 +0000 |
commit | a06ffe2321bab34e403d6450ad4ad8e81642a668 (patch) | |
tree | 02c52c202f88265307581b55806501e563800212 /http | |
parent | 50b819155c22d20161da9b44a85029f0e785978e (diff) |
uwsgi: => 2.0.18
Diffstat (limited to 'http')
-rwxr-xr-x | http/uwsgi/BUILD | 8 | ||||
-rwxr-xr-x | http/uwsgi/DEPENDS | 27 | ||||
-rwxr-xr-x | http/uwsgi/DETAILS | 4 | ||||
-rwxr-xr-x | http/uwsgi/FINAL | 10 | ||||
-rw-r--r-- | http/uwsgi/HISTORY | 14 | ||||
-rwxr-xr-x | http/uwsgi/INSTALL | 32 | ||||
-rwxr-xr-x | http/uwsgi/PRE_BUILD | 8 | ||||
-rw-r--r-- | http/uwsgi/init.d/uwsgi-emperor | 5 | ||||
-rw-r--r-- | http/uwsgi/init.d/uwsgi-emperor.conf | 3 |
9 files changed, 86 insertions, 25 deletions
diff --git a/http/uwsgi/BUILD b/http/uwsgi/BUILD index a2d1642449..75c6130439 100755 --- a/http/uwsgi/BUILD +++ b/http/uwsgi/BUILD @@ -1,13 +1,11 @@ -sed -i "/plugin_dir/s;\.;${TRACK_ROOT}/usr/lib/${SPELL};" buildconf/base.ini && +OPTS="${UWSGI_OPTS} ${OPTS}" && + if is_depends_enabled ${SPELL} python3; then PYTHON=python3 else PYTHON=python2 fi && + export PYTHON && ${PYTHON} uwsgiconfig.py --build core - -for plugin in ${OPTS}; do - ${PYTHON} uwsgiconfig.py --plugin plugins/${plugin} core -done diff --git a/http/uwsgi/DEPENDS b/http/uwsgi/DEPENDS index 8e9ecfc2c8..74294dd32b 100755 --- a/http/uwsgi/DEPENDS +++ b/http/uwsgi/DEPENDS @@ -1,6 +1,25 @@ -depends gevent "gevent" && -depends greenlet "greenlet" && -depends PYTHON "python asyncio" && +depends PYTHON "python" && + +if is_depends_enabled ${SPELL} python3; then + config_query_option UWSGI_OPTS "Enable asyncio loop engine (${PROBLEM_COLOR}experimental${MESSAGE_COLOR})?" n \ + "asyncio" \ + "" +fi && + +optional_depends gevent \ + "gevent" \ + "" \ + "for Gevent loop engine support" && + +optional_depends greenlet \ + "greenlet" \ + "" \ + "for greenlet suspend engine support" && + +optional_depends SYSTEM-LOGGER \ + "syslog" \ + "" \ + "for syslog plugin" && optional_depends perl \ "psgi" \ @@ -15,7 +34,7 @@ optional_depends RUBY \ optional_depends LUA \ "lua" \ "" \ - "for Lua plugin" + "for Lua plugin" && optional_depends SSL \ "" \ diff --git a/http/uwsgi/DETAILS b/http/uwsgi/DETAILS index 5f6b1eba33..1772fa191a 100755 --- a/http/uwsgi/DETAILS +++ b/http/uwsgi/DETAILS @@ -1,8 +1,8 @@ SPELL=uwsgi - VERSION=2.0.15 + VERSION=2.0.18 SOURCE="${SPELL}-${VERSION}.tar.gz" SOURCE_URL[0]=https://github.com/unbit/${SPELL}/archive/${VERSION}.tar.gz - SOURCE_HASH=sha512:1a2a82cf99d3e6dfe62fa18fd6f04afd1dc727d61287a1c9f47f1448e76a4858dfd59286118c94672c84ff22bcd8444c0c1568ae46993fdbdb9414ad60474bf4 + SOURCE_HASH=sha512:6561703279bcc4a81311d033810ac066d0f113bab13b0942f3eef86cac29c584a6641b52476840d6895151aee5ed064ae2d03b18932cf7f47e62f4eeed76da61 SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}" WEB_SITE="http://unbit.com/" LICENSE[0]="GPL" diff --git a/http/uwsgi/FINAL b/http/uwsgi/FINAL index fd55ae2421..68ab5d1ec1 100755 --- a/http/uwsgi/FINAL +++ b/http/uwsgi/FINAL @@ -1,6 +1,6 @@ -if [[ ${INIT_INSTALLED} ]] ; then - message "${MESSAGE_COLOR}Place your application configuration files in " \ - "${DEFAULT_COLOR}${TRACK_ROOT}/etc/${SPELL}${MESSAGE_COLOR}.\n" \ - "${SPELL_COLOR}${SPELL}${MESSAGE_COLOR} in \"emperor\" mode will pick " \ - "them up immediately.${DEFAULT_COLOR}" +if [[ ${INIT_INSTALLED} ]]; then + message "\n${MESSAGE_COLOR}Place your application configuration files in" \ + "${FILE_COLOR}${TRACK_ROOT}/etc/${SPELL}${MESSAGE_COLOR}." && + message "${SPELL_COLOR}${SPELL}${MESSAGE_COLOR} in \"emperor\" mode will pick" \ + "them up immediately.${DEFAULT_COLOR}\n" fi diff --git a/http/uwsgi/HISTORY b/http/uwsgi/HISTORY index 494d56fe85..003ba71d44 100644 --- a/http/uwsgi/HISTORY +++ b/http/uwsgi/HISTORY @@ -1,3 +1,17 @@ +2019-08-30 Vlad Glagolev <stealth@sourcemage.org> + * BUILD: use UWSGI_OPTS + * INSTALL: increase verbosity; moved plugin installation from BUILD so + they're tracked by the installation; install init script config + * FINAL: corrected messaging + * init.d/uwsgi-emperor: use init config + * PRE_BUILD: added, moved build config patching here; made ssl + dependency truly optional + * init.d/uwsgi-emperor.conf: added, init script config + +2019-08-26 Vlad Glagolev <stealth@sourcemage.org> + * DETAILS: updated spell to 2.0.18 + * DEPENDS: correct dependencies; added syslog optional dependency + 2017-05-31 Pavel Vinogradov <public@sourcemage.org> * DETAILS: version 2.0.15 diff --git a/http/uwsgi/INSTALL b/http/uwsgi/INSTALL index 8069d2e62e..838a8926c7 100755 --- a/http/uwsgi/INSTALL +++ b/http/uwsgi/INSTALL @@ -1,10 +1,28 @@ -install -m 0755 ${SPELL} ${INSTALL_ROOT}/usr/bin/${SPELL} && -PLUGIN_DIR=${INSTALL_ROOT}/usr/lib/${SPELL} && -mkdir -p ${PLUGIN_DIR} && -find ${SOURCE_DIRECTORY}/ -name \*plugin.so -exec install -m 0755 '{}' ${PLUGIN_DIR} \; +if is_depends_enabled ${SPELL} python3; then + PYTHON=python3 +else + PYTHON=python2 +fi && + +export PYTHON && + +local PLUGIN_DIR="${INSTALL_ROOT}/usr/lib/uwsgi" && + +install -vm 0755 uwsgi "${INSTALL_ROOT}/usr/bin/uwsgi" && +install -vm 0755 -d "${PLUGIN_DIR}" && + +for plugin in ${OPTS}; do + ${PYTHON} uwsgiconfig.py --plugin plugins/${plugin} core +done + SITE_DIR=$(${PYTHON} -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())") && -install -Dm644 uwsgidecorators.py ${SITE_DIR}/uwsgidecorators.py + +install -Dvm 0644 uwsgidecorators.py "${SITE_DIR}/uwsgidecorators.py" && ${PYTHON} -m py_compile ${SITE_DIR}/uwsgidecorators.py && -if [[ ${INIT_INSTALLED} ]] ; then - mkdir -p ${INSTALL_ROOT}/etc/${SPELL} + +if [[ ${INIT_INSTALLED} ]]; then + install -vm 755 -d "${INSTALL_ROOT}/etc/${SPELL}" && + + install_config_file "${SPELL_DIRECTORY}/init.d/uwsgi-emperor.conf" \ + "${INSTALL_ROOT}/etc/sysconfig/uwsgi-emperor" fi diff --git a/http/uwsgi/PRE_BUILD b/http/uwsgi/PRE_BUILD new file mode 100755 index 0000000000..6de4cf36db --- /dev/null +++ b/http/uwsgi/PRE_BUILD @@ -0,0 +1,8 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && + +if ! is_depends_enabled ${SPELL} $(get_spell_provider ${SPELL} SSL); then + sedit "s:\(ssl =\).*:\1 false:" buildconf/base.ini +fi && + +sedit "/plugin_dir/s;\.;${TRACK_ROOT}/usr/lib/${SPELL};" buildconf/base.ini diff --git a/http/uwsgi/init.d/uwsgi-emperor b/http/uwsgi/init.d/uwsgi-emperor index c04c33bc7c..1858250979 100644 --- a/http/uwsgi/init.d/uwsgi-emperor +++ b/http/uwsgi/init.d/uwsgi-emperor @@ -1,10 +1,11 @@ #!/bin/bash +. /etc/sysconfig/uwsgi-emperor + PIDFILE=/var/run/uwsgi-emperor.pid -LOGFILE=/var/log/uwsgi-emperor.log VASSALS_DIR=/etc/uwsgi PROGRAM=/usr/bin/uwsgi -ARGS="--emperor ${VASSALS_DIR} --pidfile ${PIDFILE} --daemonize ${LOGFILE} --die-on-term" +ARGS="--emperor ${VASSALS_DIR} --pidfile ${PIDFILE} ${UWSGI_EMPEROR_ARGS}" RUNLEVEL=3 NEEDS="+network +remote_fs" diff --git a/http/uwsgi/init.d/uwsgi-emperor.conf b/http/uwsgi/init.d/uwsgi-emperor.conf new file mode 100644 index 0000000000..2661d7a57e --- /dev/null +++ b/http/uwsgi/init.d/uwsgi-emperor.conf @@ -0,0 +1,3 @@ +# For arguments and description see `uwsgi --help` + +UWSGI_EMPEROR_ARGS="--die-on-term --daemonize /dev/null" |