Compare commits

...
Sign in to create a new pull request.

42 commits

Author SHA1 Message Date
Ralf Ertzinger
dd58e131b7 Rebuild for new gccgo libraries 2026-01-11 18:29:57 +01:00
Mamoru TASAKA
4f78b765d1 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 2026-01-08 20:15:17 +09:00
Ralf Ertzinger
87e2b9fbb4 Fix path errors for EPEL9 uwsgidecorator packages 2025-11-26 21:49:21 +01:00
Remi Collet
b2673a41cc rebuild for https://fedoraproject.org/wiki/Changes/php85 2025-10-15 07:59:30 +02:00
Ralf Ertzinger
451e6fd8be Update to 2.0.31, drop merged patches 2025-10-12 16:53:42 +02:00
Python Maint
fce9901ade Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 15:01:52 +02:00
Ralf Ertzinger
305e1c563f Add python3.13 module for EL9 2025-08-20 20:37:21 +02:00
Python Maint
06e8062cb4 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:21:55 +02:00
Ralf Ertzinger
1e2ce24bb0 Disable perl-Coro for rawhide, as this blocks rebuilding
for perl 5.42 (see https://bugzilla.redhat.com/show_bug.cgi?id=2379448)
2025-07-24 16:11:11 +02:00
Jitka Plesnikova
0d453e9ae8 Perl 5.42 rebuild 2025-07-08 14:25:37 +02:00
Python Maint
14c9d4c7a6 Rebuilt for Python 3.14 2025-06-09 07:43:54 +02:00
Ralf Ertzinger
7fdcfd0cd4 Update to 2.0.30 2025-06-08 18:37:32 +02:00
Python Maint
f6a6568654 Rebuilt for Python 3.14 2025-06-03 15:52:55 +02:00
Ralf Ertzinger
b0edddcb6b Update to 2.0.29 2025-04-12 12:57:47 +02:00
Ralf Ertzinger
2cad1e43b7 Rebuild for new libgo 2025-03-24 19:45:33 +01:00
Ralf Ertzinger
e82e663aeb Add sysusers.d config file to allow rpm to create users/groups automatically 2025-02-18 22:23:30 +01:00
Björn Esser
72801155cd
Add explicit BR: libxcrypt-devel
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2025-02-01 19:58:05 +01:00
Ralf Ertzinger
6e2e54ccb9 Fix type errors flagged by GCC15 2025-01-24 21:14:49 +01:00
Fedora Release Engineering
19e19698a5 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 14:01:56 +00:00
Mamoru TASAKA
6fe6c653dd Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 2025-01-08 10:41:52 +09:00
Ralf Ertzinger
b7b8802b0f Update to 2.0.28, drop merged patches 2024-11-02 21:25:32 +01:00
Richard W.M. Jones
64c090a890 Rebuild for Jansson 2.14
(https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/)
2024-10-22 13:40:31 +01:00
Ralf Ertzinger
e40dac0496 Fix uWSGI auto-reloading on config change 2024-10-14 20:12:42 +02:00
Remi Collet
d3a2179c1d rebuild for https://fedoraproject.org/wiki/Changes/php84 2024-10-14 10:42:39 +02:00
Ralf Ertzinger
f03b56ba3a Only build fiber plugin when rack plugin is also built 2024-09-29 19:27:25 +02:00
Ralf Ertzinger
670041ecc3 pdate to 2.0.27
Drop merged patches
Re-enable rack plugin for EPEL10, dependencies now present
2024-09-25 18:42:22 +02:00
Ralf Ertzinger
08576b2d25 Disable building the Ruby rack plugin for EPEL10 2024-09-22 21:15:53 +02:00
Miroslav Suchý
ee7dd133dd convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-09-04 22:36:26 +02:00
Ralf Ertzinger
591a578dd8 Cleanup work, EL10 support
- Drop support for EL7
- Add support for EL10
- Explicitly require pcre2 (all builds already pulled this
  in anyway)
2024-09-04 21:44:07 +02:00
Ralf Ertzinger
c0b79e45a5 Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
Add patch for python 3.13
2024-08-15 19:53:46 +02:00
Fedora Release Engineering
dce67072b9 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:29:55 +00:00
Jitka Plesnikova
4b286aba5a Perl 5.40 rebuild 2024-06-12 12:48:12 +02:00
Python Maint
0ed57cdb27 Rebuilt for Python 3.13 2024-06-09 01:40:22 +02:00
Ralf Ertzinger
8a5c0bd833 Update to 2.0.26
Rework support for multiple python versions
2024-06-06 19:11:42 +02:00
Ralf Ertzinger
64940f3b45 Rework support for multiple python versions 2024-05-09 20:34:52 +02:00
Ralf Ertzinger
5017f0c5b9 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
2024-04-16 20:24:11 +02:00
Dominik 'Rathann' Mierzejewski
d986271efb Rebuilt for gloox-1.0.28 2024-03-19 10:57:17 +01:00
Ralf Ertzinger
b9c84238a9 Update to 2.0.24, drop merged patches 2024-02-10 21:46:05 +01:00
Fedora Release Engineering
65dfd0fc87 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:23:48 +00:00
Ralf Ertzinger
94be625586 Build plugin for python3.11 under EPEL9 2024-01-23 21:57:07 +01:00
Ralf Ertzinger
c8dfeab0b8 Add reworked patch for python3.12 2024-01-23 21:35:44 +01:00
Mamoru TASAKA
5d4ae9e199 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-03 23:13:45 +09:00
12 changed files with 875 additions and 115 deletions

16
.gitignore vendored
View file

@ -54,3 +54,19 @@
/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

View file

@ -35,7 +35,6 @@ plugins = airbrake,
notfound,
pam,
pty,
rack,
rawrouter,
redislog,
router_basicauth,

View file

@ -1,2 +1,2 @@
SHA512 (uwsgi-2.0.23.tar.gz) = 4060dd66f8c6309497b52a961c36a58fe2b3b3afc7e11b97cfa464757c614d1d44ccc561b18500a394b5d95e5660eae48759003a30ec07379a6f079f63f3899b
SHA512 (uwsgi-docs-3be14d3.tar.gz) = 73f517fc1bb5efaa7f39ee2084011c6d3a16ab02ae590d134140eee09e27b57f5ae444c733c654ad0ec430f4627902d23a934d84d3dec431ae14fc76bf26326c
SHA512 (uwsgi-docs-5784c30.tar.gz) = 4f966da4a867e45043a0eb4a123b439c8ab1f7ce6e8b32d770545ff7fae586e4e7dd011106aa6ed0ec82a6c6192937e0fd12ed681443332205566fc329e11cd8
SHA512 (2.0.31.tar.gz) = d4d327f36455438e165298cb5a7d483c951f4acd3d834b46ceeda105bd3664792ead226b02e06db62e92c210544778119bf75a55d9d4f30f8fba896c7de51e6d

View file

@ -0,0 +1,41 @@
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();
}

View file

@ -1,5 +1,5 @@
# Documentation sources:
%global commit 3be14d357b7b73a82311db034de034f8c09035e8
%global commit 5784c30866a94942a5200db4d5f6c2850afb1caa
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global docrepo uwsgi-docs
@ -26,12 +26,13 @@
%bcond_without tuntap
%bcond_without zeromq
%bcond_without perl
%bcond_without perlcoro
%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
@ -57,41 +58,6 @@
#Fedora endif
%endif
# Conditionally enable/disable some things in epel7
%if 0%{?rhel} == 7
# el7 does have java
%bcond_without java
%bcond_without python2
%bcond_without python3
%bcond_without python3_other
%bcond_without python3_greenlet
%bcond_without gloox
%bcond_without geoip
# This only exists on EL7
%bcond_without tcp_wrappers
# 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
%bcond_without perl
# el7 does have perl-Coro
%bcond_without perlcoro
# el7 httpd does not include mod_proxy_uwsgi
%bcond_without mod_proxy_uwsgi
# el7 can now build glusterfs but only on x86_64
%ifnarch x86_64
%bcond_with glusterfs
%else
%bcond_without glusterfs
%endif
# this fails in el7 not sure why
%bcond_with gridfs
# EL7 PHP is too old
%bcond_with php
%endif
# epel8 builds pretty similar to Fedora for now
%if 0%{?rhel} == 8
%bcond_without go
@ -107,6 +73,7 @@
%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
@ -148,6 +115,7 @@
%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
@ -174,6 +142,90 @@
%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
%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_with gridfs
%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
@ -189,8 +241,14 @@
%if %{with python3}
%global __python %{__python3}
%else
%if %{with python3_other}
%global __python %{__python3_other}
%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}
%else
%if %{with python2}
%global __python %{__python2}
@ -199,23 +257,29 @@
%endif
%endif
%endif
%endif
%endif
Name: uwsgi
Version: 2.0.23
Release: 1%{?dist}
Version: 2.0.31
Release: 5%{?dist}
Summary: Fast, self-healing, application container server
# uwsgi is licensed under GPLv2 with a linking exception
# docs are licensed under MIT
License: GPLv2 with exceptions and 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
URL: https://github.com/unbit/uwsgi
Source0: http://projects.unbit.it/downloads/uwsgi-%{version}.tar.gz
ExcludeArch: %{ix86}
Source0: https://github.com/unbit/uwsgi/archive/refs/tags/%{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
Source7: uwsgi.tmpfiles
Source8: uwsgi.sysusers
# When adding patches please add to the end, don't
# reuse intermediate numbers
@ -227,12 +291,12 @@ Patch3: uwsgi_fix_lua.patch
Patch5: uwsgi_fix_mongodb.patch
Patch6: uwsgi_v8-314_compatibility.patch
Patch7: uwsgi_fix_mono.patch
# https://github.com/unbit/uwsgi/issues/2283
Patch12: uwsgi_fix_php8.patch
Patch13: uwsgi_fix_chroot_chdir.patch
Patch14: uwsgi_python312-2.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
@ -248,13 +312,19 @@ BuildRequires: python%{python3_pkgversion}-devel
%if %{with python3_greenlet}
BuildRequires: python%{python3_pkgversion}-greenlet-devel
%endif
%if %{with python3_other}
BuildRequires: python%{python3_other_pkgversion}-devel
%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
%endif
%if %{with glusterfs}
BuildRequires: glusterfs-devel, glusterfs-api-devel
%endif
BuildRequires: lua-devel, ruby, pcre-devel
BuildRequires: lua-devel, ruby, pcre2-devel
%if %{with php}
BuildRequires: php-devel, php-embedded
%endif
@ -317,7 +387,6 @@ 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
%{?systemd_requires}
%filter_requires_in %{_usrsrc}
@ -374,14 +443,36 @@ The uwsgidecorators Python %{python3_version} module provides higher-level
access to the uWSGI API.
%endif
%if %{with python3_other}
%package -n python%{python3_other_pkgversion}-uwsgidecorators
Summary: Python %{python3_other_version} decorators providing access to the uwsgi API
%if %{with python3_alternate1}
%package -n %{python3_alternate1_pkgname}-uwsgidecorators
Summary: Python %{python3_alternate1_version} decorators providing access to the uwsgi API
Requires: uwsgi = %{version}-%{release}
Requires: uwsgi-plugin-python%{python3_other_version_nodots} = %{version}-%{release}
Requires: uwsgi-plugin-python%{python3_alternate1_version_nodots} = %{version}-%{release}
%description -n python%{python3_other_pkgversion}-uwsgidecorators
The uwsgidecorators Python %{python3_other_version} module provides
%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.
%endif
@ -679,12 +770,14 @@ 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
@ -724,13 +817,31 @@ Requires: uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release}
This package contains the Python %{python3_version} gevent plugin for uWSGI
%endif
%if %{with python3_other}
%package -n uwsgi-plugin-python%{python3_other_version_nodots}-gevent
Summary: uWSGI - Plugin for Python %{python3_other_version} GEvent support
Requires: uwsgi-plugin-python%{python3_other_version_nodots} = %{version}-%{release}, libevent
%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
%description -n uwsgi-plugin-python%{python3_other_version_nodots}-gevent
This package contains the Python %{python3_other_version} gevent plugin for uWSGI
%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
%endif
%if %{with glusterfs}
@ -883,21 +994,41 @@ Provides: uwsgi-plugin-python3 = %{version}-%{release}
This package contains the Python %{python3_version} plugin for uWSGI
%endif
%if %{with python3_other}
%package -n uwsgi-plugin-python%{python3_other_version_nodots}
Summary: uWSGI - Plugin for Python %{python3_other_version} support
Requires: python%{python3_other_pkgversion}, uwsgi-plugin-common = %{version}-%{release}
%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}
%description -n uwsgi-plugin-python%{python3_other_version_nodots}
This package contains the Python %{python3_other_version} plugin for uWSGI
%description -n uwsgi-plugin-python%{python3_alternate1_version_nodots}
This package contains the Python %{python3_alternate1_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
@ -1251,8 +1382,8 @@ cp -p %{SOURCE5} README.Fedora
%if %{with mono}
%patch -P7 -p1
%endif
%patch -P12 -p1
%patch -P13 -p1
%patch -P14 -p1
%build
CFLAGS="%{optflags} -Wno-error -Wno-unused-but-set-variable -fPIC" %{__python} uwsgiconfig.py --verbose --build fedora.ini
@ -1266,9 +1397,17 @@ CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --
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
%endif
%if %{with python3_other}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --verbose --plugin plugins/python fedora python%{python3_other_version_nodots}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --verbose --plugin plugins/gevent fedora python%{python3_other_version_nodots}_gevent
%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
%endif
%if %{with mongodblibs}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/mongodblog fedora
@ -1294,7 +1433,9 @@ CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --v
%endif
%endif
%if %{with ruby19}
%if %{with ruby_rack}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/fiber fedora
%endif
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/rbthreads fedora
%endif
%if %{with tuntap}
@ -1334,6 +1475,9 @@ CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --v
%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
%endif
%if %{with tcp_wrappers}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py --verbose --plugin plugins/router_access fedora
%endif
@ -1377,10 +1521,22 @@ 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_other}
install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_other_sitelib}/uwsgidecorators.py
%if %{with python3_alternate1}
install -D -p -m 0644 uwsgidecorators.py %{buildroot}%{python3_alternate1_sitelib}/uwsgidecorators.py
%if %{manual_py_compile} == 1
%py_byte_compile %{__python3_other} %{buildroot}%{python3_other_sitelib}/uwsgidecorators.py
%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
%endif
%endif
%if %{with java}
@ -1396,13 +1552,7 @@ install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/uwsgi.conf
install -D -p -m 0755 apache2/.libs/mod_proxy_uwsgi.so %{buildroot}%{_httpd_moddir}/mod_proxy_uwsgi.so
%endif
%pre
getent group uwsgi >/dev/null || groupadd -r uwsgi
getent passwd uwsgi >/dev/null || \
useradd -r -g uwsgi -d /run/uwsgi -s /sbin/nologin \
-c "uWSGI daemon user" uwsgi
exit 0
install -m0644 -D %{SOURCE8} %{buildroot}%{_sysusersdir}/uwsgi.conf
%post
%systemd_post uwsgi.service
@ -1422,6 +1572,7 @@ exit 0
%dir %{_sysconfdir}/uwsgi.d
%doc README README.Fedora CHANGELOG
%license LICENSE
%{_sysusersdir}/uwsgi.conf
%files -n uwsgi-devel
%{_includedir}/uwsgi
@ -1438,10 +1589,22 @@ exit 0
%{python3_sitelib}/__pycache__/uwsgidecorators.cpython-%{python3_version_nodots}*.py*
%endif
%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*
%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*
%endif
%files -n uwsgi-docs
@ -1580,9 +1743,11 @@ exit 0
%{_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
@ -1604,9 +1769,19 @@ exit 0
%{_libdir}/uwsgi/python%{python3_pkgversion}_gevent_plugin.so
%endif
%if %{with python3_other}
%files -n uwsgi-plugin-python%{python3_other_version_nodots}-gevent
%{_libdir}/uwsgi/python%{python3_other_version_nodots}_gevent_plugin.so
%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
%endif
%if %{with glusterfs}
@ -1683,13 +1858,25 @@ exit 0
%{_libdir}/uwsgi/python%{python3_pkgversion}_plugin.so
%endif
%if %{with python3_other}
%files -n uwsgi-plugin-python%{python3_other_version_nodots}
%{_libdir}/uwsgi/python%{python3_other_version_nodots}_plugin.so
%if %{with python3_alternate1}
%files -n uwsgi-plugin-python%{python3_alternate1_version_nodots}
%{_libdir}/uwsgi/python%{python3_alternate1_version_nodots}_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
@ -1843,6 +2030,137 @@ exit 0
%changelog
* Sun Jan 11 2026 Ralf Ertzinger <ralf@skytale.net> - 2.0.31-5
- Rebuild for new gccgo libraries
* Thu Jan 08 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.31-4
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0
* Wed Nov 26 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.31-3
- Fix path errors for EPEL9 uwsgidecorator packages
* Wed Oct 15 2025 Remi Collet <remi@remirepo.net> - 2.0.31-2
- rebuild for https://fedoraproject.org/wiki/Changes/php85
* Sun Oct 12 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.31-1
- Update to 2.0.31, drop merged patches
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.0.30-7
- Rebuilt for Python 3.14.0rc3 bytecode
* Tue Aug 19 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.30-6
- Add python3.13 module for EL9
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.0.30-5
- Rebuilt for Python 3.14.0rc2 bytecode
* Thu Jul 24 2025 Ralf Ertzinger <ralf@skytale.net> - 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 <jplesnik@redhat.com> - 2.0.30-3
- Perl 5.42 rebuild
* Mon Jun 09 2025 Python Maint <python-maint@redhat.com> - 2.0.30-2
- Rebuilt for Python 3.14
* Sun Jun 08 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.30-1
- Update to 2.0.30
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 2.0.29-2
- Rebuilt for Python 3.14
* Sat Apr 12 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.29-1
- Update to 2.0.29
* Mon Mar 24 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.28-7
- Rebuild for new libgo
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.0.28-6
- Add sysusers.d config file to allow rpm to create users/groups automatically
* Sat Feb 01 2025 Björn Esser <besser82@fedoraproject.org> - 2.0.28-5
- Add explicit BR: libxcrypt-devel
* Fri Jan 24 2025 Ralf Ertzinger <ralf@skytale.net> - 2.0.28-4
- Fix type errors flagged by GCC15
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.28-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.28-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4
* Sun Oct 27 2024 Ralf Ertzinger <ralf@skytale.net> - 2.0.28-1
- Update to 2.0.28, drop merged patches
* Tue Oct 22 2024 Richard W.M. Jones <rjones@redhat.com> - 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 <ralf@skytale.net> - 2.0.27-4
- Fix uWSGI auto-reloading on config change
* Mon Oct 14 2024 Remi Collet <remi@fedoraproject.org> - 2.0.27-3
- rebuild for https://fedoraproject.org/wiki/Changes/php84
* Fri Sep 27 2024 Ralf Ertzinger <ralf@skytale.net> - 2.0.27-2
- Only build fiber plugin when rack plugin is also built
* Tue Sep 24 2024 Ralf Ertzinger <ralf@skytale.net> - 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 <ralf@skytale.net> - 2.0.26-8
- Disable building the Ruby rack plugin for EPEL10
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 2.0.26-7
- convert license to SPDX
* Wed Sep 04 2024 Ralf Ertzinger <ralf@skytale.net> - 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 <ralf@skytale.net> - 2.0.26-5
- Add patch for python 3.13
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.26-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jun 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.0.26-3
- Perl 5.40 rebuild
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 2.0.26-2
- Rebuilt for Python 3.13
* Sat Jun 01 2024 Ralf Ertzinger <ralf@skytale.net> - 2.0.26-1
- Update to 2.0.26
- Rework support for multiple python versions
* Tue Apr 16 2024 Ralf Ertzinger <ralf@skytale.net> - 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 <dominik@greysector.net> - 2.0.24-2
- Rebuilt for gloox-1.0.28
* Sat Feb 10 2024 Ralf Ertzinger <ralf@skytale.net> - 2.0.24-1
- Update to 2.0.24, drop merged patches
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.23-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 23 2024 Ralf Ertzinger <ralf@skytale.net> - 2.0.23-2
- Add reworked patch for python3.12
- Build plugin for python3.11 under EPEL9
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.23-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Thu Nov 02 2023 Ralf Ertzinger <ralf@skytale.net> - 2.0.23-1
- Update to 2.0.23, drop merged patches

1
uwsgi.sysusers Normal file
View file

@ -0,0 +1 @@
u uwsgi - 'uWSGI daemon user' /run/uwsgi -

View file

@ -0,0 +1,64 @@
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

View file

@ -0,0 +1,13 @@
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);

