[packages/apache-mod_python] - up to 3.5.0.4

baggins baggins at pld-linux.org
Sat Oct 12 23:24:23 CEST 2024


commit 28afaa6c3327b5fbfed9c547ed78f11fbe7ea24f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 12 23:24:01 2024 +0200

    - up to 3.5.0.4

 apache-mod_python-httpd-not-needed.patch |  4 +--
 apache-mod_python.spec                   | 14 ++++------
 build.patch                              | 21 ---------------
 import.patch                             | 29 ---------------------
 no-git.patch                             | 44 --------------------------------
 py3-nohash.patch                         | 14 ++++++++++
 6 files changed, 21 insertions(+), 105 deletions(-)
---
diff --git a/apache-mod_python.spec b/apache-mod_python.spec
index b4381b7..8ec8908 100644
--- a/apache-mod_python.spec
+++ b/apache-mod_python.spec
@@ -19,20 +19,18 @@ Summary(ja.UTF-8):	Apache Web サーバー用の組込み Python インタープ
 Summary(pl.UTF-8):	Wbudowany interpreter języka Python dla serwera WWW Apache
 Summary(sv.UTF-8):	En inbyggd Python-interpretator för webbservern Apache
 Name:		apache-mod_%{mod_name}
-Version:	3.5.0
-Release:	70
+Version:	3.5.0.4
+Release:	0.1
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
-Source0:	http://dist.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
-# Source0-md5:	2e61621e8d030f535f112d8e739161e2
+Source0:	https://github.com/grisha/mod_python/archive/%{version}/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5:	c53f328b04cfb9c2a83887de18c58273
 Source1:	%{name}.conf
 Source2:	%{name}3.conf
 Patch0:		%{name}-httpd-not-needed.patch
-Patch1:		no-git.patch
 Patch2:		set-request-response-status.patch
 Patch3:		install.patch
-Patch4:		import.patch
-Patch5:		build.patch
+Patch4:		py3-nohash.patch
 URL:		https://modpython.org/
 BuildRequires:	apache-devel >= 2.0.52-7
 BuildRequires:	apr-devel >= 1:1.0.0
@@ -238,11 +236,9 @@ prestandan jämfört med den traditionella CGI-metoden.
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 
 %build
 %{__aclocal}
diff --git a/apache-mod_python-httpd-not-needed.patch b/apache-mod_python-httpd-not-needed.patch
index 05bf0ac..42b5fd0 100644
--- a/apache-mod_python-httpd-not-needed.patch
+++ b/apache-mod_python-httpd-not-needed.patch
@@ -1,7 +1,7 @@
 diff -urNp -x '*.orig' mod_python-3.5.0.org/configure.in mod_python-3.5.0/configure.in
 --- mod_python-3.5.0.org/configure.in	2013-11-12 04:21:34.000000000 +0100
 +++ mod_python-3.5.0/configure.in	2021-03-02 22:05:35.446699820 +0100
-@@ -73,18 +73,6 @@ else
+@@ -73,18 +73,6 @@
    DSO="do_dso"
    ALL="dso"
  
@@ -13,7 +13,7 @@ diff -urNp -x '*.orig' mod_python-3.5.0.org/configure.in mod_python-3.5.0/config
 -  AC_MSG_RESULT($HTTPD_VERSION)
 -
 -  # make sure version begins with 2
--  if test -z "`echo $HTTPD_VERSION | egrep \^2`"; then
+-  if test -z "`echo $HTTPD_VERSION | grep -E \^2`"; then
 -    AC_MSG_ERROR([This version of mod_python only works with Apache 2. The one we have ($HTTPD) seems to be $HTTPD_VERSION.])
 -  fi
 -
