From 6e7928265ab1cb459ec646388ea308d115e3065e95664b19f2c8251b1cb13e54 Mon Sep 17 00:00:00 2001 From: James Oakley Date: Wed, 4 Jan 2023 09:59:22 +0000 Subject: [PATCH 1/2] Accepting request 1043055 from home:pgajdos:php8 - fixing uwsgi-php[78] package description - rpmlint: removing obsolete specfile condition for python which is included in python-rpm-macros OBS-URL: https://build.opensuse.org/request/show/1043055 OBS-URL: https://build.opensuse.org/package/show/server:http/uwsgi?expand=0&rev=113 --- uwsgi.changes | 6 ++++++ uwsgi.spec | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/uwsgi.changes b/uwsgi.changes index a9d52a8..6eb178b 100644 --- a/uwsgi.changes +++ b/uwsgi.changes @@ -4,6 +4,12 @@ Mon Dec 12 08:58:58 UTC 2022 - Dirk Müller - switch to pkgconfig(zlib) so that alternative providers can be used +------------------------------------------------------------------- +Tue Dec 13 19:44:00 UTC 2022 - sven@uebelacker.net + +- fixing uwsgi-php[78] package description +- rpmlint: removing obsolete specfile condition for python which is included in python-rpm-macros + ------------------------------------------------------------------- Tue Nov 15 10:58:25 UTC 2022 - pgajdos@suse.com diff --git a/uwsgi.spec b/uwsgi.spec index f75d6a2..d6e7ebf 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -27,7 +27,6 @@ %define with_php 0 %endif -%{?!python_module:%define python_module() python3-%{**}} Name: uwsgi Version: 2.0.20 Release: 0 @@ -420,7 +419,11 @@ This package contains support for rendering XML content using XSLT. %if %{with_php} %package %{php} +%if 0%{?suse_version} >= 1550 +Summary: PHP8 Plugin for uWSGI +%else Summary: PHP7 Plugin for uWSGI +%endif Group: Productivity/Networking/Web/Servers Requires: %{name} = %{version} Requires: %{php}-embed @@ -428,8 +431,12 @@ Requires: %{php}-embed %description %{php} uWSGI is a self-healing application container server coded in pure C. +%if 0%{?suse_version} >= 1550 +This package contains support for PHP version 8. +%else This package contains support for PHP version 7. %endif +%endif %prep %setup -q -n uwsgi-%{version} From 217d8618ea5eafea9765dca37eed83889063e1be885925c5a093dca06cf9fcb7 Mon Sep 17 00:00:00 2001 From: James Oakley Date: Sat, 7 Jan 2023 18:41:26 +0000 Subject: [PATCH 2/2] Accepting request 1056693 from home:dirkmueller:Factory - update to 2.0.21: * Python 3.10 support * Python 3.11 support * add tests for worker deadlocks * fix memory corruption in uwsgi_cache * Fix segfault from GEVENT_SWITCH * Support php 8.1 * Use parenthesis in print() statement - switch to pkgconfig(zlib) so that alternative providers can be used OBS-URL: https://build.opensuse.org/request/show/1056693 OBS-URL: https://build.opensuse.org/package/show/server:http/uwsgi?expand=0&rev=114 --- 2.0.21.tar.gz | 3 +++ uwsgi-2.0.12-no-LD_RUN_PATH.patch | 36 +++++++++++++++---------------- uwsgi-2.0.20.tar.gz | 3 --- uwsgi-ld-noexecstack.patch | 24 ++++++++++----------- uwsgi.changes | 18 +++++++++++++--- uwsgi.spec | 6 +++--- 6 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 2.0.21.tar.gz delete mode 100644 uwsgi-2.0.20.tar.gz diff --git a/2.0.21.tar.gz b/2.0.21.tar.gz new file mode 100644 index 0000000..77a3666 --- /dev/null +++ b/2.0.21.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35a30d83791329429bc04fe44183ce4ab512fcf6968070a7bfba42fc5a0552a9 +size 808494 diff --git a/uwsgi-2.0.12-no-LD_RUN_PATH.patch b/uwsgi-2.0.12-no-LD_RUN_PATH.patch index 3ee2ac4..e49ea9e 100644 --- a/uwsgi-2.0.12-no-LD_RUN_PATH.patch +++ b/uwsgi-2.0.12-no-LD_RUN_PATH.patch @@ -1,8 +1,8 @@ -Index: uwsgi-2.0.13/plugins/jvm/uwsgiplugin.py +Index: uwsgi-2.0.21/plugins/jvm/uwsgiplugin.py =================================================================== ---- uwsgi-2.0.13.orig/plugins/jvm/uwsgiplugin.py -+++ uwsgi-2.0.13/plugins/jvm/uwsgiplugin.py -@@ -65,11 +65,6 @@ if "-framework JavaVM" in JVM_LIBPATH: +--- uwsgi-2.0.21.orig/plugins/jvm/uwsgiplugin.py ++++ uwsgi-2.0.21/plugins/jvm/uwsgiplugin.py +@@ -66,11 +66,6 @@ if "-framework JavaVM" in JVM_LIBPATH: GCC_LIST = ['jvm_plugin'] @@ -12,12 +12,12 @@ Index: uwsgi-2.0.13/plugins/jvm/uwsgiplugin.py - os.environ['LD_RUN_PATH'] = JVM_LIBPATH[0][2:] - def post_build(config): - if os.system("javac %s/plugins/jvm/uwsgi.java" % os.getcwd()) != 0: + if subprocess.call("javac %s/plugins/jvm/uwsgi.java" % os.getcwd(), shell=True) != 0: os._exit(1) -Index: uwsgi-2.0.13/plugins/php/uwsgiplugin.py +Index: uwsgi-2.0.21/plugins/php/uwsgiplugin.py =================================================================== ---- uwsgi-2.0.13.orig/plugins/php/uwsgiplugin.py -+++ uwsgi-2.0.13/plugins/php/uwsgiplugin.py +--- uwsgi-2.0.21.orig/plugins/php/uwsgiplugin.py ++++ uwsgi-2.0.21/plugins/php/uwsgiplugin.py @@ -19,7 +19,6 @@ LDFLAGS = os.popen(PHPPATH + ' --ldflags if ld_run_path: @@ -26,11 +26,11 @@ Index: uwsgi-2.0.13/plugins/php/uwsgiplugin.py LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] -Index: uwsgi-2.0.13/plugins/python/uwsgiplugin.py +Index: uwsgi-2.0.21/plugins/python/uwsgiplugin.py =================================================================== ---- uwsgi-2.0.13.orig/plugins/python/uwsgiplugin.py -+++ uwsgi-2.0.13/plugins/python/uwsgiplugin.py -@@ -58,8 +58,6 @@ if not 'UWSGI_PYTHON_NOLIB' in os.enviro +--- uwsgi-2.0.21.orig/plugins/python/uwsgiplugin.py ++++ uwsgi-2.0.21/plugins/python/uwsgiplugin.py +@@ -64,8 +64,6 @@ if not 'UWSGI_PYTHON_NOLIB' in os.enviro LDFLAGS.append("-L%s" % libdir) LDFLAGS.append("-Wl,-rpath,%s" % libdir) @@ -39,10 +39,10 @@ Index: uwsgi-2.0.13/plugins/python/uwsgiplugin.py LIBS.append('-lpython%s' % get_python_version()) else: LIBS = [] -Index: uwsgi-2.0.13/plugins/rack/uwsgiplugin.py +Index: uwsgi-2.0.21/plugins/rack/uwsgiplugin.py =================================================================== ---- uwsgi-2.0.13.orig/plugins/rack/uwsgiplugin.py -+++ uwsgi-2.0.13/plugins/rack/uwsgiplugin.py +--- uwsgi-2.0.21.orig/plugins/rack/uwsgiplugin.py ++++ uwsgi-2.0.21/plugins/rack/uwsgiplugin.py @@ -46,7 +46,6 @@ LIBS = os.popen(RUBYPATH + " -e \"requir if has_shared == 'yes': @@ -51,10 +51,10 @@ Index: uwsgi-2.0.13/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() -Index: uwsgi-2.0.13/plugins/ruby19/uwsgiplugin.py +Index: uwsgi-2.0.21/plugins/ruby19/uwsgiplugin.py =================================================================== ---- uwsgi-2.0.13.orig/plugins/ruby19/uwsgiplugin.py -+++ uwsgi-2.0.13/plugins/ruby19/uwsgiplugin.py +--- uwsgi-2.0.21.orig/plugins/ruby19/uwsgiplugin.py ++++ uwsgi-2.0.21/plugins/ruby19/uwsgiplugin.py @@ -40,6 +40,5 @@ LDFLAGS = os.popen(RUBYPATH + " -e \"req libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['libdir']\"" % rbconfig).read().rstrip() diff --git a/uwsgi-2.0.20.tar.gz b/uwsgi-2.0.20.tar.gz deleted file mode 100644 index 780476d..0000000 --- a/uwsgi-2.0.20.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88ab9867d8973d8ae84719cf233b7dafc54326fcaec89683c3f9f77c002cdff9 -size 804906 diff --git a/uwsgi-ld-noexecstack.patch b/uwsgi-ld-noexecstack.patch index 60520f3..9b0304a 100644 --- a/uwsgi-ld-noexecstack.patch +++ b/uwsgi-ld-noexecstack.patch @@ -1,15 +1,15 @@ -diff --git a/uwsgiconfig.py b/uwsgiconfig.py -index 9998bc5..abb44e4 100644 ---- a/uwsgiconfig.py -+++ b/uwsgiconfig.py -@@ -539,7 +539,7 @@ def build_uwsgi(uc, print_only=False, gcll=None): +Index: uwsgi-2.0.21/uwsgiconfig.py +=================================================================== +--- uwsgi-2.0.21.orig/uwsgiconfig.py ++++ uwsgi-2.0.21/uwsgiconfig.py +@@ -539,7 +539,7 @@ def build_uwsgi(uc, print_only=False, gc gcc_list.append('%s/%s' % (path, cfile)) for bfile in up.get('BINARY_LIST', []): try: - binary_link_cmd = "ld -r -b binary -o %s/%s.o %s/%s" % (path, bfile[1], path, bfile[1]) + binary_link_cmd = "ld -z noexecstack -r -b binary -o %s/%s.o %s/%s" % (path, bfile[1], path, bfile[1]) print(binary_link_cmd) - if os.system(binary_link_cmd) != 0: + if subprocess.call(binary_link_cmd, shell=True) != 0: raise Exception('unable to link binary file') @@ -1146,7 +1146,7 @@ class uConf(object): if not self.embed_config: @@ -18,7 +18,7 @@ index 9998bc5..abb44e4 100644 - binary_link_cmd = "ld -r -b binary -o %s.o %s" % (binarize(self.embed_config), self.embed_config) + binary_link_cmd = "ld -z noexecstack -r -b binary -o %s.o %s" % (binarize(self.embed_config), self.embed_config) print(binary_link_cmd) - os.system(binary_link_cmd) + subprocess.call(binary_link_cmd, shell=True) self.cflags.append("-DUWSGI_EMBED_CONFIG=_binary_%s_start" % binarize(self.embed_config)) @@ -1165,7 +1165,7 @@ class uConf(object): for directory, directories, files in os.walk(ef): @@ -27,23 +27,23 @@ index 9998bc5..abb44e4 100644 - binary_link_cmd = "ld -r -b binary -o %s.o %s" % (binarize(fname), fname) + binary_link_cmd = "ld -z noexecstack -r -b binary -o %s.o %s" % (binarize(fname), fname) print(binary_link_cmd) - os.system(binary_link_cmd) + subprocess.call(binary_link_cmd, shell=True) if symbase: @@ -1175,7 +1175,7 @@ class uConf(object): - os.system(objcopy_cmd) + subprocess.call(objcopy_cmd, shell=True) binary_list.append(binarize(fname)) else: - binary_link_cmd = "ld -r -b binary -o %s.o %s" % (binarize(ef), ef) + binary_link_cmd = "ld -z noexecstack -r -b binary -o %s.o %s" % (binarize(ef), ef) print(binary_link_cmd) - os.system(binary_link_cmd) + subprocess.call(binary_link_cmd, shell=True) binary_list.append(binarize(ef)) -@@ -1465,7 +1465,7 @@ def build_plugin(path, uc, cflags, ldflags, libs, name = None): +@@ -1460,7 +1460,7 @@ def build_plugin(path, uc, cflags, ldfla gcc_list.append(path + '/' + cfile) for bfile in up.get('BINARY_LIST', []): try: - binary_link_cmd = "ld -r -b binary -o %s/%s.o %s/%s" % (path, bfile[1], path, bfile[1]) + binary_link_cmd = "ld -z noexecstack -r -b binary -o %s/%s.o %s/%s" % (path, bfile[1], path, bfile[1]) print(binary_link_cmd) - if os.system(binary_link_cmd) != 0: + if subprocess.call(binary_link_cmd, shell=True) != 0: raise Exception('unable to link binary file') diff --git a/uwsgi.changes b/uwsgi.changes index 6eb178b..c3b00cf 100644 --- a/uwsgi.changes +++ b/uwsgi.changes @@ -1,8 +1,14 @@ ------------------------------------------------------------------- -Mon Dec 12 08:58:58 UTC 2022 - Dirk Müller +Fri Jan 6 20:36:08 UTC 2023 - Dirk Müller -- switch to pkgconfig(zlib) so that alternative providers can be - used +- update to 2.0.21: + * Python 3.10 support + * Python 3.11 support + * add tests for worker deadlocks + * fix memory corruption in uwsgi_cache + * Fix segfault from GEVENT_SWITCH + * Support php 8.1 + * Use parenthesis in print() statement ------------------------------------------------------------------- Tue Dec 13 19:44:00 UTC 2022 - sven@uebelacker.net @@ -10,6 +16,12 @@ Tue Dec 13 19:44:00 UTC 2022 - sven@uebelacker.net - fixing uwsgi-php[78] package description - rpmlint: removing obsolete specfile condition for python which is included in python-rpm-macros +------------------------------------------------------------------- +Mon Dec 12 08:58:58 UTC 2022 - Dirk Müller + +- switch to pkgconfig(zlib) so that alternative providers can be + used + ------------------------------------------------------------------- Tue Nov 15 10:58:25 UTC 2022 - pgajdos@suse.com diff --git a/uwsgi.spec b/uwsgi.spec index d6e7ebf..df92ce1 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -1,7 +1,7 @@ # # spec file for package uwsgi # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,13 +28,13 @@ %endif Name: uwsgi -Version: 2.0.20 +Version: 2.0.21 Release: 0 Summary: Application Container Server for Networked/Clustered Web Applications License: Apache-2.0 AND GPL-2.0-only WITH GCC-exception-2.0 Group: Productivity/Networking/Web/Servers URL: https://uwsgi-docs.readthedocs.io/en/latest/ -Source: https://projects.unbit.it/downloads/uwsgi-%{version}.tar.gz +Source: https://github.com/unbit/uwsgi/archive/refs/tags/%{version}.tar.gz Source1: opensuse.ini.in Source2: uwsgi.service Source3: django.ini.example