View file

@ -1,7 +1,7 @@
diff -uNwr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py
--- a/plugins/jvm/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
+++ b/plugins/jvm/uwsgiplugin.py 2022-10-27 20:37:16.544261133 +0200
@@ -66,11 +66,6 @@
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 @@
GCC_LIST = ['jvm_plugin']
@ -13,21 +13,21 @@ diff -uNwr a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py
def post_build(config):
if subprocess.call("javac %s/plugins/jvm/uwsgi.java" % os.getcwd(), shell=True) != 0:
os._exit(1)
diff -uNwr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
--- a/plugins/php/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
+++ b/plugins/php/uwsgiplugin.py 2022-10-27 20:37:39.006374938 +0200
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 @@
if ld_run_path:
LDFLAGS.append('-L%s' % ld_run_path)
- os.environ['LD_RUN_PATH'] = ld_run_path
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
diff -uNwr a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py
--- a/plugins/python/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
+++ b/plugins/python/uwsgiplugin.py 2022-10-27 20:38:16.898566910 +0200
@@ -62,9 +62,6 @@
# 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
LDFLAGS.append("-L%s" % libdir)
@ -37,10 +37,10 @@ diff -uNwr a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py
LIBS.append('-lpython%s' % get_python_version())
else:
diff -uNwr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
--- a/plugins/rack/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
+++ b/plugins/rack/uwsgiplugin.py 2022-10-27 20:38:50.787738600 +0200
@@ -46,7 +46,6 @@
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 @@
if has_shared == 'yes':
LDFLAGS.append('-L' + libpath )
@ -48,10 +48,10 @@ diff -uNwr 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 -uNwr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
--- a/plugins/ruby19/uwsgiplugin.py 2022-10-24 12:21:58.000000000 +0200
+++ b/plugins/ruby19/uwsgiplugin.py 2022-10-27 20:39:48.879032934 +0200
@@ -40,6 +40,5 @@
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 @@
libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['libdir']\"" % rbconfig).read().rstrip()
LDFLAGS.append('-L' + libpath )

View file

@ -0,0 +1,33 @@
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;

82
uwsgi_python312-2.patch Normal file
View file

@ -0,0 +1,82 @@
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

193
uwsgi_python313.patch Normal file
View file

@ -0,0 +1,193 @@
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;