summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mair-Keimberger <mmk@levelnine.at>2023-01-01 14:45:52 +0100
committerConrad Kostecki <conikost@gentoo.org>2023-01-01 19:16:18 +0100
commit8f649e01d7a5dcf6c597b4d33aa20885950ae96d (patch)
treec86290c24a29438c95cc59e7f5b88ecf83c4aa29 /www-apache
parentsys-fs/hfsutils: remove unused patch (diff)
downloadgentoo-8f649e01d7a5dcf6c597b4d33aa20885950ae96d.tar.gz
gentoo-8f649e01d7a5dcf6c597b4d33aa20885950ae96d.tar.bz2
gentoo-8f649e01d7a5dcf6c597b4d33aa20885950ae96d.zip
www-apache/mod_wsgi: remove unused patch
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/28914 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch126
1 files changed, 0 insertions, 126 deletions
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
deleted file mode 100644
index 274046d99ca0..000000000000
--- a/www-apache/mod_wsgi/files/mod_wsgi-4.7.1-py310.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-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"
-