py-uwsgi: update to 2.0.14

2.0.14 changes:
    backported gevent-early-monkey-patch (jianbin-wei)
    Fixed OpenBSD version check (Pavel Korovin)
    PSGI/Perl cache api fixes (Alexander Demenshin)
    Correctly decode PATH_INFo in router_rewrite plugin (Ben Hearsum)
    add uwsgi.accepting() for chain-reload + worker-override combo (enkore)
    fixed workers killing when in cheaper modes (shoham-stratoscale)
    added –cgi-safe option (nnnn20430)
    Implemented graceful reload for COROAE plugin (aleksey-mashanov)
    Added –php-fallback2, –php-fallback-qs (Felicity unixwitch)
    Added ipv4in and ipv6in routing rules (Felicity unixwitch)
    Fixed readline support in python3 when working interactively (Anthony Sottile)
    Implement touch-reloading for mules and spoolers (Alexandre Bonnetain)
    add request_start timestamp in stats (Ben Plotnick)
    Fixed double free in uwsgi_routing_func_rewrite (William Orr)
    Various mod_proxy_uwsgi fixes (Ya-Lin Huang)
    support for ‘no-answer’ in PSGI (Anton Petrusevich)
    added php-constant option (Дамјан Георгиевски [gdamjan])
    added the stdio logger (Дамјан Георгиевски [gdamjan])
    spooler: fix reading inconsistent data (Pavel Patrin)
    Removed -WError from the build procedure (Riccardo Magliocchetti, suggested by Ian Denhardt)
    The usual amount of coverity-based fixes (Riccardo Magliocchetti)

2.0.13.1:

    Fixed support for python 2.5 and python 2.6
    Fixed support for older glibc
    reverted EPOLLEXCLUSIVE patch, requires more investigation

2.0.13:

    Fix compilation with GCC 6
    Remote rpc fixes (Darvame)
    Musl support! (Natanael Copa, Matt Dainty, Riccardo Magliocchetti)
    Create the spooler directory if it does not exist (Alexandre Bonnetain)
    Fix compilation on big endian linux (Riccardo Magliocchetti)
    A ton of cache fixes (Darvame)
    Make it easier to compile plugins on a different directory (Jakub Jirutka)
    Add wheel package machinery (Matt Robenolt)
    Use EPOLLEXCLUSIVE for reading, helps with the thundering herd problem (on linux 4.5+) (INADA Naoki)
    Fix apache 2.4 integration with unix sockets (Alexandre Rossi)
    Add HTTP/2 support to apache 2 proxy (Michael Fladischer, OGAWA Hirofumi)
    Fix apache mod proxy compilation with apache 2.4.20 (Mathieu Arnold)
    Default to clang as default compiler on MacOS X (Riccardo Magliocchetti)
    Added –cgi-close-stdin-on-eof (Roberto De Ioris)

2.0.12:

Bugfixes

    ‘rpcvar’ routing action correctly returns NEXT on empty response
    uwsgiconfig: fix handling of empty keys in python3 (Simone Basso)
    plugins/alarm_speech: fix AppKit spelling to support case-sensitive filesystems (Andrew Janke)
    Fix inheriting INET address 0.0.0.0 (INADA Naoki)
    core/xmlconf: correctly initialize libxml2 (Riccardo Magliocchetti)
    Pass LIBDIR to linker in python plugin (Borys Pierov)
    Platforms-related build fixes for pty, forkptyrouter and mono plugins (Jonas Smedegaard and Riccardo Magliocchetti)


New Features and Backports
The custom worker api

Finally you are able to override the uWSGI processing model to completely get control of it. This is very similar to what you can do in projects like gunicorn (and its integration with tornado or gevent). Obviously native plugins are still the best approach (they allow integration with uWSGI api and states), but in some case you may want to use uWSGI process management facilities and let your app do the rest of the work.

Currently only the python plugin supports “overriding” of workers, an aiohttp (asyncio) example module is available:

https://github.com/unbit/uwsgi-docs/blob/master/WorkerOverride.rst
–wsgi-disable-file-wrapper

This option disables the wsgi.file_wrapper optimization of the WSGI standard. In some corner case this is the only trick to avoid errors.
Official PHP 7 support

PHP 7 is now officially supported in the php plugin.
uwsgi.spooler_get_task api (Credits: Alexandre Bonnetain)

This patch allows you to easily parse spooler files.

Check the example/test here:

https://github.com/unbit/uwsgi/blob/master/t/spooler/read.py
–if-hostname-match (Credits: Alexandre Bonnetain)

This options for config logic allows you to define options only when a regexp over the hostname matches:

[uwsgi]
if-hostname-match = ^prod
  threads = 20
endif =


2.0.11.2:

Bugfixes

    OSX 10.11 supports TCP_FASTOPEN
    fixed http-socket parser state after harakiri
    fixed threaded request logger
    fixed fastrouter subscriptions modifiers
    fixed alarm backlog

2.0.11.1:

Bugfixes

    fixed HTTPS router resource deallocation and fiel descriptors leak
    do not spit out ssl errors when errno is 0

New Features
The unix_signal hook

You can now remap UNIX signals to specific functions symbols

2.0.11:

Bugfixes

    [pypy] fixed misuse of ffi.string
    fixed detection for gcc 5 (jimfunk)
    fixed shared sockets for gateways
    [psgi] Changed abs to labs because offset is declared as a long (Peter H. Ezetta)
    add null terminator to uwsgi_get_dot_h() and uwsgi_config_py() (Jay Oster)
    fixed thread waiting during stop/restart (Kaiwen Xu)
    fixed chain reloading verbosity
    [python] fixed spooler job reference counting (Curtis Maloney)
    various static analysis improvements (Riccardo Magliocchetti)
    fixed sharedarea support for very big ranges
    fixed gzip transformation for zero-sized responses (Curtis Maloney)
    fixed management of https client certificate authentication (Vladimir Didenko)
    fixed OpenBSD build
    fixed TMPFILE permissions

New Features
The mem_collector thread

Evil memory monitors (like –evil-reload-on-rss) are now asynchronously managed by a dedicated thread.

This solves the issue of runaway processes not catched by the master.
fixpathinfo routing action

This is another step in removing the need of the infamous uwsgi_modifier1 30 relic.

This routing action assumes the PATH_INFO cgi var has the SCRIPT_NAME part included.

This action allows you to set SCRIPT_NAME in nginx without bothering to rewrite the PATH_INFO (something nginx cannot afford)

[uwsgi]
; blindly assumes PATH_INFO is clobbered with SCRIPT_NAME
route-run = fixpathinfo:

uwsgi[sor] and time[micros] routing vars

This two new vars exposes the start of the current request (in micros) and the current time (again in micros)

[uwsgi]
route-run = log:request started at ${uwsgi[sor]}
route-run = log:current micros time is ${time[micros]}

wait-for-socket

This works like wait-for-fs/iface/file/dir

The spawn of the instance is suspended until the specified tcp/unix socket is ready.

You can use it to synchronize vassals spawn (like stopping a vassal until a postgresql server has been spawned)
wait_for hooks

All of the wait-for-* functions can now be used as a hook:

[uwsgi]
; wait for postgres soon after privileges drop
hook-as-user = wait_for_socket:127.0.0.1:5432
This commit is contained in:
maya 2016-11-04 21:38:59 +00:00
parent e17e6c0fe6
commit 8bad2a667c
7 changed files with 18 additions and 94 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.33 2016/08/28 15:48:37 wiz Exp $
# $NetBSD: Makefile,v 1.34 2016/11/04 21:38:59 maya Exp $
DISTNAME= uwsgi-2.0.10
DISTNAME= uwsgi-2.0.14
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
PKGREVISION= 2
CATEGORIES= python www
MASTER_SITES= http://projects.unbit.it/downloads/

View file

@ -1,14 +1,10 @@
$NetBSD: distinfo,v 1.27 2016/01/11 22:57:00 joerg Exp $
$NetBSD: distinfo,v 1.28 2016/11/04 21:38:59 maya Exp $
SHA1 (uwsgi-2.0.10.tar.gz) = 31bae2dac113af8d95dbc9b982df139ff61ce209
RMD160 (uwsgi-2.0.10.tar.gz) = 24d9f7528ed3d5f20b962a60512ab9ab1a43ef35
SHA512 (uwsgi-2.0.10.tar.gz) = 027f2ad94f5213f5de13c08670a5f084b7d4e5aa1670550fd5ff012d016f8c0e162dbd3962d5a3d16e5202996141bb92bb025e4c0ef40a646cfb6f2368aec857
Size (uwsgi-2.0.10.tar.gz) = 779820 bytes
SHA1 (uwsgi-2.0.14.tar.gz) = b500ed76dd791d09ce57304c55b724ca74b2ab9b
RMD160 (uwsgi-2.0.14.tar.gz) = 9438fd8d50c92c86b657f227a92358a32e046121
SHA512 (uwsgi-2.0.14.tar.gz) = cf557ba27cb1c28e784e8909043bca874cd56846aa9ebaf1ff229191ad20484e467147a6ea7cc629399d4afd6e4ac4479b2f6827729df04321eef4bf842b9e42
Size (uwsgi-2.0.14.tar.gz) = 788971 bytes
SHA1 (patch-base.ini) = 1c5d7693e6c8011e6cc34f5f5d203584c985eb30
SHA1 (patch-core_logging.c) = bce3b6fe0e54d25ad631671363b0872f9084e0f2
SHA1 (patch-plugins_cgi_cgi__plugin.c) = f163383c837069b046d2677c8b6dc71501c5defa
SHA1 (patch-plugins_gccgo_gccgo__plugin.c) = 5e26ef0bbcee33234444552bb160f8c5862104ce
SHA1 (patch-plugins_jwsgi_jwsgi__plugin.c) = 9feaa75262e86b96f28fd46f097da05e7ee7ee0a
SHA1 (patch-plugins_lua_lua__plugin.c) = 2e94763765176256663f6d440d157221a71889d6
SHA1 (patch-core_logging.c) = 8978d42354dd607ed28c00f514cbd296bcb6666d
SHA1 (patch-uwsgi.h) = 64b5f6ea310bf6c65c1f546e160fcd0bd94a3808
SHA1 (patch-uwsgiconfig.py) = aab47457f2fafb0206a53913ef3777700175d020

View file

@ -1,15 +1,15 @@
$NetBSD: patch-core_logging.c,v 1.1 2015/04/06 02:35:54 rodent Exp $
$NetBSD: patch-core_logging.c,v 1.2 2016/11/04 21:39:00 maya Exp $
Fix build for OpenBSD and Bitrig.
Fix build for Bitrig.
--- core/logging.c.orig 2015-03-17 07:34:34.000000000 +0000
--- core/logging.c.orig 2016-10-03 08:16:59.000000000 +0000
+++ core/logging.c
@@ -13,7 +13,7 @@
#define _FILE_OFFSET_BITS 64
@@ -1,7 +1,7 @@
#ifndef __DragonFly__
#include <uwsgi.h>
#endif
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__Bitrig__)
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__Bitrig__)
#include <sys/user.h>
#include <sys/sysctl.h>
#endif
#include <kvm.h>

View file

