diff options
| author | Robert Scott <code@humanleg.org.uk> | 2022-01-08 21:31:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-08 21:31:26 +0000 |
| commit | 6fa556fa2c649fc555af05b94b41c97adb827447 (patch) | |
| tree | d9d5be650f9a78fbbf18706b9e460d57f8b92a78 | |
| parent | uriparser: 0.9.5 -> 0.9.5 (security, fixes #153777) (diff) | |
| parent | uwsgi: non-weird postPatch :) (diff) | |
| download | nixpkgs-6fa556fa2c649fc555af05b94b41c97adb827447.tar.gz | |
Merge pull request #152214 from NixOS/backport-148163-to-release-21.11
[Backport release-21.11] uwsgi: fix compiling against php 8, bump to 2.0.20
| -rw-r--r-- | pkgs/servers/uwsgi/default.nix | 8 | ||||
| -rw-r--r-- | pkgs/servers/uwsgi/missing-arginfo-php8.patch | 49 |
2 files changed, 55 insertions, 2 deletions
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index c6c65d58e356..e8bfed1ab89b 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -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 = '' diff --git a/pkgs/servers/uwsgi/missing-arginfo-php8.patch b/pkgs/servers/uwsgi/missing-arginfo-php8.patch new file mode 100644 index 000000000000..98a924e40279 --- /dev/null +++ b/pkgs/servers/uwsgi/missing-arginfo-php8.patch @@ -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}, + }; + |
