aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-02-10 13:58:27 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-02-10 16:11:06 +0000
commitf6028422aa3fb9ab7b94e4540e1093b37bbafaf8 (patch)
tree44af7f4880336e181e2c17ac2dd45ce243766a8f /testing
parent62ceb9126266ce5690887435ee17dec1acae0cab (diff)
downloadaports-f6028422aa3fb9ab7b94e4540e1093b37bbafaf8.tar.bz2
aports-f6028422aa3fb9ab7b94e4540e1093b37bbafaf8.tar.xz
testing/uwsgi: upgrade to 2.0.1 and fix musl build
Diffstat (limited to 'testing')
-rw-r--r--testing/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch40
-rw-r--r--testing/uwsgi/0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch31
-rw-r--r--testing/uwsgi/0003-always-define-_GNU_SOURCE-for-linux.patch64
-rw-r--r--testing/uwsgi/0004-define-WAIT_ANY-if-missing.patch34
-rw-r--r--testing/uwsgi/APKBUILD53
-rw-r--r--testing/uwsgi/musl-fix-python.patch13
6 files changed, 209 insertions, 26 deletions
diff --git a/testing/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch b/testing/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
new file mode 100644
index 0000000000..cab800620a
--- /dev/null
+++ b/testing/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
@@ -0,0 +1,40 @@
+From 1a09a7264026339d8e0c4899a2f9ff488c0bd97d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Feb 2014 12:13:00 +0000
+Subject: [PATCH 1/4] use portable pthread functions instead of the
+ non-portable
+
+The pthread functions pthread_mutexattr_setrobust and
+pthread_mutex_consistent are in posix nowdays. Use those instead of their
+non-portable synonyms.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ core/lock.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/lock.c b/core/lock.c
+index d368148..f806b2c 100644
+--- a/core/lock.c
++++ b/core/lock.c
+@@ -99,7 +99,7 @@ retry:
+ exit(1);
+ }
+ if (uwsgi_pthread_robust_mutexes_enabled) {
+- if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST)) {
++ if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
+ uwsgi_log("unable to make the mutex 'robust'\n");
+ exit(1);
+ }
+@@ -161,7 +161,7 @@ void uwsgi_lock_fast(struct uwsgi_lock_item *uli) {
+ #ifdef EOWNERDEAD
+ if (pthread_mutex_lock((pthread_mutex_t *) uli->lock_ptr) == EOWNERDEAD) {
+ uwsgi_log("[deadlock-detector] a process holding a robust mutex died. recovering...\n");
+- pthread_mutex_consistent_np((pthread_mutex_t *) uli->lock_ptr);
++ pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
+ }
+ #else
+ pthread_mutex_lock((pthread_mutex_t *) uli->lock_ptr);
+--
+1.8.5.3
+
diff --git a/testing/uwsgi/0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch b/testing/uwsgi/0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
new file mode 100644
index 0000000000..8ab4d9ffff
--- /dev/null
+++ b/testing/uwsgi/0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
@@ -0,0 +1,31 @@
+From ab68dc90d3a6e3ae660adb65cf8a020d91eb8f09 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Feb 2014 12:17:18 +0000
+Subject: [PATCH 2/4] Check for GNU libc instead of linux for use of execinfo.h
+
+Since execinfo.h is a GNU extension it makes more sense to check for GNU
+than to assume that linux is GNU.
+
+This is needed for building on linux with musl libc.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ core/uwsgi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/core/uwsgi.c b/core/uwsgi.c
+index 67b175b..b3b25ae 100644
+--- a/core/uwsgi.c
++++ b/core/uwsgi.c
+@@ -1690,7 +1690,7 @@ void uwsgi_plugins_atexit(void) {
+
+ void uwsgi_backtrace(int depth) {
+
+-#if defined(__linux__) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
++#if defined(__GLIBC__) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
+
+ #include <execinfo.h>
+
+--
+1.8.5.3
+
diff --git a/testing/uwsgi/0003-always-define-_GNU_SOURCE-for-linux.patch b/testing/uwsgi/0003-always-define-_GNU_SOURCE-for-linux.patch
new file mode 100644
index 0000000000..5b02cb6ef4
--- /dev/null
+++ b/testing/uwsgi/0003-always-define-_GNU_SOURCE-for-linux.patch
@@ -0,0 +1,64 @@
+From c6ddb3e4ca72f6ec8662f8a18674eb4d861561b8 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Feb 2014 13:03:50 +0000
+Subject: [PATCH 3/4] always define _GNU_SOURCE for linux
+
+We are using various extenstions that the spec say depends on _GNU_SOURCE,
+for example unshare, CPU_SET, CPU_ZERO, cpu_set_t. We enable those always
+for linux and we never unset it.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ uwsgi.h | 18 +++++-------------
+ 1 file changed, 5 insertions(+), 13 deletions(-)
+
+diff --git a/uwsgi.h b/uwsgi.h
+index b3ce4f7..3131a0f 100644
+--- a/uwsgi.h
++++ b/uwsgi.h
+@@ -149,29 +149,22 @@ extern "C" {
+ #endif
+ #endif
+
++#ifdef __linux__
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+-#include <stdio.h>
+-#ifdef __UCLIBC__
+-#include <sched.h>
++#ifndef __USE_GNU
++#define __USE_GNU
++#endif
+ #endif
+-#undef _GNU_SOURCE
+
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+ #include <signal.h>
+ #include <math.h>
+
+ #include <sys/types.h>
+-#ifdef __linux__
+-#ifndef _GNU_SOURCE
+-#define _GNU_SOURCE
+-#endif
+-#ifndef __USE_GNU
+-#define __USE_GNU
+-#endif
+-#endif
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #ifdef __linux__
+@@ -179,7 +172,6 @@ extern "C" {
+ #define MSG_FASTOPEN 0x20000000
+ #endif
+ #endif
+-#undef _GNU_SOURCE
+ #include <netinet/in.h>
+
+ #include <termios.h>
+--
+1.8.5.3
+
diff --git a/testing/uwsgi/0004-define-WAIT_ANY-if-missing.patch b/testing/uwsgi/0004-define-WAIT_ANY-if-missing.patch
new file mode 100644
index 0000000000..1281752111
--- /dev/null
+++ b/testing/uwsgi/0004-define-WAIT_ANY-if-missing.patch
@@ -0,0 +1,34 @@
+From 393de27d01710718ffedf46cbbe20c5a1d559c9e Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Feb 2014 13:15:07 +0000
+Subject: [PATCH 4/4] define WAIT_ANY if missing
+
+POSIX uses -1 and does not define WAIT_ANY so we need to define it if
+needed.
+
+See:
+http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html
+http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ uwsgi.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/uwsgi.h b/uwsgi.h
+index 3131a0f..7a0d93e 100644
+--- a/uwsgi.h
++++ b/uwsgi.h
+@@ -257,6 +257,9 @@ extern int pivot_root(const char *new_root, const char *put_old);
+ #include <stdint.h>
+
+ #include <sys/wait.h>
++#ifndef WAIT_ANY
++#define WAIT_ANY (-1)
++#endif
+
+ #ifdef __APPLE__
+ #ifndef MAC_OS_X_VERSION_MIN_REQUIRED
+--
+1.8.5.3
+
diff --git a/testing/uwsgi/APKBUILD b/testing/uwsgi/APKBUILD
index 6c74451b6f..cb4c8febc7 100644
--- a/testing/uwsgi/APKBUILD
+++ b/testing/uwsgi/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uwsgi
-pkgver=2.0
+pkgver=2.0.1
pkgrel=0
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
@@ -11,11 +11,12 @@ makedepends="linux-headers lua5.2-dev python python-dev zeromq-dev paxctl
pcre-dev"
source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz
uwsgi.initd uwsgi.confd
- 0001-core-socket-common-socket-creation-function-for-bind.patch
- 0002-core-socket-move-socket-buffer-size-setting-to-creat.patch
- 0003-core-socket-move-listen-queue-size-checking-to-creat.patch
- 0004-core-socket-move-SO_REUSEADDR-setting-to-create_serv.patch
- 0005-option-for-closing-server-sockets-when-spawning.patch
+
+ 0001-use-portable-pthread-functions-instead-of-the-non-po.patch
+ 0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
+ 0003-always-define-_GNU_SOURCE-for-linux.patch
+ 0004-define-WAIT_ANY-if-missing.patch
+ musl-fix-python.patch
"
_plugins="lua python router_uwsgi"
@@ -37,10 +38,10 @@ prepare() {
build() {
cd "$_builddir"
- export CFLAGS=-D_GNU_SOURCE
msg "building core"
- python uwsgiconfig.py --build core || return 1
+ # ccache seems to trigger some weird bug on musl
+ CC="gcc" python uwsgiconfig.py --build core || return 1
export UWSGICONFIG_LUAPC="lua5.2"
for i in $_plugins; do
@@ -79,27 +80,27 @@ for _p in $_plugins; do
eval "_$_p() { _plugin $_p; }"
done
-md5sums="e4ab884be53a18c40975da1f9f14ef3d uwsgi-2.0.tar.gz
+md5sums="e7234f16ddfb4fe5d0b5d5fa76dc17e1 uwsgi-2.0.1.tar.gz
8a8be061d7b5f3108a0f16813da68389 uwsgi.initd
3d6afe6a8c52556d1d6c52384fc38d9a uwsgi.confd
-cc169ef121e428c85551c470640220b4 0001-core-socket-common-socket-creation-function-for-bind.patch
-e4a8c9ff5826b752c046cf1e35190a6f 0002-core-socket-move-socket-buffer-size-setting-to-creat.patch
-fa18c76cca3020fee9ce6cb3cebe6ef3 0003-core-socket-move-listen-queue-size-checking-to-creat.patch
-9c381a6ed3ca0efad0a1640bdd19793e 0004-core-socket-move-SO_REUSEADDR-setting-to-create_serv.patch
-b5d18b3642a6b671f4a8e7531fbb0670 0005-option-for-closing-server-sockets-when-spawning.patch"
-sha256sums="297073c85dc7a6b104f6367778cf7604bedd685a977b320b36dd46b0b11a8af0 uwsgi-2.0.tar.gz
+a7f98e2775e9f38a0f16c28332745836 0001-use-portable-pthread-functions-instead-of-the-non-po.patch
+b40fe76f34674874815c39a7e611f259 0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
+43e4edbe50bde1096e8ca03297a1f271 0003-always-define-_GNU_SOURCE-for-linux.patch
+1ee8996f7cced9dc88515c69c04dd79a 0004-define-WAIT_ANY-if-missing.patch
+87c16f6fe482c9b0eac0d33c51873f45 musl-fix-python.patch"
+sha256sums="e84e498c217a793571f803d04fca4f2877dd856e9c5af1e66e645132d70c7cc2 uwsgi-2.0.1.tar.gz
58b998b025e4a9df20ca917bc93e287f9a8cf02d278d513fa461f70e1d08f799 uwsgi.initd
4cb047e311aecd0f498da1d6a4c0947dd6dc7cc98575d54cb2ef150cacf8425c uwsgi.confd
-b986e7d72ad246bdff01c18129e9e12cde88fe4c53aacd6550c6ab32a16dcc1b 0001-core-socket-common-socket-creation-function-for-bind.patch
-445a145f48d79b808d0d2664d23fb9c8bcb5836cc00967e03387e8698681074b 0002-core-socket-move-socket-buffer-size-setting-to-creat.patch
-96d782e52b9edf835c6aa71c4ffc79e90f20022cf16dc2f0f9bf628a4aefd2fe 0003-core-socket-move-listen-queue-size-checking-to-creat.patch
-63c3775d20cd1905bda1c086132fa10a0b70e9c80513f854d09342c071f5b3cd 0004-core-socket-move-SO_REUSEADDR-setting-to-create_serv.patch
-135927e845ea5405cb11894f9a2989ac425db9a3b4242f7d1a916c47a163cb7a 0005-option-for-closing-server-sockets-when-spawning.patch"
-sha512sums="ee4b3602749b5b0352717001a6ea3d252c80f2d0d0b8ac0c21b3fbb49df7ff911f4211a1cb6f23afe1716f1b3a6f856236b6cd48a0f82d618a6d52dbf13f13b3 uwsgi-2.0.tar.gz
+b61bf4da3d022ddfd93a73196300cb86d962f8f6198079d11b727f61c0f8acb4 0001-use-portable-pthread-functions-instead-of-the-non-po.patch
+360ede589ad228f31dd06fbf8dc17d86d60e968ae76a61b3ca258a2c5ae6f007 0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
+6cefd10432900518b3c19ee7f2a20b6b1f722b6d6e7ad43e4c3ad1be3daf43ee 0003-always-define-_GNU_SOURCE-for-linux.patch
+82a2c13162387efcafa388038602d783f8a7e71c28d56ab3ac6b94abeba474d3 0004-define-WAIT_ANY-if-missing.patch
+3838e8e3926a1f6271bb5aa88d309837a3bcd06cd570c499b72ca549326c682e musl-fix-python.patch"
+sha512sums="91d134413beac4d36ad4c1334410bd4d68a1bd53b4700da00e39f17fe01b1059457a102a9835ee09f8971b26597766ec8812afb5219c4774c2c7dbc025bcf617 uwsgi-2.0.1.tar.gz
ab9dc6277bd05821287f6f8beb3ac2504f0e41db38e11b4d2884ac026f14ac7bfaaca138f045afa712d4f2843f94de105bf0d43fad35d18679ac33b507cd187e uwsgi.initd
9f00afb2aa574bbc59040f945475712b8c40da0c06eeb5699de5510aa116148e35ab0429fa891084cf0cd7868876d5a80e1601b7c85d0e2e9ea2a1f54cdde619 uwsgi.confd
-50828a048384aa5e71832e135f295cc44b39887c4adc22c273328726a10803c914da1d113d6dfbcd54058ed46ce9affd24219de4e21f91f8bb383926ffa29cc1 0001-core-socket-common-socket-creation-function-for-bind.patch
-41662a2f92b38788b3b7f4057ba5ec645dc448ca804c00b762997badd3652209a5edb853b2cbc43e5ed3a78e956c57c66c5f648406f0b775d018c84c756b69a2 0002-core-socket-move-socket-buffer-size-setting-to-creat.patch
-112e5702d89ed9a9bcbf1ae69f68faf14f50837f787c9dc219fa16c8e55c94db2e668c735cb5220bcb1c7349b1b4da0479d72e2dfe1609c7ad38418e7b49106f 0003-core-socket-move-listen-queue-size-checking-to-creat.patch
-4ea108f19174b00146f9948b7c9e3272299c7e2cbfaf339753866971e94d8ccf6ba914d2a6d5064f32a33424b97099aac97c31bee3b5eba64bee7bd321c2a8ad 0004-core-socket-move-SO_REUSEADDR-setting-to-create_serv.patch
-d04869f43bd91c8117698f4ff9f775766afef7b9849b757dc43357a247e09d903b6b6561391d86bfcfda75f84c7924f5b5df7f5091c32dac0ce15634f69c4659 0005-option-for-closing-server-sockets-when-spawning.patch"
+d105c487d8bd0b496cfac2dad6090f0e420805a83dca514bfbea97c687be26d7a8b9545add0f999cb67eb66818b05995405f9a874b970f53aa38ff5ce3bbdc02 0001-use-portable-pthread-functions-instead-of-the-non-po.patch
+f4038ab866f445a94e155f4b73d308959c402e81227401bc7a5fe2165b888a2c8d95141245a2c10b186782934a4103c785769afaf4091fe3fe5524ed3c270fcf 0002-Check-for-GNU-libc-instead-of-linux-for-use-of-execi.patch
+fc13550528121a1c8ecd530b38ea63f3802cb6d829ec18e55e485acb592b29bed8afe4d23a5f8b9baf8076a00f72d45e8b48c5c56e8c05299b7a1ea7a0ee2e77 0003-always-define-_GNU_SOURCE-for-linux.patch
+deb9fb2f125b80534e8176d32ec7cd85d49225339ccd989cfb463f5b38aa0869841c4bf9a2a97e0ed1c38b999599edb057b9aae17bdad96dad68970362e8bbc3 0004-define-WAIT_ANY-if-missing.patch
+de68b16b44e554a79c073c9befa10566796316dbf4c375b4d6b633d80b0282694cca233f0a70f3d6570584324f14276826bbeb8f38b550c00087a05f9ba9227f musl-fix-python.patch"
diff --git a/testing/uwsgi/musl-fix-python.patch b/testing/uwsgi/musl-fix-python.patch
new file mode 100644
index 0000000000..b4b8fd240f
--- /dev/null
+++ b/testing/uwsgi/musl-fix-python.patch
@@ -0,0 +1,13 @@
+diff --git a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h
+index 0c5c1c8..5c0dc6d 100644
+--- a/plugins/python/uwsgi_python.h
++++ b/plugins/python/uwsgi_python.h
+@@ -1,4 +1,8 @@
+ #include <uwsgi.h>
++/* seems like Python.h explicitlyl redefines _GNU_SOURCE */
++#ifdef _GNU_SOURCE
++#undef _GNU_SOURCE
++#endif
+ #include <Python.h>
+
+ #include <frameobject.h>