uwsgi: 2.0.20 -> 2.0.21

changelog: https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.21.html

the `missing-arginfo-php8.patch` is removed, since it's already been
merged upstream.

additionally, when php is enabled, make sure uwsgi loads the
...php-with-extensions-<ver>/lib/php.ini file
so that it will load all the extensions

lastly, change the source to fetchFromGitHub,
it seems the project web site is not that well maintained
This commit is contained in:
Damjan Georgievski 2022-10-29 15:22:48 +02:00
parent 9616bc4dc5
commit b8f2368805
2 changed files with 14 additions and 56 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, nixosTests, lib, fetchurl, pkg-config, jansson, pcre, libxcrypt
{ stdenv, nixosTests, lib, pkg-config, jansson, pcre, libxcrypt
# plugins: list of strings, eg. [ "python2" "python3" ]
, plugins ? []
, pam, withPAM ? stdenv.isLinux
@ -6,6 +6,7 @@
, libcap, withCap ? stdenv.isLinux
, python2, python3, ncurses
, ruby, php
, makeWrapper, fetchFromGitHub
}:
let php-embed = php.override {
@ -59,20 +60,21 @@ in
stdenv.mkDerivation rec {
pname = "uwsgi";
version = "2.0.20";
version = "2.0.21";
src = fetchurl {
url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz";
sha256 = "1yfz5h07rxzrqf1rdj5fzhk47idgglxj7kqr8zl8lgcpv1kriaw8";
src = fetchFromGitHub {
owner = "unbit";
repo = "uwsgi";
rev = version;
sha256 = "sha256-TUASYDyG+p1tlhmqi+ivaC7aW6UZBrPTFQUTYys5ICE=";
};
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 ];
nativeBuildInputs = [ python3 pkg-config makeWrapper ];
buildInputs = [ jansson pcre libxcrypt ]
++ lib.optional withPAM pam
@ -126,6 +128,11 @@ stdenv.mkDerivation rec {
${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
'';
postFixup = lib.optionalString (builtins.any (x: x.name == "php") needed)
''
wrapProgram $out/bin/uwsgi --set PHP_INI_SCAN_DIR ${php-embed}/lib
'';
meta = with lib; {
homepage = "https://uwsgi-docs.readthedocs.org/en/latest/";
description = "A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C";

View file

@ -1,49 +0,0 @@
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},
};