From 3d5d99734e06b2e33cb9c843dbe3d409f03b94c1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 May 2022 07:31:08 +0200 Subject: update to 2.3.1 drop patch merged upstream --- ...-provider-token-may-be-not-nul-terminated.patch | 35 ---------------------- PHPINFO | 2 +- REFLECTION | 4 +-- php-pecl-yar.spec | 14 ++++----- 4 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 0001-fix-172-provider-token-may-be-not-nul-terminated.patch diff --git a/0001-fix-172-provider-token-may-be-not-nul-terminated.patch b/0001-fix-172-provider-token-may-be-not-nul-terminated.patch deleted file mode 100644 index 4170681..0000000 --- a/0001-fix-172-provider-token-may-be-not-nul-terminated.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bef13789e0f6b8cb54015504752036f5a197d3fa Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 5 May 2022 09:01:46 +0200 -Subject: [PATCH] fix #172 provider/token may be not nul terminated - ---- - yar_server.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/yar_server.c b/yar_server.c -index 331284b..b66124e 100644 ---- a/yar_server.c -+++ b/yar_server.c -@@ -525,8 +525,16 @@ static inline int php_yar_server_auth(zval *obj, yar_header_t *header, yar_respo - YAR_TRY { - zval auth_params[2]; - -- ZVAL_STRINGL(&auth_params[0], (char*)header->provider, MIN(strlen(header->provider), 32)); -- ZVAL_STRINGL(&auth_params[1], (char*)header->token, MIN(strlen(header->token), 32)); -+ if (memchr(header->provider, 0, 32)) { -+ ZVAL_STRINGL(&auth_params[0], (char*)header->provider, strlen((char *)header->provider)); -+ } else { -+ ZVAL_STRINGL(&auth_params[0], (char*)header->provider, 32); -+ } -+ if (memchr(header->token, 0, 32)) { -+ ZVAL_STRINGL(&auth_params[1], (char*)header->token, strlen((char*)header->token)); -+ } else { -+ ZVAL_STRINGL(&auth_params[1], (char*)header->token, 32); -+ } - - #if PHP_VERSION_ID < 80000 - zend_call_method_with_2_params(obj, ce, NULL, "__auth", &ret, auth_params, auth_params + 1); --- -2.35.1 - diff --git a/PHPINFO b/PHPINFO index fe268fe..221d56f 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,7 +2,7 @@ yar yar support => enabled -Version => 2.3.0 +Version => 2.3.1 Directive => Local Value => Master Value yar.packager => msgpack => msgpack diff --git a/REFLECTION b/REFLECTION index dbc76d4..84317c1 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #119 yar version 2.3.0 ] { +Extension [ extension #119 yar version 2.3.1 ] { - Dependencies { Dependency [ json (Required) ] @@ -27,7 +27,7 @@ Extension [ extension #119 yar version 2.3.0 ] { } - Constants [24] { - Constant [ string YAR_VERSION ] { 2.3.0 } + Constant [ string YAR_VERSION ] { 2.3.1 } Constant [ int YAR_HAS_MSGPACK ] { 1 } Constant [ int YAR_OPT_PACKAGER ] { 0 } Constant [ int YAR_OPT_PERSISTENT ] { 1 } diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec index fd2b70f..8a7326c 100644 --- a/php-pecl-yar.spec +++ b/php-pecl-yar.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-yar # -# Copyright (c) 2013-2021 Remi Collet +# Copyright (c) 2013-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -25,19 +25,17 @@ Summary: Light, concurrent RPC framework Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 2.3.0 +Version: 2.3.1 %if 0%{?gh_date:1} Release: 0.14.%{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: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif License: PHP URL: https://pecl.php.net/package/%{pecl_name} -Patch0: 0001-fix-172-provider-token-may-be-not-nul-terminated.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: make BuildRequires: curl-devel @@ -98,8 +96,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b pr174 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_YAR_VERSION/{s/.* "//;s/".*$//;p}' php_yar.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}%{?gh_date:-dev}"; then @@ -257,6 +253,10 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR %changelog +* Mon May 9 2022 Remi Collet - 2.3.1-1 +- update to 2.3.1 +- drop patch merged upstream + * Thu May 5 2022 Remi Collet - 2.3.0-2 - add fix for https://github.com/laruence/yar/issues/172 using patch from https://github.com/laruence/yar/pull/174 -- cgit