diff --git a/.gitignore b/.gitignore index cceb6ff..943f260 100644 --- a/.gitignore +++ b/.gitignore @@ -46,27 +46,3 @@ /uwsgi-docs-32a8f73.tar.gz /uwsgi-2.0.18.tar.gz /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 -/uwsgi-2.0.22.tar.gz -/uwsgi-docs-9c89fef.tar.gz -/uwsgi-2.0.23.tar.gz -/uwsgi-docs-3be14d3.tar.gz -/uwsgi-2.0.24.tar.gz -/uwsgi-docs-4e23afe.tar.gz -/2.0.25.1.tar.gz -/uwsgi-docs-8dcaacd.tar.gz -/2.0.26.tar.gz -/uwsgi-docs-59e6cd1.tar.gz -/2.0.27.tar.gz -/uwsgi-docs-c0f17cd.tar.gz -/2.0.28.tar.gz -/uwsgi-docs-9606cb0.tar.gz -/2.0.29.tar.gz -/uwsgi-docs-b9da5ea.tar.gz -/2.0.30.tar.gz -/uwsgi-docs-f728a25.tar.gz -/uwsgi-docs-5784c30.tar.gz -/2.0.31.tar.gz diff --git a/fedora.ini b/fedora.ini index 7c3cda6..35298b8 100644 --- a/fedora.ini +++ b/fedora.ini @@ -11,6 +11,7 @@ malloc_implementation = libc embedded_plugins = corerouter, echo, ping plugins = airbrake, alarm_curl, + alarm_xmpp, cache, carbon, cgi, @@ -19,9 +20,9 @@ plugins = airbrake, curl_cron, dumbloop, dummy, - emperor_amqp, fastrouter, forkptyrouter, + geoip, graylog2, http, ldap, @@ -34,7 +35,9 @@ plugins = airbrake, nagios, notfound, pam, + php, pty, + rack, rawrouter, redislog, router_basicauth, @@ -64,7 +67,6 @@ plugins = airbrake, stats_pusher_socket, stats_pusher_statsd, syslog, - systemd_logger, transformation_chunked, transformation_gzip, transformation_offload, diff --git a/sources b/sources index 6394bca..e8512e0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (uwsgi-docs-5784c30.tar.gz) = 4f966da4a867e45043a0eb4a123b439c8ab1f7ce6e8b32d770545ff7fae586e4e7dd011106aa6ed0ec82a6c6192937e0fd12ed681443332205566fc329e11cd8 -SHA512 (2.0.31.tar.gz) = d4d327f36455438e165298cb5a7d483c951f4acd3d834b46ceeda105bd3664792ead226b02e06db62e92c210544778119bf75a55d9d4f30f8fba896c7de51e6d +SHA512 (uwsgi-2.0.18.tar.gz) = 6561703279bcc4a81311d033810ac066d0f113bab13b0942f3eef86cac29c584a6641b52476840d6895151aee5ed064ae2d03b18932cf7f47e62f4eeed76da61 +SHA512 (uwsgi-docs-8d868ea.tar.gz) = 1ebf9bbe42d7a67553ff1081a2322fc00c72b72fa52879bba3b7ce8d9f4934b5643d96444ce75559b9f7303be4cdc0453ae2b4d73f1fa13cfc32f69d522bc2f0 diff --git a/uwsgi-2.0.16-glfs.patch b/uwsgi-2.0.16-glfs.patch new file mode 100644 index 0000000..fc41c38 --- /dev/null +++ b/uwsgi-2.0.16-glfs.patch @@ -0,0 +1,10 @@ +diff -up uwsgi-2.0.16/plugins/glusterfs/glusterfs.c.glfs uwsgi-2.0.16/plugins/glusterfs/glusterfs.c +--- uwsgi-2.0.16/plugins/glusterfs/glusterfs.c.glfs 2018-04-03 14:35:48.099323330 +0200 ++++ uwsgi-2.0.16/plugins/glusterfs/glusterfs.c 2018-04-03 14:35:07.573068567 +0200 +@@ -1,5 +1,5 @@ + #include +-#include ++#include + + extern struct uwsgi_server uwsgi; + diff --git a/uwsgi-2.0.27-graceful-reload.patch b/uwsgi-2.0.27-graceful-reload.patch deleted file mode 100644 index dcec832..0000000 --- a/uwsgi-2.0.27-graceful-reload.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -uNr a/core/master_utils.c b/core/master_utils.c ---- a/core/master_utils.c 2024-09-23 22:05:33.000000000 +0200 -+++ b/core/master_utils.c 2024-10-14 19:57:00.233290804 +0200 -@@ -54,12 +54,6 @@ - - uwsgi_detach_daemons(); - -- for (i = 1; i <= uwsgi.numproc; i++) { -- if (uwsgi.workers[i].pid > 0) { -- waitpid(uwsgi.workers[i].pid, &waitpid_status, 0); -- } -- } -- - for (i = 0; i < ushared->gateways_cnt; i++) { - if (ushared->gateways[i].pid > 0) { - kill(ushared->gateways[i].pid, SIGKILL); -diff -uNr a/core/uwsgi.c b/core/uwsgi.c ---- a/core/uwsgi.c 2024-09-23 22:05:33.000000000 +0200 -+++ b/core/uwsgi.c 2024-10-14 19:57:00.134291181 +0200 -@@ -1319,6 +1319,8 @@ - // gracefully destroy - void gracefully_kill_them_all(int signum) { - -+ int waitpid_status; -+ - if (uwsgi_instance_is_dying) return; - uwsgi.status.gracefully_destroying = 1; - -@@ -1341,6 +1343,12 @@ - } - } - -+ -+ for (i = 1; i <= uwsgi.numproc; i++) { -+ if (uwsgi.workers[i].pid > 0) { -+ waitpid(uwsgi.workers[i].pid, &waitpid_status, 0); -+ } -+ } - uwsgi_destroy_processes(); - } - diff --git a/uwsgi.service b/uwsgi.service index dec058d..73db94c 100644 --- a/uwsgi.service +++ b/uwsgi.service @@ -9,6 +9,7 @@ ExecReload=/bin/kill -HUP $MAINPID KillSignal=SIGINT Restart=always Type=notify +StandardError=syslog NotifyAccess=all [Install] diff --git a/uwsgi.spec b/uwsgi.spec index 424e718..c3d89e8 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -1,38 +1,25 @@ # Documentation sources: -%global commit 5784c30866a94942a5200db4d5f6c2850afb1caa +%global commit 8d868eadfb460785a735030271afa233ac854763 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global docrepo uwsgi-docs -# The default compile options of uwsgi and php disagree in subtle ways, -# leading to potential crashes when uwsgi loads the php module, and php itself -# loads certain of its own modules. -# -# The "proper" solution for this would be to change the way php is compiled. -# In the interim, disabling PIE for uwsgi, and enabling PIC for the main -# uwsgi executable can work around the issue. -# -# See https://bugzilla.redhat.com/show_bug.cgi?id=2203863 -%undefine _hardened_build - %{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} # This is primarily built for fedora, make it easy right now %if 0%{?fedora} +%bcond_without systemd %bcond_without go +%if 0%{?fedora} < 31 +%bcond_without python2 +%bcond_without python2_greenlet +%endif %bcond_without python3 -%bcond_without python3_greenlet %bcond_without ruby19 %bcond_without tuntap %bcond_without zeromq %bcond_without perl -%bcond_with perlcoro %bcond_without glusterfs -%bcond_without php -%bcond_without pq -%bcond_without gloox -%bcond_without geoip -%bcond_without ruby_rack # javapackages-tools retired (apache-ivy orphanage) %bcond_with java # Fedora httpd includes mod_proxy_uwsgi @@ -58,178 +45,61 @@ #Fedora endif %endif -# epel8 builds pretty similar to Fedora for now -%if 0%{?rhel} == 8 -%bcond_without go -%bcond_without python3 -%bcond_without python3_greenlet -%bcond_without ruby19 -%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 -%bcond_without ruby_rack -# javapackages-tools retired (apache-ivy orphanage) +# Conditionally disable some things in epel6 +%if 0%{?rhel} == 6 +# javapackages-tools retired in epel (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 -#EL8 endif -%endif - -%if 0%{?rhel} == 9 -%bcond_without go -%bcond_without python3 -# EPEL9 does not have python-greenlet-devel any more -%bcond_with python3_greenlet -%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 -%bcond_without ruby_rack -# 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 has multiple python3 versions -%bcond_without python3_alternate1 -%if %{with python3_alternate1} -%global python3_alternate1_pkgname python3.11 -%global __python3_alternate1 python3.11 -%global python3_alternate1_sitelib %(RPM_BUILD_ROOT= %{__python3_alternate1} -Ic "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") -%global python3_alternate1_version 3.11 -%global python3_alternate1_version_nodots 311 -%endif -%bcond_without python3_alternate2 -%if %{with python3_alternate2} -%global python3_alternate2_pkgname python3.12 -%global __python3_alternate2 python3.12 -%global python3_alternate2_sitelib %(RPM_BUILD_ROOT= %{__python3_alternate2} -Ic "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") -%global python3_alternate2_version 3.12 -%global python3_alternate2_version_nodots 312 -%endif -%bcond_without python3_alternate3 -%if %{with python3_alternate3} -%global python3_alternate3_pkgname python3.13 -%global __python3_alternate3 python3.13 -%global python3_alternate3_sitelib %(RPM_BUILD_ROOT= %{__python3_alternate3} -Ic "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") -%global python3_alternate3_version 3.13 -%global python3_alternate3_version_nodots 313 -%endif -#EL9 endif -%endif - -%if 0%{?rhel} == 10 -# EPEL10 does not have gcc-go +# el6 doesn't ship with systemd +%bcond_with systemd +# el6 doesn't have go %bcond_with go -%bcond_without python3 -# EPEL10 does not have python-greenlet-devel any more -%bcond_with python3_greenlet -%bcond_without ruby19 -%bcond_without tuntap -# EPEL10 doesn't have zeromq yet -%bcond_with zeromq -%bcond_without perl -# EPEL10 doesn't have perl-Coro yet -%bcond_with perlcoro -# EPEL10 doesn't have glusterfs yet -%bcond_with glusterfs -%bcond_without php -%bcond_without pq -%bcond_without ruby_rack -# EPEL10 doesn't have gloox yet -%bcond_with gloox -# EPEL10 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 -# EPEL10 doesn't have mono yet -%ifarch %{mono_arches} -%bcond_with 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_without python2 +%bcond_without python2_greenlet +# el6 ships with ruby 1.8 but fiberloop/rbthreads needs 1.9 +%bcond_with ruby19 +# el6 doesn't have perl-PSGI +# el6 does have perl-Coro +%bcond_with perl +# el6 httpd does not include mod_proxy_uwsgi +%bcond_without mod_proxy_uwsgi +# this fails in el not sure why %bcond_with gridfs +%bcond_with tuntap +%bcond_with mongodblibs +%global manual_py_compile 0 %else -%bcond_without gridfs -%endif - -# EL10 has multiple python3 versions -%bcond_without python3_alternate1 -%if %{with python3_alternate1} -%global python3_alternate1_pkgname python3.12 -%global __python3_alternate1 python3.12 -%global python3_alternate1_sitelib %(RPM_BUILD_ROOT= %{__python3_alternate1} -Ic "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))")} -%global python3_alternate1_version 3.12 -%global python3_alternate1_version_nodots 312 -%endif -#EL9 endif -%endif - %global manual_py_compile 1 +%endif + +# Conditionally enable/disable some things in epel7 +%if 0%{?rhel} == 7 +# el7 does have java +%bcond_without java +# el7 does have systemd +%bcond_without systemd +%bcond_without python2 +%bcond_without python3 +%bcond_without python3_other +# el7 doesn't have zeromq +%bcond_with zeromq +# el7 does have python-greenlet, but only on x86_64 +%ifarch x86_64 +%bcond_without python2_greenlet +%endif +# el7 does have perl-PSGI +# el7 does have perl-Coro +%bcond_without perl +# el7 httpd does not include mod_proxy_uwsgi +%bcond_without mod_proxy_uwsgi +# el7 can now build glusterfs but only on x86_64 +%ifnarch x86_64 +%bcond_with glusterfs +%else +%bcond_without glusterfs +%endif +# this fails in el7 not sure why +%bcond_with gridfs +%endif # Turn off byte compilation so it doesn't try # to auto-optimize the code in /usr/src/uwsgi @@ -237,18 +107,19 @@ %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %endif +# Disable router_access in fedora >= 28 because tcp_wrappers deprecation +%if 0%{?fedora} >= 28 +%bcond_with tcp_wrappers +%else +%bcond_without tcp_wrappers +%endif + # Set %%__python to the newest possible version %if %{with python3} %global __python %{__python3} %else -%if %{with python3_alternate1} -%global __python %{__python3_alternate1} -%else -%if %{with python3_alternate2} -%global __python %{__python3_alternate2} -%else -%if %{with python3_alternate3} -%global __python %{__python3_alternate3} +%if %{with python3_other} +%global __python %{__python3_other} %else %if %{with python2} %global __python %{__python2} @@ -257,32 +128,25 @@ %endif %endif %endif -%endif -%endif Name: uwsgi -Version: 2.0.31 -Release: 5%{?dist} +Version: 2.0.18 +Release: 13%{?dist} Summary: Fast, self-healing, application container server # uwsgi is licensed under GPLv2 with a linking exception # docs are licensed under MIT -# Automatically converted from old format: GPLv2 with exceptions and MIT - review is highly recommended. -License: LicenseRef-Callaway-GPLv2-with-exceptions AND LicenseRef-Callaway-MIT +License: GPLv2 with exceptions and MIT URL: https://github.com/unbit/uwsgi -ExcludeArch: %{ix86} - -Source0: https://github.com/unbit/uwsgi/archive/refs/tags/%{version}.tar.gz +Source0: http://projects.unbit.it/downloads/uwsgi-%{version}.tar.gz Source1: fedora.ini Source2: uwsgi.service Source3: emperor.ini Source4: https://github.com/unbit/%{docrepo}/archive/%{commit}/%{docrepo}-%{shortcommit}.tar.gz Source5: README.Fedora +Source6: uwsgi.init Source7: uwsgi.tmpfiles -Source8: uwsgi.sysusers -# When adding patches please add to the end, don't -# reuse intermediate numbers Patch0: uwsgi_trick_chroot_rpmbuild.patch Patch1: uwsgi_fix_rpath.patch Patch2: uwsgi_ruby20_compatibility.patch @@ -291,12 +155,15 @@ Patch3: uwsgi_fix_lua.patch Patch5: uwsgi_fix_mongodb.patch Patch6: uwsgi_v8-314_compatibility.patch Patch7: uwsgi_fix_mono.patch -Patch13: uwsgi_fix_chroot_chdir.patch -Patch14: uwsgi_python312-2.patch +# https://github.com/unbit/uwsgi/pull/1772 +Patch9: uwsgi-2.0.16-glfs.patch +# https://github.com/unbit/uwsgi/pull/2141 +Patch10: uwsgi_fix_psgi.patch +# https://github.com/unbit/uwsgi/pull/2105 +Patch11: uwsgi_fix_php74_zend.patch BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel BuildRequires: libyaml-devel, ruby-devel -BuildRequires: libxcrypt-devel %if %{with tcp_wrappers} BuildRequires: tcp_wrappers-devel %endif @@ -308,46 +175,26 @@ BuildRequires: python-greenlet-devel %endif %if %{with python3} BuildRequires: python%{python3_pkgversion}-devel -%endif -%if %{with python3_greenlet} BuildRequires: python%{python3_pkgversion}-greenlet-devel %endif -%if %{with python3_alternate1} -BuildRequires: %{python3_alternate1_pkgname}-devel -%endif -%if %{with python3_alternate2} -BuildRequires: %{python3_alternate2_pkgname}-devel -%endif -%if %{with python3_alternate3} -BuildRequires: %{python3_alternate3_pkgname}-devel +%if %{with python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel %endif %if %{with glusterfs} BuildRequires: glusterfs-devel, glusterfs-api-devel %endif -BuildRequires: lua-devel, ruby, pcre2-devel -%if %{with php} -BuildRequires: php-devel, php-embedded -%endif -BuildRequires: libedit-devel, krb5-devel +BuildRequires: lua-devel, ruby, pcre-devel +BuildRequires: php-devel, php-embedded, libedit-devel, krb5-devel BuildRequires: openssl-devel BuildRequires: bzip2-devel, gmp-devel, pam-devel BuildRequires: sqlite-devel, libcap-devel BuildRequires: httpd-devel, libcurl-devel -BuildRequires: libstdc++-devel -%if %{with gloox} -BuildRequires: gloox-devel -%endif -BuildRequires: libevent-devel, zlib-devel -%if %{with geoip} -BuildRequires: GeoIP-devel -%endif +BuildRequires: gloox-devel, libstdc++-devel +BuildRequires: GeoIP-devel, libevent-devel, zlib-devel BuildRequires: openldap-devel, boost-devel BuildRequires: libattr-devel, libxslt-devel %if %{with perl} -BuildRequires: perl-devel, perl-ExtUtils-Embed -%if %{with perlcoro} -BuildRequires: perl-Coro -%endif +BuildRequires: perl-devel, perl-ExtUtils-Embed, perl-Coro %endif %if %{with zeromq} BuildRequires: zeromq-devel @@ -355,29 +202,28 @@ BuildRequires: zeromq-devel %if %{with go} BuildRequires: gcc-go %endif +%if %{with systemd} BuildRequires: systemd-devel, systemd-units +%endif %if %{with mono} BuildRequires: mono-devel, mono-web, glib2-devel %endif %if %{with v8} -%if 0%{?fedora} +%if 0%{?fedora} >= 25 BuildRequires: v8-314-devel %else BuildRequires: v8-devel %endif %endif %if %{with mongodblibs} -%if 0%{?fedora} +%if 0%{?fedora} >= 30 BuildRequires: mongo-cxx-driver-legacy-devel %else BuildRequires: mongo-cxx-driver-devel %endif %endif -%if %{with pq} -BuildRequires: libpq-devel -%endif -%if 0%{?fedora} +%if 0%{?fedora} >= 28 BuildRequires: libargon2-devel Obsoletes: uwsgi-router-access <= 2.0.16 %endif @@ -387,7 +233,14 @@ Obsoletes: uwsgi-routers <= 2.0.6 Obsoletes: uwsgi-plugin-erlang <= 1.9.20-1 Obsoletes: uwsgi-plugin-admin <= 2.0.6 +Requires(pre): shadow-utils +%if %{with systemd} %{?systemd_requires} +%else +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +%endif %filter_requires_in %{_usrsrc} %filter_provides_in %{_usrsrc} @@ -439,41 +292,17 @@ Provides: python3-uwsgidecorators = %{version}-%{release} %endif %description -n python%{python3_pkgversion}-uwsgidecorators -The uwsgidecorators Python %{python3_version} module provides higher-level -access to the uWSGI API. +The uwsgidecorators Python %{python3_version} module provides higher-level access to the uWSGI API. %endif -%if %{with python3_alternate1} -%package -n %{python3_alternate1_pkgname}-uwsgidecorators -Summary: Python %{python3_alternate1_version} decorators providing access to the uwsgi API +%if %{with python3_other} +%package -n python%{python3_other_pkgversion}-uwsgidecorators +Summary: Python %{python3_other_version} decorators providing access to the uwsgi API Requires: uwsgi = %{version}-%{release} -Requires: uwsgi-plugin-python%{python3_alternate1_version_nodots} = %{version}-%{release} +Requires: uwsgi-plugin-python%{python3_other_pkgversion} = %{version}-%{release} -%description -n %{python3_alternate1_pkgname}-uwsgidecorators -The uwsgidecorators Python %{python3_alternate1_version} module provides -higher-level access to the uWSGI API. -%endif - -%if %{with python3_alternate2} -%package -n %{python3_alternate2_pkgname}-uwsgidecorators -Summary: Python %{python3_alternate2_version} decorators providing access to the uwsgi API -Requires: uwsgi = %{version}-%{release} -Requires: uwsgi-plugin-python%{python3_alternate2_version_nodots} = %{version}-%{release} - -%description -n %{python3_alternate2_pkgname}-uwsgidecorators -The uwsgidecorators Python %{python3_alternate2_version} module provides -higher-level access to the uWSGI API. -%endif - -%if %{with python3_alternate3} -%package -n %{python3_alternate3_pkgname}-uwsgidecorators -Summary: Python %{python3_alternate3_version} decorators providing access to the uwsgi API -Requires: uwsgi = %{version}-%{release} -Requires: uwsgi-plugin-python%{python3_alternate3_version_nodots} = %{version}-%{release} - -%description -n %{python3_alternate3_pkgname}-uwsgidecorators -The uwsgidecorators Python %{python3_alternate3_version} module provides -higher-level access to the uWSGI API. +%description -n python%{python3_other_pkgversion}-uwsgidecorators +The uwsgidecorators Python %{python3_other_version} module provides higher-level access to the uWSGI API. %endif %package -n uwsgi-docs @@ -534,19 +363,17 @@ This package contains the zabbix plugin for uWSGI %package -n uwsgi-alarm-curl Summary: uWSGI - Curl alarm plugin -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl %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} +Requires: uwsgi-plugin-common = %{version}-%{release}, gloox %description -n uwsgi-alarm-xmpp This package contains the alarm_xmpp alarm plugin for uWSGI -%endif # Transformations @@ -619,7 +446,7 @@ This package contains the logfile logger plugin for uWSGI %package -n uwsgi-logger-graylog2 Summary: uWSGI - Graylog2 logger plugin -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, zlib %description -n uwsgi-logger-graylog2 This package contains the graylog2 logger plugin for uWSGI @@ -678,12 +505,14 @@ Provides: uwsgi-plugin-syslog = %{version}-%{release} %description -n uwsgi-logger-syslog This package contains the syslog logger plugin for uWSGI +%if %{with systemd} %package -n uwsgi-logger-systemd Summary: uWSGI - systemd journal logger plugin Requires: uwsgi-plugin-common = %{version}-%{release} %description -n uwsgi-logger-systemd This package contains the systemd journal logger plugin for uWSGI +%endif %if %{with zeromq} %package -n uwsgi-logger-zeromq @@ -698,7 +527,7 @@ This package contains the ZeroMQ logger plugin for uWSGI %package -n uwsgi-plugin-airbrake Summary: uWSGI - Plugin for AirBrake support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl %description -n uwsgi-plugin-airbrake This package contains the airbrake plugin for uWSGI @@ -720,12 +549,11 @@ 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: uwsgi-plugin-common = %{version}-%{release} +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 @@ -733,7 +561,6 @@ 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 @@ -744,14 +571,14 @@ This package contains the cheaper_busyness plugin for uWSGI %package -n uwsgi-plugin-cplusplus Summary: uWSGI - Plugin for C++ support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libstdc++ %description -n uwsgi-plugin-cplusplus This package contains the cplusplus plugin for uWSGI %package -n uwsgi-plugin-curl-cron Summary: uWSGI - Plugin for CURL Cron support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl %description -n uwsgi-plugin-curl-cron This package contains the curl_cron plugin for uWSGI @@ -770,14 +597,12 @@ Requires: uwsgi-plugin-common = %{version}-%{release} %description -n uwsgi-plugin-dummy This package contains the dummy plugin for uWSGI -%if %{with ruby_rack} %package -n uwsgi-plugin-fiber Summary: uWSGI - Plugin for Ruby Fiber support Requires: uwsgi-plugin-common = %{version}-%{release}, uwsgi-plugin-rack = %{version}-%{release} %description -n uwsgi-plugin-fiber This package contains the fiber plugin for uWSGI -%endif %if %{with go} %package -n uwsgi-plugin-gccgo @@ -788,19 +613,17 @@ 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} +Requires: uwsgi-plugin-common = %{version}-%{release}, GeoIP %description -n uwsgi-plugin-geoip This package contains the geoip plugin for uWSGI -%endif %if %{with python2} %package -n uwsgi-plugin-python2-gevent Summary: uWSGI - Plugin for Python 2 GEvent support -Requires: uwsgi-plugin-python2 = %{version}-%{release} +Requires: uwsgi-plugin-python2 = %{version}-%{release}, libevent Obsoletes: uwsgi-plugin-gevent < 2.0.16-4 Provides: uwsgi-plugin-gevent = %{version}-%{release} @@ -811,37 +634,19 @@ This package contains the Python 2 gevent plugin for uWSGI %if %{with python3} %package -n uwsgi-plugin-python%{python3_pkgversion}-gevent Summary: uWSGI - Plugin for Python %{python3_version} GEvent support -Requires: uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release} +Requires: uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release}, libevent %description -n uwsgi-plugin-python%{python3_pkgversion}-gevent This package contains the Python %{python3_version} gevent plugin for uWSGI %endif -%if %{with python3_alternate1} -%package -n uwsgi-plugin-python%{python3_alternate1_version_nodots}-gevent -Summary: uWSGI - Plugin for Python %{python3_alternate1_version} GEvent support -Requires: uwsgi-plugin-python%{python3_alternate1_version_nodots} = %{version}-%{release}, libevent +%if %{with python3_other} +%package -n uwsgi-plugin-python%{python3_other_pkgversion}-gevent +Summary: uWSGI - Plugin for Python %{python3_other_version} GEvent support +Requires: uwsgi-plugin-python%{python3_other_pkgversion} = %{version}-%{release}, libevent -%description -n uwsgi-plugin-python%{python3_alternate1_version_nodots}-gevent -This package contains the Python %{python3_alternate1_version} gevent plugin for uWSGI -%endif - -%if %{with python3_alternate2} -%package -n uwsgi-plugin-python%{python3_alternate2_version_nodots}-gevent -Summary: uWSGI - Plugin for Python %{python3_alternate2_version} GEvent support -Requires: uwsgi-plugin-python%{python3_alternate2_version_nodots} = %{version}-%{release}, libevent - -%description -n uwsgi-plugin-python%{python3_alternate2_version_nodots}-gevent -This package contains the Python %{python3_alternate2_version} gevent plugin for uWSGI -%endif - -%if %{with python3_alternate3} -%package -n uwsgi-plugin-python%{python3_alternate3_version_nodots}-gevent -Summary: uWSGI - Plugin for Python %{python3_alternate3_version} GEvent support -Requires: uwsgi-plugin-python%{python3_alternate3_version_nodots} = %{version}-%{release}, libevent - -%description -n uwsgi-plugin-python%{python3_alternate3_version_nodots}-gevent -This package contains the Python %{python3_alternate3_version} gevent plugin for uWSGI +%description -n uwsgi-plugin-python%{python3_other_pkgversion}-gevent +This package contains the Python %{python3_other_version} gevent plugin for uWSGI %endif %if %{with glusterfs} @@ -866,7 +671,7 @@ This package contains the Python 2 greenlet plugin for uWSGI %endif %endif -%if %{with python3_greenlet} +%if %{with python3} %package -n uwsgi-plugin-python%{python3_pkgversion}-greenlet Summary: uWSGI - Plugin for Python %{python3_version} Greenlet support Requires: python%{python3_pkgversion}-greenlet, uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release} @@ -954,14 +759,12 @@ Requires: uwsgi-plugin-common = %{version}-%{release}, pam %description -n uwsgi-plugin-pam This package contains the PAM plugin for uWSGI -%if %{with php} %package -n uwsgi-plugin-php Summary: uWSGI - Plugin for PHP support Requires: uwsgi-plugin-common = %{version}-%{release} %description -n uwsgi-plugin-php This package contains the PHP plugin for uWSGI -%endif %package -n uwsgi-plugin-pty Summary: uWSGI - Plugin for PTY support @@ -994,41 +797,21 @@ Provides: uwsgi-plugin-python3 = %{version}-%{release} This package contains the Python %{python3_version} plugin for uWSGI %endif -%if %{with python3_alternate1} -%package -n uwsgi-plugin-python%{python3_alternate1_version_nodots} -Summary: uWSGI - Plugin for Python %{python3_alternate1_version} support -Requires: %{python3_alternate1_pkgname}, uwsgi-plugin-common = %{version}-%{release} +%if %{with python3_other} +%package -n uwsgi-plugin-python%{python3_other_pkgversion} +Summary: uWSGI - Plugin for Python %{python3_other_version} support +Requires: python%{python3_other_pkgversion}, uwsgi-plugin-common = %{version}-%{release} -%description -n uwsgi-plugin-python%{python3_alternate1_version_nodots} -This package contains the Python %{python3_alternate1_version} plugin for uWSGI +%description -n uwsgi-plugin-python%{python3_other_pkgversion} +This package contains the Python %{python3_other_version} plugin for uWSGI %endif -%if %{with python3_alternate2} -%package -n uwsgi-plugin-python%{python3_alternate2_version_nodots} -Summary: uWSGI - Plugin for Python %{python3_alternate2_version} support -Requires: %{python3_alternate2_pkgname}, uwsgi-plugin-common = %{version}-%{release} - -%description -n uwsgi-plugin-python%{python3_alternate2_version_nodots} -This package contains the Python %{python3_alternate2_version} plugin for uWSGI -%endif - -%if %{with python3_alternate3} -%package -n uwsgi-plugin-python%{python3_alternate3_version_nodots} -Summary: uWSGI - Plugin for Python %{python3_alternate3_version} support -Requires: %{python3_alternate3_pkgname}, uwsgi-plugin-common = %{version}-%{release} - -%description -n uwsgi-plugin-python%{python3_alternate3_version_nodots} -This package contains the Python %{python3_alternate3_version} plugin for uWSGI -%endif - -%if %{with ruby_rack} %package -n uwsgi-plugin-rack Summary: uWSGI - Ruby rack plugin Requires: rubygem-rack, uwsgi-plugin-common = %{version}-%{release} %description -n uwsgi-plugin-rack This package contains the rack plugin for uWSGI -%endif %package -n uwsgi-plugin-rbthreads Summary: uWSGI - Ruby native threads support plugin @@ -1103,6 +886,10 @@ This package contains the tornado (Python 2) plugin for uWSGI %package -n uwsgi-plugin-python%{python3_pkgversion}-tornado Summary: uWSGI - Plugin for Tornado (Python %{python3_version}) support Requires: uwsgi-plugin-common = %{version}-%{release}, python%{python3_pkgversion}-tornado +%if 0%{?fedora} && 0%{?fedora} < 29 +Obsoletes: uwsgi-plugin-tornado3 < 2.0.16-4 +Provides: uwsgi-plugin-tornado3 = %{version}-%{release} +%endif %description -n uwsgi-plugin-python%{python3_pkgversion}-tornado This package contains the tornado (Python %{python3_version}) plugin for uWSGI @@ -1126,21 +913,21 @@ This package contains the v8 plugin for uWSGI %package -n uwsgi-plugin-webdav Summary: uWSGI - Plugin for WebDAV support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libattr %description -n uwsgi-plugin-webdav This package contains the webdav plugin for uWSGI %package -n uwsgi-plugin-xattr Summary: uWSGI - Plugin for Extra Attributes support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libattr %description -n uwsgi-plugin-xattr This package contains the xattr plugin for uWSGI %package -n uwsgi-plugin-xslt Summary: uWSGI - Plugin for XSLT transformation support -Requires: uwsgi-plugin-common = %{version}-%{release} +Requires: uwsgi-plugin-common = %{version}-%{release}, libxslt %description -n uwsgi-plugin-xslt This package contains the xslt plugin for uWSGI @@ -1325,33 +1112,6 @@ Provides: uwsgi-routers = %{version}-%{release} %description -n uwsgi-router-xmldir This package contains the xmldir router plugin for uWSGI -# Emperors - -%package -n uwsgi-emperor-amqp -Summary: uWSGI - Plugin for AMQP emperor rupport -Requires: uwsgi-plugin-common = %{version}-%{release} - -%description -n uwsgi-emperor-amqp -This package contains the AMQP emperor plugin for uWSGI - -%if %{with pq} -%package -n uwsgi-emperor-pg -Summary: uWSGI - Plugin for Postgres emperor rupport -Requires: uwsgi-plugin-common = %{version}-%{release} - -%description -n uwsgi-emperor-pg -This package contains the Postgres emperor plugin for uWSGI -%endif - -%if %{with zeromq} -%package -n uwsgi-emperor-zeromq -Summary: uWSGI - Plugin for ZeroMQ emperor rupport -Requires: uwsgi-plugin-common = %{version}-%{release} - -%description -n uwsgi-emperor-zeromq -This package contains the ZeroMQ emperor plugin for uWSGI -%endif - # The rest %if %{with mod_proxy_uwsgi} @@ -1369,125 +1129,115 @@ Fully Apache API compliant proxy module cp -p %{SOURCE1} buildconf/ echo "plugin_dir = %{_libdir}/uwsgi" >> buildconf/fedora.ini cp -p %{SOURCE5} README.Fedora -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 -%if 0%{?fedora} -%patch -P5 -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%if 0%{?fedora} >= 22 +%patch5 -p1 %endif -%if %{with v8} && 0%{?fedora} -%patch -P6 -p1 +%if %{with v8} && 0%{?fedora} >= 25 +%patch6 -p1 %endif %if %{with mono} -%patch -P7 -p1 +%patch7 -p1 %endif -%patch -P13 -p1 -%patch -P14 -p1 +%patch9 -p1 +%if 0%{?fedora} >= 32 +%patch10 -p1 +%endif +%patch11 -p1 + +#disable plug-ins +%if %{without mongodblibs} +sed -in "s/mongodblog, //" buildconf/fedora.ini +sed -in "s/stats_pusher_mongodb, //" buildconf/fedora.ini +%endif +%if %{without v8} +sed -in "s/v8, //" buildconf/fedora.ini +%endif +%if %{without gridfs} +sed -in "s/gridfs, //" buildconf/fedora.ini +%endif +%if %{without mono} +sed -in "s/mono, //" buildconf/fedora.ini +%endif + +%if %{with perl} && (%{with python3} || %{with python3_other}) +%{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py +%endif + %build -CFLAGS="%{optflags} -Wno-error -Wno-unused-but-set-variable -fPIC" %{__python} uwsgiconfig.py --verbose --build fedora.ini +CFLAGS="%{optflags} -Wno-error -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --build fedora.ini %if %{with python2} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --verbose --plugin plugins/python fedora -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --verbose --plugin plugins/gevent fedora -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --verbose --plugin plugins/tornado fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/python fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/gevent fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/tornado fedora %endif %if %{with python3} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --verbose --plugin plugins/python fedora python%{python3_pkgversion} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --verbose --plugin plugins/gevent fedora python%{python3_pkgversion}_gevent -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --verbose --plugin plugins/tornado fedora python%{python3_pkgversion}_tornado +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/python fedora python%{python3_pkgversion} +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/gevent fedora python%{python3_pkgversion}_gevent +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/tornado fedora python%{python3_pkgversion}_tornado %endif -%if %{with python3_alternate1} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate1} uwsgiconfig.py --verbose --plugin plugins/python fedora python%{python3_alternate1_version_nodots} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate1} uwsgiconfig.py --verbose --plugin plugins/gevent fedora python%{python3_alternate1_version_nodots}_gevent -%endif -%if %{with python3_alternate2} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate2} uwsgiconfig.py --verbose --plugin plugins/python fedora python%{python3_alternate2_version_nodots} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate2} uwsgiconfig.py --verbose --plugin plugins/gevent fedora python%{python3_alternate2_version_nodots}_gevent -%endif -%if %{with python3_alternate3} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate3} uwsgiconfig.py --verbose --plugin plugins/python fedora python%{python3_alternate3_version_nodots} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_alternate3} uwsgiconfig.py --verbose --plugin plugins/gevent fedora python%{python3_alternate3_version_nodots}_gevent +%if %{with python3_other} +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --plugin plugins/python fedora python%{python3_other_pkgversion} +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --plugin plugins/gevent fedora python%{python3_other_pkgversion}_gevent %endif %if %{with mongodblibs} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/mongodblog fedora -CFLAGS="%{optflags} -Wno-unused-but-set-variable -std=gnu++11 -Wno-error" %{__python2} uwsgiconfig.py --verbose --plugin plugins/stats_pusher_mongodb fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/mongodblog fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable -std=gnu++11 -Wno-error" %{__python2} uwsgiconfig.py --plugin plugins/stats_pusher_mongodb fedora %endif %if %{with mono} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/mono fedora -%endif -%if %{with php} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/php fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/mono fedora %endif %if %{with v8} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/v8 fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/v8 fedora %endif %if %{with go} -# In EL* distributions, the gccgo compiler needs to be explicitly used to -# compile Go code, gcc will not work. However, gccgo can compile C code, -# so use that instead -%if 0%{?rhel} -CC="gccgo" CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/gccgo fedora -%else -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/gccgo fedora -%endif +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/gccgo fedora %endif %if %{with ruby19} -%if %{with ruby_rack} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/fiber fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/fiber fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/rbthreads fedora %endif -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/rbthreads fedora +%if %{with systemd} +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/systemd_logger fedora %endif %if %{with tuntap} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/tuntap fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/tuntap fedora %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 +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/psgi fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/coroae fedora %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 -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/emperor_zeromq fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/logzmq fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/mongrel2 fedora %endif %if %{with python2_greenlet} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/greenlet fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/greenlet fedora %endif -%if %{with python3_greenlet} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/greenlet fedora python%{python3_pkgversion}_greenlet +%if %{with python3} +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/greenlet fedora python%{python3_pkgversion}_greenlet %endif %if %{with glusterfs} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/glusterfs fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/glusterfs fedora %endif %if %{with gridfs} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/gridfs fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/gridfs fedora %endif %if %{with java} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/jvm fedora -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 ruby_rack} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/rack fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/jvm fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/jwsgi fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/ring fedora %endif %if %{with tcp_wrappers} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/router_access fedora +CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --plugin plugins/router_access fedora %endif %if %{with mod_proxy_uwsgi} %{_httpd_apxs} -Wc,-Wall -Wl -c apache2/mod_proxy_uwsgi.c %endif -%if %{with pq} -CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/emperor_pg fedora -%endif - %install @@ -1495,6 +1245,9 @@ install -d %{buildroot}%{_sysconfdir}/uwsgi.d install -d %{buildroot}%{_usrsrc}/uwsgi/%{version} install -d %{buildroot}%{_includedir}/uwsgi install -d %{buildroot}%{_libdir}/uwsgi +%if %{without systemd} +install -d -m 0775 %{buildroot}%{_localstatedir}/run/uwsgi +%endif %if %{with mono} install -d %{buildroot}%{_monogacdir} %endif @@ -1521,22 +1274,10 @@ install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_sitelib}/uwsgidec %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/uwsgidecorators.py %endif %endif -%if %{with python3_alternate1} -install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_alternate1_sitelib}/uwsgidecorators.py +%if %{with python3_other} +install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_other_sitelib}/uwsgidecorators.py %if %{manual_py_compile} == 1 -%py_byte_compile %{__python3_alternate1} %{buildroot}%{python3_alternate1_sitelib}/uwsgidecorators.py -%endif -%endif -%if %{with python3_alternate2} -install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_alternate2_sitelib}/uwsgidecorators.py -%if %{manual_py_compile} == 1 -%py_byte_compile %{__python3_alternate2} %{buildroot}%{python3_alternate2_sitelib}/uwsgidecorators.py -%endif -%endif -%if %{with python3_alternate3} -install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_alternate3_sitelib}/uwsgidecorators.py -%if %{manual_py_compile} == 1 -%py_byte_compile %{__python3_alternate3} %{buildroot}%{python3_alternate3_sitelib}/uwsgidecorators.py +%py_byte_compile %{__python3_other} %{buildroot}%{python3_other_sitelib}/uwsgidecorators.py %endif %endif %if %{with java} @@ -1546,33 +1287,95 @@ install -D -p -m 0644 plugins/jvm/uwsgi.jar %{buildroot}%{_javadir}/uwsgi.jar gacutil -i plugins/mono/uwsgi.dll -f -package uwsgi -root %{buildroot}/usr/lib %endif install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/uwsgi.ini +%if %{with systemd} install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/uwsgi.service install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/uwsgi.conf +%else +install -D -p -m 0755 %{SOURCE6} %{buildroot}%{_initddir}/uwsgi +%endif %if %{with mod_proxy_uwsgi} install -D -p -m 0755 apache2/.libs/mod_proxy_uwsgi.so %{buildroot}%{_httpd_moddir}/mod_proxy_uwsgi.so %endif -install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf + +%pre +getent group uwsgi >/dev/null || groupadd -r uwsgi +getent passwd uwsgi >/dev/null || \ + useradd -r -g uwsgi -d %{!?with_systemd:%{_localstatedir}}/run/uwsgi -s /sbin/nologin \ + -c "uWSGI daemon user" uwsgi +exit 0 %post -%systemd_post uwsgi.service +%if %{with systemd} +echo "Executing systemd post-install tasks" +%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 +%else +echo "Executing System V post-install tasks" +/sbin/chkconfig --add uwsgi +%endif %preun -%systemd_preun uwsgi.service +%if %{with systemd} +echo "Executing systemd pre-uninstall tasks" +%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 +%else +echo "Executing System V pre-uninstall tasks" +if [ $1 -eq 0 ] ; then + /sbin/service uwsgi stop >/dev/null 2>&1 + /sbin/chkconfig --del uwsgi +fi +%endif %postun -%systemd_postun uwsgi.service +%if %{with systemd} +echo "Executing systemd post-uninstall tasks" +%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 +%else +echo "Executing System V post-uninstall tasks" +if [ "$1" -ge "1" ] ; then + /sbin/service uwsgi condrestart >/dev/null 2>&1 || : +fi +%endif %files %{_sbindir}/uwsgi %config(noreplace) %{_sysconfdir}/uwsgi.ini +%if %{with systemd} %{_unitdir}/uwsgi.service %{_tmpfilesdir}/uwsgi.conf +%else +%{_initddir}/uwsgi +%endif %dir %{_sysconfdir}/uwsgi.d +%if %{without systemd} +%attr(0775,uwsgi,uwsgi) %dir %{_localstatedir}/run/uwsgi +%endif %doc README README.Fedora CHANGELOG %license LICENSE -%{_sysusersdir}/uwsgi.conf %files -n uwsgi-devel %{_includedir}/uwsgi @@ -1589,22 +1392,10 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %{python3_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_version_nodots}*.py* %endif -%if %{with python3_alternate1} -%files -n %{python3_alternate1_pkgname}-uwsgidecorators -%{python3_alternate1_sitelib}/uwsgidecorators.py -%{python3_alternate1_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_alternate1_version_nodots}*.py* -%endif - -%if %{with python3_alternate2} -%files -n %{python3_alternate2_pkgname}-uwsgidecorators -%{python3_alternate2_sitelib}/uwsgidecorators.py -%{python3_alternate2_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_alternate2_version_nodots}*.py* -%endif - -%if %{with python3_alternate3} -%files -n %{python3_alternate3_pkgname}-uwsgidecorators -%{python3_alternate3_sitelib}/uwsgidecorators.py -%{python3_alternate3_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_alternate3_version_nodots}*.py* +%if %{with python3_other} +%files -n python%{python3_other_pkgversion}-uwsgidecorators +%{python3_other_sitelib}/uwsgidecorators.py +%{python3_other_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_other_version_nodots}*.py* %endif %files -n uwsgi-docs @@ -1639,10 +1430,8 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %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 @@ -1698,8 +1487,10 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %files -n uwsgi-logger-syslog %{_libdir}/uwsgi/syslog_plugin.so +%if %{with systemd} %files -n uwsgi-logger-systemd %{_libdir}/uwsgi/systemd_logger_plugin.so +%endif %if %{with zeromq} %files -n uwsgi-logger-zeromq @@ -1721,11 +1512,9 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %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 @@ -1743,21 +1532,17 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %{_libdir}/uwsgi/dummy_plugin.so %if %{with ruby19} -%if %{with ruby_rack} %files -n uwsgi-plugin-fiber %{_libdir}/uwsgi/fiber_plugin.so %endif -%endif %if %{with go} %files -n uwsgi-plugin-gccgo %{_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 @@ -1769,19 +1554,9 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %{_libdir}/uwsgi/python%{python3_pkgversion}_gevent_plugin.so %endif -%if %{with python3_alternate1} -%files -n uwsgi-plugin-python%{python3_alternate1_version_nodots}-gevent -%{_libdir}/uwsgi/python%{python3_alternate1_version_nodots}_gevent_plugin.so -%endif - -%if %{with python3_alternate2} -%files -n uwsgi-plugin-python%{python3_alternate2_version_nodots}-gevent -%{_libdir}/uwsgi/python%{python3_alternate2_version_nodots}_gevent_plugin.so -%endif - -%if %{with python3_alternate3} -%files -n uwsgi-plugin-python%{python3_alternate3_version_nodots}-gevent -%{_libdir}/uwsgi/python%{python3_alternate3_version_nodots}_gevent_plugin.so +%if %{with python3_other} +%files -n uwsgi-plugin-python%{python3_other_pkgversion}-gevent +%{_libdir}/uwsgi/python%{python3_other_pkgversion}_gevent_plugin.so %endif %if %{with glusterfs} @@ -1794,7 +1569,7 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %{_libdir}/uwsgi/greenlet_plugin.so %endif -%if %{with python3_greenlet} +%if %{with python3} %files -n uwsgi-plugin-python%{python3_pkgversion}-greenlet %{_libdir}/uwsgi/python%{python3_pkgversion}_greenlet_plugin.so %endif @@ -1840,10 +1615,8 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %files -n uwsgi-plugin-pam %{_libdir}/uwsgi/pam_plugin.so -%if %{with php} %files -n uwsgi-plugin-php %{_libdir}/uwsgi/php_plugin.so -%endif %files -n uwsgi-plugin-pty %{_libdir}/uwsgi/pty_plugin.so @@ -1858,25 +1631,13 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %{_libdir}/uwsgi/python%{python3_pkgversion}_plugin.so %endif -%if %{with python3_alternate1} -%files -n uwsgi-plugin-python%{python3_alternate1_version_nodots} -%{_libdir}/uwsgi/python%{python3_alternate1_version_nodots}_plugin.so +%if %{with python3_other} +%files -n uwsgi-plugin-python%{python3_other_pkgversion} +%{_libdir}/uwsgi/python%{python3_other_pkgversion}_plugin.so %endif -%if %{with python3_alternate2} -%files -n uwsgi-plugin-python%{python3_alternate2_version_nodots} -%{_libdir}/uwsgi/python%{python3_alternate2_version_nodots}_plugin.so -%endif - -%if %{with python3_alternate3} -%files -n uwsgi-plugin-python%{python3_alternate3_version_nodots} -%{_libdir}/uwsgi/python%{python3_alternate3_version_nodots}_plugin.so -%endif - -%if %{with ruby_rack} %files -n uwsgi-plugin-rack %{_libdir}/uwsgi/rack_plugin.so -%endif %if %{with ruby19} %files -n uwsgi-plugin-rbthreads @@ -2005,22 +1766,6 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %files -n uwsgi-router-xmldir %{_libdir}/uwsgi/router_xmldir_plugin.so -# Emperors - -%files -n uwsgi-emperor-amqp -%{_libdir}/uwsgi/emperor_amqp_plugin.so - -%if %{with pq} -%files -n uwsgi-emperor-pg -%{_libdir}/uwsgi/emperor_pg_plugin.so -%endif - -%if %{with zeromq} -%files -n uwsgi-emperor-zeromq -%{_libdir}/uwsgi/emperor_zeromq_plugin.so -%endif - - # The rest %if %{with mod_proxy_uwsgi} @@ -2030,256 +1775,6 @@ install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf %changelog -* Sun Jan 11 2026 Ralf Ertzinger - 2.0.31-5 -- Rebuild for new gccgo libraries - -* Thu Jan 08 2026 Mamoru TASAKA - 2.0.31-4 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 - -* Wed Nov 26 2025 Ralf Ertzinger - 2.0.31-3 -- Fix path errors for EPEL9 uwsgidecorator packages - -* Wed Oct 15 2025 Remi Collet - 2.0.31-2 -- rebuild for https://fedoraproject.org/wiki/Changes/php85 - -* Sun Oct 12 2025 Ralf Ertzinger - 2.0.31-1 -- Update to 2.0.31, drop merged patches - -* Fri Sep 19 2025 Python Maint - 2.0.30-7 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Tue Aug 19 2025 Ralf Ertzinger - 2.0.30-6 -- Add python3.13 module for EL9 - -* Fri Aug 15 2025 Python Maint - 2.0.30-5 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Thu Jul 24 2025 Ralf Ertzinger - 2.0.30-4 -- Disable perl-Coro for rawhide, as this blocks rebuilding - for perl 5.42 (see https://bugzilla.redhat.com/show_bug.cgi?id=2379448) - -* Tue Jul 08 2025 Jitka Plesnikova - 2.0.30-3 -- Perl 5.42 rebuild - -* Mon Jun 09 2025 Python Maint - 2.0.30-2 -- Rebuilt for Python 3.14 - -* Sun Jun 08 2025 Ralf Ertzinger - 2.0.30-1 -- Update to 2.0.30 - -* Tue Jun 03 2025 Python Maint - 2.0.29-2 -- Rebuilt for Python 3.14 - -* Sat Apr 12 2025 Ralf Ertzinger - 2.0.29-1 -- Update to 2.0.29 - -* Mon Mar 24 2025 Ralf Ertzinger - 2.0.28-7 -- Rebuild for new libgo - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.0.28-6 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Sat Feb 01 2025 Björn Esser - 2.0.28-5 -- Add explicit BR: libxcrypt-devel - -* Fri Jan 24 2025 Ralf Ertzinger - 2.0.28-4 -- Fix type errors flagged by GCC15 - -* Sun Jan 19 2025 Fedora Release Engineering - 2.0.28-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jan 08 2025 Mamoru TASAKA - 2.0.28-2 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 - -* Sun Oct 27 2024 Ralf Ertzinger - 2.0.28-1 -- Update to 2.0.28, drop merged patches - -* Tue Oct 22 2024 Richard W.M. Jones - 2.0.27-5 -- Rebuild for Jansson 2.14 - (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) - -* Mon Oct 14 2024 Ralf Ertzinger - 2.0.27-4 -- Fix uWSGI auto-reloading on config change - -* Mon Oct 14 2024 Remi Collet - 2.0.27-3 -- rebuild for https://fedoraproject.org/wiki/Changes/php84 - -* Fri Sep 27 2024 Ralf Ertzinger - 2.0.27-2 -- Only build fiber plugin when rack plugin is also built - -* Tue Sep 24 2024 Ralf Ertzinger - 2.0.27-1 -- Update to 2.0.27 -- Drop merged patches -- Re-enable rack plugin for EPEL10, dependencies now present - -* Sun Sep 22 2024 Ralf Ertzinger - 2.0.26-8 -- Disable building the Ruby rack plugin for EPEL10 - -* Wed Sep 04 2024 Miroslav Suchý - 2.0.26-7 -- convert license to SPDX - -* Wed Sep 04 2024 Ralf Ertzinger - 2.0.26-6 -- Drop support for EL7 -- Add support for EL10 -- Explicitly require pcre2 (all builds already pulled this - in anyway) - -* Tue Aug 13 2024 Ralf Ertzinger - 2.0.26-5 -- Add patch for python 3.13 - -* Sat Jul 20 2024 Fedora Release Engineering - 2.0.26-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jun 12 2024 Jitka Plesnikova - 2.0.26-3 -- Perl 5.40 rebuild - -* Sat Jun 08 2024 Python Maint - 2.0.26-2 -- Rebuilt for Python 3.13 - -* Sat Jun 01 2024 Ralf Ertzinger - 2.0.26-1 -- Update to 2.0.26 -- Rework support for multiple python versions - -* Tue Apr 16 2024 Ralf Ertzinger - 2.0.25.1-1 -- Update to 2.0.25.1, drop merged patches -- Use github.com as source for the main tarball -- Do not build for i686 any more - -* Tue Mar 19 2024 Dominik Mierzejewski - 2.0.24-2 -- Rebuilt for gloox-1.0.28 - -* Sat Feb 10 2024 Ralf Ertzinger - 2.0.24-1 -- Update to 2.0.24, drop merged patches - -* Sat Jan 27 2024 Fedora Release Engineering - 2.0.23-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Jan 23 2024 Ralf Ertzinger - 2.0.23-2 -- Add reworked patch for python3.12 -- Build plugin for python3.11 under EPEL9 - -* Wed Jan 03 2024 Mamoru TASAKA - 2.0.23-2 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 - -* Thu Nov 02 2023 Ralf Ertzinger - 2.0.23-1 -- Update to 2.0.23, drop merged patches - -* Sat Oct 21 2023 Ralf Ertzinger - 2.0.22-7 -- Drop 2to3 call, it doesn't do anything anymore - -* Tue Oct 03 2023 Remi Collet - 2.0.22-6 -- rebuild for https://fedoraproject.org/wiki/Changes/php83 -- add patch for PHP 8.3 from - https://github.com/unbit/uwsgi/pull/2559 - -* Sat Sep 30 2023 Ralf Ertzinger - 2.0.22-5 -- Rework python 3.12 patch - -* Tue Sep 26 2023 Miro Hrončok - 2.0.22-4 -- Don't build the Python 3.11 module on Fedora 39+, it is not installable -- Fixes: rhbz#2239671 - -* Sat Sep 16 2023 Ralf Ertzinger - 2.0.22-3 -- Extend building the python 3.11 module to rawhide - -* Fri Sep 15 2023 Ralf Ertzinger - 2.0.22-2 -- For Fedora 39, build an extra module against Python 3.11 -- Disable PIE and enable PIC for the mail executable to avoid crashes when using - the PHP module (see BZ2203863) - -* Fri Jul 28 2023 Ralf Ertzinger - 2.0.22-1 -- Update to 2.0.22 -- Add initial patch for building against python3.12 - -* Sat Jul 22 2023 Fedora Release Engineering - 2.0.21-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jul 11 2023 Jitka Plesnikova - 2.0.21-11 -- Perl 5.38 rebuild - -* Thu Jun 15 2023 Python Maint - 2.0.21-10 -- Rebuilt for Python 3.12 - -* Thu Jun 15 2023 Ralf Ertzinger - 2.0.21-9 -- Rework Ruby patches -- Disable python3-greenlet plugin for EPEL9 - -* Thu Jun 15 2023 Python Maint - 2.0.21-8 -- Rebuilt for Python 3.12 - -* Fri Apr 21 2023 Ralf Ertzinger - 2.0.21-7 -- Fix Ruby/Rack plugin for Ruby >= 3.2 - -* Tue Jan 24 2023 Ralf Ertzinger - 2.0.21-5 -- Rebuilt for new libgo.so - -* Sat Jan 21 2023 Fedora Release Engineering - 2.0.21-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jan 04 2023 Mamoru TASAKA - 2.0.21-3 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 - -* Fri Oct 28 2022 Ralf Ertzinger - 2.0.21-2 -- Drop the perl-PSGI Requirement from the Perl plugin, it's not - strictly needed - -* Thu Oct 27 2022 Ralf Ertzinger - 2.0.21-1 -- Update to 2.0.21 - -* Thu Oct 06 2022 Ralf Ertzinger - 2.0.20-10 -- Fix PHP 8.2 support - -* Tue Aug 09 2022 Ralf Ertzinger - 2.0.20-9 -- Fix PHP 8.1 support - -* Sat Jul 23 2022 Fedora Release Engineering - 2.0.20-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jun 30 2022 Victor Stinner - 2.0.20-7 -- Add Python 3.11 support (rhbz#2099185) - -* Mon Jun 13 2022 Python Maint - 2.0.20-6 -- Rebuilt for Python 3.11 - -* Wed Jun 01 2022 Jitka Plesnikova - 2.0.20-5 -- Perl 5.36 rebuild - -* Fri Mar 04 2022 Ralf Ertzinger - 2.0.20-4 -- Add support for EPEL9 - -* Wed Mar 02 2022 Ralf Ertzinger - 2.0.20-3 -- Add build support for EPEL9 - -* Sat Feb 19 2022 Ralf Ertzinger - 2.0.20-3 -- Fix errors in uwsgi python module when building against python3.10 or higher - -* Wed Feb 16 2022 Ralf Ertzinger - 2.0.20-2.1 -- F37 rebuild for new libgo - -* Sat Feb 12 2022 Ralf Ertzinger - 2.0.20-2 -- Adding emperor-amqp for all targets -- Adding emperor-pg for Fedora/EPEL8 -- Adding emperor-zeromq for Fedora/EPEL8 - -* Mon Feb 07 2022 Ralf Ertzinger - 2.0.20-1.1 -- Fix gccgo plugin build for F36 - -* Sun Jan 23 2022 Ralf Ertzinger - 2.0.20-1 -- Update to 2.0.20 -- Fix build against PHP8 -- Remove support for EL6 -- General logic cleanup and removal of dead code from the spec file -- Add --verbose to build step to show compiler settings - -* Wed Jan 27 2021 Fedora Release Engineering - 2.0.18-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jan 06 2021 Mamoru TASAKA - 2.0.18-15 -- F-34: rebuild against ruby 3.0 - -* Tue Sep 15 2020 Miro Hrončok - 2.0.18-14 -- Rebuilt for libevent soname change - * Sat Aug 01 2020 Fedora Release Engineering - 2.0.18-13 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/uwsgi.sysusers b/uwsgi.sysusers deleted file mode 100644 index 30b5692..0000000 --- a/uwsgi.sysusers +++ /dev/null @@ -1 +0,0 @@ -u uwsgi - 'uWSGI daemon user' /run/uwsgi - diff --git a/uwsgi_fix_chroot_chdir.patch b/uwsgi_fix_chroot_chdir.patch deleted file mode 100644 index 5fbbd46..0000000 --- a/uwsgi_fix_chroot_chdir.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -uNr a/core/utils.c b/core/utils.c ---- a/core/utils.c 2021-10-06 07:22:45.000000000 +0200 -+++ b/core/utils.c 2022-01-23 12:19:10.715602147 +0100 -@@ -593,6 +593,10 @@ - uwsgi_error("chroot()"); - exit(1); - } -+ if (chdir("/")) { -+ uwsgi_error("chdir()"); -+ exit(1); -+ } - uwsgi.is_chrooted = 1; - #ifdef __linux__ - if (uwsgi.logging_options.memory_report) { diff --git a/uwsgi_fix_gcc_format_signedness.patch b/uwsgi_fix_gcc_format_signedness.patch deleted file mode 100644 index 44daae1..0000000 --- a/uwsgi_fix_gcc_format_signedness.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -uNr a/uwsgiconfig.py b/uwsgiconfig.py ---- a/uwsgiconfig.py 2024-02-09 21:30:45.436292711 +0100 -+++ b/uwsgiconfig.py 2024-02-09 21:32:29.607595604 +0100 -@@ -690,7 +690,27 @@ - '-D_LARGEFILE_SOURCE', - '-D_FILE_OFFSET_BITS=64' - ] -- if "gcc" in GCC: -+ -+ gcc_version = spcall("%s -dumpversion" % GCC) -+ if not gcc_version and GCC.startswith('gcc'): -+ if uwsgi_os == 'Darwin': -+ GCC = 'llvm-' + GCC -+ else: -+ GCC = 'gcc' -+ gcc_version = spcall("%s -dumpversion" % GCC) -+ -+ try: -+ gcc_version_components = gcc_version.split('.') -+ gcc_major = int(gcc_version_components[0]) -+ if len(gcc_version_components) > 1: -+ gcc_minor = int(gcc_version_components[1]) -+ else: -+ # gcc 5.0 is represented as simply "5" -+ gcc_minor = 0 -+ except Exception: -+ raise Exception("you need a C compiler to build uWSGI") -+ -+ if "gcc" in GCC and gcc_major >= 5: - cflags.append('-Wformat-signedness') - self.cflags = cflags + os.environ.get("CFLAGS", "").split() + self.get('cflags', '').split() - -@@ -710,14 +730,6 @@ - if uwsgi_os == 'GNU': - self.cflags.append('-D__HURD__') - -- gcc_version = spcall("%s -dumpversion" % GCC) -- if not gcc_version and GCC.startswith('gcc'): -- if uwsgi_os == 'Darwin': -- GCC = 'llvm-' + GCC -- else: -- GCC = 'gcc' -- gcc_version = spcall("%s -dumpversion" % GCC) -- - try: - add_it = False - cpp_include_list = str(spcall3("%s -v" % CPP)).split("\n") -@@ -750,16 +762,6 @@ - if not mute: - print("detected include path: %s" % self.include_path) - -- try: -- gcc_version_components = gcc_version.split('.') -- gcc_major = int(gcc_version_components[0]) -- if len(gcc_version_components) > 1: -- gcc_minor = int(gcc_version_components[1]) -- else: -- # gcc 5.0 is represented as simply "5" -- gcc_minor = 0 -- except: -- raise Exception("you need a C compiler to build uWSGI") - if (sys.version_info[0] == 2) or (gcc_major < 4) or (gcc_major == 4 and gcc_minor < 3): - self.cflags = self.cflags + ['-fno-strict-aliasing'] - # add -fno-strict-aliasing only on python2 and gcc < 4.3 diff --git a/uwsgi_fix_glusterfs_io_cb.patch b/uwsgi_fix_glusterfs_io_cb.patch deleted file mode 100644 index aa5d71b..0000000 --- a/uwsgi_fix_glusterfs_io_cb.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/plugins/glusterfs/glusterfs.c b/plugins/glusterfs/glusterfs.c -index 83428faf..c0063f4e 100644 ---- a/plugins/glusterfs/glusterfs.c -+++ b/plugins/glusterfs/glusterfs.c -@@ -46,7 +46,7 @@ struct uwsgi_glusterfs_async_io { - ssize_t rlen; - }; - --static void uwsgi_glusterfs_read_async_cb(glfs_fd_t *fd, ssize_t rlen, void *data) { -+static void uwsgi_glusterfs_read_async_cb(glfs_fd_t *fd, ssize_t rlen, struct glfs_stat *prestat, struct glfs_stat *poststat, void *data) { - struct uwsgi_glusterfs_async_io *aio = (struct uwsgi_glusterfs_async_io *) data; - #ifdef UWSGI_DEBUG - uwsgi_log("[glusterfs-cb] rlen = %d\n", rlen); diff --git a/uwsgi_fix_jvm_missing_path.patch b/uwsgi_fix_jvm_missing_path.patch deleted file mode 100644 index 29960d8..0000000 --- a/uwsgi_fix_jvm_missing_path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py ---- a/plugins/jvm/uwsgiplugin.py 2023-07-28 20:59:42.036749911 +0200 -+++ b/plugins/jvm/uwsgiplugin.py 2023-07-28 21:00:11.079400969 +0200 -@@ -36,7 +36,7 @@ - for jvm in known_jvms: - if os.path.exists(jvm + '/include'): - JVM_INCPATH = ["-I%s/include/" % jvm, "-I%s/include/%s" % (jvm, operating_system)] -- if os.path.exists("%s/jre"): -+ if os.path.exists("%s/jre" % jvm): - JVM_LIBPATH = ["-L%s/jre/lib/%s/server" % (jvm, arch)] - else: - JVM_LIBPATH = ["-L%s/lib/server" % (jvm,)] diff --git a/uwsgi_fix_mono.patch b/uwsgi_fix_mono.patch index bce3b1a..217eb68 100644 --- a/uwsgi_fix_mono.patch +++ b/uwsgi_fix_mono.patch @@ -1,15 +1,15 @@ -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' +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' -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_php74_zend.patch b/uwsgi_fix_php74_zend.patch new file mode 100644 index 0000000..a6f47e8 --- /dev/null +++ b/uwsgi_fix_php74_zend.patch @@ -0,0 +1,16 @@ +diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c +index 72c390223..1690fb60c 100644 +--- a/plugins/php/php_plugin.c ++++ b/plugins/php/php_plugin.c +@@ -1115,10 +1115,9 @@ 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; +- file_handle.free_filename = 0; +- file_handle.opened_path = NULL; + + if (php_request_startup(TSRMLS_C) == FAILURE) { + uwsgi_500(wsgi_req); diff --git a/uwsgi_fix_php8.patch b/uwsgi_fix_php8.patch deleted file mode 100644 index c968559..0000000 --- a/uwsgi_fix_php8.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py ---- a/plugins/php/uwsgiplugin.py 2022-01-22 22:40:33.783038869 +0100 -+++ b/plugins/php/uwsgiplugin.py 2022-01-22 22:41:45.261394898 +0100 -@@ -20,7 +20,12 @@ - if ld_run_path: - LDFLAGS.append('-L%s' % ld_run_path) - --LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] -+# PHP8 and above does not add the version to the library -+# name -+if int(php_version) < 8: -+ LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] -+else: -+ LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp'] - - phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR') - if phplibdir: diff --git a/uwsgi_fix_php81_filename_zend_string.patch b/uwsgi_fix_php81_filename_zend_string.patch deleted file mode 100644 index 81d9025..0000000 --- a/uwsgi_fix_php81_filename_zend_string.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 8ca18da9a01eee19156243c5c0d28d2572698e4a Mon Sep 17 00:00:00 2001 -From: Riccardo Magliocchetti -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; - diff --git a/uwsgi_fix_php82.patch b/uwsgi_fix_php82.patch deleted file mode 100644 index 66a8e49..0000000 --- a/uwsgi_fix_php82.patch +++ /dev/null @@ -1,15 +0,0 @@ -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; diff --git a/uwsgi_fix_php83.patch b/uwsgi_fix_php83.patch deleted file mode 100644 index ed343a9..0000000 --- a/uwsgi_fix_php83.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 064984116e86ac0a5d5d3805765395b661fc4455 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 4 Sep 2023 13:10:52 +0200 -Subject: [PATCH] ini_entries is read-only PHP 8.3 - ---- - plugins/php/php_plugin.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c -index b3efa006a..d9b615bac 100644 ---- a/plugins/php/php_plugin.c -+++ b/plugins/php/php_plugin.c -@@ -27,6 +27,7 @@ struct uwsgi_php { - char *fallback; - char *fallback2; - char *fallback_qs; -+ char *ini_entries; - size_t ini_size; - int dump_config; - char *server_software; -@@ -232,21 +233,22 @@ static sapi_module_struct uwsgi_sapi_module; - - void uwsgi_php_append_config(char *filename) { - size_t file_size = 0; -- char *file_content = uwsgi_open_and_read(filename, &file_size, 1, NULL); -- uwsgi_sapi_module.ini_entries = realloc(uwsgi_sapi_module.ini_entries, uphp.ini_size + file_size); -- memcpy(uwsgi_sapi_module.ini_entries + uphp.ini_size, file_content, file_size); -+ char *file_content = uwsgi_open_and_read(filename, &file_size, 1, NULL); -+ uphp.ini_entries = realloc(uphp.ini_entries, uphp.ini_size + file_size); -+ memcpy(uphp.ini_entries + uphp.ini_size, file_content, file_size); - uphp.ini_size += file_size-1; - free(file_content); -+ uwsgi_sapi_module.ini_entries = uphp.ini_entries; - } - - void uwsgi_php_set(char *opt) { - -- uwsgi_sapi_module.ini_entries = realloc(uwsgi_sapi_module.ini_entries, uphp.ini_size + strlen(opt)+2); -- memcpy(uwsgi_sapi_module.ini_entries + uphp.ini_size, opt, strlen(opt)); -- -+ uphp.ini_entries = realloc(uphp.ini_entries, uphp.ini_size + strlen(opt)+2); -+ memcpy(uphp.ini_entries + uphp.ini_size, opt, strlen(opt)); - uphp.ini_size += strlen(opt)+1; -- uwsgi_sapi_module.ini_entries[uphp.ini_size-1] = '\n'; -- uwsgi_sapi_module.ini_entries[uphp.ini_size] = 0; -+ uphp.ini_entries[uphp.ini_size-1] = '\n'; -+ uphp.ini_entries[uphp.ini_size] = 0; -+ uwsgi_sapi_module.ini_entries = uphp.ini_entries; - } - - extern ps_module ps_mod_uwsgi; diff --git a/uwsgi_fix_php_arginfo.patch b/uwsgi_fix_php_arginfo.patch deleted file mode 100644 index 5228066..0000000 --- a/uwsgi_fix_php_arginfo.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c -index 717d6317b..d336adddc 100644 ---- a/plugins/php/php_plugin.c -+++ b/plugins/php/php_plugin.c -@@ -497,21 +497,24 @@ PHP_FUNCTION(uwsgi_signal) { - RETURN_NULL(); - } - -+ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ - zend_function_entry uwsgi_php_functions[] = { -- PHP_FE(uwsgi_version, NULL) -- PHP_FE(uwsgi_setprocname, NULL) -- PHP_FE(uwsgi_worker_id, NULL) -- PHP_FE(uwsgi_masterpid, NULL) -- PHP_FE(uwsgi_signal, NULL) -- -- PHP_FE(uwsgi_rpc, NULL) -- -- PHP_FE(uwsgi_cache_get, NULL) -- PHP_FE(uwsgi_cache_set, NULL) -- PHP_FE(uwsgi_cache_update, NULL) -- PHP_FE(uwsgi_cache_del, NULL) -- PHP_FE(uwsgi_cache_clear, NULL) -- PHP_FE(uwsgi_cache_exists, NULL) -+ PHP_FE(uwsgi_version, arginfo_void) -+ PHP_FE(uwsgi_setprocname, arginfo_void) -+ PHP_FE(uwsgi_worker_id, arginfo_void) -+ PHP_FE(uwsgi_masterpid, arginfo_void) -+ PHP_FE(uwsgi_signal, arginfo_void) -+ -+ PHP_FE(uwsgi_rpc, arginfo_void) -+ -+ PHP_FE(uwsgi_cache_get, arginfo_void) -+ PHP_FE(uwsgi_cache_set, arginfo_void) -+ PHP_FE(uwsgi_cache_update, arginfo_void) -+ PHP_FE(uwsgi_cache_del, arginfo_void) -+ PHP_FE(uwsgi_cache_clear, arginfo_void) -+ PHP_FE(uwsgi_cache_exists, arginfo_void) - { NULL, NULL, NULL}, - }; - diff --git a/uwsgi_fix_psgi.patch b/uwsgi_fix_psgi.patch new file mode 100644 index 0000000..0c47dba --- /dev/null +++ b/uwsgi_fix_psgi.patch @@ -0,0 +1,38 @@ +diff --git a/plugins/psgi/psgi.h b/plugins/psgi/psgi.h +index 92e6b588..064041a2 100644 +--- a/plugins/psgi/psgi.h ++++ b/plugins/psgi/psgi.h +@@ -87,3 +87,5 @@ void uwsgi_perl_exec(char *); + + void uwsgi_perl_check_auto_reload(void); + void uwsgi_psgi_preinit_apps(void); ++ ++extern struct uwsgi_perl uperl; +diff --git a/plugins/psgi/psgi_loader.c b/plugins/psgi/psgi_loader.c +index 1e61f0e9..a9211185 100644 +--- a/plugins/psgi/psgi_loader.c ++++ b/plugins/psgi/psgi_loader.c +@@ -1,7 +1,6 @@ + #include "psgi.h" + + extern struct uwsgi_server uwsgi; +-struct uwsgi_perl uperl; + + extern struct uwsgi_plugin psgi_plugin; + +diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c +index e1177be2..8ca0a2ed 100644 +--- a/plugins/psgi/psgi_plugin.c ++++ b/plugins/psgi/psgi_plugin.c +@@ -3,11 +3,7 @@ + extern char **environ; + extern struct uwsgi_server uwsgi; + +-#ifdef __APPLE__ +-extern struct uwsgi_perl uperl; +-#else + struct uwsgi_perl uperl; +-#endif + + struct uwsgi_plugin psgi_plugin; + diff --git a/uwsgi_fix_python_py_ssize_t.patch b/uwsgi_fix_python_py_ssize_t.patch deleted file mode 100644 index ec90175..0000000 --- a/uwsgi_fix_python_py_ssize_t.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uNr a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h ---- a/plugins/python/uwsgi_python.h 2021-10-06 07:22:45.000000000 +0200 -+++ b/plugins/python/uwsgi_python.h 2022-02-19 18:39:10.929895062 +0100 -@@ -1,3 +1,7 @@ -+// This needs to be defined before Python.h is included -+// to indicate that the code uses Py_ssize_t properly -+#define PY_SSIZE_T_CLEAN -+ - #include - #include - diff --git a/uwsgi_fix_rpath.patch b/uwsgi_fix_rpath.patch index c05d4b8..0333830 100644 --- a/uwsgi_fix_rpath.patch +++ b/uwsgi_fix_rpath.patch @@ -1,7 +1,8 @@ -diff -uNr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py ---- a/plugins/jvm/uwsgiplugin.py 2024-02-08 17:35:28.000000000 +0100 -+++ b/plugins/jvm/uwsgiplugin.py 2024-02-08 21:55:26.627134235 +0100 -@@ -69,11 +69,6 @@ +diff --git a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py +index f39ad63..d9e95bb 100644 +--- a/plugins/jvm/uwsgiplugin.py ++++ b/plugins/jvm/uwsgiplugin.py +@@ -65,11 +65,6 @@ if "-framework JavaVM" in JVM_LIBPATH: GCC_LIST = ['jvm_plugin'] @@ -11,36 +12,38 @@ 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 subprocess.call("javac %s/plugins/jvm/uwsgi.java" % os.getcwd(), shell=True) != 0: + if os.system("javac %s/plugins/jvm/uwsgi.java" % os.getcwd()) != 0: os._exit(1) -diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py ---- a/plugins/php/uwsgiplugin.py 2024-02-08 17:35:28.000000000 +0100 -+++ b/plugins/php/uwsgiplugin.py 2024-02-08 21:56:28.630427541 +0100 -@@ -19,7 +19,6 @@ +diff --git a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py +index d930c44..273cdde 100644 +--- a/plugins/php/uwsgiplugin.py ++++ b/plugins/php/uwsgiplugin.py +@@ -19,7 +19,6 @@ LDFLAGS = os.popen(PHPPATH + ' --ldflags').read().rstrip().split() if ld_run_path: LDFLAGS.append('-L%s' % ld_run_path) - os.environ['LD_RUN_PATH'] = ld_run_path - # PHP8 and above does not add the version to the library - # name -diff -uNr a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py ---- a/plugins/python/uwsgiplugin.py 2024-02-08 17:35:28.000000000 +0100 -+++ b/plugins/python/uwsgiplugin.py 2024-02-08 21:55:26.654133927 +0100 -@@ -88,9 +88,6 @@ - libdir = "%s/lib" % sysconfig.PREFIX + LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] +diff --git a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py +index 843876f..69ae68f 100644 +--- a/plugins/python/uwsgiplugin.py ++++ b/plugins/python/uwsgiplugin.py +@@ -58,8 +58,6 @@ if not 'UWSGI_PYTHON_NOLIB' in os.environ: LDFLAGS.append("-L%s" % libdir) -- LDFLAGS.append("-Wl,-rpath,%s" % libdir) -- -- os.environ['LD_RUN_PATH'] = "%s" % libdir + LDFLAGS.append("-Wl,-rpath,%s" % libdir) +- os.environ['LD_RUN_PATH'] = "%s" % libdir +- 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 2024-02-08 17:35:28.000000000 +0100 -+++ b/plugins/rack/uwsgiplugin.py 2024-02-08 21:55:26.655133916 +0100 -@@ -48,7 +48,6 @@ + LIBS = [] +diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py +index 210b28e..06f5edd 100644 +--- a/plugins/rack/uwsgiplugin.py ++++ b/plugins/rack/uwsgiplugin.py +@@ -46,7 +46,6 @@ LIBS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LIBS']\"" if has_shared == 'yes': LDFLAGS.append('-L' + libpath ) @@ -48,10 +51,11 @@ 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 2024-02-08 17:35:28.000000000 +0100 -+++ b/plugins/ruby19/uwsgiplugin.py 2024-02-08 21:55:26.655133916 +0100 -@@ -42,6 +42,5 @@ +diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py +index ecea48d..4f35984 100644 +--- a/plugins/ruby19/uwsgiplugin.py ++++ b/plugins/ruby19/uwsgiplugin.py +@@ -40,6 +40,5 @@ LDFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LDFLAG libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['libdir']\"" % rbconfig).read().rstrip() LDFLAGS.append('-L' + libpath ) diff --git a/uwsgi_fix_ruby_taint.patch b/uwsgi_fix_ruby_taint.patch deleted file mode 100644 index df7fe16..0000000 --- a/uwsgi_fix_ruby_taint.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -uNr a/plugins/rack/rack_plugin.c b/plugins/rack/rack_plugin.c ---- a/plugins/rack/rack_plugin.c 2022-10-24 12:21:58.000000000 +0200 -+++ b/plugins/rack/rack_plugin.c 2023-06-13 21:47:46.514179214 +0200 -@@ -456,7 +456,11 @@ - - static void rack_hack_dollar_zero(VALUE name, ID id) { - ur.dollar_zero = rb_obj_as_string(name); -+ // From ruby 2.7 onwards this is a noop, from ruby 3.2 onwards -+ // this function no longer exists -+#if !defined(RUBY27) - rb_obj_taint(ur.dollar_zero); -+#endif - } - - #ifndef RUBY19 diff --git a/uwsgi_gcc15-signal-handler.patch b/uwsgi_gcc15-signal-handler.patch deleted file mode 100644 index a36dc99..0000000 --- a/uwsgi_gcc15-signal-handler.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -uNr a/plugins/pty/pty.c b/plugins/pty/pty.c ---- a/plugins/pty/pty.c 2024-10-26 11:59:26.000000000 +0200 -+++ b/plugins/pty/pty.c 2025-01-24 20:04:55.952597269 +0100 -@@ -259,7 +259,7 @@ - - } - --static void uwsgi_pty_winch() { -+static void uwsgi_pty_winch(int signum) { - // 2 uwsgi packets - char uwsgi_pkt[8]; - #ifdef TIOCGWINSZ -@@ -309,7 +309,7 @@ - if (upty.uremote) { - signal(SIGWINCH, uwsgi_pty_winch); - // send current terminal size -- uwsgi_pty_winch(); -+ uwsgi_pty_winch(0); - } - - upty.queue = event_queue_init(); -diff -uNr a/plugins/tuntap/tuntap.c b/plugins/tuntap/tuntap.c ---- a/plugins/tuntap/tuntap.c 2024-10-26 11:59:26.000000000 +0200 -+++ b/plugins/tuntap/tuntap.c 2025-01-24 20:33:49.513449322 +0100 -@@ -409,7 +409,7 @@ - } - } - --static void uwsgi_tuntap_router() { -+static void uwsgi_tuntap_router(int (*_)(void *), char ** __) { - - if (!utt.routers) return; - diff --git a/uwsgi_python311.patch b/uwsgi_python311.patch deleted file mode 100644 index ddf0a3d..0000000 --- a/uwsgi_python311.patch +++ /dev/null @@ -1,174 +0,0 @@ -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 *); diff --git a/uwsgi_python312-2.patch b/uwsgi_python312-2.patch deleted file mode 100644 index 7a2d6b3..0000000 --- a/uwsgi_python312-2.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c -index de92f34c..08d99a96 100644 ---- a/plugins/python/python_plugin.c -+++ b/plugins/python/python_plugin.c -@@ -233,21 +233,6 @@ void uwsgi_python_pthread_child(void) { - PyMethodDef uwsgi_spit_method[] = { {"uwsgi_spit", py_uwsgi_spit, METH_VARARGS, ""} }; - PyMethodDef uwsgi_write_method[] = { {"uwsgi_write", py_uwsgi_write, METH_VARARGS, ""} }; - --PyDoc_STRVAR(uwsgi_py_doc, "uWSGI api module."); -- --#ifdef PYTHREE --static PyModuleDef uwsgi_module3 = { -- PyModuleDef_HEAD_INIT, -- "uwsgi", -- uwsgi_py_doc, -- -1, -- NULL, --}; --PyObject *init_uwsgi3(void) { -- return PyModule_Create(&uwsgi_module3); --} --#endif -- - int uwsgi_python_init() { - - char *pyversion = strchr(Py_GetVersion(), '\n'); -@@ -313,9 +298,6 @@ pep405: - wchar_t *pname = uwsgi_calloc(sizeof(wchar_t) * (strlen(program_name)+1)); - mbstowcs(pname, program_name, strlen(program_name)+1); - Py_SetProgramName(pname); --#ifdef UWSGI_PY312 -- PyImport_AppendInittab("uwsgi", init_uwsgi3); --#endif - #else - Py_SetProgramName(program_name); - #endif -@@ -678,6 +660,21 @@ next: - - - -+PyDoc_STRVAR(uwsgi_py_doc, "uWSGI api module."); -+ -+#ifdef PYTHREE -+static PyModuleDef uwsgi_module3 = { -+ PyModuleDef_HEAD_INIT, -+ "uwsgi", -+ uwsgi_py_doc, -+ -1, -+ NULL, -+}; -+PyObject *init_uwsgi3(void) { -+ return PyModule_Create(&uwsgi_module3); -+} -+#endif -+ - void init_uwsgi_embedded_module() { - PyObject *new_uwsgi_module, *zero; - int i; -@@ -698,10 +695,21 @@ void init_uwsgi_embedded_module() { - - - #ifdef PYTHREE --#ifndef UWSGI_PY312 -+# ifndef UWSGI_PY312 - PyImport_AppendInittab("uwsgi", init_uwsgi3); --#endif - new_uwsgi_module = PyImport_AddModule("uwsgi"); -+# else -+ // From python 3.12 onwards, PyImport_AppendInittab() can no -+ // longer be called after Py_Initialize(). Instead, dynamically -+ // add the module instead -+ PyObject *sys_modules; -+ PyImport_AddModule("uwsgi"); -+ new_uwsgi_module = init_uwsgi3(); -+ sys_modules = PyImport_GetModuleDict(); -+ PyDict_SetItemString(sys_modules, "uwsgi", new_uwsgi_module); -+ Py_DECREF(new_uwsgi_module); -+ -+# endif - #else - new_uwsgi_module = Py_InitModule3("uwsgi", NULL, uwsgi_py_doc); - #endif diff --git a/uwsgi_python312.patch b/uwsgi_python312.patch deleted file mode 100644 index 7595cd2..0000000 --- a/uwsgi_python312.patch +++ /dev/null @@ -1,152 +0,0 @@ -diff -uNr a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c ---- a/plugins/python/python_plugin.c 2023-07-27 17:34:12.000000000 +0200 -+++ b/plugins/python/python_plugin.c 2023-09-30 18:30:47.884490233 +0200 -@@ -197,6 +197,7 @@ - PyMethodDef uwsgi_spit_method[] = { {"uwsgi_spit", py_uwsgi_spit, METH_VARARGS, ""} }; - PyMethodDef uwsgi_write_method[] = { {"uwsgi_write", py_uwsgi_write, METH_VARARGS, ""} }; - -+PyObject *init_uwsgi3(void); - int uwsgi_python_init() { - - char *pyversion = strchr(Py_GetVersion(), '\n'); -@@ -261,6 +262,9 @@ - wchar_t *pname = uwsgi_calloc(sizeof(wchar_t) * (strlen(program_name)+1)); - mbstowcs(pname, program_name, strlen(program_name)+1); - Py_SetProgramName(pname); -+#ifdef UWSGI_PY312 -+ PyImport_AppendInittab("uwsgi", init_uwsgi3); -+#endif - #else - Py_SetProgramName(program_name); - #endif -@@ -658,7 +662,9 @@ - - - #ifdef PYTHREE -+#ifndef UWSGI_PY312 - PyImport_AppendInittab("uwsgi", init_uwsgi3); -+#endif - new_uwsgi_module = PyImport_AddModule("uwsgi"); - #else - new_uwsgi_module = Py_InitModule3("uwsgi", NULL, uwsgi_py_doc); -@@ -1161,7 +1167,10 @@ - - // prepare for stack suspend/resume - if (uwsgi.async > 1) { --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ up.current_c_recursion_remaining = uwsgi_malloc(sizeof(int)*uwsgi.async); -+ up.current_py_recursion_remaining = uwsgi_malloc(sizeof(int)*uwsgi.async); -+#elif defined UWSGI_PY311 - up.current_recursion_remaining = uwsgi_malloc(sizeof(int)*uwsgi.async); - #else - up.current_recursion_depth = uwsgi_malloc(sizeof(int)*uwsgi.async); -@@ -1324,7 +1333,12 @@ - // Acquire the gil and import lock before forking in order to avoid - // deadlocks in workers - UWSGI_GET_GIL -+#if defined UWSGI_PY312 -+ PyInterpreterState *interp = PyInterpreterState_Get(); -+ _PyImport_AcquireLock(interp); -+#else - _PyImport_AcquireLock(); -+#endif - } - } - -@@ -1336,7 +1350,12 @@ - if (uwsgi.has_threads) { - if (step == 0) { - // Release locks within master process -+#if defined UWSGI_PY312 -+ PyInterpreterState *interp = PyInterpreterState_Get(); -+ _PyImport_ReleaseLock(interp); -+#else - _PyImport_ReleaseLock(); -+#endif - UWSGI_RELEASE_GIL - } - else { -@@ -1592,7 +1611,11 @@ - PyGILState_Release(pgst); - - if (wsgi_req) { --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ up.current_c_recursion_remaining[wsgi_req->async_id] = tstate->c_recursion_remaining; -+ up.current_py_recursion_remaining[wsgi_req->async_id] = tstate->py_recursion_remaining; -+ up.current_frame[wsgi_req->async_id] = tstate->cframe; -+#elif defined UWSGI_PY311 - up.current_recursion_remaining[wsgi_req->async_id] = tstate->recursion_remaining; - up.current_frame[wsgi_req->async_id] = tstate->cframe; - #else -@@ -1601,7 +1624,11 @@ - #endif - } - else { --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ up.current_main_c_recursion_remaining = tstate->c_recursion_remaining; -+ up.current_main_py_recursion_remaining = tstate->py_recursion_remaining; -+ up.current_main_frame = tstate->cframe; -+#elif defined UWSGI_PY311 - up.current_main_recursion_remaining = tstate->recursion_remaining; - up.current_main_frame = tstate->cframe; - #else -@@ -1835,7 +1862,11 @@ - PyGILState_Release(pgst); - - if (wsgi_req) { --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ tstate->c_recursion_remaining = up.current_c_recursion_remaining[wsgi_req->async_id]; -+ tstate->py_recursion_remaining = up.current_py_recursion_remaining[wsgi_req->async_id]; -+ tstate->cframe = up.current_frame[wsgi_req->async_id]; -+#elif defined UWSGI_PY311 - tstate->recursion_remaining = up.current_recursion_remaining[wsgi_req->async_id]; - tstate->cframe = up.current_frame[wsgi_req->async_id]; - #else -@@ -1844,7 +1875,11 @@ - #endif - } - else { --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ tstate->c_recursion_remaining = up.current_main_c_recursion_remaining; -+ tstate->py_recursion_remaining = up.current_main_py_recursion_remaining; -+ tstate->cframe = up.current_main_frame; -+#elif defined UWSGI_PY311 - tstate->recursion_remaining = up.current_main_recursion_remaining; - tstate->cframe = up.current_main_frame; - #else -diff -uNr a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h ---- a/plugins/python/uwsgi_python.h 2023-07-27 17:34:12.000000000 +0200 -+++ b/plugins/python/uwsgi_python.h 2023-09-30 18:30:24.766699317 +0200 -@@ -21,6 +21,10 @@ - # define UWSGI_PY311 - #endif - -+#if (PY_VERSION_HEX >= 0x030c0000) -+# define UWSGI_PY312 -+#endif -+ - #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7 - #define HAS_NOT_PyMemoryView_FromBuffer - #endif -@@ -168,7 +172,15 @@ - - char *callable; - --#ifdef UWSGI_PY311 -+#ifdef UWSGI_PY312 -+ int *current_c_recursion_remaining; -+ int *current_py_recursion_remaining; -+ _PyCFrame **current_frame; -+ -+ int current_main_c_recursion_remaining; -+ int current_main_py_recursion_remaining; -+ _PyCFrame *current_main_frame; -+#elif defined UWSGI_PY311 - int *current_recursion_remaining; - _PyCFrame **current_frame; - diff --git a/uwsgi_python313.patch b/uwsgi_python313.patch deleted file mode 100644 index 6031408..0000000 --- a/uwsgi_python313.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff -uNr a/core/init.c b/core/init.c ---- a/core/init.c 2024-06-01 20:40:38.000000000 +0200 -+++ b/core/init.c 2024-08-13 09:56:13.152870522 +0200 -@@ -432,8 +432,8 @@ - uwsgi.cores = uwsgi.async; - } - -+ uwsgi.has_threads = 1; - if (uwsgi.threads > 1) { -- uwsgi.has_threads = 1; - uwsgi.cores = uwsgi.threads; - } - -diff -uNr a/core/uwsgi.c b/core/uwsgi.c ---- a/core/uwsgi.c 2024-06-01 20:40:38.000000000 +0200 -+++ b/core/uwsgi.c 2024-08-13 09:56:13.156870522 +0200 -@@ -197,7 +197,7 @@ - {"freebind", no_argument, 0, "put socket in freebind mode", uwsgi_opt_true, &uwsgi.freebind, 0}, - #endif - {"map-socket", required_argument, 0, "map sockets to specific workers", uwsgi_opt_add_string_list, &uwsgi.map_socket, 0}, -- {"enable-threads", no_argument, 'T', "enable threads", uwsgi_opt_true, &uwsgi.has_threads, 0}, -+ {"enable-threads", no_argument, 'T', "enable threads (stub option this is true by default)", uwsgi_opt_true, &uwsgi.has_threads, 0}, - {"no-threads-wait", no_argument, 0, "do not wait for threads cancellation on quit/reload", uwsgi_opt_true, &uwsgi.no_threads_wait, 0}, - - {"auto-procname", no_argument, 0, "automatically set processes name to something meaningful", uwsgi_opt_true, &uwsgi.auto_procname, 0}, -diff -uNr a/.github/workflows/test.yml b/.github/workflows/test.yml ---- a/.github/workflows/test.yml 2024-06-01 20:40:38.000000000 +0200 -+++ b/.github/workflows/test.yml 2024-08-13 09:56:13.152870522 +0200 -@@ -37,7 +37,7 @@ - runs-on: ubuntu-20.04 - strategy: - matrix: -- python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] -+ python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] - test-suite: [python, deadlocks] - steps: - - name: Add deadnakes ppa -diff -uNr a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c ---- a/plugins/python/python_plugin.c 2024-08-13 09:55:30.374870522 +0200 -+++ b/plugins/python/python_plugin.c 2024-08-13 10:00:36.315870522 +0200 -@@ -406,7 +406,7 @@ - // reset python signal flags so child processes can trap signals - // Necessary if uwsgi fork hooks not called to update interpreter state - if (!up.call_uwsgi_fork_hooks && up.call_osafterfork) { --#ifdef HAS_NOT_PyOS_AfterFork_Child -+#ifdef HAS_NOT_PYOS_FORK_STABLE_API - PyOS_AfterFork(); - #else - PyOS_AfterFork_Child(); -@@ -1340,11 +1340,10 @@ - // Acquire the gil and import lock before forking in order to avoid - // deadlocks in workers - UWSGI_GET_GIL --#if defined UWSGI_PY312 -- PyInterpreterState *interp = PyInterpreterState_Get(); -- _PyImport_AcquireLock(interp); --#else -+#ifdef HAS_NOT_PYOS_FORK_STABLE_API - _PyImport_AcquireLock(); -+#else -+ PyOS_BeforeFork(); - #endif - } - } -@@ -1357,17 +1356,16 @@ - if (uwsgi.has_threads) { - if (step == 0) { - // Release locks within master process --#if defined UWSGI_PY312 -- PyInterpreterState *interp = PyInterpreterState_Get(); -- _PyImport_ReleaseLock(interp); --#else -+#ifdef HAS_NOT_PYOS_FORK_STABLE_API - _PyImport_ReleaseLock(); -+#else -+ PyOS_AfterFork_Parent(); - #endif - UWSGI_RELEASE_GIL - } - else { - // Ensure thread state and locks are cleaned up in child process --#ifdef HAS_NOT_PyOS_AfterFork_Child -+#ifdef HAS_NOT_PYOS_FORK_STABLE_API - PyOS_AfterFork(); - #else - PyOS_AfterFork_Child(); -@@ -1618,7 +1616,11 @@ - PyGILState_Release(pgst); - - if (wsgi_req) { --#ifdef UWSGI_PY312 -+#ifdef UWSGI_PY313 -+ up.current_c_recursion_remaining[wsgi_req->async_id] = tstate->c_recursion_remaining; -+ up.current_py_recursion_remaining[wsgi_req->async_id] = tstate->py_recursion_remaining; -+ up.current_frame[wsgi_req->async_id] = tstate->current_frame; -+#elif defined UWSGI_PY312 - up.current_c_recursion_remaining[wsgi_req->async_id] = tstate->c_recursion_remaining; - up.current_py_recursion_remaining[wsgi_req->async_id] = tstate->py_recursion_remaining; - up.current_frame[wsgi_req->async_id] = tstate->cframe; -@@ -1631,7 +1633,11 @@ - #endif - } - else { --#ifdef UWSGI_PY312 -+#ifdef UWSGI_PY313 -+ up.current_main_c_recursion_remaining = tstate->c_recursion_remaining; -+ up.current_main_py_recursion_remaining = tstate->py_recursion_remaining; -+ up.current_main_frame = tstate->current_frame; -+#elif defined UWSGI_PY312 - up.current_main_c_recursion_remaining = tstate->c_recursion_remaining; - up.current_main_py_recursion_remaining = tstate->py_recursion_remaining; - up.current_main_frame = tstate->cframe; -@@ -1871,7 +1877,11 @@ - PyGILState_Release(pgst); - - if (wsgi_req) { --#ifdef UWSGI_PY312 -+#ifdef UWSGI_PY313 -+ tstate->c_recursion_remaining = up.current_c_recursion_remaining[wsgi_req->async_id]; -+ tstate->py_recursion_remaining = up.current_py_recursion_remaining[wsgi_req->async_id]; -+ tstate->current_frame = up.current_frame[wsgi_req->async_id]; -+#elif defined UWSGI_PY312 - tstate->c_recursion_remaining = up.current_c_recursion_remaining[wsgi_req->async_id]; - tstate->py_recursion_remaining = up.current_py_recursion_remaining[wsgi_req->async_id]; - tstate->cframe = up.current_frame[wsgi_req->async_id]; -@@ -1884,7 +1894,11 @@ - #endif - } - else { --#ifdef UWSGI_PY312 -+#ifdef UWSGI_PY313 -+ tstate->c_recursion_remaining = up.current_main_c_recursion_remaining; -+ tstate->py_recursion_remaining = up.current_main_py_recursion_remaining; -+ tstate->current_frame = up.current_main_frame; -+#elif defined UWSGI_PY312 - tstate->c_recursion_remaining = up.current_main_c_recursion_remaining; - tstate->py_recursion_remaining = up.current_main_py_recursion_remaining; - tstate->cframe = up.current_main_frame; -@@ -2098,7 +2112,7 @@ - // ensure signals can be used again from python - // Necessary if fork hooks have been not used to update interpreter state - if (!up.call_osafterfork && !up.call_uwsgi_fork_hooks) --#ifdef HAS_NOT_PyOS_AfterFork_Child -+#ifdef HAS_NOT_PYOS_FORK_STABLE_API - PyOS_AfterFork(); - #else - PyOS_AfterFork_Child(); -diff -uNr a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h ---- a/plugins/python/uwsgi_python.h 2024-06-01 20:40:38.000000000 +0200 -+++ b/plugins/python/uwsgi_python.h 2024-08-13 10:04:58.492870522 +0200 -@@ -25,6 +25,10 @@ - # define UWSGI_PY312 - #endif - -+#if (PY_VERSION_HEX >= 0x030d0000) -+# define UWSGI_PY313 -+#endif -+ - #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7 - #define HAS_NOT_PyMemoryView_FromBuffer - #endif -@@ -41,12 +45,8 @@ - #define HAS_NO_ERRORS_IN_PyFile_FromFd - #endif - --#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7 --#define HAS_NOT_PyOS_AfterFork_Child --#endif -- --#if PY_MAJOR_VERSION < 3 --#define HAS_NOT_PyOS_AfterFork_Child -+#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7) || PY_MAJOR_VERSION < 3 -+#define HAS_NOT_PYOS_FORK_STABLE_API - #endif - - #if PY_MAJOR_VERSION > 2 -@@ -172,7 +172,15 @@ - - char *callable; - --#ifdef UWSGI_PY312 -+#ifdef UWSGI_PY313 -+ int *current_c_recursion_remaining; -+ int *current_py_recursion_remaining; -+ struct _PyInterpreterFrame **current_frame; -+ -+ int current_main_c_recursion_remaining; -+ int current_main_py_recursion_remaining; -+ struct _PyInterpreterFrame *current_main_frame; -+#elif defined UWSGI_PY312 - int *current_c_recursion_remaining; - int *current_py_recursion_remaining; - _PyCFrame **current_frame; diff --git a/uwsgi_ruby20_compatibility.patch b/uwsgi_ruby20_compatibility.patch index 6fdaa02..b4bf20d 100644 --- a/uwsgi_ruby20_compatibility.patch +++ b/uwsgi_ruby20_compatibility.patch @@ -1,42 +1,42 @@ -diff -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py ---- a/plugins/rack/uwsgiplugin.py 2023-07-28 20:02:57.242903528 +0200 -+++ b/plugins/rack/uwsgiplugin.py 2023-07-28 20:05:59.933863052 +0200 -@@ -10,14 +10,14 @@ +diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py +index 2375bc9..b908417 100644 +--- a/plugins/rack/uwsgiplugin.py ++++ b/plugins/rack/uwsgiplugin.py +@@ -10,13 +10,14 @@ except: rbconfig = 'Config' version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip() -v = version.split('.') -+v = tuple(int(x) for x in version.split('.')) GCC_LIST = ['rack_plugin', 'rack_api'] -if (v[0] == '1' and v[1] == '9') or v[0] >= '2': -+if v >= (1, 9): ++if version >= '1.9': CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split() CFLAGS.append('-DRUBY19') -- if version >= '2.7': -+ if v >= (2, 7): - CFLAGS.append('-DRUBY27') ++ if version >= '2.0': ++ CFLAGS.append('-DRUBY20') CFLAGS.append('-Wno-unused-parameter') rbconfig = 'RbConfig' -diff -uNr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py ---- a/plugins/ruby19/uwsgiplugin.py 2023-07-28 20:02:57.242903528 +0200 -+++ b/plugins/ruby19/uwsgiplugin.py 2023-07-28 20:05:11.560403332 +0200 -@@ -10,14 +10,14 @@ + else: +diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py +index 4f35984..156018f 100644 +--- a/plugins/ruby19/uwsgiplugin.py ++++ b/plugins/ruby19/uwsgiplugin.py +@@ -10,13 +10,14 @@ except: rbconfig = 'Config' version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip() -v = version.split('.') -+v = tuple(int(x) for x in version.split('.')) GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api'] --if (v[0] == '1' and v[1] == '9') or v[0] >= '2': -+if v >= (1, 9): +-if v[0] == '1' and v[1] == '9': ++if version >= '1.9': CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split() CFLAGS.append('-DRUBY19') -- if version >= '2.7': -+ if v >= (2, 7): - CFLAGS.append('-DRUBY27') ++ if version >= '2.0': ++ CFLAGS.append('-DRUBY20') CFLAGS.append('-Wno-unused-parameter') rbconfig = 'RbConfig' + else: