diff options
Diffstat (limited to 'testing/uwsgi')
-rw-r--r-- | testing/uwsgi/APKBUILD | 55 | ||||
-rw-r--r-- | testing/uwsgi/futimes.patch | 22 | ||||
-rw-r--r-- | testing/uwsgi/include-sched.patch | 8 | ||||
-rw-r--r-- | testing/uwsgi/lua-async.patch | 20 |
4 files changed, 105 insertions, 0 deletions
diff --git a/testing/uwsgi/APKBUILD b/testing/uwsgi/APKBUILD new file mode 100644 index 000000000..4d40b10f9 --- /dev/null +++ b/testing/uwsgi/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +# Maintainer: +pkgname=uwsgi +pkgver=1.3 +pkgrel=0 +pkgdesc="uWSGI application container server" +url=http://projects.unbit.it/uwsgi/ +arch=all +license=GPL-2 +makedepends="linux-headers lua-dev python python-dev" +subpackages=uwsgi-lua +source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz futimes.patch include-sched.patch lua-async.patch" + +_builddir=$srcdir/$pkgname-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + export CFLAGS=-D_GNU_SOURCE + python uwsgiconfig.py --build core + python uwsgiconfig.py --plugin plugins/lua core +} + +package() { + cd "$_builddir" + + local bindir=$pkgdir/usr/sbin + install -d "$bindir" + install uwsgi "$bindir" + + local libdir=$pkgdir/usr/lib/uwsgi + install -d "$libdir" + install *_plugin.so "$libdir" +} + +lua() { + depends=uwsgi + + local libdir=$subpkgdir/usr/lib/uwsgi + install -d "$libdir" + mv "$pkgdir/usr/lib/uwsgi/lua_plugin.so" "$libdir" +} + +md5sums="0e83c1ef1b7b01a16c87884d23030ce2 uwsgi-1.3.tar.gz +2c9aeb5b2adf1fa45ef4ed6bda47236a futimes.patch +02c43e001d5f44eb421079e17f9db003 include-sched.patch +eee9b786b235f577776039c1661b0c63 lua-async.patch" diff --git a/testing/uwsgi/futimes.patch b/testing/uwsgi/futimes.patch new file mode 100644 index 000000000..79b525fa0 --- /dev/null +++ b/testing/uwsgi/futimes.patch @@ -0,0 +1,22 @@ +--- uwsgi-1.3/core/spooler.c ++++ uwsgi-1.3.alpine/core/spooler.c +@@ -223,15 +223,15 @@ + } + + if (at > 0) { +- struct timeval tv[2]; ++ struct timespec tv[2]; + tv[0].tv_sec = at; +- tv[0].tv_usec = 0; ++ tv[0].tv_nsec = 0; + tv[1].tv_sec = at; +- tv[1].tv_usec = 0; ++ tv[1].tv_nsec = 0; + #ifdef __sun__ + if (futimesat(fd, NULL, tv)) { + #else +- if (futimes(fd, tv)) { ++ if (futimens(fd, tv)) { + #endif + uwsgi_error("futimes()"); + } diff --git a/testing/uwsgi/include-sched.patch b/testing/uwsgi/include-sched.patch new file mode 100644 index 000000000..914296597 --- /dev/null +++ b/testing/uwsgi/include-sched.patch @@ -0,0 +1,8 @@ +--- uwsgi-1.3/core/utils.c ++++ uwsgi-1.3.alpine/core/utils.c +@@ -1,3 +1,5 @@ ++#include <sched.h> ++ + #include "uwsgi.h" + + diff --git a/testing/uwsgi/lua-async.patch b/testing/uwsgi/lua-async.patch new file mode 100644 index 000000000..89c484afa --- /dev/null +++ b/testing/uwsgi/lua-async.patch @@ -0,0 +1,20 @@ +--- uwsgi-1.3/plugins/lua/lua_plugin.c ++++ uwsgi-1.3.alpine/plugins/lua/lua_plugin.c +@@ -306,6 +306,8 @@ + static int uwsgi_lua_input(lua_State *L) { + + struct wsgi_request *wsgi_req = current_wsgi_req(); ++ int fd = wsgi_req->async_post ? ++ fileno(wsgi_req->async_post) : wsgi_req->poll.fd; + ssize_t sum, len, total; + char *buf, *ptr; + +@@ -328,7 +330,7 @@ + + ptr = buf; + while(total) { +- len = read(wsgi_req->poll.fd, ptr, total); ++ len = read(fd, ptr, total); + ptr += len; + total -= len; + } |