Compare commits
No commits in common. "stream-python38-3.8-rhel-8.10.0" and "c8" have entirely different histories.
stream-pyt
...
c8
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/mod_wsgi-4.6.8.tar.gz
|
||||
SOURCES/mod_wsgi-4.6.4.tar.gz
|
||||
|
||||
1
.mod_wsgi.metadata
Normal file
1
.mod_wsgi.metadata
Normal file
@ -0,0 +1 @@
|
||||
6a0cc67546a5e172a885324f3e58b8be5f4e0e58 SOURCES/mod_wsgi-4.6.4.tar.gz
|
||||
@ -1,41 +0,0 @@
|
||||
From 0f34844009075391c55419a3afb90e469facf35e Mon Sep 17 00:00:00 2001
|
||||
From: Graham Dumpleton <Graham.Dumpleton@gmail.com>
|
||||
Date: Tue, 14 May 2019 16:14:07 +1000
|
||||
Subject: [PATCH] Changed functions to pre/post actions when forking.
|
||||
|
||||
---
|
||||
src/server/mod_wsgi.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c
|
||||
index 2e4bb24..bf55945 100644
|
||||
--- a/src/server/mod_wsgi.c
|
||||
+++ b/src/server/mod_wsgi.c
|
||||
@@ -4345,8 +4345,13 @@ static void wsgi_python_child_init(apr_pool_t *p)
|
||||
* do it if Python was initialised in parent process.
|
||||
*/
|
||||
|
||||
- if (wsgi_python_initialized && !wsgi_python_after_fork)
|
||||
+ if (wsgi_python_initialized && !wsgi_python_after_fork) {
|
||||
+#if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7)
|
||||
+ PyOS_AfterFork_Child();
|
||||
+#else
|
||||
PyOS_AfterFork();
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
/* Finalise any Python objects required by child process. */
|
||||
|
||||
@@ -10422,6 +10427,12 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon)
|
||||
wsgi_exit_daemon_process(0);
|
||||
}
|
||||
|
||||
+ if (wsgi_python_initialized) {
|
||||
+#if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7)
|
||||
+ PyOS_AfterFork_Parent();
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
apr_pool_note_subprocess(p, &daemon->process, APR_KILL_AFTER_TIMEOUT);
|
||||
apr_proc_other_child_register(&daemon->process, wsgi_manage_process,
|
||||
daemon, NULL, p);
|
||||
131
SOURCES/mod_wsgi-4.6.4-warnings.patch
Normal file
131
SOURCES/mod_wsgi-4.6.4-warnings.patch
Normal file
@ -0,0 +1,131 @@
|
||||
|
||||
https://github.com/GrahamDumpleton/mod_wsgi/pull/364
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1602620
|
||||
|
||||
--- mod_wsgi-4.6.4/src/server/__init__.py.warnings
|
||||
+++ mod_wsgi-4.6.4/src/server/__init__.py
|
||||
@@ -103,7 +103,6 @@
|
||||
for name in mimetypes.knownfiles:
|
||||
if os.path.exists(name):
|
||||
return name
|
||||
- break
|
||||
else:
|
||||
return name
|
||||
|
||||
--- mod_wsgi-4.6.4/src/server/mod_wsgi.c.warnings
|
||||
+++ mod_wsgi-4.6.4/src/server/mod_wsgi.c
|
||||
@@ -2108,9 +2108,11 @@
|
||||
/* Publish event for the start of the response. */
|
||||
|
||||
if (wsgi_event_subscribers()) {
|
||||
+#if 0
|
||||
WSGIThreadInfo *thread_info;
|
||||
|
||||
thread_info = wsgi_thread_info(0, 0);
|
||||
+#endif
|
||||
|
||||
event = PyDict_New();
|
||||
|
||||
@@ -6349,10 +6351,7 @@
|
||||
|
||||
/* Need to cast const away. */
|
||||
|
||||
- if (r)
|
||||
- id = &((request_rec *)r)->log_id;
|
||||
- else
|
||||
- id = &((conn_rec *)c)->log_id;
|
||||
+ id = &((request_rec *)r)->log_id;
|
||||
|
||||
ap_run_generate_log_id(c, r, id);
|
||||
}
|
||||
@@ -8510,6 +8509,7 @@
|
||||
ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server,
|
||||
"mod_wsgi (pid=%d): Couldn't bind unix domain "
|
||||
"socket '%s'.", getpid(), process->socket_path);
|
||||
+ close(sockfd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -8521,6 +8521,7 @@
|
||||
ap_log_error(APLOG_MARK, APLOG_ALERT, errno, wsgi_server,
|
||||
"mod_wsgi (pid=%d): Couldn't listen on unix domain "
|
||||
"socket.", getpid());
|
||||
+ close(sockfd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -8555,6 +8556,7 @@
|
||||
"mod_wsgi (pid=%d): Couldn't change owner of unix "
|
||||
"domain socket '%s' to uid=%ld.", getpid(),
|
||||
process->socket_path, (long)socket_uid);
|
||||
+ close(sockfd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -13338,8 +13340,10 @@
|
||||
for (i = 0; i < wsgi_daemon_list->nelts; ++i) {
|
||||
entry = &entries[i];
|
||||
|
||||
- close(entry->listener_fd);
|
||||
- entry->listener_fd = -1;
|
||||
+ if (entry->listener_fd != -1) {
|
||||
+ close(entry->listener_fd);
|
||||
+ entry->listener_fd = -1;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -13751,8 +13755,8 @@
|
||||
|
||||
if (trusted_proxy) {
|
||||
for (i=0; i<trusted_proxy_headers->nelts; i++) {
|
||||
- const char *name = NULL;
|
||||
- const char *value = NULL;
|
||||
+ const char *name;
|
||||
+ const char *value;
|
||||
|
||||
name = ((const char**)trusted_proxy_headers->elts)[i];
|
||||
value = apr_table_get(r->subprocess_env, name);
|
||||
@@ -13879,11 +13883,9 @@
|
||||
*/
|
||||
|
||||
for (i=0; i<trusted_proxy_headers->nelts; i++) {
|
||||
- const char *name = NULL;
|
||||
- const char *value = NULL;
|
||||
+ const char *name;
|
||||
|
||||
name = ((const char**)trusted_proxy_headers->elts)[i];
|
||||
- value = apr_table_get(r->subprocess_env, name);
|
||||
|
||||
if (!strcmp(name, "HTTP_X_FORWARDED_FOR") ||
|
||||
!strcmp(name, "HTTP_X_REAL_IP")) {
|
||||
--- mod_wsgi-4.6.4/src/server/wsgi_logger.c.warnings
|
||||
+++ mod_wsgi-4.6.4/src/server/wsgi_logger.c
|
||||
@@ -694,9 +694,11 @@
|
||||
PyObject *object = NULL;
|
||||
|
||||
if (wsgi_event_subscribers()) {
|
||||
+#if 0
|
||||
WSGIThreadInfo *thread_info;
|
||||
|
||||
thread_info = wsgi_thread_info(0, 0);
|
||||
+#endif
|
||||
|
||||
event = PyDict_New();
|
||||
|
||||
--- mod_wsgi-4.6.4/src/server/wsgi_python.h.warnings
|
||||
+++ mod_wsgi-4.6.4/src/server/wsgi_python.h
|
||||
@@ -21,6 +21,12 @@
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
+#ifdef _POSIX_C_SOURCE
|
||||
+#undef _POSIX_C_SOURCE
|
||||
+#endif
|
||||
+#ifdef _XOPEN_SOURCE
|
||||
+#undef _XOPEN_SOURCE
|
||||
+#endif
|
||||
#include <Python.h>
|
||||
|
||||
#if !defined(PY_VERSION_HEX)
|
||||
@ -1,12 +1,4 @@
|
||||
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
|
||||
|
||||
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
|
||||
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
|
||||
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
|
||||
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
|
||||
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
|
||||
|
||||
%bcond_with docs
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%bcond_without python3
|
||||
@ -14,39 +6,39 @@
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
|
||||
%if 0%{?fedora} || 0%{?rhel} <= 7
|
||||
%bcond_without python2
|
||||
%else
|
||||
%bcond_with python2
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%if %{with python3} && !%{with python2}
|
||||
%global py3dir .
|
||||
%endif
|
||||
|
||||
Name: mod_wsgi
|
||||
Version: 4.6.8
|
||||
Version: 4.6.4
|
||||
Release: 5%{?dist}
|
||||
Summary: A WSGI interface for Python web applications in Apache
|
||||
Group: System Environment/Libraries
|
||||
License: ASL 2.0
|
||||
URL: https://modwsgi.readthedocs.io/
|
||||
Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz
|
||||
Source1: wsgi.conf
|
||||
Source2: wsgi-python3.conf
|
||||
Patch1: mod_wsgi-4.5.20-exports.patch
|
||||
Patch2: mod_wsgi-4.9.1-request-limit.patch
|
||||
Patch3: mod_wsgi-4.7.1-remove-rpath.patch
|
||||
|
||||
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
||||
# x86_64 compose of CRB, but we don't want to ship it at all.
|
||||
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1779142
|
||||
ExcludeArch: i686
|
||||
|
||||
Patch2: mod_wsgi-4.6.4-warnings.patch
|
||||
Patch3: mod_wsgi-4.9.1-request-limit.patch
|
||||
BuildRequires: httpd-devel
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: gcc
|
||||
|
||||
# Suppress auto-provides for module DSO
|
||||
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
|
||||
%{?filter_setup}
|
||||
|
||||
|
||||
|
||||
%global _description\
|
||||
The mod_wsgi adapter is an Apache module that provides a WSGI compliant\
|
||||
interface for hosting Python based web applications within Apache. The\
|
||||
@ -61,7 +53,7 @@ existing WSGI adapters for mod_python or CGI.\
|
||||
%package -n python2-%{name}
|
||||
Summary: %summary
|
||||
Requires: httpd-mmn = %{_httpd_mmn}
|
||||
BuildRequires: python2-devel, python2-setuptools
|
||||
BuildRequires: python2-devel
|
||||
%{?python_provide:%python_provide python2-%{name}}
|
||||
# Remove before F30
|
||||
Provides: mod_wsgi = %{version}-%{release}
|
||||
@ -73,66 +65,50 @@ Obsoletes: mod_wsgi < %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python%{python3_pkgversion}-%{name}
|
||||
%package -n python3-%{name}
|
||||
Summary: %summary
|
||||
Requires: httpd-mmn = %{_httpd_mmn}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
||||
%if %{with docs}
|
||||
BuildRequires: python3-sphinx, python3-sphinx_rtd_theme
|
||||
%endif
|
||||
BuildRequires: python3-devel
|
||||
|
||||
# httpd can only load one Python 3 version of mod_wsgi at the time, and
|
||||
# therefore we use a Conflicts tag to only allow one to be installed. The
|
||||
# alternative would be to define a priority between them (e.g. python3- has
|
||||
# priority over python38-), however, it would be potentially confusing and
|
||||
# tricky to notice why the other version is not working.
|
||||
Conflicts: python3-mod_wsgi
|
||||
|
||||
%description -n python%{python3_pkgversion}-%{name} %_description
|
||||
|
||||
Only one Python 3 version of mod_wsgi can be loaded at the same time in httpd,
|
||||
therefore this package conflicts with the other versions available.
|
||||
%description -n python3-%{name} %_description
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
%setup -qn %{name}-%{version}
|
||||
%patch1 -p1 -b .exports
|
||||
%patch2 -p1 -b .warnings
|
||||
%patch3 -p1 -b .request-limit
|
||||
|
||||
: Python2=%{with_python2} Python3=%{with_python3}
|
||||
%if "%{py3dir}" != "."
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{with python3}
|
||||
%if %{with docs}
|
||||
make -C docs html SPHINXBUILD=%{_bindir}/sphinx-build-3
|
||||
%endif
|
||||
%endif
|
||||
make -C docs html
|
||||
|
||||
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
|
||||
%if %{with python3}
|
||||
mkdir py3build/
|
||||
# this always produces an error (because of trying to copy py3build
|
||||
# into itself) but we don't mind, so || :
|
||||
cp -R * py3build/ || :
|
||||
pushd py3build
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3.8
|
||||
make %{?_smp_mflags}
|
||||
%py3_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with python2}
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python2
|
||||
make %{?_smp_mflags}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
|
||||
make %{?_smp_mflags}
|
||||
%py3_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
# first install python3 variant and rename the so file
|
||||
%if %{with python3}
|
||||
pushd py3build
|
||||
|
||||
pushd %{py3dir}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
|
||||
mv $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so
|
||||
|
||||
@ -141,7 +117,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
|
||||
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3.conf
|
||||
|
||||
%py3_install
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-%{python3_version}}
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3}
|
||||
popd
|
||||
|
||||
%endif
|
||||
@ -172,77 +148,42 @@ ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python%{python3_pkgversion}-%{name}
|
||||
%files -n python3-%{name}
|
||||
%license LICENSE
|
||||
%doc CREDITS.rst README.rst
|
||||
%config(noreplace) %{_httpd_modconfdir}/*wsgi-python3.conf
|
||||
%{_httpd_moddir}/mod_wsgi_python3.so
|
||||
%{python3_sitearch}/mod_wsgi-*.egg-info
|
||||
%{python3_sitearch}/mod_wsgi
|
||||
%{_bindir}/mod_wsgi-express-%{python3_version}
|
||||
%{_bindir}/mod_wsgi-express-3
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jul 13 2023 Charalampos Stratakis <cstratak@redhat.com> - 4.6.8-5
|
||||
- Remove rpath
|
||||
Resolves: rhbz#2213836
|
||||
* Tue Sep 06 2022 Luboš Uhliarik <luhliari@redhat.com> - 4.6.4-5
|
||||
- Resolves: #2122695 - Core dumped upon file upload >= 1GB
|
||||
|
||||
* Thu Sep 08 2022 Lumír Balhar <lbalhar@redhat.com> - 4.6.8-4
|
||||
- Core dumped upon file upload >= 1GB
|
||||
Resolves: rhbz#2125171
|
||||
* Wed Dec 04 2019 Lubos Uhliarik <luhliari@redhat.com> - 4.6.4-4
|
||||
- Resolves: #1779705 - python3-mod_wsgi: Remove the Provides and Obsoletes for
|
||||
the name `mod_wsgi`
|
||||
|
||||
* Wed Dec 11 2019 Tomas Orsava <torsava@redhat.com> - 4.6.8-3
|
||||
- Exclude unsupported i686 arch (rhbz#1779142)
|
||||
* Thu Dec 13 2018 Joe Orton <jorton@redhat.com> - 4.6.4-3
|
||||
- avoid unstripped binaries, re-enable debugsource generation (#1659086)
|
||||
|
||||
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 4.6.8-2
|
||||
- Adjusted for Python 3.8 module in RHEL 8
|
||||
* Tue Dec 11 2018 Joe Orton <jorton@redhat.com> - 4.6.4-2
|
||||
- fix covscan warnings (#1602620)
|
||||
|
||||
* Mon Nov 11 2019 Joe Orton <jorton@redhat.com> - 4.6.8-1
|
||||
- update to 4.6.8 (#1721376)
|
||||
* Wed Jun 27 2018 Joe Orton <jorton@redhat.com> - 4.6.4-1
|
||||
- update to 4.6.4 (#1592687)
|
||||
|
||||
* Mon Nov 11 2019 Joe Orton <jorton@redhat.com> - 4.6.6-6
|
||||
- try again to drop Python 2
|
||||
* Tue Jun 26 2018 Tomas Orsava <torsava@redhat.com> - 4.6.2-5
|
||||
- Switch to using Python 3 version of sphinx
|
||||
|
||||
* Tue Oct 29 2019 Joe Orton <jorton@redhat.com> - 4.6.6-5
|
||||
- drop python2 build
|
||||
* Tue Jun 26 2018 Tomas Orsava <torsava@redhat.com> - 4.6.2-4
|
||||
- Update conditionals into bcond's so they can be manipulated during modular
|
||||
builds
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.6-4
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.6-3
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Jun 08 2019 Matthias Runge <mrunge@redhat.com> - 4.6.6-1
|
||||
- update to 4.6.6 (rhbz#1718151)
|
||||
|
||||
* Wed May 29 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.5-1
|
||||
- update to 4.6.5
|
||||
|
||||
* Tue Apr 16 2019 Joe Orton <jorton@redhat.com> - 4.6.4-4
|
||||
- only build docs with Python 3
|
||||
- fix build on Fedora>30 and RHEL 7
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Jul 31 2018 Adam Williamson <awilliam@redhat.com> - 4.6.4-2
|
||||
- Run Python 3 build in a subdir, so module isn't linked against both
|
||||
libpython 2 and libpython 3 (rhbz#1609491)
|
||||
|
||||
* Fri Jul 20 2018 Matthias Runge <mrunge@redhat.com> - 4.6.4-1
|
||||
- update to 4.6.4 (rhbz#1560329)
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.6.2-4
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri Apr 20 2018 Joe Orton <jorton@redhat.com> - 4.6.2-3
|
||||
- use sphinx-build-3 if python2 support is disabled
|
||||
* Tue Jun 26 2018 Tomas Orsava <torsava@redhat.com> - 4.6.2-3
|
||||
- Fix the invocation of Python 2 to a versioned executable
|
||||
|
||||
* Thu Mar 22 2018 Troy Dawson <tdawson@redhat.com> - 4.6.2-2
|
||||
- Update conditionals.
|
||||
@ -1,55 +0,0 @@
|
||||
From b03b02df6318afe26052db5b0365732152cacea2 Mon Sep 17 00:00:00 2001
|
||||
From: Graham Dumpleton <Graham.Dumpleton@gmail.com>
|
||||
Date: Tue, 14 May 2019 16:14:42 +1000
|
||||
Subject: [PATCH] Use official APIs for accessing interpreter list.
|
||||
|
||||
---
|
||||
src/server/wsgi_interp.c | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/server/wsgi_interp.c b/src/server/wsgi_interp.c
|
||||
index 4a94850..3fbca04 100644
|
||||
--- a/src/server/wsgi_interp.c
|
||||
+++ b/src/server/wsgi_interp.c
|
||||
@@ -338,9 +338,10 @@ static PyObject *ShutdownInterpreter_call(
|
||||
|
||||
PyThreadState_Swap(NULL);
|
||||
|
||||
- tstate = tstate->interp->tstate_head;
|
||||
+ tstate = PyInterpreterState_ThreadHead(tstate->interp);
|
||||
+
|
||||
while (tstate) {
|
||||
- tstate_next = tstate->next;
|
||||
+ tstate_next = PyThreadState_Next(tstate);
|
||||
if (tstate != tstate_save) {
|
||||
PyThreadState_Swap(tstate);
|
||||
PyThreadState_Clear(tstate);
|
||||
@@ -436,9 +437,13 @@ InterpreterObject *newInterpreterObject(const char *name)
|
||||
*/
|
||||
|
||||
if (!name) {
|
||||
+#if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7)
|
||||
+ interp = PyInterpreterState_Main();
|
||||
+#else
|
||||
interp = PyInterpreterState_Head();
|
||||
- while (interp->next)
|
||||
- interp = interp->next;
|
||||
+ while (PyInterpreterState_Next(interp))
|
||||
+ interp = PyInterpreterState_Next(interp);
|
||||
+#endif
|
||||
|
||||
name = "";
|
||||
}
|
||||
@@ -1883,9 +1888,10 @@ static void Interpreter_dealloc(InterpreterObject *self)
|
||||
|
||||
PyThreadState_Swap(NULL);
|
||||
|
||||
- tstate = tstate->interp->tstate_head;
|
||||
+ tstate = PyInterpreterState_ThreadHead(tstate->interp);
|
||||
+
|
||||
while (tstate) {
|
||||
- tstate_next = tstate->next;
|
||||
+ tstate_next = PyThreadState_Next(tstate);
|
||||
if (tstate != tstate_save) {
|
||||
PyThreadState_Swap(tstate);
|
||||
PyThreadState_Clear(tstate);
|
||||
@ -1,20 +0,0 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index bf272ba..824957d 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -465,15 +465,6 @@ EXTRA_COMPILE_FLAGS = (EXTRA_INCLUDES + CPPFLAGS + EXTRA_CPPFLAGS +
|
||||
CFLAGS + EXTRA_CFLAGS + APR_INCLUDES + APU_INCLUDES)
|
||||
EXTRA_LINK_ARGS = PYTHON_LDFLAGS + PYTHON_LDLIBS
|
||||
|
||||
-# Force adding of LD_RUN_PATH for platforms that may need it.
|
||||
-
|
||||
-if os.name != 'nt':
|
||||
- LD_RUN_PATH = os.environ.get('LD_RUN_PATH', '')
|
||||
- LD_RUN_PATH += ':%s:%s' % (PYTHON_LIBDIR, PYTHON_CFGDIR)
|
||||
- LD_RUN_PATH = LD_RUN_PATH.lstrip(':')
|
||||
-
|
||||
- os.environ['LD_RUN_PATH'] = LD_RUN_PATH
|
||||
-
|
||||
# On MacOS X, recent versions of Apple's Apache do not support compiling
|
||||
# Apache modules with a target older than 10.8. This is because it
|
||||
# screws up Apache APR % formats for apr_time_t, which breaks daemon
|
||||
@ -1,12 +0,0 @@
|
||||
# We have disabled the debuginfo package
|
||||
# generation due to issues with modularity
|
||||
debuginfo:
|
||||
ignore:
|
||||
- /usr/lib*/httpd/modules/mod_wsgi_python*.so
|
||||
- /usr/lib*/python*/site-packages/mod_wsgi/server/mod_wsgi*.so
|
||||
|
||||
# In a modular build rpminspect confuses the python39-libs for a
|
||||
# subpackage of mod_wsgi. Ignore this check.
|
||||
rpmdeps:
|
||||
ignore:
|
||||
requires: ^libpython[0-9]+\.[0-9]+\.so.*\(\)\(.*\)$
|
||||
Loading…
Reference in New Issue
Block a user