Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: libapache2-mod-pyt...@packages.debian.org
Control: affects -1 + src:libapache2-mod-python

Please unblock package libapache2-mod-python

[ Reason ]
* In 03_debian-version.patch, strip the debian part of the version. BinNMUs
  were resulting in invalid PEP-440 versions. (Closes: #1054587)
* Patch: Fix segfaults when releasing threads. (Closes: #1019299)

[ Impact ]
The segfault issue seems rather serious.

The PEP-440 issue breaks any attempt to enumerate installed packages on
the system with pkg_resources.

[ Tests ]
Manually tested that mod_python runs and serves content.

[ Risks ]
Segfault patch is trivial and taken from upstream.

Version patch is trivial, and Debian-specific.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock libapache2-mod-python/3.5.0+git20211031.e6458ec-1+b1
diff -Nru libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/changelog 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/changelog
--- libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/changelog    
2022-04-18 06:22:40.000000000 +0200
+++ libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/changelog    
2023-10-26 15:07:51.000000000 +0200
@@ -1,3 +1,12 @@
+libapache2-mod-python (3.5.0+git20211031.e6458ec-1+deb12u1) bookworm; 
urgency=medium
+
+  * Team upload.
+  * In 03_debian-version.patch, strip the debian part of the version. BinNMUs
+    were resulting in invalid PEP-440 versions. (Closes: #1054587)
+  * Patch: Fix segfaults when releasing threads. (Closes: #1019299)
+
+ -- Stefano Rivera <stefa...@debian.org>  Thu, 26 Oct 2023 15:07:51 +0200
+
 libapache2-mod-python (3.5.0+git20211031.e6458ec-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/03_debian-version.patch
 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/03_debian-version.patch
--- 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/03_debian-version.patch
      2022-04-18 06:22:40.000000000 +0200
+++ 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/03_debian-version.patch
      2023-10-26 15:07:51.000000000 +0200
@@ -9,7 +9,7 @@
  1 file changed, 2 insertions(+), 19 deletions(-)
 
 diff --git a/dist/version.sh b/dist/version.sh
-index e50000d..9ee18ac 100755
+index e50000d..f97084a 100755
 --- a/dist/version.sh
 +++ b/dist/version.sh
 @@ -1,21 +1,4 @@
@@ -35,4 +35,4 @@
 -
 -echo $MAJ.$MIN.$PCH$GIT
 +cd $(dirname $0)/..
-+exec dpkg-parsechangelog -S Version
++dpkg-parsechangelog -S Version | cut -d - -f 1
diff -Nru 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/15_py310_threadstate_clear.patch
 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/15_py310_threadstate_clear.patch
--- 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/15_py310_threadstate_clear.patch
     1970-01-01 02:00:00.000000000 +0200
+++ 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/15_py310_threadstate_clear.patch
     2023-10-26 15:07:51.000000000 +0200
@@ -0,0 +1,27 @@
+From: Gregory Trubetskoy <gri...@modpython.org>
+Date: Fri, 16 Jun 2023 18:29:50 -0400
+Subject: 3.10 and up do not need a PyThreadState_Clear()
+
+Closes #100
+
+Bug-Upstream: https://github.com/grisha/mod_python/issues/100
+Bug-Debian: https://bugs.debian.org/1019299
+Origin: upstream, 
https://github.com/grisha/mod_python/commit/7e863bb4652ca4edeb158bf42eb26120e0e54040
+---
+ src/mod_python.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/mod_python.c b/src/mod_python.c
+index 6259c1b..11af968 100644
+--- a/src/mod_python.c
++++ b/src/mod_python.c
+@@ -303,7 +303,9 @@ static void release_interpreter(interpreterdata *idata)
+ {
+     PyThreadState *tstate = PyThreadState_Get();
+ #ifdef WITH_THREAD
++#if PY_MAJOR_VERSION <= 3 && PY_MINOR_VERSION < 10 
+     PyThreadState_Clear(tstate);
++#endif
+     if (idata)
+         APR_ARRAY_PUSH(idata->tstates, PyThreadState *) = tstate;
+     else
diff -Nru libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/series 
libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/series
--- libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/series       
2022-04-18 06:22:40.000000000 +0200
+++ libapache2-mod-python-3.5.0+git20211031.e6458ec/debian/patches/series       
2023-10-26 15:07:51.000000000 +0200
@@ -6,3 +6,4 @@
 12_py310_collections_import.patch
 13_py310_minor_version.patch
 14_sphinx_py3.patch
+15_py310_threadstate_clear.patch

Reply via email to