changeset 118:20416e8b70cc origin

Update to 2.0.19.1
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 16 May 2021 15:55:19 +0200
parents 5f9369cd567d
children d07a6ab6455d 87b78aefbb31
files Makefile distinfo files/patch-core-logging.c files/patch-plugins_coroae_uwsgiplugin.py files/uwsgi.in
diffstat 5 files changed, 61 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Jun 11 22:35:08 2020 +0200
+++ b/Makefile	Sun May 16 15:55:19 2021 +0200
@@ -1,8 +1,8 @@
 # Created by: Daniel Gerzo <danger@FreeBSD.org>
-# $FreeBSD: head/www/uwsgi/Makefile 518934 2019-12-03 11:48:45Z amdmi3 $
 
 PORTNAME=	uwsgi
-PORTVERSION=	2.0.18
+PORTVERSION=	2.0.19.1
+PORTREVISION=	1
 CATEGORIES=	www python
 MASTER_SITES=	http://projects.unbit.it/downloads/
 
@@ -12,7 +12,7 @@
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		pkgconfig python
+USES=		pkgconfig python:3.6+
 USE_PYTHON=	distutils concurrent optsuffix
 USE_RC_SUBR=	uwsgi
 
@@ -34,11 +34,16 @@
 OPTIONS_DEFAULT=	SSL
 
 OPTIONS_GROUP=		PLG
-OPTIONS_GROUP_PLG=	PSGI
+OPTIONS_GROUP_PLG=	COROAE LOGPIPE PSGI
 
 PLG_DESC=		Enable plugins
+COROAE_DESC=		Coro::AnyEvent support
+LOGPIPE_DESC=		Pipe logger support
 PSGI_DESC=		PSGI embedded plugin
 
+COROAE_BUILD_DEPENDS=	p5-Coro>=0:devel/p5-Coro
+COROAE_IMPLIES=		PSGI
+
 DEBUG_VARS=		PYDISTUTILS_BUILDARGS+=--debug
 
 JSON_VARS=		BUILDCONF_JSON=jansson
@@ -62,8 +67,11 @@
 	@${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}:Ufalse}|' ${WRKSRC}/buildconf/base.ini
 .endfor
 
-post-patch-PSGI-on:
-	@${REINPLACE_CMD} -e 's/%(main_plugin)s,/%(main_plugin)s, psgi,/' ${WRKSRC}/buildconf/base.ini
+.for plugin in COROAE LOGPIPE PSGI
+post-patch-${plugin}-on:
+	@${REINPLACE_CMD} -e 's/%(main_plugin)s,/& ${plugin:tl},/' \
+		${WRKSRC}/buildconf/base.ini
+.endfor
 
 do-configure:
 	@${DO_NADA}
--- a/distinfo	Thu Jun 11 22:35:08 2020 +0200
+++ b/distinfo	Sun May 16 15:55:19 2021 +0200
@@ -1,3 +1,3 @@
-TIMESTAMP = 1573864256
-SHA256 (uwsgi-2.0.18.tar.gz) = 4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583
-SIZE (uwsgi-2.0.18.tar.gz) = 801555
+TIMESTAMP = 1605080865
+SHA256 (uwsgi-2.0.19.1.tar.gz) = 56be307f3bfcf6cc074f4354de6403778d7ec3e44addac896e26ffb3c4d9a608
+SIZE (uwsgi-2.0.19.1.tar.gz) = 811149
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/files/patch-core-logging.c	Sun May 16 15:55:19 2021 +0200
@@ -0,0 +1,32 @@
+--- core/logging.c.orig	2020-11-06 10:12:49.865752000 +0100
++++ core/logging.c	2020-11-06 10:17:57.825745000 +0100
+@@ -536,13 +536,23 @@
+ 			uwsgi_error_open(logfile);
+ 			exit(1);
+ 		}
+-		else {
+-			if (dup2(fd, log_fd) < 0) {
+-				// this could be lost :(
+-				uwsgi_error("uwsgi_log_do_rotate()/dup2()");
+-				exit(1);
+-			}
++		if (dup2(fd, log_fd) < 0) {
++			// this could be lost :(
++			uwsgi_error("uwsgi_log_do_rotate()/dup2()");
+ 			close(fd);
++			exit(1);
++		}
++		close(fd);
++
++		if (uwsgi.chmod_logfile_value) {
++			if (fchmod(log_fd, uwsgi.chmod_logfile_value)) {
++				uwsgi_error("fchmod()");
++			}
++		}
++		if (uwsgi.logfile_chown) {
++			if (fchown(log_fd, uwsgi.uid, uwsgi.gid)) {
++				uwsgi_error("fchown()");
++			}
+ 		}
+ 	}
+ 	else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/files/patch-plugins_coroae_uwsgiplugin.py	Sun May 16 15:55:19 2021 +0200
@@ -0,0 +1,11 @@
+--- 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'
--- a/files/uwsgi.in	Thu Jun 11 22:35:08 2020 +0200
+++ b/files/uwsgi.in	Sun May 16 15:55:19 2021 +0200
@@ -1,7 +1,5 @@
 #!/bin/sh
-#
-# $FreeBSD: head/www/uwsgi/files/uwsgi.in 473044 2018-06-22 14:59:33Z swills $
-#
+
 # PROVIDE: uwsgi
 # REQUIRE: DAEMON
 # KEYWORD: shutdown