summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-02-14 10:29:31 +0100
committerRemi Collet <remi@php.net>2022-02-14 10:29:31 +0100
commita8a769712ab226db4557844ab0a1a70fd50ee39c (patch)
tree54727eac111a7bdf3595cf6c325dac1c7c66ebb8
parent391d8bd573a80cc3bbde42caa0f2d3b480dd5d36 (diff)
update to 2.0.20
-rw-r--r--uwsgi-plugin-php.spec27
-rw-r--r--uwsgi_fix_php8.patch17
-rw-r--r--uwsgi_fix_php_arginfo.patch43
3 files changed, 80 insertions, 7 deletions
diff --git a/uwsgi-plugin-php.spec b/uwsgi-plugin-php.spec
index 38a29ee..63134f1 100644
--- a/uwsgi-plugin-php.spec
+++ b/uwsgi-plugin-php.spec
@@ -12,6 +12,7 @@
# Disable RPATH check
%global __arch_install_post /bin/true
+%global __brp_check_rpaths /bin/true
# Disable auto-provides (php_plugin.so is not a library)
AutoProv: 0
@@ -27,19 +28,21 @@ Requires: %{scl_prefix}php-embedded
%endif
Name: %{?scl_prefix}%{project}-plugin-php
-Version: 2.0.18
-Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 2.0.20
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: uWSGI - Plugin for PHP support
License: GPLv2 with exceptions
URL: http://projects.unbit.it/uwsgi
Source0: http://projects.unbit.it/downloads/%{project}-%{version}.tar.gz
-# https://github.com/unbit/uwsgi/pull/2105
-Patch11: uwsgi_fix_php74_zend.patch
+# https://github.com/unbit/uwsgi/issues/2283
+Patch1: uwsgi_fix_php8.patch
+# https://github.com/unbit/uwsgi/issues/2356
+Patch2: uwsgi_fix_php_arginfo.patch
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-embedded
BuildRequires: %{project}-devel = %{version}
BuildRequires: bzip2-devel
@@ -56,7 +59,7 @@ BuildRequires: libargon2-devel
Requires: %{project}-plugin-common = %{version}
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
%if "%{php_version}" > "5.6"
Obsoletes: %{project}-plugin-php56u <= %{version}
@@ -76,6 +79,12 @@ Obsoletes: %{project}-plugin-php73 <= %{version}
%if "%{php_version}" > "7.4"
Obsoletes: %{project}-plugin-php74 <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: %{project}-plugin-php80 <= %{version}
+%endif
+%if "%{php_version}" > "8.1"
+Obsoletes: %{project}-plugin-php81 <= %{version}
+%endif
%endif
@@ -88,7 +97,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qn %{project}-%{version}
-%patch11 -p1
+%patch1 -p1
+%patch2 -p1
# Fix makefile
sed -e 's:/lib:/%{_lib}:' -i plugins/php/uwsgiplugin.py
@@ -115,6 +125,9 @@ install -Dpm 755 %{?scl}%{!?scl:php}_plugin.so %{buildroot}%{_root_libdir}/%{pro
%changelog
+* Mon Feb 14 2022 Remi Collet <remi@remirepo.net> - 2.0.20-1
+- update to 2.0.20
+
* Thu May 14 2020 Remi Collet <remi@remirepo.net> - 2.0.18-8
- Patching PHP plugin for 7.4
diff --git a/uwsgi_fix_php8.patch b/uwsgi_fix_php8.patch
new file mode 100644
index 0000000..1685a0f
--- /dev/null
+++ b/uwsgi_fix_php8.patch
@@ -0,0 +1,17 @@
+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
+@@ -21,7 +21,12 @@ 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]
++# 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_php_arginfo.patch b/uwsgi_fix_php_arginfo.patch
new file mode 100644
index 0000000..5228066
--- /dev/null
+++ b/uwsgi_fix_php_arginfo.patch
@@ -0,0 +1,43 @@
+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},
+ };
+