Merge #148163: uwsgi: fix with php 8, bump to 2.0.20

This commit is contained in:
Vladimír Čunát 2021-12-26 12:09:21 +01:00
commit 8de62ec192
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 55 additions and 2 deletions

View File

@ -59,16 +59,17 @@ in
stdenv.mkDerivation rec {
pname = "uwsgi";
version = "2.0.19.1";
version = "2.0.20";
src = fetchurl {
url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz";
sha256 = "0256v72b7zr6ds4srpaawk1px3bp0djdwm239w3wrxpw7dzk1gjn";
sha256 = "1yfz5h07rxzrqf1rdj5fzhk47idgglxj7kqr8zl8lgcpv1kriaw8";
};
patches = [
./no-ext-session-php_session.h-on-NixOS.patch
./additional-php-ldflags.patch
./missing-arginfo-php8.patch # https://github.com/unbit/uwsgi/issues/2356
];
nativeBuildInputs = [ python3 pkg-config ];
@ -96,6 +97,9 @@ stdenv.mkDerivation rec {
substituteInPlace "$f" \
--replace pkg-config "$PKG_CONFIG"
done
${lib.optionalString (lib.versionAtLeast php.version "8") ''
sed -e "s/ + php_version//" -i plugins/php/uwsgiplugin.py
''}
'';
configurePhase = ''

View File

@ -0,0 +1,49 @@
diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
index ca0ef6c1..00c39b09 100644
--- a/plugins/php/php_plugin.c
+++ b/plugins/php/php_plugin.c
@@ -257,6 +257,9 @@ PHP_MINIT_FUNCTION(uwsgi_php_minit) {
return SUCCESS;
}
+ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
PHP_FUNCTION(uwsgi_version) {
RETURN_STRING(UWSGI_VERSION);
}
@@ -488,20 +491,20 @@ PHP_FUNCTION(uwsgi_signal) {
}
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},
};