diff --git a/uwsgi.spec b/uwsgi.spec index e2890be..6b51a54 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -186,7 +186,7 @@ Name: uwsgi Version: 2.0.21 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Fast, self-healing, application container server # uwsgi is licensed under GPLv2 with a linking exception # docs are licensed under MIT @@ -219,6 +219,7 @@ Patch16: uwsgi_python311.patch # https://github.com/unbit/uwsgi/pull/2400 Patch17: uwsgi_fix_php81_filename_zend_string.patch Patch18: uwsgi_fix_php82.patch +Patch19: uwsgi_fix_ruby_taint.patch BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel BuildRequires: libyaml-devel, ruby-devel @@ -1241,6 +1242,7 @@ cp -p %{SOURCE5} README.Fedora %patch12 -p1 %patch13 -p1 %patch18 -p1 +%patch19 -p1 %if %{with perl} && (%{with python3} || %{with python3_other}) && %{with perlcoro} %{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py @@ -1835,6 +1837,9 @@ exit 0 %changelog +* Fri Apr 21 2023 Ralf Ertzinger - 2.0.21-6 +- Fix Ruby/Rack plugin for Ruby >= 3.2 + * Tue Jan 24 2023 Ralf Ertzinger - 2.0.21-5 - Rebuilt for new libgo.so diff --git a/uwsgi_fix_ruby_taint.patch b/uwsgi_fix_ruby_taint.patch new file mode 100644 index 0000000..b23b671 --- /dev/null +++ b/uwsgi_fix_ruby_taint.patch @@ -0,0 +1,27 @@ +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-04-21 21:51:06.675598538 +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 -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py +--- a/plugins/rack/uwsgiplugin.py 2023-04-21 21:47:16.170430600 +0200 ++++ b/plugins/rack/uwsgiplugin.py 2023-04-21 21:49:33.070124247 +0200 +@@ -18,6 +18,8 @@ + CFLAGS.append('-DRUBY19') + if version >= '2.0': + CFLAGS.append('-DRUBY20') ++ if version >= '2.7': ++ CFLAGS.append('-DRUBY27') + CFLAGS.append('-Wno-unused-parameter') + rbconfig = 'RbConfig' + else: