The package rpms/uwsgi.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/uwsgi.git/commit/?id=6d410724c068....
Change:
+%ifarch %{mono_arches}
Thanks.
Full change:
============
commit b41d6035d61b2ed897c4f08723daee07a4fcbf2d
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Fri Oct 28 21:39:35 2022 +0200
Drop the perl-PSGI Requirement from the Perl plugin, it's not
trictly needed
diff --git a/uwsgi.spec b/uwsgi.spec
index f0648cc..200d947 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -62,9 +62,8 @@
%ifarch x86_64
%bcond_without python2_greenlet
%endif
-# el7 does have perl-PSGI
-# el7 does have perl-Coro
%bcond_without perl
+# el7 does have perl-Coro
%bcond_without perlcoro
# el7 httpd does not include mod_proxy_uwsgi
%bcond_without mod_proxy_uwsgi
@@ -187,7 +186,7 @@
Name: uwsgi
Version: 2.0.21
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -617,7 +616,7 @@ This package contains the Carbon plugin for uWSGI (to use in
graphite)
%if %{with perl}
%package -n uwsgi-plugin-psgi
Summary: uWSGI - Plugin for PSGI support
-Requires: perl-PSGI, uwsgi-plugin-common = %{version}-%{release}
+Requires: uwsgi-plugin-common = %{version}-%{release}
%description -n uwsgi-plugin-psgi
This package contains the PSGI plugin for uWSGI
@@ -1836,6 +1835,10 @@ exit 0
%changelog
+* Fri Oct 28 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.21-2
+- Drop the perl-PSGI Requirement from the Perl plugin, it's not
+ strictly needed
+
* Thu Oct 27 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.21-1
- Update to 2.0.21
commit 9a8c2b97e26552cce11fdf52001d0346a32f91d2
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Fri Oct 28 19:25:26 2022 +0200
Update to 2.0.21
diff --git a/.gitignore b/.gitignore
index fb9d183..a8a8f9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,5 @@
/uwsgi-docs-8d868ea.tar.gz
/uwsgi-2.0.20.tar.gz
/uwsgi-docs-9b4ef5f.tar.gz
+/uwsgi-2.0.21.tar.gz
+/uwsgi-docs-47e1794.tar.gz
diff --git a/sources b/sources
index 3e2395c..d55d324 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (uwsgi-2.0.20.tar.gz) =
22677a8ad1ea886e1a3a153f486474ce064a55e5b12515322345116980f699f4e2e73267f991c300d904284e06f265ea821e71ba3c97832b6f25705475b498ff
-SHA512 (uwsgi-docs-9b4ef5f.tar.gz) =
faacb571533c5e770cf5701e979efec44b042d8eda6051d79a65216067715d113168663e8fc0f84133fecaeecee3053b60a5f9ac7938558f40a6cae90cd79b52
+SHA512 (uwsgi-2.0.21.tar.gz) =
36a9c1b87a4c3d08482b9045d2227f56b006acb53f38ddf1b510880ae5fc24c0177a077338ec8af3ef0b8f8e220bc4fc7f8311dab8066e13cbcbb616f736c795
+SHA512 (uwsgi-docs-47e1794.tar.gz) =
8fa66303b405da519f986e8a848439bb76d8043a860bb468e43fb451b672a5234ec1a06835b47f0e9bb467bab1bc0daf7fae387dfa1ef0ed3a3a501234fc5950
diff --git a/uwsgi.spec b/uwsgi.spec
index 336ec39..f0648cc 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -1,5 +1,5 @@
# Documentation sources:
-%global commit 9b4ef5fa68fe42929a5e5410165d36fcc7b2d2c7
+%global commit 47e17949d0fd95e524d4f90cc58a3fcb11bc0bae
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global docrepo uwsgi-docs
@@ -186,8 +186,8 @@
%endif
Name: uwsgi
-Version: 2.0.20
-Release: 10%{?dist}
+Version: 2.0.21
+Release: 1%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -1241,10 +1241,6 @@ cp -p %{SOURCE5} README.Fedora
%endif
%patch12 -p1
%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
%patch18 -p1
%if %{with perl} && (%{with python3} || %{with python3_other}) && %{with
perlcoro}
@@ -1840,6 +1836,9 @@ exit 0
%changelog
+* Thu Oct 27 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.21-1
+- Update to 2.0.21
+
* Thu Oct 06 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-10
- Fix PHP 8.2 support
diff --git a/uwsgi_fix_mono.patch b/uwsgi_fix_mono.patch
index 217eb68..bce3b1a 100644
--- a/uwsgi_fix_mono.patch
+++ b/uwsgi_fix_mono.patch
@@ -1,15 +1,15 @@
-diff -Naurp a/plugins/mono/uwsgiplugin.py b/plugins/mono/uwsgiplugin.py
---- a/plugins/mono/uwsgiplugin.py 2016-10-03 03:16:59.000000000 -0500
-+++ b/plugins/mono/uwsgiplugin.py 2017-03-20 16:18:54.917935286 -0500
-@@ -1,9 +1,9 @@
- import os
- NAME='mono'
+diff -uNwr a/plugins/mono/uwsgiplugin.py b/plugins/mono/uwsgiplugin.py
+--- a/plugins/mono/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/mono/uwsgiplugin.py 2022-10-27 20:47:38.791413699 +0200
+@@ -3,9 +3,9 @@
+
+ NAME = 'mono'
-CFLAGS = os.popen('pkg-config --cflags mono-2').read().rstrip().split()
+CFLAGS = os.popen('pkg-config --cflags mono-2
glib-2.0').read().rstrip().split()
LDFLAGS = []
-LIBS = os.popen('pkg-config --libs mono-2').read().rstrip().split()
-+LIBS = os.popen('pkg-config --libs mono-2 glib-2.0').read().rstrip().split()
++LIBS = os.popen('pkg-config --libs mono-2 glib-2.0').read().rstrip().split()
GCC_LIST = ['mono_plugin']
if os.uname()[0] == 'Darwin':
diff --git a/uwsgi_fix_rpath.patch b/uwsgi_fix_rpath.patch
index 4c4178b..cb9295b 100644
--- a/uwsgi_fix_rpath.patch
+++ b/uwsgi_fix_rpath.patch
@@ -1,7 +1,7 @@
-diff -uNr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py
---- a/plugins/jvm/uwsgiplugin.py 2021-10-06 07:22:45.000000000 +0200
-+++ b/plugins/jvm/uwsgiplugin.py 2022-01-23 10:50:20.403612334 +0100
-@@ -65,11 +65,6 @@
+diff -uNwr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py
+--- a/plugins/jvm/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/jvm/uwsgiplugin.py 2022-10-27 20:37:16.544261133 +0200
+@@ -66,11 +66,6 @@
GCC_LIST = ['jvm_plugin']
@@ -11,11 +11,11 @@ diff -uNr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py
- os.environ['LD_RUN_PATH'] = JVM_LIBPATH[0][2:]
-
def post_build(config):
- if os.system("javac %s/plugins/jvm/uwsgi.java" % os.getcwd()) != 0:
+ if subprocess.call("javac %s/plugins/jvm/uwsgi.java" % os.getcwd(),
shell=True) != 0:
os._exit(1)
-diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
---- a/plugins/php/uwsgiplugin.py 2021-10-06 07:22:45.000000000 +0200
-+++ b/plugins/php/uwsgiplugin.py 2022-01-23 10:50:20.404612340 +0100
+diff -uNwr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
+--- a/plugins/php/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/php/uwsgiplugin.py 2022-10-27 20:37:39.006374938 +0200
@@ -19,7 +19,6 @@
if ld_run_path:
@@ -24,10 +24,10 @@ diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' +
php_version]
-diff -uNr a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py
---- a/plugins/python/uwsgiplugin.py 2021-10-06 07:22:45.000000000 +0200
-+++ b/plugins/python/uwsgiplugin.py 2022-01-23 10:50:31.286681373 +0100
-@@ -60,9 +60,6 @@
+diff -uNwr a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py
+--- a/plugins/python/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/python/uwsgiplugin.py 2022-10-27 20:38:16.898566910 +0200
+@@ -62,9 +62,6 @@
libdir = "%s/lib" % sysconfig.PREFIX
LDFLAGS.append("-L%s" % libdir)
@@ -37,9 +37,9 @@ diff -uNr a/plugins/python/uwsgiplugin.py
b/plugins/python/uwsgiplugin.py
LIBS.append('-lpython%s' % get_python_version())
else:
-diff -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
---- a/plugins/rack/uwsgiplugin.py 2021-10-06 07:22:45.000000000 +0200
-+++ b/plugins/rack/uwsgiplugin.py 2022-01-23 10:50:20.408612365 +0100
+diff -uNwr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
+--- a/plugins/rack/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/rack/uwsgiplugin.py 2022-10-27 20:38:50.787738600 +0200
@@ -46,7 +46,6 @@
if has_shared == 'yes':
@@ -48,9 +48,9 @@ diff -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
LIBS.append(os.popen(RUBYPATH + " -e \"require 'rbconfig';print
'-l' + %s::CONFIG['RUBY_SO_NAME']\"" %
rbconfig).read().rstrip())
else:
rubylibdir = os.popen(RUBYPATH + " -e \"require 'rbconfig';print
RbConfig::CONFIG['rubylibdir']\"").read().rstrip()
-diff -uNr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
---- a/plugins/ruby19/uwsgiplugin.py 2021-10-06 07:22:45.000000000 +0200
-+++ b/plugins/ruby19/uwsgiplugin.py 2022-01-23 10:50:20.408612365 +0100
+diff -uNwr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
+--- a/plugins/ruby19/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
++++ b/plugins/ruby19/uwsgiplugin.py 2022-10-27 20:39:48.879032934 +0200
@@ -40,6 +40,5 @@
libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print
%s::CONFIG['libdir']\"" % rbconfig).read().rstrip()
commit 361f4afe4bc0e34f3e28fdbd9324a278a54c7cdc
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Thu Oct 6 20:23:45 2022 +0200
Fix PHP 8.2 support
diff --git a/uwsgi.spec b/uwsgi.spec
index 0cc77f1..336ec39 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -219,6 +219,7 @@ Patch15: uwsgi_fix_python_py_ssize_t.patch
Patch16: uwsgi_python311.patch
#
https://github.com/unbit/uwsgi/pull/2400
Patch17: uwsgi_fix_php81_filename_zend_string.patch
+Patch18: uwsgi_fix_php82.patch
BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel
BuildRequires: libyaml-devel, ruby-devel
@@ -1244,6 +1245,7 @@ cp -p %{SOURCE5} README.Fedora
%patch15 -p1
%patch16 -p1
%patch17 -p1
+%patch18 -p1
%if %{with perl} && (%{with python3} || %{with python3_other}) && %{with
perlcoro}
%{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py
@@ -1838,6 +1840,9 @@ exit 0
%changelog
+* Thu Oct 06 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-10
+- Fix PHP 8.2 support
+
* Tue Aug 09 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-9
- Fix PHP 8.1 support
diff --git a/uwsgi_fix_php82.patch b/uwsgi_fix_php82.patch
new file mode 100644
index 0000000..66a8e49
--- /dev/null
+++ b/uwsgi_fix_php82.patch
@@ -0,0 +1,15 @@
+diff -uNr a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+--- a/plugins/php/php_plugin.c 2022-10-06 19:52:07.237882916 +0200
++++ b/plugins/php/php_plugin.c 2022-10-06 19:56:29.232418542 +0200
+@@ -607,7 +607,11 @@
+ static int php_uwsgi_startup(sapi_module_struct *sapi_module)
+ {
+
++#if PHP_VERSION_ID >= 80200
++ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry)==FAILURE) {
++#else
+ if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry, 1)==FAILURE) {
++#endif
+ return FAILURE;
+ } else {
+ return SUCCESS;
commit 4cfce955e51396c4d68be16fe7d90d98baf373f6
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Fri Sep 16 20:22:45 2022 +0200
Remove deprecated StandardError setting from .service file
diff --git a/uwsgi.service b/uwsgi.service
index 73db94c..dec058d 100644
--- a/uwsgi.service
+++ b/uwsgi.service
@@ -9,7 +9,6 @@ ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
Restart=always
Type=notify
-StandardError=syslog
NotifyAccess=all
[Install]
commit a3b3307d31f54e455d5732477802af503349a759
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Tue Aug 9 22:05:51 2022 +0200
Fix PHP 8.1 support
diff --git a/uwsgi.spec b/uwsgi.spec
index 150b288..0cc77f1 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -217,6 +217,8 @@ Patch13: uwsgi_fix_chroot_chdir.patch
Patch14: uwsgi_fix_php_arginfo.patch
Patch15: uwsgi_fix_python_py_ssize_t.patch
Patch16: uwsgi_python311.patch
+#
https://github.com/unbit/uwsgi/pull/2400
+Patch17: uwsgi_fix_php81_filename_zend_string.patch
BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel
BuildRequires: libyaml-devel, ruby-devel
@@ -1241,6 +1243,7 @@ cp -p %{SOURCE5} README.Fedora
%patch14 -p1
%patch15 -p1
%patch16 -p1
+%patch17 -p1
%if %{with perl} && (%{with python3} || %{with python3_other}) && %{with
perlcoro}
%{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py
@@ -1835,6 +1838,9 @@ exit 0
%changelog
+* Tue Aug 09 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-9
+- Fix PHP 8.1 support
+
* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.0.20-8
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
diff --git a/uwsgi_fix_php81_filename_zend_string.patch
b/uwsgi_fix_php81_filename_zend_string.patch
new file mode 100644
index 0000000..81d9025
--- /dev/null
+++ b/uwsgi_fix_php81_filename_zend_string.patch
@@ -0,0 +1,42 @@
+From 8ca18da9a01eee19156243c5c0d28d2572698e4a Mon Sep 17 00:00:00 2001
+From: Riccardo Magliocchetti <riccardo.magliocchetti(a)gmail.com>
+Date: Sun, 30 Jan 2022 14:31:50 +0100
+Subject: [PATCH] plugins/php: handle php8.1 zend_file_handle signature change
+
+filename is now a zend_string.
+
+Refs #2394
+---
+ plugins/php/php_plugin.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+index d336adddc..8b5a24156 100644
+--- a/plugins/php/php_plugin.c
++++ b/plugins/php/php_plugin.c
+@@ -1096,14 +1096,19 @@ int uwsgi_php_request(struct wsgi_request *wsgi_req) {
+
+ SG(request_info).path_translated = wsgi_req->file;
+
+- memset(&file_handle, 0, sizeof(zend_file_handle));
+- file_handle.type = ZEND_HANDLE_FILENAME;
+- file_handle.filename = real_filename;
++#if PHP_VERSION_ID >= 80100
++ zend_string *handle_filename = zend_string_init(real_filename, real_filename_len, 0);
++#else
++ const char *handle_filename = real_filename;
++#endif
++ memset(&file_handle, 0, sizeof(zend_file_handle));
++ file_handle.type = ZEND_HANDLE_FILENAME;
++ file_handle.filename = handle_filename;
+
+- if (php_request_startup() == FAILURE) {
++ if (php_request_startup() == FAILURE) {
+ uwsgi_500(wsgi_req);
+- return -1;
+- }
++ return -1;
++ }
+
+ struct uwsgi_string_list *usl=NULL;
+
commit 061e65645fbde5372b1a64e5becd0eef077aa5ea
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 23 11:37:12 2022 +0000
Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/uwsgi.spec b/uwsgi.spec
index 016d6a8..150b288 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -1835,6 +1835,9 @@ exit 0
%changelog
+* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.0.20-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
* Thu Jun 30 2022 Victor Stinner <vstinner(a)python.org> - 2.0.20-7
- Add Python 3.11 support (rhbz#2099185)
commit 703b4ef92df1f0058bc07543fde9754de2fecc95
Author: Victor Stinner <vstinner(a)python.org>
Date: Thu Jun 30 10:31:35 2022 +0000
Add Python 3.11 support
Resolves: rhbz#2099185
diff --git a/uwsgi.spec b/uwsgi.spec
index e4063f8..016d6a8 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -216,6 +216,7 @@ Patch13: uwsgi_fix_chroot_chdir.patch
#
https://github.com/unbit/uwsgi/issues/2356
Patch14: uwsgi_fix_php_arginfo.patch
Patch15: uwsgi_fix_python_py_ssize_t.patch
+Patch16: uwsgi_python311.patch
BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel
BuildRequires: libyaml-devel, ruby-devel
@@ -1239,6 +1240,7 @@ cp -p %{SOURCE5} README.Fedora
%patch13 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%if %{with perl} && (%{with python3} || %{with python3_other}) && %{with
perlcoro}
%{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py
@@ -1833,6 +1835,9 @@ exit 0
%changelog
+* Thu Jun 30 2022 Victor Stinner <vstinner(a)python.org> - 2.0.20-7
+- Add Python 3.11 support (rhbz#2099185)
+
* Mon Jun 13 2022 Python Maint <python-maint(a)redhat.com> - 2.0.20-6
- Rebuilt for Python 3.11
diff --git a/uwsgi_python311.patch b/uwsgi_python311.patch
new file mode 100644
index 0000000..ddf0a3d
--- /dev/null
+++ b/uwsgi_python311.patch
@@ -0,0 +1,174 @@
+Add Python 3.11 support
+
+Backport of
https://github.com/unbit/uwsgi/pull/2453
+
+Resolves: rhbz#2099185
+
+diff --git a/plugins/python/profiler.c b/plugins/python/profiler.c
+index 92bc3da..2a7e1cc 100644
+--- a/plugins/python/profiler.c
++++ b/plugins/python/profiler.c
+@@ -13,6 +13,14 @@ int PyFrame_GetLineNumber(PyFrameObject *frame) {
+ }
+ #endif
+
++#if PY_VERSION_HEX < 0x030900B1
++PyCodeObject* PyFrame_GetCode(PyFrameObject *frame)
++{
++ Py_INCREF(frame->f_code);
++ return frame->f_code;
++}
++#endif
++
+ #ifdef PYTHREE
+ #undef PyString_AsString
+ static char *PyString_AsString(PyObject *o) {
+@@ -27,27 +35,32 @@ int uwsgi_python_profiler_call(PyObject *obj, PyFrameObject *frame,
int what, Py
+ static uint64_t last_ts = 0;
+ uint64_t now = uwsgi_micros();
+ uint64_t delta = 0;
++ PyCodeObject *code;
+
+ switch(what) {
+ case PyTrace_CALL:
+ if (last_ts == 0) delta = 0;
+ else delta = now - last_ts;
+ last_ts = now;
++ code = PyFrame_GetCode(frame);
+ uwsgi_log("[uWSGI Python profiler %llu] CALL: %s (line %d) -> %s %d args,
stacksize %d\n",
+ (unsigned long long) delta,
+- PyString_AsString(frame->f_code->co_filename),
++ PyString_AsString(code->co_filename),
+ PyFrame_GetLineNumber(frame),
+- PyString_AsString(frame->f_code->co_name), frame->f_code->co_argcount,
frame->f_code->co_stacksize);
++ PyString_AsString(code->co_name), code->co_argcount, code->co_stacksize);
++ Py_DECREF(code);
+ break;
+ case PyTrace_C_CALL:
+ if (last_ts == 0) delta = 0;
+ else delta = now - last_ts;
+ last_ts = now;
++ code = PyFrame_GetCode(frame);
+ uwsgi_log("[uWSGI Python profiler %llu] C CALL: %s (line %d) -> %s %d args,
stacksize %d\n",
+ (unsigned long long) delta,
+- PyString_AsString(frame->f_code->co_filename),
++ PyString_AsString(code->co_filename),
+ PyFrame_GetLineNumber(frame),
+- PyEval_GetFuncName(arg), frame->f_code->co_argcount,
frame->f_code->co_stacksize);
++ PyEval_GetFuncName(arg), code->co_argcount, code->co_stacksize);
++ Py_DECREF(code);
+ break;
+ }
+
+@@ -68,7 +81,9 @@ int uwsgi_python_tracer(PyObject *obj, PyFrameObject *frame, int what,
PyObject
+ delta = now - last_ts;
+ }
+ last_ts = now;
+- uwsgi_log("[uWSGI Python profiler %llu] file %s line %d: %s argc:%d\n",
(unsigned long long)delta, PyString_AsString(frame->f_code->co_filename),
PyFrame_GetLineNumber(frame), PyString_AsString(frame->f_code->co_name),
frame->f_code->co_argcount);
++ PyCodeObject *code = PyFrame_GetCode(frame);
++ uwsgi_log("[uWSGI Python profiler %llu] file %s line %d: %s argc:%d\n",
(unsigned long long)delta, PyString_AsString(code->co_filename),
PyFrame_GetLineNumber(frame), PyString_AsString(code->co_name), code->co_argcount);
++ Py_DECREF(code);
+ }
+
+ return 0;
+diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c
+index 6834f84..1d21c0d 100644
+--- a/plugins/python/python_plugin.c
++++ b/plugins/python/python_plugin.c
+@@ -1137,9 +1137,13 @@ void uwsgi_python_init_apps() {
+ }
+
+ // prepare for stack suspend/resume
+- if (uwsgi.async > 1) {
++ if (uwsgi.async > 0) {
++#ifdef UWSGI_PY311
++ up.current_recursion_remaining = uwsgi_malloc(sizeof(int)*uwsgi.async);
++#else
+ up.current_recursion_depth = uwsgi_malloc(sizeof(int)*uwsgi.async);
+- up.current_frame = uwsgi_malloc(sizeof(struct _frame)*uwsgi.async);
++#endif
++ up.current_frame = uwsgi_malloc(sizeof(up.current_frame[0])*uwsgi.async);
+ }
+
+ // setup app loaders
+@@ -1530,12 +1534,22 @@ void uwsgi_python_suspend(struct wsgi_request *wsgi_req) {
+ PyGILState_Release(pgst);
+
+ if (wsgi_req) {
++#ifdef UWSGI_PY311
++ up.current_recursion_remaining[wsgi_req->async_id] =
tstate->recursion_remaining;
++ up.current_frame[wsgi_req->async_id] = tstate->cframe;
++#else
+ up.current_recursion_depth[wsgi_req->async_id] = tstate->recursion_depth;
+ up.current_frame[wsgi_req->async_id] = tstate->frame;
++#endif
+ }
+ else {
++#ifdef UWSGI_PY311
++ up.current_main_recursion_remaining = tstate->recursion_remaining;
++ up.current_main_frame = tstate->cframe;
++#else
+ up.current_main_recursion_depth = tstate->recursion_depth;
+ up.current_main_frame = tstate->frame;
++#endif
+ }
+
+ }
+@@ -1763,12 +1777,22 @@ void uwsgi_python_resume(struct wsgi_request *wsgi_req) {
+ PyGILState_Release(pgst);
+
+ if (wsgi_req) {
++#ifdef UWSGI_PY311
++ tstate->recursion_remaining =
up.current_recursion_remaining[wsgi_req->async_id];
++ tstate->cframe = up.current_frame[wsgi_req->async_id];
++#else
+ tstate->recursion_depth = up.current_recursion_depth[wsgi_req->async_id];
+ tstate->frame = up.current_frame[wsgi_req->async_id];
++#endif
+ }
+ else {
++#ifdef UWSGI_PY311
++ tstate->recursion_remaining = up.current_main_recursion_remaining;
++ tstate->cframe = up.current_main_frame;
++#else
+ tstate->recursion_depth = up.current_main_recursion_depth;
+ tstate->frame = up.current_main_frame;
++#endif
+ }
+
+ }
+diff --git a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h
+index 357d731..6c6f7a4 100644
+--- a/plugins/python/uwsgi_python.h
++++ b/plugins/python/uwsgi_python.h
+@@ -18,6 +18,10 @@
+ #define UWSGI_PYTHON_OLD
+ #endif
+
++#if (PY_VERSION_HEX >= 0x030b0000)
++# define UWSGI_PY311
++#endif
++
+ #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7
+ #define HAS_NOT_PyMemoryView_FromBuffer
+ #endif
+@@ -165,11 +169,19 @@ struct uwsgi_python {
+
+ char *callable;
+
++#ifdef UWSGI_PY311
++ int *current_recursion_remaining;
++ _PyCFrame **current_frame;
++
++ int current_main_recursion_remaining;
++ _PyCFrame *current_main_frame;
++#else
+ int *current_recursion_depth;
+ struct _frame **current_frame;
+
+ int current_main_recursion_depth;
+ struct _frame *current_main_frame;
++#endif
+
+ void (*swap_ts)(struct wsgi_request *, struct uwsgi_app *);
+ void (*reset_ts)(struct wsgi_request *, struct uwsgi_app *);
commit 35a88dd5f8f1f586c587f789bade370743af4847
Author: Python Maint <python-maint(a)redhat.com>
Date: Mon Jun 13 19:54:20 2022 +0200
Rebuilt for Python 3.11
diff --git a/uwsgi.spec b/uwsgi.spec
index e590ac8..e4063f8 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -1833,6 +1833,9 @@ exit 0
%changelog
+* Mon Jun 13 2022 Python Maint <python-maint(a)redhat.com> - 2.0.20-6
+- Rebuilt for Python 3.11
+
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik(a)redhat.com> - 2.0.20-5
- Perl 5.36 rebuild
commit 927b0ea2f07930b9da36aa32a658049fd3e6d442
Author: Jitka Plesnikova <jplesnik(a)redhat.com>
Date: Wed Jun 1 08:39:30 2022 +0200
Perl 5.36 rebuild
diff --git a/uwsgi.spec b/uwsgi.spec
index 14dd844..e590ac8 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -187,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -1833,6 +1833,9 @@ exit 0
%changelog
+* Wed Jun 01 2022 Jitka Plesnikova <jplesnik(a)redhat.com> - 2.0.20-5
+- Perl 5.36 rebuild
+
* Fri Mar 04 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-4
- Add support for EPEL9
commit 6d410724c0684c789612d977f96367bfcfa80f6a
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Fri Mar 4 20:09:54 2022 +0100
Add support for EPEL9
diff --git a/fedora.ini b/fedora.ini
index 7811aab..951846b 100644
--- a/fedora.ini
+++ b/fedora.ini
@@ -11,7 +11,6 @@ malloc_implementation = libc
embedded_plugins = corerouter, echo, ping
plugins = airbrake,
alarm_curl,
- alarm_xmpp,
cache,
carbon,
cgi,
@@ -23,7 +22,6 @@ plugins = airbrake,
emperor_amqp,
fastrouter,
forkptyrouter,
- geoip,
graylog2,
http,
ldap,
diff --git a/uwsgi.spec b/uwsgi.spec
index 9bf000d..14dd844 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -14,9 +14,12 @@
%bcond_without tuntap
%bcond_without zeromq
%bcond_without perl
+%bcond_without perlcoro
%bcond_without glusterfs
%bcond_without php
%bcond_without pq
+%bcond_without gloox
+%bcond_without geoip
# javapackages-tools retired (apache-ivy orphanage)
%bcond_with java
# Fedora httpd includes mod_proxy_uwsgi
@@ -49,6 +52,8 @@
%bcond_without python2
%bcond_without python3
%bcond_without python3_other
+%bcond_without gloox
+%bcond_without geoip
# This only exists on EL7
%bcond_without tcp_wrappers
# el7 doesn't have zeromq
@@ -60,6 +65,7 @@
# el7 does have perl-PSGI
# el7 does have perl-Coro
%bcond_without perl
+%bcond_without perlcoro
# el7 httpd does not include mod_proxy_uwsgi
%bcond_without mod_proxy_uwsgi
# el7 can now build glusterfs but only on x86_64
@@ -82,9 +88,12 @@
%bcond_without tuntap
%bcond_without zeromq
%bcond_without perl
+%bcond_without perlcoro
%bcond_without glusterfs
%bcond_without php
%bcond_without pq
+%bcond_without gloox
+%bcond_without geoip
# javapackages-tools retired (apache-ivy orphanage)
%bcond_with java
# Fedora httpd includes mod_proxy_uwsgi
@@ -110,6 +119,49 @@
#EL8 endif
%endif
+%if 0%{?rhel} == 9
+%bcond_without go
+%bcond_without python3
+%bcond_without ruby19
+%bcond_without tuntap
+# EPEL9 doesn't have zeromq yet
+%bcond_with zeromq
+%bcond_without perl
+# EPEL9 doesn't have perl-Coro yet
+%bcond_with perlcoro
+# EPEL9 doesn't have glusterfs yet
+%bcond_with glusterfs
+%bcond_without php
+%bcond_without pq
+# EPEL9 doesn't have gloox yet
+%bcond_with gloox
+# EPEL9 doesn't have GeoIP yet
+%bcond_with geoip
+# javapackages-tools retired (apache-ivy orphanage)
+%bcond_with java
+# Fedora httpd includes mod_proxy_uwsgi
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1574335
+%bcond_with mod_proxy_uwsgi
+#mono
+%ifarch %{mono_arches}
+%bcond_without mono
+%else
+%bcond_with mono
+%endif
+# mongodblibs
+# mongo-cxx-driver-legacy broken in rawhide rhbz#1675407
+%bcond_with mongodblibs
+# v8-314 retired
+%bcond_with v8
+#mongodblibs dependency
+%if %{without mongodblibs}
+%bcond_with gridfs
+%else
+%bcond_without gridfs
+%endif
+#EL9 endif
+%endif
+
%global manual_py_compile 1
# Turn off byte compilation so it doesn't try
@@ -135,7 +187,7 @@
Name: uwsgi
Version: 2.0.20
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
@@ -195,12 +247,21 @@ BuildRequires: openssl-devel
BuildRequires: bzip2-devel, gmp-devel, pam-devel
BuildRequires: sqlite-devel, libcap-devel
BuildRequires: httpd-devel, libcurl-devel
-BuildRequires: gloox-devel, libstdc++-devel
-BuildRequires: GeoIP-devel, libevent-devel, zlib-devel
+BuildRequires: libstdc++-devel
+%if %{with gloox}
+BuildRequires: gloox-devel
+%endif
+BuildRequires: libevent-devel, zlib-devel
+%if %{with geoip}
+BuildRequires: GeoIP-devel
+%endif
BuildRequires: openldap-devel, boost-devel
BuildRequires: libattr-devel, libxslt-devel
%if %{with perl}
-BuildRequires: perl-devel, perl-ExtUtils-Embed, perl-Coro
+BuildRequires: perl-devel, perl-ExtUtils-Embed
+%if %{with perlcoro}
+BuildRequires: perl-Coro
+%endif
%endif
%if %{with zeromq}
BuildRequires: zeromq-devel
@@ -371,12 +432,14 @@ Requires: uwsgi-plugin-common = %{version}-%{release}
%description -n uwsgi-alarm-curl
This package contains the alarm_curl alarm plugin for uWSGI
+%if %{with gloox}
%package -n uwsgi-alarm-xmpp
Summary: uWSGI - Curl alarm plugin
-Requires: uwsgi-plugin-common = %{version}-%{release}, gloox
+Requires: uwsgi-plugin-common = %{version}-%{release}
%description -n uwsgi-alarm-xmpp
This package contains the alarm_xmpp alarm plugin for uWSGI
+%endif
# Transformations
@@ -555,6 +618,7 @@ Requires: perl-PSGI, uwsgi-plugin-common = %{version}-%{release}
%description -n uwsgi-plugin-psgi
This package contains the PSGI plugin for uWSGI
+%if %{with perlcoro}
%package -n uwsgi-plugin-coroae
Summary: uWSGI - Plugin for PERL Coro support
Requires: uwsgi-plugin-common = %{version}-%{release}, uwsgi-plugin-psgi =
%{version}-%{release}, perl-Coro
@@ -562,6 +626,7 @@ Requires: uwsgi-plugin-common = %{version}-%{release},
uwsgi-plugin-psgi = %{ver
%description -n uwsgi-plugin-coroae
This package contains the coroae plugin for uWSGI
%endif
+%endif
%package -n uwsgi-plugin-cheaper-busyness
Summary: uWSGI - Plugin for Cheaper Busyness algos
@@ -614,12 +679,14 @@ Requires: uwsgi-plugin-common = %{version}-%{release}
This package contains the gccgo plugin for uWSGI
%endif
+%if %{with geoip}
%package -n uwsgi-plugin-geoip
Summary: uWSGI - Plugin for GeoIP support
-Requires: uwsgi-plugin-common = %{version}-%{release}, GeoIP
+Requires: uwsgi-plugin-common = %{version}-%{release}
%description -n uwsgi-plugin-geoip
This package contains the geoip plugin for uWSGI
+%endif
%if %{with python2}
%package -n uwsgi-plugin-python2-gevent
@@ -1173,7 +1240,7 @@ cp -p %{SOURCE5} README.Fedora
%patch14 -p1
%patch15 -p1
-%if %{with perl} && (%{with python3} || %{with python3_other})
+%if %{with perl} && (%{with python3} || %{with python3_other}) && %{with
perlcoro}
%{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py
%endif
@@ -1225,8 +1292,10 @@ CFLAGS="%{optflags} -Wno-unused-but-set-variable"
%{__python} uwsgiconfig.py --v
%endif
%if %{with perl}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/psgi fedora
+%if %{with perlcoro}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/coroae fedora
%endif
+%endif
%if %{with zeromq}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/logzmq fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/mongrel2 fedora
@@ -1249,6 +1318,12 @@ CFLAGS="%{optflags} -Wno-unused-but-set-variable"
%{__python} uwsgiconfig.py --v
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/jwsgi fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/ring fedora
%endif
+%if %{with gloox}
+CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/alarm_xmpp fedora
+%endif
+%if %{with geoip}
+CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/geoip fedora
+%endif
%if %{with tcp_wrappers}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--verbose --plugin plugins/router_access fedora
%endif
@@ -1391,8 +1466,10 @@ exit 0
%files -n uwsgi-alarm-curl
%{_libdir}/uwsgi/alarm_curl_plugin.so
+%if %{with gloox}
%files -n uwsgi-alarm-xmpp
%{_libdir}/uwsgi/alarm_xmpp_plugin.so
+%endif
# Transformations
@@ -1471,9 +1548,11 @@ exit 0
%files -n uwsgi-plugin-psgi
%{_libdir}/uwsgi/psgi_plugin.so
+%if %{with perlcoro}
%files -n uwsgi-plugin-coroae
%{_libdir}/uwsgi/coroae_plugin.so
%endif
+%endif
%files -n uwsgi-plugin-cheaper-busyness
%{_libdir}/uwsgi/cheaper_busyness_plugin.so
@@ -1500,8 +1579,10 @@ exit 0
%{_libdir}/uwsgi/gccgo_plugin.so
%endif
+%if %{with geoip}
%files -n uwsgi-plugin-geoip
%{_libdir}/uwsgi/geoip_plugin.so
+%endif
%if %{with python2}
%files -n uwsgi-plugin-python2-gevent
@@ -1752,6 +1833,12 @@ exit 0
%changelog
+* Fri Mar 04 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-4
+- Add support for EPEL9
+
+* Wed Mar 02 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-3
+- Add build support for EPEL9
+
* Sat Feb 19 2022 Ralf Ertzinger <ralf(a)skytale.net> - 2.0.20-3
- Fix errors in uwsgi python module when building against python3.10 or higher
commit 73fd0c25da5b20398b5da6051cdcb3140ae2011c
Author: Ralf Ertzinger <ralf(a)skytale.net>
Date: Wed Feb 23 20:13:29 2022 +0100
Clean up %post, %preun and %postun scripts
diff --git a/uwsgi.spec b/uwsgi.spec
index 3db1e53..9bf000d 100644
--- a/uwsgi.spec
+++ b/uwsgi.spec
@@ -1320,36 +1320,13 @@ getent passwd uwsgi >/dev/null || \
exit 0
%post
-%if 0%{?systemd_post:1}
- %systemd_post uwsgi.service
-%else
- if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
- fi
-%endif
+%systemd_post uwsgi.service
%preun
-%if 0%{?systemd_preun:1}
- %systemd_preun uwsgi.service
-%else
- if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable uwsgi.service > /dev/null 2>&1 || :
- /bin/systemctl stop uwsgi.service > /dev/null 2>&1 || :
- fi
-%endif
+%systemd_preun uwsgi.service
%postun
-%if 0%{?systemd_postun:1}
- %systemd_postun uwsgi.service
-%else
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
- if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart uwsgi.service >/dev/null 2>&1 || :
- fi
-%endif
+%systemd_postun uwsgi.service
%files