From ad39913b34adbf488d0afcabef47af083a95676e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 04:57:16 +0000 Subject: import mod_wsgi-3.4-18.el7 --- diff --git a/.mod_wsgi.metadata b/.mod_wsgi.metadata index 8f9d399..ceac8a1 100644 --- a/.mod_wsgi.metadata +++ b/.mod_wsgi.metadata @@ -1 +1 @@ -92ebc48e60ab658a984f97fd40cb71e0ae895469 SOURCES/mod_wsgi-3.4.tar.gz +4384f40407347ad3f32d4488d38f4ec6f75dd095 SOURCES/mod_wsgi-3.4.tar.gz diff --git a/SOURCES/mod_wsgi-3.4-restart-segfault.patch b/SOURCES/mod_wsgi-3.4-restart-segfault.patch new file mode 100644 index 0000000..cae8ab1 --- /dev/null +++ b/SOURCES/mod_wsgi-3.4-restart-segfault.patch @@ -0,0 +1,44 @@ +diff --git a/mod_wsgi.c b/mod_wsgi.c +index fd304bd..c65344e 100644 +--- a/mod_wsgi.c ++++ b/mod_wsgi.c +@@ -13659,14 +13659,37 @@ static int wsgi_hook_init(apr_pool_t *pconf, apr_pool_t *ptemp, + * Init function gets called twice during startup, we only + * need to actually do anything on the second time it is + * called. This avoids unecessarily initialising and then +- * destroying Python for no reason. ++ * destroying Python for no reason. We also though have to ++ * deal with a special case when a graceful restart is done. ++ * For that we are only called once, which is generally okay ++ * as the 'wsgi_init' key will be set from initial start up ++ * of the server. The exception to this is where the module ++ * is only loaded into Apache when the server is already ++ * running. In this case we have to detect that it is not ++ * the initial startup, but a subsequent restart. We can do ++ * this by looking at whether the scoreboard has been ++ * initialised yet. That is probably enough, but to be safe, ++ * also check what generation it is. + */ + + apr_pool_userdata_get(&data, userdata_key, s->process->pool); + if (!data) { + apr_pool_userdata_set((const void *)1, userdata_key, + apr_pool_cleanup_null, s->process->pool); +- return OK; ++ ++ /* ++ * Check for the special case of a graceful restart and ++ * the module being loaded for the first time. In this ++ * case we still go onto perform initialisation as the ++ * initialisation routine for the module will not be ++ * called a second time. ++ */ ++ ++ if (!ap_scoreboard_image || ++ ap_get_scoreboard_global()->running_generation == 0) { ++ ++ return OK; ++ } + } + + /* Setup module version information. */ diff --git a/SPECS/mod_wsgi.spec b/SPECS/mod_wsgi.spec index 2f38e31..394a8b0 100644 --- a/SPECS/mod_wsgi.spec +++ b/SPECS/mod_wsgi.spec @@ -7,19 +7,20 @@ Name: mod_wsgi Version: 3.4 -Release: 13%{?dist}.1 +Release: 18%{?dist} Summary: A WSGI interface for Python web applications in Apache Group: System Environment/Libraries License: ASL 2.0 -URL: http://modwsgi.org -Source0: http://modwsgi.googlecode.com/files/%{name}-%{version}.tar.gz +URL: http://www.modwsgi.org +Source0: https://github.com/GrahamDumpleton/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: wsgi.conf Patch0: mod_wsgi-3.4-connsbh.patch Patch1: mod_wsgi-3.4-procexit.patch Patch2: mod_wsgi-3.4-coredump.patch Patch3: mod_wsgi-3.4-CVE-2014-0240.patch Patch4: mod_wsgi-3.4-deadlock.patch -Patch5: mod_wsgi-3.4-head-to-get.patch +Patch5: mod_wsgi-3.4-restart-segfault.patch +Patch6: mod_wsgi-3.4-head-to-get.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: httpd-devel, python-devel, autoconf Requires: httpd-mmn = %{_httpd_mmn} @@ -43,7 +44,8 @@ existing WSGI adapters for mod_python or CGI. %patch2 -p1 -b .coredump %patch3 -p1 -b .cve20140240 %patch4 -p1 -b .deadlock -%patch5 -p1 -b .headtoget +%patch5 -p1 -b .restartseg +%patch6 -p1 -b .headtoget %build # Regenerate configure for -coredump patch change to configure.in @@ -78,8 +80,14 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Aug 30 2018 Luboš Uhliarik - 3.4-13.1 -- mod_wsgi forces HEAD to GET (#1623666) +* Wed Aug 15 2018 Luboš Uhliarik - 3.4-18 +- mod_wsgi forces HEAD to GET (#1466799) + +* Mon Jun 18 2018 Luboš Uhliarik - 3.4-17 +- upstream URL reference in the rpm header is unreachable/dead (#1583920) + +* Mon Jun 18 2018 Luboš Uhliarik - 3.4-14 +- mod_wsgi segfault if loaded during a restart (#1445540) * Thu Dec 14 2017 Joe Orton - 3.4-13 - reduce chance of deadlock at process shutdown (#1493429)