summaryrefslogtreecommitdiff
path: root/www-apache/mod_wsgi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /www-apache/mod_wsgi
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'www-apache/mod_wsgi')
-rw-r--r--www-apache/mod_wsgi/Manifest5
-rw-r--r--www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch126
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.7.1-r1.ebuild6
-rw-r--r--www-apache/mod_wsgi/mod_wsgi-4.9.0.ebuild48
4 files changed, 183 insertions, 2 deletions
diff --git a/www-apache/mod_wsgi/Manifest b/www-apache/mod_wsgi/Manifest
index 0f03e07ce5ab..7115373275b1 100644
--- a/www-apache/mod_wsgi/Manifest
+++ b/www-apache/mod_wsgi/Manifest
@@ -1,5 +1,8 @@
AUX 70_mod_wsgi.conf 100 BLAKE2B e0df283f4b825628cceb7538231afbba10d3dc1eaab64da22d336c1426c4f8f0379e1958b3599811b2efc3cdb16f9543ad3f72d6139da9be01897bf200c06100 SHA512 6e0310d3f5dd8da4653c8502ad297ffe73c04e04c5fdd87721c407e839ba81ba4060394bcd1f06ef26d2d98cf007b585a382eb5f566345817999cd237adfa833
+AUX mod_wsgi-4.7.1-py310.patch 4484 BLAKE2B c58f1dff4ad997e18aa46f96d4dae6a11891e1e7efd7b0ffb3626d115634105c32b90eb697f950cf820145e569c4f2e285a1d36540ec602ee7b0976816e2d975 SHA512 03d535a85d1d44cc48c501e0e35029383ae95ba4cc54c440b50bb4176b48da61fe6dbd71a948fa510f717cae110f221a3abbf1445a139fde46cd68990f544a1e
DIST mod_wsgi-4.7.1.tar.gz 696111 BLAKE2B 69fea421077f1ecbf1cef5c9eac4ba296fa676e0bfbb860ca8a7cb701701f405edb3760486b87e8d9dd93efcb4c23385197d770ca32e16a473d5d252d292fb76 SHA512 cbb5ec53d55e47a83f2b0630527c6a52b48ef21d5d2c18adcb875fc455795b39b3c93f4a86dfbf9738c0bd554d86cc4912cc9ff83c428af302ab94a61f66b5b4
-EBUILD mod_wsgi-4.7.1-r1.ebuild 1232 BLAKE2B 1d91d0f6bb3cbade51242299c240547f7fec679eb47673f93ad4e60102df7ad8e7f5fb54e847b98a11e34e1a5460788f87112548c8de403f0afe654386c2c04f SHA512 d2c54f581d2e55d70ee524163abfc19be07eaf28dc67d90f70621ef299da320db4335ce2e19acf948090b979b95cd642a1cc83dbd21111f038e69e50dc6d1bda
+DIST mod_wsgi-4.9.0.tar.gz 699891 BLAKE2B 7ee6ffc28e86baf8ee92973479a26964f7c183c2b113b49a48af02c622f8d8f698abffcd4f522a1ecca5b89325f94856cbe89db5a81d2ac2e87438ee90be97b0 SHA512 9dc34d431171321094a9713444895d9754eff4e69ad1e86c8d3cd77bc1ca0a4c10b697e7f8cf14902d6bfaf205c8842e62fa944bb38f66f1c54fd36af95a09d6
+EBUILD mod_wsgi-4.7.1-r1.ebuild 1275 BLAKE2B d9a5dbad4c0a788bf12df888bb42d9ce4598bc80bcaa317e11ef8ef444e7a0564bd7139df91957a1dc7dc3dec858b24c2f24e1aa6717aee7cacaaf7b219a20e9 SHA512 6e4e8254bfa149cc95045624c5635456a5253ba6d0fa4168a10c8b49ad163ecc6c6bea107821a99079a74580a0f5d677561ec6d9d25e7b51f10c60497d40a375
EBUILD mod_wsgi-4.7.1.ebuild 1228 BLAKE2B dc5ab6545e2acfe51ee4f77dd6335f3b7ed56170f64a6fc043f57faa7b0d7d00a04d227611565da142e0a2e9bc4bfa5b315c0f54c1c9e519e0fa552030c2f98a SHA512 aaf4516e8304d1312b1ce3977281c86f866baaf9d7b1de3da3dd5b471f59e547b0b002aa966cb72dfbefd22efa26124e15ec4a377b64aa5a2f49196aeb58e1c3
+EBUILD mod_wsgi-4.9.0.ebuild 1111 BLAKE2B 69c4c4584a991bdc542eaa795c1669a29f35755e197d9aaf50705223dd937f78ca9428a1430d92b5e50b2edbbaf32c62284c517fa28a3ad62266afd350a577e2 SHA512 fd135f4833b251a74c8f3e69c0622238f95f07eb83f8921b1032e3a6faefe0dc5b065e014bb8a2fc222026699bbcc6fae203f73d6c0c98d6d22708d1fefe416d
MISC metadata.xml 381 BLAKE2B 604d6931a9a17c2521e907f719286c798028c6c51788ece43f81a09744eb545f9cc5b530177fbc7580df88855cdfe72d9204e3eeec660daaca7b72d9387fd650 SHA512 b8e16b976555de98f41b1ecee63c1cb2b1c518ae7b70d517024a7f1b03c2b1f89b54cc2f978792bdf79768cdd8d89abc11ee668db2d78786b1455afcf097a085
diff --git a/www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch b/www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch
new file mode 100644
index 000000000000..274046d99ca0
--- /dev/null
+++ b/www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch
@@ -0,0 +1,126 @@
+From b439f1c411a9479ccc03c16465cdff50fede79d3 Mon Sep 17 00:00:00 2001
+From: Petr Viktorin <encukou@gmail.com>
+Date: Thu, 10 Jun 2021 15:45:03 +0200
+Subject: [PATCH] Use Py_CompileString rather than
+ PyParser_SimpleParseFile/PyNode_Compile
+From: https://github.com/GrahamDumpleton/mod_wsgi/commit/b439f1c411a9479ccc03c16465cdff50fede79d3
+
+---
+ src/server/mod_wsgi.c | 68 +++++++++++++++++++++++++++++++---------
+ src/server/wsgi_python.h | 1 -
+ 2 files changed, 53 insertions(+), 16 deletions(-)
+
+diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c
+index b657a748..4f1d8765 100644
+--- a/src/server/mod_wsgi.c
++++ b/src/server/mod_wsgi.c
+@@ -3645,7 +3645,10 @@ static PyObject *wsgi_load_source(apr_pool_t *pool, request_rec *r,
+ FILE *fp = NULL;
+ PyObject *m = NULL;
+ PyObject *co = NULL;
+- struct _node *n = NULL;
++ char *source;
++ size_t pos = 0;
++ size_t allocated = 1024;
++ size_t nread;
+
+ #if defined(WIN32) && defined(APR_HAS_UNICODE_FS)
+ apr_wchar_t wfilename[APR_PATH_MAX];
+@@ -3730,36 +3733,71 @@ static PyObject *wsgi_load_source(apr_pool_t *pool, request_rec *r,
+ return NULL;
+ }
+
+- n = PyParser_SimpleParseFile(fp, filename, Py_file_input);
+-
++ source = malloc(allocated);
++ if (source != NULL) {
++ do {
++ nread = fread(source + pos, 1, allocated - pos, fp);
++ pos += nread;
++ if (nread == 0) {
++ if (ferror(fp)) {
++ free(source);
++ source = NULL;
++ }
++ break;
++ }
++ if (pos == allocated) {
++ allocated *= 2;
++ char *reallocated_source = realloc(source, allocated);
++ if (reallocated_source == NULL) {
++ free(source);
++ source = NULL;
++ break;
++ }
++ source = reallocated_source;
++ }
++ } while (!feof(fp));
++ }
+ fclose(fp);
+-
+- if (!n) {
++ if (source == NULL) {
+ Py_BEGIN_ALLOW_THREADS
+ if (r) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
+ "mod_wsgi (pid=%d, process='%s', application='%s'): "
+- "Failed to parse Python script file '%s'.", getpid(),
++ "Could not read source file '%s'.", getpid(),
+ process_group, application_group, filename);
+ }
+ else {
+- ap_log_error(APLOG_MARK, APLOG_ERR, 0, wsgi_server,
++ ap_log_error(APLOG_MARK, APLOG_ERR, errno, wsgi_server,
+ "mod_wsgi (pid=%d, process='%s', application='%s'): "
+- "Failed to parse Python script file '%s'.", getpid(),
++ "Could not read source file '%s'.", getpid(),
+ process_group, application_group, filename);
+ }
+ Py_END_ALLOW_THREADS
++ return NULL;
++ }
+
+- wsgi_log_python_error(r, NULL, filename, 0);
++ co = Py_CompileString(filename, source, 0);
++ free(source);
+
++ if (!co) {
++ Py_BEGIN_ALLOW_THREADS
++ if (r) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
++ "mod_wsgi (pid=%d, process='%s', application='%s'): "
++ "Could not compile source file '%s'.", getpid(),
++ process_group, application_group, filename);
++ }
++ else {
++ ap_log_error(APLOG_MARK, APLOG_ERR, errno, wsgi_server,
++ "mod_wsgi (pid=%d, process='%s', application='%s'): "
++ "Could not compile source file '%s'.", getpid(),
++ process_group, application_group, filename);
++ }
++ Py_END_ALLOW_THREADS
+ return NULL;
+ }
+
+- co = (PyObject *)PyNode_Compile(n, filename);
+- PyNode_Free(n);
+-
+- if (co)
+- m = PyImport_ExecCodeModuleEx((char *)name, co, (char *)filename);
++ m = PyImport_ExecCodeModuleEx((char *)name, co, (char *)filename);
+
+ Py_XDECREF(co);
+
+diff --git a/src/server/wsgi_python.h b/src/server/wsgi_python.h
+index fa06e2cb..3b34b731 100644
+--- a/src/server/wsgi_python.h
++++ b/src/server/wsgi_python.h
+@@ -43,7 +43,6 @@
+
+ #include "structmember.h"
+ #include "compile.h"
+-#include "node.h"
+ #include "osdefs.h"
+ #include "frameobject.h"
+
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.7.1-r1.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.7.1-r1.ebuild
index e5ae886e528e..759f60c5f6d0 100644
--- a/www-apache/mod_wsgi/mod_wsgi-4.7.1-r1.ebuild
+++ b/www-apache/mod_wsgi/mod_wsgi-4.7.1-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8,9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE="threads(+)"
inherit apache-module python-single-r1
@@ -27,6 +27,10 @@ APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
DOCFILES="README.rst"
+PATCHES=(
+ "${FILESDIR}/${P}-py310.patch"
+)
+
need_apache2
pkg_setup() {
diff --git a/www-apache/mod_wsgi/mod_wsgi-4.9.0.ebuild b/www-apache/mod_wsgi/mod_wsgi-4.9.0.ebuild
new file mode 100644
index 000000000000..09d2547237d1
--- /dev/null
+++ b/www-apache/mod_wsgi/mod_wsgi-4.9.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit apache-module python-single-r1
+
+DESCRIPTION="An Apache2 module for running Python WSGI applications"
+HOMEPAGE="https://github.com/GrahamDumpleton/mod_wsgi"
+SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="${PYTHON_DEPS}"
+
+APACHE2_MOD_CONF="70_${PN}"
+APACHE2_MOD_DEFINE="WSGI"
+APACHE2_MOD_FILE="${S}/src/server/.libs/${PN}.so"
+
+DOCFILES="README.rst"
+
+need_apache2
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+
+ # Calling depend.apache_pkg_setup fails because we do not have
+ # "apache2" in IUSE but the function expects this in order to call
+ # _init_apache2_late which sets the APACHE_MODULESDIR variable.
+ _init_apache2
+ _init_apache2_late
+}
+
+src_configure() {
+ econf --with-apxs="${APXS}" --with-python="${PYTHON}"
+}
+
+src_compile() {
+ default
+}