From 3291ecdb459180bf813b3803e3d885bfee2df17e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Sep 2020 15:53:17 +0200 Subject: add minor fix from https://github.com/m6w6/ext-raphf/pull/9 --- 9.patch | 22 ++++++++++++++++++++++ PHPINFO | 11 +++++++++++ REFLECTION | 2 +- php-pecl-raphf.spec | 30 +++++++++++++++--------------- 4 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 9.patch create mode 100644 PHPINFO diff --git a/9.patch b/9.patch new file mode 100644 index 0000000..762cfc9 --- /dev/null +++ b/9.patch @@ -0,0 +1,22 @@ +From d48a944c053084382b2b0a914cb1058cda89d99c Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 21 Sep 2020 15:48:01 +0200 +Subject: [PATCH] fix format, used is unsigned long + +--- + src/php_raphf_api.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/php_raphf_api.c b/src/php_raphf_api.c +index 004fd66..d71ce36 100644 +--- a/src/php_raphf_api.c ++++ b/src/php_raphf_api.c +@@ -624,7 +624,7 @@ static int php_persistent_handle_apply_info_ex(zval *p, int argc, + zend_hash_key *super_key = va_arg(argv, zend_hash_key *); + char used[21], free[21]; + +- slprintf(used, sizeof(used), "%u", list->used); ++ slprintf(used, sizeof(used), "%lu", list->used); + slprintf(free, sizeof(free), "%d", zend_hash_num_elements(&list->free)); + + php_info_print_table_row(4, super_key->key->val, key->key->val, used, free); diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..3b8c982 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,11 @@ + +raphf + +Resource and persistent handle factory support => enabled +Extension version => 2.0.1 + + Persistent handles in this process +Provider => Ident => Used => Free + +Directive => Local Value => Master Value +raphf.persistent_handle.limit => -1 => -1 diff --git a/REFLECTION b/REFLECTION index 17baefc..02fb2b8 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #135 raphf version 2.0.1 ] { +Extension [ extension #96 raphf version 2.0.1 ] { - INI { Entry [ raphf.persistent_handle.limit ] diff --git a/php-pecl-raphf.spec b/php-pecl-raphf.spec index 88e61c3..ea23b89 100644 --- a/php-pecl-raphf.spec +++ b/php-pecl-raphf.spec @@ -3,7 +3,7 @@ # # Fedora spec file for php-pecl-raphf # -# Copyright (c) 2013-2019 Remi Collet +# Copyright (c) 2013-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -38,11 +38,13 @@ Version: 2.0.1 Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif License: BSD -URL: http://pecl.php.net/package/%{pecl_name} +URL: https://pecl.php.net/package/%{pecl_name} + +Patch0: https://patch-diff.githubusercontent.com/raw/m6w6/ext-raphf/pull/9.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 @@ -62,23 +64,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{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}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -119,6 +114,8 @@ mv %{pecl_name}-%{version}%{?prever} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS +%patch0 -p1 -b .pr9 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_RAPHF_VERSION/{s/.* "//;s/".*$//;p}' php_raphf.h) if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:dev}"; then @@ -272,6 +269,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Sep 21 2020 Remi Collet - 2.0.1-2 +- add minor fix from https://github.com/m6w6/ext-raphf/pull/9 + * Fri Oct 25 2019 Remi Collet - 2.0.1-1 - update to 2.0.1 -- cgit