@ -1,18 +0,0 @@
$NetBSD: patch-plugins_cgi_cgi__plugin.c,v 1.1 2016/01/11 22:57:00 joerg Exp $
--- plugins/cgi/cgi_plugin.c.orig 2016-01-11 16:11:06.000000000 +0000
+++ plugins/cgi/cgi_plugin.c
@@ -763,12 +763,11 @@ clear2:
}
// fill cgi env
- for(i=0;i<wsgi_req->var_cnt;i++) {
+ for(i=0;i<wsgi_req->var_cnt;i+=2) {
// no need to free the putenv() memory
if (putenv(uwsgi_concat3n(wsgi_req->hvec[i].iov_base, wsgi_req->hvec[i].iov_len, "=", 1, wsgi_req->hvec[i+1].iov_base, wsgi_req->hvec[i+1].iov_len))) {
uwsgi_error("putenv()");
}
- i++;
}

View file

@ -1,15 +0,0 @@
$NetBSD: patch-plugins_gccgo_gccgo__plugin.c,v 1.1 2016/01/11 22:57:00 joerg Exp $
--- plugins/gccgo/gccgo_plugin.c.orig 2016-01-11 16:11:52.000000000 +0000
+++ plugins/gccgo/gccgo_plugin.c
@@ -233,9 +233,8 @@ static int uwsgi_gccgo_request(struct ws
wsgi_req->async_environ = uwsgigo_env(wsgi_req);
int i;
- for(i=0;i<wsgi_req->var_cnt;i++) {
+ for(i=0;i<wsgi_req->var_cnt;i+=2) {
uwsgigo_env_add(wsgi_req->async_environ, wsgi_req->hvec[i].iov_base, wsgi_req->hvec[i].iov_len, wsgi_req->hvec[i+1].iov_base, wsgi_req->hvec[i+1].iov_len);
- i++;
}
uwsgigo_request(wsgi_req->async_environ, wsgi_req);
end:

View file

@ -1,19 +0,0 @@
$NetBSD: patch-plugins_jwsgi_jwsgi__plugin.c,v 1.1 2016/01/11 22:57:00 joerg Exp $
--- plugins/jwsgi/jwsgi_plugin.c.orig 2016-01-11 16:11:52.000000000 +0000
+++ plugins/jwsgi/jwsgi_plugin.c
@@ -71,13 +71,12 @@ static int uwsgi_jwsgi_request(struct ws
if (!hm) return -1;
int i;
- for(i=0;i<wsgi_req->var_cnt;i++) {
+ for(i=0;i<wsgi_req->var_cnt;i+=) {
char *hk = wsgi_req->hvec[i].iov_base;
uint16_t hk_l = wsgi_req->hvec[i].iov_len;
char *hv = wsgi_req->hvec[i+1].iov_base;
uint16_t hv_l = wsgi_req->hvec[i+1].iov_len;
if (uwsgi_jwsgi_add_request_item(hm, hk, hk_l, hv, hv_l)) goto end;
- i++;
}
if (uwsgi_jwsgi_add_request_input(hm, "jwsgi.input", 11)) goto end;

View file

@ -1,19 +0,0 @@
$NetBSD: patch-plugins_lua_lua__plugin.c,v 1.1 2016/01/11 22:57:00 joerg Exp $
--- plugins/lua/lua_plugin.c.orig 2016-01-11 16:11:52.000000000 +0000
+++ plugins/lua/lua_plugin.c
@@ -764,13 +764,12 @@ static int uwsgi_lua_request(struct wsgi
lua_newtable(L);
lua_pushstring(L, "");
lua_setfield(L, -2, "CONTENT_TYPE");
- for(i=0;i<wsgi_req->var_cnt;i++) {
+ for(i=0;i<wsgi_req->var_cnt;i+=2) {
lua_pushlstring(L, (char *)wsgi_req->hvec[i+1].iov_base, wsgi_req->hvec[i+1].iov_len);
// transform it in a valid c string TODO this is ugly
ptrbuf = wsgi_req->hvec[i].iov_base+wsgi_req->hvec[i].iov_len;
*ptrbuf = 0;
lua_setfield(L, -2, (char *)wsgi_req->hvec[i].iov_base);
- i++;
}