* [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/
@ 2016-05-13 15:57 Alexys Jacob
0 siblings, 0 replies; 5+ messages in thread
From: Alexys Jacob @ 2016-05-13 15:57 UTC (permalink / raw
To: gentoo-commits
commit: 89a125886d8e24af223914487f057beaded611ac
Author: Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 15:56:58 2016 +0000
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Fri May 13 15:57:13 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a12588
www-servers/uwsgi: version bump, add go support, make pid path mode configurable, drop broken release
Package-Manager: portage-2.2.27
www-servers/uwsgi/Manifest | 2 +-
www-servers/uwsgi/files/uwsgi.confd-r4 | 69 ++++++++++
www-servers/uwsgi/files/uwsgi.initd-r7 | 144 +++++++++++++++++++++
www-servers/uwsgi/metadata.xml | 1 +
.../{uwsgi-2.0.13.ebuild => uwsgi-2.0.13.1.ebuild} | 13 +-
5 files changed, 224 insertions(+), 5 deletions(-)
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 66288d8..efcf2d1 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1,4 +1,4 @@
DIST uwsgi-2.0.11.2.tar.gz 782133 SHA256 0b889b0b4d2dd3f6625df28cb0b86ec44a68d074ede2d0dfad0b91e88914885c SHA512 627759ec9cccc8de74016c245b19069dc7e6970c398be95e707c2c9e36fa06438249f130d0c2bdee16f585b123094a9dd4977de5be276a065ddce30a9698da9a WHIRLPOOL 314a397bc678aefe59df8b6a87584768d19b5d52cfd894d518ebe3e9019fb74232c9139c9cc5af00da8b1bc21c369c7a84e9d424b7c5986e6ece65172f3cca27
DIST uwsgi-2.0.12.tar.gz 784048 SHA256 306b51db97648d6d23bb7eacd76e5a413434575f220dac1de231c8c26d33e409 SHA512 3178d140d8365d4f876002490f138c1586fdffa1dbd1a9ec2279097535fcdf5e6bac16acf5d409b51b54c003e0533b724a95a57a213b7310a624ee02bf5c1796 WHIRLPOOL 64bbd21a74ec493a3e48981988a76c9c424b406e48784244717567c3842f954229a503d41f36e651634668be5117a533c15e0e51473e99c831676e483cd7d87a
-DIST uwsgi-2.0.13.tar.gz 784971 SHA256 74219b483e6244eba3b9c48cde043ea4f2fc6db3f952c160aae5498a2d8ddefd SHA512 59695a92e277aa853a291958d715620e195ab6460fd94ebbb8fe5b23b35d2e220efb95e266bcfb38f9360122b42cf635f56da8632d9ed71ed93cdd821e73623a WHIRLPOOL efe1e5475d9c3cc60da88c6130aea03ba31eb2068a6d4e744154148697e743706d040c1f3770658402197d1a0e4c8ccb7f3f0e1c37ccf1642918a82897a1e4c8
+DIST uwsgi-2.0.13.1.tar.gz 784937 SHA256 da32a4438c623a5f7129d1ebeefa3e13eccc2be220af36475fb3461734fe539b SHA512 9cc7936faf4898401268803d1294896a4d60bc8f1c8ecf3177b16f5e873e69b88d6b8d28cd020a6bf319e6c1e7de65caf29e85207633a5b60f423ffbdaf116e5 WHIRLPOOL 9246bdf85cd22b2f01789e8cc06f035ae7d15d4213d7e40e88dd9cd4f1152fb9c4205c32ee8749d0fc174b116453887dbdb2b01ed42c0be897d8e011913f4199
DIST uwsgi-2.0.9.tar.gz 779244 SHA256 fe0489bca0a8b95653908be2297e35699fb9e992f728e382224587ee6b918295 SHA512 8afb6ca51aa2113e2c9fc0b90e11ce8c1aeddb38f41c7b0d5da6811d7ef93aa8b9e015abfd29b1ced35b0f6a00fd7285b8140b855fc3ee79804e2513e94a9fb5 WHIRLPOOL 362abe240b9a3f170409b850d9ae5186701b137159cd91d2e689b5f3d43dfe779f13d9e4554b60b82efd534a00751394a7982130912f7f106ac6e7c6dbde88d6
diff --git a/www-servers/uwsgi/files/uwsgi.confd-r4 b/www-servers/uwsgi/files/uwsgi.confd-r4
new file mode 100644
index 0000000..f562403
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.confd-r4
@@ -0,0 +1,69 @@
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# YOU SHOULD ONLY MODIFY THIS FILE IF YOU USE THE UWSGI EMPEROR MODE!
+# IF YOU WANT TO RUN A SINGLE APP INSTANCE, CREATE A COPY AND MODIFY THAT INSTEAD!
+
+# Path (or name) of UNIX/TCP socket to bind to
+# Example : UWSGI_SOCKET=127.0.0.1:1234
+UWSGI_SOCKET=
+
+# Enable threads? (1 = yes, 0 = no). The default is 0
+#
+UWSGI_THREADS=0
+
+# The path to your uWSGI application.
+#
+UWSGI_PROGRAM=
+
+# The path to your uWSGI xml config file.
+#
+UWSGI_XML_CONFIG=
+
+# The number of child processes to spawn. The default is 1.
+#
+UWSGI_PROCESSES=1
+
+# The log file path. If empty, log only errors
+#
+UWSGI_LOG_FILE=
+
+# If you want to run your application inside a chroot then specify the
+# directory here. Leave this blank otherwise.
+#
+UWSGI_CHROOT=
+
+# If you want to run your application from a specific directiory specify
+# it here. Leave this blank otherwise.
+#
+UWSGI_DIR=
+
+# PIDPATH folder mode (/run/uwsgi_${PROGNAME})
+UWSGI_PIDPATH_MODE=0750
+
+# The user to run your application as. If you do not specify these,
+# the application will be run as user root.
+#
+UWSGI_USER=
+
+# The group to run your application as. If you do not specify these,
+# the application will be run as group root.
+#
+UWSGI_GROUP=
+
+# Run the uwsgi emperor which loads vassals dynamically from this PATH
+# see http://projects.unbit.it/uwsgi/wiki/Emperor
+# The advised Gentoo folder is /etc/uwsgi.d/
+UWSGI_EMPEROR_PATH=
+
+# Emperor PIDPATH folder mode (/run/uwsgi)
+UWSGI_EMPEROR_PIDPATH_MODE=0770
+
+# The group the emperor should run as. This is different from the UWSGI_GROUP
+# as you could want your apps share some sockets with other processes such as
+# www servers while preserving your emperor logs from being accessible by them.
+UWSGI_EMPEROR_GROUP=
+
+# Additional options you might want to pass to uWSGI
+#
+UWSGI_EXTRA_OPTIONS=
diff --git a/www-servers/uwsgi/files/uwsgi.initd-r7 b/www-servers/uwsgi/files/uwsgi.initd-r7
new file mode 100644
index 0000000..f7cff44
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi.initd-r7
@@ -0,0 +1,144 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PROGNAME=${SVCNAME#*.}
+
+UWSGI_EXEC=/usr/bin/uwsgi
+if [ "${SVCNAME}" = "uwsgi" ]; then
+ PIDPATH=/run/uwsgi
+else
+ PIDPATH="/run/uwsgi_${PROGNAME}"
+fi
+PIDFILE="${PIDPATH}/${PROGNAME}.pid"
+
+extra_started_commands="${opts} reload stats"
+
+depend() {
+ need net
+}
+
+start_emperor() {
+ local OPTIONS
+ OPTIONS="--daemonize"
+
+ if [ -n "${UWSGI_LOG_FILE}" ]; then
+ OPTIONS="${OPTIONS} ${UWSGI_LOG_FILE}"
+ else
+ OPTIONS="${OPTIONS} /dev/null --disable-logging"
+ fi
+
+ [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/"
+ [ -z "${UWSGI_USER}" ] && UWSGI_USER="root"
+ [ -z "${UWSGI_GROUP}" ] && UWSGI_GROUP="root"
+
+ if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then
+ OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}"
+ fi
+
+ ebegin "Starting uWSGI emperor"
+ checkpath -d -m ${UWSGI_EMPEROR_PIDPATH_MODE} -o "${UWSGI_USER}":"${UWSGI_EMPEROR_GROUP:-${UWSGI_GROUP}}" "${PIDPATH}"
+
+ cd "${UWSGI_DIR}" && \
+ start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}" \
+ --group ${UWSGI_EMPEROR_GROUP:-${UWSGI_GROUP}} \
+ -- --emperor "${UWSGI_EMPEROR_PATH}" ${OPTIONS} --pidfile "${PIDFILE}"
+ return $?
+}
+
+start_app() {
+ local OPTIONS
+ OPTIONS="--master --daemonize"
+
+ if [ -n "${UWSGI_LOG_FILE}" ]; then
+ OPTIONS="${OPTIONS} ${UWSGI_LOG_FILE}"
+ else
+ OPTIONS="${OPTIONS} /dev/null --disable-logging"
+ fi
+
+ [ -z "${UWSGI_DIR}" ] && UWSGI_DIR="/"
+ [ -z "${UWSGI_USER}" ] && UWSGI_USER="root"
+ [ -z "${UWSGI_GROUP}" ] && UWSGI_GROUP="root"
+
+ if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then
+ OPTIONS="${OPTIONS} ${UWSGI_EXTRA_OPTIONS}"
+ fi
+
+ if [ "${UWSGI_THREADS}" = "1" ]; then
+ OPTIONS="${OPTIONS} --enable-threads"
+ fi
+
+ if [ -n "${UWSGI_SOCKET}" ]; then
+ OPTIONS="${OPTIONS} --socket ${UWSGI_SOCKET}"
+ fi
+
+ if [ -n "${UWSGI_PROCESSES}" ]; then
+ OPTIONS="${OPTIONS} --processes ${UWSGI_PROCESSES}"
+ fi
+
+ if [ -n "${UWSGI_CHROOT}" ]; then
+ OPTIONS="${OPTIONS} --chroot ${UWSGI_CHROOT}"
+ fi
+
+ if [ -n "${UWSGI_PROGRAM}" ]; then
+ OPTIONS="${OPTIONS} --fileserve-mode ${UWSGI_PROGRAM}"
+ fi
+
+ if [ -n "${UWSGI_XML_CONFIG}" ]; then
+ OPTIONS="${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}"
+ fi
+
+ ebegin "Starting uWSGI application ${PROGNAME}"
+ checkpath -d -m ${UWSGI_PIDPATH_MODE} -o "${UWSGI_USER}":"${UWSGI_GROUP}" "${PIDPATH}"
+
+ cd "${UWSGI_DIR}" && \
+ start-stop-daemon --start --user "${UWSGI_USER}" --group "${UWSGI_GROUP}" \
+ --exec "${UWSGI_EXEC}" -- ${OPTIONS} --pidfile "${PIDFILE}"
+ return $?
+}
+
+start() {
+ if [ -n "${UWSGI_EMPEROR_PATH}" ]; then
+ start_emperor
+ eend $?
+ else
+ if [ "${SVCNAME}" = "uwsgi" ]; then
+ eerror "You are not supposed to run this script directly unless you"
+ eerror "want to run in Emperor mode. In that case please set the UWSGI_EMPEROR_PATH."
+ eerror "Otherwise create a symlink for the uwsgi application you want to run as well as"
+ eerror "a copy of the configuration file and modify it appropriately like so..."
+ eerror
+ eerror " ln -s uwsgi /etc/init.d/uwsgi.trac"
+ eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac"
+ eerror " nano /etc/conf.d/uwsgi.trac"
+ eerror
+ return 1
+ else
+ start_app
+ eend $?
+ fi
+ fi
+}
+
+stop() {
+ if [ -n "${UWSGI_EMPEROR_PATH}" ]; then
+ ebegin "Stopping uWSGI emperor"
+ else
+ ebegin "Stopping uWSGI application ${PROGNAME}"
+ fi
+ start-stop-daemon --stop --signal QUIT --pidfile "${PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading uWSGI"
+ start-stop-daemon --signal HUP --pidfile "${PIDFILE}"
+ eend $?
+}
+
+stats() {
+ ebegin "Logging uWSGI statistics"
+ start-stop-daemon --signal USR1 --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml
index c0eca5a..c5f1ce0 100644
--- a/www-servers/uwsgi/metadata.xml
+++ b/www-servers/uwsgi/metadata.xml
@@ -10,6 +10,7 @@
</maintainer>
<use>
<flag name="embedded">Embed plugins instead of building them as real plugins. When disabling this USE flag make sure you specify all used plugins in your uWSGI configuration. Note: Language plugins will always be built as real plugins.</flag>
+ <flag name="go">Build the gccgo plugin to run Go applications.</flag>
<flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> instead of libc's malloc</flag>
<flag name="json">Support json as a configuration file format.</flag>
<flag name="pypy">Build the pypy plugin to run your code using <pkg>virtual/pypy</pkg>.</flag>
diff --git a/www-servers/uwsgi/uwsgi-2.0.13.ebuild b/www-servers/uwsgi/uwsgi-2.0.13.1.ebuild
similarity index 97%
rename from www-servers/uwsgi/uwsgi-2.0.13.ebuild
rename to www-servers/uwsgi/uwsgi-2.0.13.1.ebuild
index 466791a..13b6a5a 100644
--- a/www-servers/uwsgi/uwsgi-2.0.13.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.13.1.ebuild
@@ -43,7 +43,7 @@ UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix )
LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process
-LANG_SUPPORT_EXTENDED=( lua php pypy python python_asyncio python_gevent ruby )
+LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby )
# plugins to be ignored (for now):
# cheaper_backlog2: example plugin
@@ -52,7 +52,6 @@ LANG_SUPPORT_EXTENDED=( lua php pypy python python_asyncio python_gevent ruby )
# dummy: no idea
# example: example plugin
# exception_log: example plugin
-# *go*: TODO
# *java*: TODO
# v8: TODO
# matheval: TODO
@@ -109,6 +108,7 @@ CDEPEND="sys-libs/zlib
uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
uwsgi_plugins_webdav? ( dev-libs/libxml2 )
uwsgi_plugins_xslt? ( dev-libs/libxslt )
+ go? ( dev-lang/go:=[gccgo] )
lua? ( dev-lang/lua:= )
mono? ( =dev-lang/mono-2* )
perl? ( dev-lang/perl:= )
@@ -275,6 +275,10 @@ src_compile() {
python uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+ if use go ; then
+ python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
+ fi
+
if use lua ; then
# setting the name for the pkg-config file to lua, since we don't have
# slotted lua
@@ -311,6 +315,7 @@ src_install() {
doins "${T}/plugins"/*.so
use cgi && dosym uwsgi /usr/bin/uwsgi_cgi
+ use go && dosym uwsgi /usr/bin/uwsgi_go
use lua && dosym uwsgi /usr/bin/uwsgi_lua
use mono && dosym uwsgi /usr/bin/uwsgi_mono
use perl && dosym uwsgi /usr/bin/uwsgi_psgi
@@ -333,8 +338,8 @@ src_install() {
done
fi
- newinitd "${FILESDIR}"/uwsgi.initd-r6 uwsgi
- newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi
+ newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi
+ newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi
keepdir /etc/"${PN}".d
use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}"
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/
@ 2022-01-20 12:36 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-01-20 12:36 UTC (permalink / raw
To: gentoo-commits
commit: 43fd8ae135f9d301246b5450ddf521138158e91a
Author: Thomas Bettler <thomas.bettler <AT> gmail <DOT> com>
AuthorDate: Tue Dec 14 19:51:20 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 20 12:35:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43fd8ae1
www-servers/uwsgi: fix python 3.10 (upstream patches)
[sam: revbump to propagate fixes.]
Closes: https://bugs.gentoo.org/829204
Closes: https://github.com/gentoo/gentoo/pull/23301
Signed-off-by: Thomas Bettler <thomas.bettler <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../uwsgi/files/uwsgi-2.0.19.1-py310-fix.patch | 36 ++++++
.../files/uwsgi-2.0.19.1-pynode-compile.patch | 123 +++++++++++++++++++++
...19.1-r107.ebuild => uwsgi-2.0.19.1-r108.ebuild} | 5 +
3 files changed, 164 insertions(+)
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix.patch b/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix.patch
new file mode 100644
index 000000000000..8fe64d1b3d3b
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix.patch
@@ -0,0 +1,36 @@
+https://github.com/unbit/uwsgi/commit/c8c4bd1b5439217f2cb2f146caf162de69638bc1
+
+From c8c4bd1b5439217f2cb2f146caf162de69638bc1 Mon Sep 17 00:00:00 2001
+From: Cyrille Pontvieux <cyrille@enialis.net>
+Date: Thu, 1 Jul 2021 12:45:29 +0200
+Subject: [PATCH] Allow to compile on Python versions with more that two digits
+ (Python 3.10)
+
+---
+ plugins/python/pyloader.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c
+index d8ab6fe35..3a1465d67 100644
+--- a/plugins/python/pyloader.c
++++ b/plugins/python/pyloader.c
+@@ -22,7 +22,7 @@ PyMethodDef uwsgi_eventfd_write_method[] = { {"uwsgi_eventfd_write", py_eventfd_
+ void set_dyn_pyhome(char *home, uint16_t pyhome_len) {
+
+
+- char venv_version[15];
++ char venv_version[30];
+ PyObject *site_module;
+
+ PyObject *pysys_dict = get_uwsgi_pydict("sys");
+@@ -45,8 +45,8 @@ void set_dyn_pyhome(char *home, uint16_t pyhome_len) {
+ PyDict_SetItemString(pysys_dict, "prefix", venv_path);
+ PyDict_SetItemString(pysys_dict, "exec_prefix", venv_path);
+
+- venv_version[14] = 0;
+- if (snprintf(venv_version, 15, "/lib/python%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION) == -1) {
++ bzero(venv_version, 30);
++ if (snprintf(venv_version, 30, "/lib/python%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION) == -1) {
+ return;
+ }
+
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.19.1-pynode-compile.patch b/www-servers/uwsgi/files/uwsgi-2.0.19.1-pynode-compile.patch
new file mode 100644
index 000000000000..6bcf04ae2bc3
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.19.1-pynode-compile.patch
@@ -0,0 +1,123 @@
+https://github.com/unbit/uwsgi/commit/8c890c84604a0477b46a66eab8a620733f596cc8
+
+From 8c890c84604a0477b46a66eab8a620733f596cc8 Mon Sep 17 00:00:00 2001
+From: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
+Date: Sun, 22 Nov 2020 18:20:19 +0100
+Subject: [PATCH] plugins/python: use Py_CompileString
+
+Instead of the deprecated PyParser_SimpleParseString, PyParser_SimpleParseFile
+and PyNode_Compile.
+While at it fixup a possible null pointer dereference when uwsgi_open_and_read
+returns an empty string.
+
+See https://bugs.python.org/issue40939
+---
+ plugins/python/pyloader.c | 12 +-----------
+ plugins/python/python_plugin.c | 36 ++++++++++++++--------------------
+ 2 files changed, 16 insertions(+), 32 deletions(-)
+
+diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c
+index a63c375b5..d8ab6fe35 100644
+--- a/plugins/python/pyloader.c
++++ b/plugins/python/pyloader.c
+@@ -757,25 +757,15 @@ PyObject *uwsgi_eval_loader(void *arg1) {
+
+ PyObject *wsgi_eval_module, *wsgi_eval_callable = NULL;
+
+- struct _node *wsgi_eval_node = NULL;
+ PyObject *wsgi_compiled_node;
+
+- wsgi_eval_node = PyParser_SimpleParseString(code, Py_file_input);
+- if (!wsgi_eval_node) {
+- PyErr_Print();
+- uwsgi_log( "failed to parse <eval> code\n");
+- exit(UWSGI_FAILED_APP_CODE);
+- }
+-
+- wsgi_compiled_node = (PyObject *) PyNode_Compile(wsgi_eval_node, "uwsgi_eval_config");
+-
++ wsgi_compiled_node = Py_CompileString(code, "uwsgi_eval_config", Py_file_input);
+ if (!wsgi_compiled_node) {
+ PyErr_Print();
+ uwsgi_log( "failed to compile eval code\n");
+ exit(UWSGI_FAILED_APP_CODE);
+ }
+
+-
+ wsgi_eval_module = PyImport_ExecCodeModule("uwsgi_eval_config", wsgi_compiled_node);
+ if (!wsgi_eval_module) {
+ PyErr_Print();
+diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c
+index 37d0b7bbf..79f29d43c 100644
+--- a/plugins/python/python_plugin.c
++++ b/plugins/python/python_plugin.c
+@@ -473,8 +473,7 @@ UWSGI_RELEASE_GIL
+
+ PyObject *uwsgi_pyimport_by_filename(char *name, char *filename) {
+
+- FILE *pyfile;
+- struct _node *py_file_node = NULL;
++ char *pycontent;
+ PyObject *py_compiled_node, *py_file_module;
+ int is_a_package = 0;
+ struct stat pystat;
+@@ -483,7 +482,7 @@ PyObject *uwsgi_pyimport_by_filename(char *name, char *filename) {
+
+ if (!uwsgi_check_scheme(filename)) {
+
+- pyfile = fopen(filename, "r");
++ FILE *pyfile = fopen(filename, "r");
+ if (!pyfile) {
+ uwsgi_log("failed to open python file %s\n", filename);
+ return NULL;
+@@ -507,37 +506,32 @@ PyObject *uwsgi_pyimport_by_filename(char *name, char *filename) {
+ }
+ }
+
+- py_file_node = PyParser_SimpleParseFile(pyfile, real_filename, Py_file_input);
+- if (!py_file_node) {
+- PyErr_Print();
+- uwsgi_log("failed to parse file %s\n", real_filename);
+- if (is_a_package)
++ fclose(pyfile);
++ pycontent = uwsgi_simple_file_read(real_filename);
++
++ if (!pycontent) {
++ if (is_a_package) {
+ free(real_filename);
+- fclose(pyfile);
++ }
++ uwsgi_log("no data read from file %s\n", real_filename);
+ return NULL;
+ }
+
+- fclose(pyfile);
+ }
+ else {
+ size_t pycontent_size = 0;
+- char *pycontent = uwsgi_open_and_read(filename, &pycontent_size, 1, NULL);
++ pycontent = uwsgi_open_and_read(filename, &pycontent_size, 1, NULL);
+
+- if (pycontent) {
+- py_file_node = PyParser_SimpleParseString(pycontent, Py_file_input);
+- if (!py_file_node) {
+- PyErr_Print();
+- uwsgi_log("failed to parse url %s\n", real_filename);
+- return NULL;
+- }
++ if (!pycontent) {
++ uwsgi_log("no data read from url %s\n", real_filename);
++ return NULL;
+ }
+ }
+
+- py_compiled_node = (PyObject *) PyNode_Compile(py_file_node, real_filename);
+-
++ py_compiled_node = Py_CompileString(pycontent, real_filename, Py_file_input);
+ if (!py_compiled_node) {
+ PyErr_Print();
+- uwsgi_log("failed to compile python file %s\n", real_filename);
++ uwsgi_log("failed to compile %s\n", real_filename);
+ return NULL;
+ }
+
diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r107.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
similarity index 99%
rename from www-servers/uwsgi/uwsgi-2.0.19.1-r107.ebuild
rename to www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
index c418baa38343..c547c3316a71 100644
--- a/www-servers/uwsgi/uwsgi-2.0.19.1-r107.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
@@ -128,6 +128,11 @@ RDEPEND="${CDEPEND}
uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${P}-py310-fix.patch"
+ "${FILESDIR}/${P}-pynode-compile.patch"
+)
+
S="${WORKDIR}/${MY_P}"
src_unpack() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/
@ 2022-01-20 12:36 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-01-20 12:36 UTC (permalink / raw
To: gentoo-commits
commit: 11dbcf457bf4b7ec83c26e1d4eb3d7b9366b7e13
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 20 12:35:44 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 20 12:35:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11dbcf45
www-servers/uwsgi: add additional Python 3.10 patch
Bug: https://bugs.gentoo.org/829204
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../uwsgi/files/uwsgi-2.0.19.1-py310-fix-2.patch | 23 ++++++++++++++++++++++
www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild | 1 +
2 files changed, 24 insertions(+)
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix-2.patch b/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix-2.patch
new file mode 100644
index 000000000000..d175a99c65fb
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.19.1-py310-fix-2.patch
@@ -0,0 +1,23 @@
+https://github.com/unbit/uwsgi/commit/94b28b156c26d5b0b4ba93fedb057e9aebf59545.patch
+
+From 94b28b156c26d5b0b4ba93fedb057e9aebf59545 Mon Sep 17 00:00:00 2001
+From: Thea Flowers <me@thea.codes>
+Date: Tue, 2 Nov 2021 16:29:36 -0400
+Subject: [PATCH] Add PY_SSIZE_T_CLEAN define for Python 3.10 support
+
+---
+ plugins/python/uwsgi_python.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h
+index aca1f83b7..ec64ad80c 100644
+--- a/plugins/python/uwsgi_python.h
++++ b/plugins/python/uwsgi_python.h
+@@ -1,4 +1,6 @@
+ #include <uwsgi.h>
++/* See https://docs.python.org/3.10/whatsnew/3.10.html#id2 */
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+
+ #include <frameobject.h>
+
diff --git a/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild b/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
index c547c3316a71..089c51e499e2 100644
--- a/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.19.1-r108.ebuild
@@ -131,6 +131,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${P}-py310-fix.patch"
"${FILESDIR}/${P}-pynode-compile.patch"
+ "${FILESDIR}/${P}-py310-fix-2.patch"
)
S="${WORKDIR}/${MY_P}"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/
@ 2023-04-13 3:03 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-13 3:03 UTC (permalink / raw
To: gentoo-commits
commit: e69d0cbd75deb341e0e8073e5f5c8598710bb587
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 12 11:14:37 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 13 03:01:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e69d0cbd
www-servers/uwsgi: add 2.0.21
- Adds support for modern Python, Ruby, and PHP.
- Build in parallel.
- Drop various obsolete Python branches. These were a bit
sneaky so easy to miss, but included python2.7 & python3.4.
- Use postgres.eclass to properly declare compat for various
pg versions instead of guessing the right slot (and always
picking the latest, even if not desired by the user)
- Add a note about the stable branch upstream for future
cherry-picking of patches.
Closes: https://bugs.gentoo.org/897340
Signed-off-by: Sam James <sam <AT> gentoo.org>
www-servers/uwsgi/Manifest | 1 +
www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch | 41 +++
.../uwsgi/files/uwsgi-2.0.21-python-unicode.patch | 21 ++
www-servers/uwsgi/uwsgi-2.0.21.ebuild | 386 +++++++++++++++++++++
4 files changed, 449 insertions(+)
diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest
index 60756e5fd8a3..2c94a02b32c1 100644
--- a/www-servers/uwsgi/Manifest
+++ b/www-servers/uwsgi/Manifest
@@ -1 +1,2 @@
DIST uwsgi-2.0.19.1.tar.gz 804398 BLAKE2B 73fc19990866eb1058a742b34a817b3bd87e00c838da055bece2bff5e13c161f53c642866ed591aa4afeb23ef924205502f2cb0a4cf9d303b5b63fb9a53f57e2 SHA512 34b55f7c7a77dc0b0dab34d1a9ca9a4cba8a9261969656c88435e7f32fe8a0c5654e1562706775f77e2f60c4ad0f5c6055257a23ab7d387c1579639e054807b5
+DIST uwsgi-2.0.21.tar.gz 808494 BLAKE2B 3c5fc3ce3a6a7f8f915bb302c0b775a75227f859dd2b141034e8b1aa5cb867b447ed532b3e8b537db80acc908fc26121b752e35ebc0bf9a542678843fd02ff54 SHA512 36a9c1b87a4c3d08482b9045d2227f56b006acb53f38ddf1b510880ae5fc24c0177a077338ec8af3ef0b8f8e220bc4fc7f8311dab8066e13cbcbb616f736c795
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch
new file mode 100644
index 000000000000..8a830389b989
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.21-php82.patch
@@ -0,0 +1,41 @@
+https://github.com/unbit/uwsgi/commit/6fba62a3ad947b656bb4379f8f903e90c7b01346
+
+From 6fba62a3ad947b656bb4379f8f903e90c7b01346 Mon Sep 17 00:00:00 2001
+From: Alexandre Rossi <alexandre.rossi@gmail.com>
+Date: Tue, 10 Jan 2023 10:01:05 +0000
+Subject: [PATCH] plugins/php: fix build with PHP >= 8.2
+
+from https://raw.githubusercontent.com/php/php-src/PHP-8.2/UPGRADING.INTERNALS:
+
+======================== 5. SAPI changes ========================
+
+* The signature of php_module_startup() has changed from
+
+int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules)
+
+to
+
+zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module)
+
+as only one additional module was ever provided.
+---
+ plugins/php/php_plugin.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+index 9bb8befad..4d3930b82 100644
+--- a/plugins/php/php_plugin.c
++++ b/plugins/php/php_plugin.c
+@@ -607,7 +607,11 @@ static void activate_user_config(const char *filename, const char *doc_root, siz
+ static int php_uwsgi_startup(sapi_module_struct *sapi_module)
+ {
+
++#if ((PHP_MAJOR_VERSION >= 8) && (PHP_MINOR_VERSION >= 2))
++ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry)==FAILURE) {
++#else
+ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry, 1)==FAILURE) {
++#endif
+ return FAILURE;
+ } else {
+ return SUCCESS;
+
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch
new file mode 100644
index 000000000000..b346c2655175
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.21-python-unicode.patch
@@ -0,0 +1,21 @@
+https://github.com/unbit/uwsgi/commit/509104eaff6f6ecde656c20fdd65a0b98b371c8d
+
+From 509104eaff6f6ecde656c20fdd65a0b98b371c8d Mon Sep 17 00:00:00 2001
+From: Nicolas Evrard <nicoe@openhex.org>
+Date: Thu, 17 Nov 2022 09:47:39 +0100
+Subject: [PATCH] plugins/python: Use "backslashreplace" on stderr
+ initialization
+
+Failing to use this value will result in enconding errors when logging
+unicode characters to stderr
+--- a/plugins/python/python_plugin.c
++++ b/plugins/python/python_plugin.c
+@@ -554,7 +554,7 @@ void init_uwsgi_vars() {
+ #ifdef HAS_NO_ERRORS_IN_PyFile_FromFd
+ PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, NULL, 0);
+ #else
+- PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, NULL, NULL, 0);
++ PyObject *new_stdprint = PyFile_FromFd(2, NULL, "w", _IOLBF, NULL, "backslashreplace", NULL, 0);
+ #endif
+ PyDict_SetItemString(pysys_dict, "stdout", new_stdprint);
+ PyDict_SetItemString(pysys_dict, "__stdout__", new_stdprint);
diff --git a/www-servers/uwsgi/uwsgi-2.0.21.ebuild b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
new file mode 100644
index 000000000000..6283e0d78a3e
--- /dev/null
+++ b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
@@ -0,0 +1,386 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Check the upstream uwsgi-2.0 branch, not master, for backports
+
+LUA_COMPAT=( lua5-1 )
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+
+RUBY_OPTIONAL="yes"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+PHP_EXT_INI="no"
+PHP_EXT_NAME="dummy"
+PHP_EXT_OPTIONAL_USE="php"
+USE_PHP="php7-4 php8-0 php8-1 php8-2" # deps must be registered separately below
+
+POSTGRES_COMPAT=( 13 14 15 )
+
+MY_P="${P/_/-}"
+
+inherit lua-single multiprocessing pax-utils php-ext-source-r3 postgres python-r1 ruby-ng
+
+DESCRIPTION="uWSGI server for Python web applications"
+HOMEPAGE="https://uwsgi-docs.readthedocs.io/en/latest/"
+SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux"
+
+UWSGI_PLUGINS_STD=(
+ ping cache carbon nagios rpc rrdtool
+ http ugreen signal syslog rsyslog
+ router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics}
+ {core,fast,raw,ssl}router
+ redislog mongodblog log{file,socket}
+ spooler cheaper_busyness symcall
+ transformation_{chunked,gzip,offload,tofile}
+ zergpool
+)
+UWSGI_PLUGINS_OPT=(
+ alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron
+ dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter
+ geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam
+ rados router_{access,radius,spnego,xmldir}
+ sqlite ssi stats_pusher_statsd
+ systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix
+)
+
+LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process
+LANG_SUPPORT_EXTENDED=( go lua php python python-asyncio ruby )
+
+# plugins to be ignored (for now):
+# cheaper_backlog2: example plugin
+# coroae: TODO
+# cplusplus: partially example code, needs explicit class
+# dummy: no idea
+# example: example plugin
+# exception_log: example plugin
+# *java*: TODO
+# v8: TODO
+# matheval: TODO
+IUSE="apache2 +caps debug +embedded expat jemalloc json +pcre +routing selinux +ssl +xml yajl yaml zeromq"
+
+for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done
+for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done
+IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}"
+
+REQUIRED_USE="
+ || ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} )
+ uwsgi_plugins_logcrypto? ( ssl )
+ uwsgi_plugins_sslrouter? ( ssl )
+ routing? ( pcre )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_REQ_USE} )
+ uwsgi_plugins_emperor_zeromq? ( zeromq )
+ uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter )
+ uwsgi_plugins_router_xmldir? ( xml !expat )
+ lua? ( ${LUA_REQUIRED_USE} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ python-asyncio? ( python )
+ expat? ( xml )
+"
+
+# Dependency notes:
+# - util-linux is required for libuuid when requesting zeromq support
+# - sys-devel/gcc[go] is needed for libgo.so
+#
+# Order:
+# 1. Unconditional
+# 2. General features
+# 3. Plugins
+# 4. Language/app support
+CDEPEND="
+ sys-libs/zlib
+ virtual/libcrypt:=
+ caps? ( sys-libs/libcap )
+ json? (
+ !yajl? ( dev-libs/jansson:= )
+ yajl? ( dev-libs/yajl )
+ )
+ pcre? ( dev-libs/libpcre:3 )
+ ssl? ( dev-libs/openssl:= )
+ xml? (
+ !expat? ( dev-libs/libxml2 )
+ expat? ( dev-libs/expat )
+ )
+ yaml? ( dev-libs/libyaml )
+ zeromq? (
+ net-libs/zeromq
+ sys-apps/util-linux
+ )
+ uwsgi_plugins_alarm_curl? ( net-misc/curl )
+ uwsgi_plugins_alarm_xmpp? ( net-libs/gloox )
+ uwsgi_plugins_curl_cron? ( net-misc/curl )
+ uwsgi_plugins_emperor_pg? ( ${POSTGRES_DEP} )
+ uwsgi_plugins_geoip? ( dev-libs/geoip )
+ uwsgi_plugins_ldap? ( net-nds/openldap:= )
+ uwsgi_plugins_pam? ( sys-libs/pam )
+ uwsgi_plugins_sqlite? ( dev-db/sqlite:3 )
+ uwsgi_plugins_rados? ( sys-cluster/ceph )
+ uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers )
+ uwsgi_plugins_router_spnego? ( virtual/krb5 )
+ uwsgi_plugins_systemd_logger? ( sys-apps/systemd )
+ uwsgi_plugins_webdav? ( dev-libs/libxml2 )
+ uwsgi_plugins_xslt? ( dev-libs/libxslt )
+ go? ( sys-devel/gcc:=[go] )
+ lua? ( ${LUA_DEPS} )
+ mono? ( dev-lang/mono:= )
+ perl? ( dev-lang/perl:= )
+ php? (
+ php_targets_php7-4? ( dev-lang/php:7.4[embed] )
+ php_targets_php8-0? ( dev-lang/php:8.0[embed] )
+ php_targets_php8-1? ( dev-lang/php:8.1[embed] )
+ php_targets_php8-2? ( dev-lang/php:8.2[embed] )
+ )
+ python? ( ${PYTHON_DEPS} )
+ python-asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )
+ ruby? ( $(ruby_implementations_depend) )
+"
+DEPEND="${CDEPEND}"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-uwsgi )
+ uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-php82.patch
+ "${FILESDIR}"/${P}-python-unicode.patch
+)
+
+pkg_setup() {
+ python_setup
+ use lua && lua-single_pkg_setup
+ use ruby && ruby-ng_pkg_setup
+ use uwsgi_plugins_emperor_pg && postgres_pkg_setup
+}
+
+src_unpack() {
+ default
+}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s|'-O2', ||" \
+ -e "s|'-Werror', ||" \
+ -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \
+ uwsgiconfig.py || die "sed failed"
+
+ sed -i \
+ -e "s|/lib|/$(get_libdir)|" \
+ plugins/php/uwsgiplugin.py || die "sed failed"
+}
+
+src_configure() {
+ local embedded_plugins=()
+ local plugins=()
+ local malloc_impl="libc"
+ local json="false"
+ local xml="false"
+
+ local p
+ for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do
+ use uwsgi_plugins_${p} && embedded_plugins+=("${p}")
+ done
+ for p in ${LANG_SUPPORT_SIMPLE[@]} ; do
+ use ${p} && plugins+=("${p}")
+ done
+
+ # do not embed any plugins
+ if ! use embedded; then
+ plugins=( ${plugins[@]} ${embedded_plugins[@]} )
+ embedded_plugins=()
+ fi
+
+ # flatten the arrays
+ plugins=${plugins[@]}
+ embedded_plugins=${embedded_plugins[@]}
+
+ # rename some of the use flags, language plugins are always real plugins
+ plugins="${plugins/perl/psgi}"
+ plugins="${plugins/sqlite/sqlite3}"
+ embedded_plugins="${embedded_plugins/sqlite/sqlite3}"
+
+ # override defaults as requested by the user
+ if use xml; then
+ use expat && xml="expat" || xml="libxml2"
+ fi
+ if use json; then
+ use yajl && json="yajl" || json="jansson"
+ fi
+ use jemalloc && malloc_impl="jemalloc"
+
+ # prepare the buildconf for gentoo
+ cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die
+ sed -i \
+ -e "s|VAR_XML|${xml}|" \
+ -e "s|VAR_YAML|$(usex yaml libyaml true)|" \
+ -e "s|VAR_JSON|${json}|" \
+ -e "s|VAR_SSL|$(usex ssl true false)|" \
+ -e "s|VAR_PCRE|$(usex pcre true false)|" \
+ -e "s|VAR_ZMQ|$(usex zeromq true false)|" \
+ -e "s|VAR_ROUTING|$(usex routing true false)|" \
+ -e "s|VAR_DEBUG|$(usex debug true false)|" \
+ -e "s|VAR_MALLOC|${malloc_impl}|" \
+ -e "s|VAR_PLUGINS|${plugins// /, }|" \
+ -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \
+ -e "s|VAR_BUILD_DIR|${T}/plugins|" \
+ -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \
+ buildconf/gentoo.ini || die "sed failed"
+
+ if ! use caps; then
+ sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed"
+ fi
+
+ if ! use zeromq; then
+ sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed"
+ fi
+
+ if use uwsgi_plugins_emperor_pg ; then
+ sed -i \
+ -e "s|pg_config|${PG_CONFIG}|" \
+ plugins/emperor_pg/uwsgiplugin.py || die "sed failed"
+ fi
+}
+
+each_ruby_compile() {
+ cd "${WORKDIR}/${MY_P}" || die "sed failed"
+
+ UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed"
+ UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed"
+}
+
+python_compile_plugins() {
+ local EPYV
+ local PYV
+ EPYV=${EPYTHON/.}
+ PYV=${EPYV/python}
+
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed"
+
+ if use python-asyncio ; then
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed"
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed"
+ fi
+}
+
+python_install_symlinks() {
+ dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.}
+}
+
+src_compile() {
+ mkdir -p "${T}/plugins" || die
+
+ export CPUCOUNT="$(makeopts_jobs)"
+
+ ${EPYTHON} uwsgiconfig.py --build gentoo || die "building uwsgi failed"
+
+ if use go ; then
+ ${EPYTHON} uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed"
+ fi
+
+ if use lua ; then
+ # setting the name for the pkg-config file to lua, since that is the name
+ # provided by the wrapper from Lua eclasses
+ UWSGICONFIG_LUAPC="lua" ${EPYTHON} uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed"
+ fi
+
+ if use php ; then
+ for s in $(php_get_slots); do
+ UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" ${EPYTHON} uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed"
+ done
+ fi
+
+ if use python ; then
+ python_foreach_impl python_compile_plugins
+ fi
+
+ if use ruby ; then
+ ruby-ng_src_compile
+ fi
+}
+
+src_install() {
+ dobin uwsgi
+ pax-mark m "${D}"/usr/bin/uwsgi
+
+ insinto /usr/$(get_libdir)/uwsgi
+ doins "${T}/plugins"/*.so
+
+ use cgi && dosym uwsgi /usr/bin/uwsgi_cgi
+ use go && dosym uwsgi /usr/bin/uwsgi_go
+ use lua && dosym uwsgi /usr/bin/uwsgi_lua
+ use mono && dosym uwsgi /usr/bin/uwsgi_mono
+ use perl && dosym uwsgi /usr/bin/uwsgi_psgi
+
+ if use php ; then
+ local s
+ for s in $(php_get_slots); do
+ dosym uwsgi /usr/bin/uwsgi_${s/.}
+ done
+ fi
+
+ if use python ; then
+ python_foreach_impl python_install_symlinks
+ python_foreach_impl python_domodule uwsgidecorators.py
+ fi
+
+ newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi
+ newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi
+ keepdir /etc/"${PN}".d
+ use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}"
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ ewarn "As reported on bug #650776 [1], Apache module mod_proxy_uwsgi"
+ ewarn "is being transferred to upstream Apache since 2.4.30, see [2]."
+ ewarn "We therefore do not build them any more."
+ ewarn " [1] https://bugs.gentoo.org/650776"
+ ewarn " [2] https://github.com/unbit/uwsgi/issues/1636"
+ fi
+
+ elog "Append the following options to the uwsgi call to load the respective language plugin:"
+ use cgi && elog " '--plugins cgi' for cgi"
+ use lua && elog " '--plugins lua' for lua"
+ use mono && elog " '--plugins mono' for mono"
+ use perl && elog " '--plugins psgi' for perl"
+
+ if use php ; then
+ for s in $(php_get_slots); do
+ elog " '--plugins ${s/.}' for ${s}"
+ done
+ fi
+
+ python_pkg_postinst() {
+ local EPYV
+ local PYV
+ EPYV=${EPYTHON/.}
+ PYV=${EPYV/python}
+
+ elog " "
+ elog " '--plugins ${EPYV}' for ${EPYTHON}"
+ if use python-asyncio ; then
+ elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}"
+ fi
+ }
+
+ use python && python_foreach_impl python_pkg_postinst
+
+ if use ruby ; then
+ for ruby in $(ruby_get_use_implementations) ; do
+ elog " '--plugins rack_${ruby/.}' for ${ruby}"
+ elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers"
+ elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads"
+ done
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/
@ 2023-04-28 0:59 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-28 0:59 UTC (permalink / raw
To: gentoo-commits
commit: a6e3c66aabe4e19161dfe6f389af0eb349fb0cf4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 00:58:10 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 28 00:58:10 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6e3c66a
www-servers/uwsgi: fix build w/ newer php
Closes: https://bugs.gentoo.org/904664
Signed-off-by: Sam James <sam <AT> gentoo.org>
www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch | 13 +++++++++++++
www-servers/uwsgi/uwsgi-2.0.21.ebuild | 1 +
2 files changed, 14 insertions(+)
diff --git a/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch b/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch
new file mode 100644
index 000000000000..8b0276c3cb89
--- /dev/null
+++ b/www-servers/uwsgi/files/uwsgi-2.0.21-libphp-version.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/904664
+--- a/plugins/php/uwsgiplugin.py
++++ b/plugins/php/uwsgiplugin.py
+@@ -14,6 +14,9 @@
+
+ php_version = os.popen(PHPPATH + ' --version').read().rstrip().split('.')[0]
+
++if php_version == '8' :
++ php_version = ''
++
+ CFLAGS = [os.popen(PHPPATH + ' --includes').read().rstrip(), '-Wno-sign-compare']
+ LDFLAGS = os.popen(PHPPATH + ' --ldflags').read().rstrip().split()
+
diff --git a/www-servers/uwsgi/uwsgi-2.0.21.ebuild b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
index 6283e0d78a3e..e141c804fb8a 100644
--- a/www-servers/uwsgi/uwsgi-2.0.21.ebuild
+++ b/www-servers/uwsgi/uwsgi-2.0.21.ebuild
@@ -152,6 +152,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-php82.patch
"${FILESDIR}"/${P}-python-unicode.patch
+ "${FILESDIR}"/${P}-libphp-version.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-28 0:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 15:57 [gentoo-commits] repo/gentoo:master commit in: www-servers/uwsgi/, www-servers/uwsgi/files/ Alexys Jacob
-- strict thread matches above, loose matches on Subject: below --
2022-01-20 12:36 Sam James
2022-01-20 12:36 Sam James
2023-04-13 3:03 Sam James
2023-04-28 0:59 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox