Mercurial > hgrepos > FreeBSD > ports > www > uwsginl
changeset 174:72804fc47f7c origin
Update to latest snapshot of 2.0.28.
Has been tagged at 2024-10-26.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 08 Mar 2025 19:34:51 +0100 |
| parents | df2620ce614c |
| children | c567b3394ef8 |
| files | Makefile distinfo files/patch-core_socket.c files/patch-plugins_corerouter_corerouter.c files/patch-plugins_coroae_uwsgiplugin.py files/patch-proto_base.c |
| diffstat | 6 files changed, 77 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Jan 16 22:10:04 2024 +0100 +++ b/Makefile Sat Mar 08 19:34:51 2025 +0100 @@ -1,9 +1,9 @@ PORTNAME= uwsgi -PORTVERSION= 2.0.21 +PORTVERSION= 2.0.28 CATEGORIES= www python PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} -MAINTAINER= amdmi3@FreeBSD.org +MAINTAINER= wen@FreeBSD.org COMMENT= Developer-friendly WSGI server which uses uwsgi protocol WWW= https://projects.unbit.it/uwsgi/
--- a/distinfo Tue Jan 16 22:10:04 2024 +0100 +++ b/distinfo Sat Mar 08 19:34:51 2025 +0100 @@ -1,3 +1,3 @@ -TIMESTAMP = 1667404884 -SHA256 (unbit-uwsgi-2.0.21_GH0.tar.gz) = 35a30d83791329429bc04fe44183ce4ab512fcf6968070a7bfba42fc5a0552a9 -SIZE (unbit-uwsgi-2.0.21_GH0.tar.gz) = 808494 +TIMESTAMP = 1734750335 +SHA256 (unbit-uwsgi-2.0.28_GH0.tar.gz) = 4bb0762c5becb0414352cca664957206df4d6847e9a1c472e87708dc2cdad610 +SIZE (unbit-uwsgi-2.0.28_GH0.tar.gz) = 815887
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/patch-core_socket.c Sat Mar 08 19:34:51 2025 +0100 @@ -0,0 +1,48 @@ +Fix SOCK_NONBLOCK handling for FreeBSD, copied from NetBSD. +--- core/socket.c.orig 2024-06-05 01:53:18 UTC ++++ core/socket.c +@@ -413,7 +413,7 @@ static int connect_to_unix(char *socket_name, int time + memcpy(uws_addr.sun_path, socket_name, UMIN(strlen(socket_name), 102)); + } + +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + uwsgi_poll.fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); + #else + uwsgi_poll.fd = socket(AF_UNIX, SOCK_STREAM, 0); +@@ -453,7 +453,7 @@ static int connect_to_tcp(char *socket_name, int port, + uws_addr.sin_addr.s_addr = inet_addr(socket_name); + } + +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + uwsgi_poll.fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); + #else + uwsgi_poll.fd = socket(AF_INET, SOCK_STREAM, 0); +@@ -827,7 +827,7 @@ int timed_connect(struct pollfd *fdpoll, const struct + int cnt; + /* set non-blocking socket */ + +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + // hmm, nothing to do, as we are already non-blocking + #else + int arg = fcntl(fdpoll->fd, F_GETFL, NULL); +@@ -861,7 +861,7 @@ int timed_connect(struct pollfd *fdpoll, const struct + } + + +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + uwsgi_socket_b(fdpoll->fd); + #else + /* re-set blocking socket */ +@@ -1907,7 +1907,7 @@ int uwsgi_accept(int server_fd) { + struct sockaddr_un client_src; + memset(&client_src, 0, sizeof(struct sockaddr_un)); + socklen_t client_src_len = 0; +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + return accept4(server_fd, (struct sockaddr *) &client_src, &client_src_len, SOCK_NONBLOCK); + #elif defined(__linux__) + int client_fd = accept(server_fd, (struct sockaddr *) &client_src, &client_src_len);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/patch-plugins_corerouter_corerouter.c Sat Mar 08 19:34:51 2025 +0100 @@ -0,0 +1,12 @@ +Fix SOCK_NONBLOCK handling for FreeBSD, copied from NetBSD. +--- plugins/corerouter/corerouter.c.orig 2024-06-05 01:59:02 UTC ++++ plugins/corerouter/corerouter.c +@@ -822,7 +822,7 @@ void uwsgi_corerouter_loop(int id, void *data) { + while (ugs) { + if (ugs->gateway == &ushared->gateways[id] && ucr->interesting_fd == ugs->fd) { + if (!ugs->subscription) { +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + new_connection = accept4(ucr->interesting_fd, (struct sockaddr *) &cr_addr, &cr_addr_len, SOCK_NONBLOCK); + if (new_connection < 0) { + taken = 1;
--- a/files/patch-plugins_coroae_uwsgiplugin.py Tue Jan 16 22:10:04 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- plugins/coroae/uwsgiplugin.py.orig 2020-06-17 09:03:34 UTC -+++ plugins/coroae/uwsgiplugin.py -@@ -9,7 +9,7 @@ for p in search_paths: - coroapi = p - - if not coroapi: -- print "unable to find the Coro perl module !!!" -+ print("unable to find the Coro perl module !!!") - sys.exit(1) - - NAME='coroae'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files/patch-proto_base.c Sat Mar 08 19:34:51 2025 +0100 @@ -0,0 +1,12 @@ +Fix SOCK_NONBLOCK handling for FreeBSD, copied from NetBSD. +--- proto/base.c.orig 2024-06-05 02:00:36 UTC ++++ proto/base.c +@@ -97,7 +97,7 @@ int uwsgi_proto_base_accept(struct wsgi_request *wsgi_ + int uwsgi_proto_base_accept(struct wsgi_request *wsgi_req, int fd) { + + wsgi_req->c_len = sizeof(struct sockaddr_un); +-#if defined(__linux__) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) ++#if (defined(__linux__) ||defined(__FreeBSD__)) && defined(SOCK_NONBLOCK) && !defined(OBSOLETE_LINUX_KERNEL) + return accept4(fd, (struct sockaddr *) &wsgi_req->client_addr, (socklen_t *) & wsgi_req->c_len, SOCK_NONBLOCK); + #elif defined(__linux__) + int client_fd = accept(fd, (struct sockaddr *) &wsgi_req->client_addr, (socklen_t *) & wsgi_req->c_len);
