diff options
author | Remi Collet <remi@remirepo.net> | 2020-09-02 11:16:37 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-09-02 11:16:37 +0200 |
commit | fb7adb9801301a1f20ac3e5bf072d5a824743f01 (patch) | |
tree | f5b46542f56d55e05eff4a9b476c1d720cc0aa45 | |
parent | a0f34231e4ba2f18be9cbfdacae99e9e657e3574 (diff) |
add patch for PHP 8.0.0beta3 from
https://github.com/nginx/unit/pull/474
-rw-r--r-- | 474.patch | 27 | ||||
-rw-r--r-- | unit-php.spec | 9 |
2 files changed, 35 insertions, 1 deletions
diff --git a/474.patch b/474.patch new file mode 100644 index 0000000..076dfdc --- /dev/null +++ b/474.patch @@ -0,0 +1,27 @@ +From 01ad74d272a2d408b58e16946979ac5d9e127ab5 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 2 Sep 2020 11:13:05 +0200 +Subject: [PATCH] fix for PHP 8.0.0beta3 + +--- + src/nxt_php_sapi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c +index d7e5b476..11e4e702 100644 +--- a/src/nxt_php_sapi.c ++++ b/src/nxt_php_sapi.c +@@ -537,9 +537,13 @@ nxt_php_set_options(nxt_task_t *task, nxt_conf_value_t *options, int type) + } + + if (nxt_str_eq(&name, "disable_functions", 17)) { ++#ifdef NXT_PHP8 ++ zend_disable_functions((const char *)value.start); ++#else + nxt_php_disable(task, "function", &value, + &PG(disable_functions), + zend_disable_function); ++#endif + continue; + } + diff --git a/unit-php.spec b/unit-php.spec index a15f060..0f7636d 100644 --- a/unit-php.spec +++ b/unit-php.spec @@ -35,13 +35,15 @@ Requires: %{scl_prefix}php-embedded Name: %{?scl_prefix}%{project}-php Version: 1.19.0 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP module for NGINX Unit License: ASL 2.0 URL: https://unit.nginx.org/ Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz +Patch0: https://patch-diff.githubusercontent.com/raw/nginx/unit/pull/474.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-embedded @@ -60,6 +62,7 @@ and NGINX unit %{version}. %prep %setup -qn %{project}-%{gh_commit} +%patch0 -p1 -b .pr %build @@ -118,6 +121,10 @@ make %{modname}-install DESTDIR=%{buildroot} %changelog +* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 1.19.0-2 +- add patch for PHP 8.0.0beta3 from + https://github.com/nginx/unit/pull/474 + * Fri Aug 14 2020 Remi Collet <remi@remirepo.net> - 1.19.0-1 - update to 1.19.0 - drop patch merged upstream |