diff --git a/build.patch b/build.patch
deleted file mode 100644
index f5c4b86..0000000
--- a/build.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urNp -x '*.orig' mod_python-3.5.0.org/src/_apachemodule.c mod_python-3.5.0/src/_apachemodule.c
---- mod_python-3.5.0.org/src/_apachemodule.c	2013-11-12 04:21:34.000000000 +0100
-+++ mod_python-3.5.0/src/_apachemodule.c	2021-03-02 22:05:35.930030347 +0100
-@@ -836,7 +836,7 @@ static struct PyModuleDef _apache_module
- 
- PyObject *_apache_module_init()
- {
--    PyObject *m, *d, *o;
-+    PyObject *m, *d, *o, *mod;
- 
-     PyType_Ready(&MpTable_Type);
-     PyType_Ready(&MpTableIter_Type);
-@@ -851,7 +851,7 @@ PyObject *_apache_module_init()
- #else
-     m = PyModule_Create(&_apache_moduledef);
-     PyObject *name = PyUnicode_FromString("_apache");
--    _PyImport_FixupExtensionObject(m, name, name);
-+    _PyImport_FixupExtensionObject(m, name, name, mod);
- #endif
-     d = PyModule_GetDict(m);
-     Mp_ServerReturn = PyErr_NewException("_apache.SERVER_RETURN", NULL, NULL);
diff --git a/import.patch b/import.patch
deleted file mode 100644
index 71456f3..0000000
--- a/import.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -urNp -x '*.orig' mod_python-3.5.0.org/src/mod_python.c mod_python-3.5.0/src/mod_python.c
---- mod_python-3.5.0.org/src/mod_python.c	2013-11-12 04:21:34.000000000 +0100
-+++ mod_python-3.5.0/src/mod_python.c	2021-03-02 22:05:35.833364242 +0100
-@@ -772,8 +772,15 @@ static int python_init(apr_pool_t *p, ap
-     {
-         initialized = 1;
- 
--        /* initialze the interpreter */
-+        /* Initialze the main interpreter. We do not want site.py to
-+         * be imported because as of Python 2.7.9 it would cause a
-+         * circular dependency related to _locale which breaks
-+         * graceful restart so we set Py_NoSiteFlag to 1 just for this
-+         * one time. (https://github.com/grisha/mod_python/issues/46)
-+         */
-+        Py_NoSiteFlag = 1;
-         Py_Initialize();
-+        Py_NoSiteFlag = 0;
- 
- #ifdef WITH_THREAD
-         /* create and acquire the interpreter lock */
-@@ -2646,7 +2653,7 @@ static void PythonChildInitHandler(apr_p
-      * problems as well. Thus disable cleanup of Python when
-      * child processes are being shutdown. (MODPYTHON-109)
-      *
--    apr_pool_cleanup_register(p, NULL, python_finalize, apr_pool_cleanup_null);
-+     * apr_pool_cleanup_register(p, NULL, python_finalize, apr_pool_cleanup_null);
-      */
- 
-     /*
diff --git a/no-git.patch b/no-git.patch
deleted file mode 100644
index 65e2345..0000000
--- a/no-git.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -urNp -x '*.orig' mod_python-3.5.0.org/dist/version.sh mod_python-3.5.0/dist/version.sh
---- mod_python-3.5.0.org/dist/version.sh	2013-11-12 04:21:34.000000000 +0100
-+++ mod_python-3.5.0/dist/version.sh	2021-03-02 22:05:35.543365926 +0100
-@@ -5,6 +5,5 @@ MPV_PATH="`dirname $0`/../src/include/mp
- MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
- MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
- PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
--GIT=`git describe --always`
- 
--echo $MAJ.$MIN.$PCH-$GIT
-+echo $MAJ.$MIN.$PCH
-diff -urNp -x '*.orig' mod_python-3.5.0.org/src/Makefile.in mod_python-3.5.0/src/Makefile.in
---- mod_python-3.5.0.org/src/Makefile.in	2013-11-12 04:21:34.000000000 +0100
-+++ mod_python-3.5.0/src/Makefile.in	2021-03-02 22:05:35.543365926 +0100
-@@ -64,16 +64,14 @@ distclean: clean
- 	rm -f Makefile .depend
- 
- version.c:
--	@MP_GIT_SHA=$$(git describe --always); \
- 	echo > version.c ; \
- 	echo "/* THIS FILE IS AUTO-GENERATED BY Makefile */" >> version.c ; \
- 	echo "#include \"mp_version.h\"" >> version.c ; \
--	echo "const char * const mp_git_sha = \"$${MP_GIT_SHA}\";" >> version.c ; \
- 	echo "const int mp_version_major = MP_VERSION_MAJOR;" >> version.c ; \
- 	echo "const int mp_version_minor = MP_VERSION_MINOR;" >> version.c ; \
- 	echo "const int mp_version_patch = MP_VERSION_PATCH;" >> version.c ; \
--	echo "const char * const mp_version_string = MP_VERSION_STRING(MP_VERSION_MAJOR,MP_VERSION_MINOR,MP_VERSION_PATCH) \"-$${MP_GIT_SHA}\";" >> version.c ; \
--	echo "const char * const mp_version_component = \"mod_python/\" MP_VERSION_STRING(MP_VERSION_MAJOR,MP_VERSION_MINOR,MP_VERSION_PATCH) \"-$${MP_GIT_SHA}\";" >> version.c
-+	echo "const char * const mp_version_string = MP_VERSION_STRING(MP_VERSION_MAJOR,MP_VERSION_MINOR,MP_VERSION_PATCH);" >> version.c ; \
-+	echo "const char * const mp_version_component = \"mod_python/\" MP_VERSION_STRING(MP_VERSION_MAJOR,MP_VERSION_MINOR,MP_VERSION_PATCH);" >> version.c
- 
- #	echo "const char * const mp_version_component = \"mod_python/\" #MP_VERSION_MAJOR \".\" #MP_VERSION_MINOR \".\" #MP_VERSION_PATCH \"-$${MP_GIT_SHA}\";" >> version.c
- 
-diff -urNp -x '*.orig' mod_python-3.5.0.org/src/include/mod_python.h.in mod_python-3.5.0/src/include/mod_python.h.in
---- mod_python-3.5.0.org/src/include/mod_python.h.in	2013-11-12 04:21:34.000000000 +0100
-+++ mod_python-3.5.0/src/include/mod_python.h.in	2021-03-02 22:05:35.543365926 +0100
-@@ -156,7 +156,6 @@ extern module AP_MODULE_DECLARE_DATA pyt
- #define MUTEX_DIR "@MUTEX_DIR@"
- 
- /* version stuff */
--extern const char * const mp_git_sha;
- extern const int mp_version_major;
- extern const int mp_version_minor;
- extern const int mp_version_patch;
diff --git a/py3-nohash.patch b/py3-nohash.patch
new file mode 100644
index 0000000..99dfc83
--- /dev/null
+++ b/py3-nohash.patch
@@ -0,0 +1,14 @@
+--- mod_python-3.5.0.4/src/tableobject.c.orig	2024-09-05 14:03:35.000000000 +0200
++++ mod_python-3.5.0.4/src/tableobject.c	2024-10-12 23:17:10.561504401 +0200
+@@ -1158,7 +1158,11 @@
+     return result;
+ }
+ 
++#if PY_MAJOR_VERSION < 3
+ static long table_nohash(PyObject *self)
++#else
++static int table_nohash(PyObject *self)
++#endif
+ {
+     TABLE_DEBUG("table_nohash");
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_python.git/commitdiff/28afaa6c3327b5fbfed9c547ed78f11fbe7ea24f



More information about the pld-cvs-commit mailing list