diff options
author | Remi Collet <remi@remirepo.net> | 2020-03-16 08:21:45 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-03-16 08:21:45 +0100 |
commit | 422b2ff6f1437043483cf3f304ddf47e9f15a70e (patch) | |
tree | 322a5b5b29e37a158b5523cbc44a01ca4a8a7b4e | |
parent | 989e32ff2ae1c3725519ab5d6118d0cc6eda9a11 (diff) |
update to 2.1.0
fix build with msgpack using patch from
https://github.com/laruence/yar/pull/151
add missing file from upstream git repo and
open https://github.com/laruence/yar/pull/152
-rw-r--r-- | 151.patch | 22 | ||||
-rw-r--r-- | PHPINFO | 3 | ||||
-rw-r--r-- | REFLECTION | 14 | ||||
-rw-r--r-- | internal.php | 7 | ||||
-rw-r--r-- | php-pecl-yar.spec | 19 |
5 files changed, 53 insertions, 12 deletions
diff --git a/151.patch b/151.patch new file mode 100644 index 0000000..008bc95 --- /dev/null +++ b/151.patch @@ -0,0 +1,22 @@ +From ffe62a8793fcee61368a09e017b400a64d9db709 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 16 Mar 2020 07:05:37 +0100 +Subject: [PATCH] fix build, undefined variable + +--- + packagers/msgpack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packagers/msgpack.c b/packagers/msgpack.c +index 2050f4e..e1b078d 100644 +--- a/packagers/msgpack.c ++++ b/packagers/msgpack.c +@@ -39,7 +39,7 @@ int php_yar_packager_msgpack_pack(const yar_packager_t *self, zval *pzval, smart + + zval * php_yar_packager_msgpack_unpack(const yar_packager_t *self, char *content, size_t len, char **msg, zval *ret) /* {{{ */ { + ZVAL_NULL(ret); +- php_msgpack_unserialize(rret, content, len); ++ php_msgpack_unserialize(ret, content, len); + return ret; + } /* }}} */ + @@ -2,7 +2,7 @@ yar yar support => enabled -Version => 2.0.7 +Version => 2.1.0 Directive => Local Value => Master Value yar.packager => msgpack => msgpack @@ -12,4 +12,3 @@ yar.expose_info => On => On yar.connect_timeout => 1000 => 1000 yar.timeout => 5000 => 5000 yar.content_type => application/octet-stream => application/octet-stream -yar.allow_persistent => 0 => 0 @@ -1,8 +1,8 @@ -Extension [ <persistent> extension #108 yar version 2.0.7 ] { +Extension [ <persistent> extension #112 yar version 2.1.0 ] { - Dependencies { - Dependency [ json (Required) ] - Dependency [ msgpack (Required) ] + Dependency [ json (Optional) ] + Dependency [ msgpack (Optional) ] } - INI { @@ -27,18 +27,16 @@ Extension [ <persistent> extension #108 yar version 2.0.7 ] { Entry [ yar.content_type <ALL> ] Current = 'application/octet-stream' } - Entry [ yar.allow_persistent <ALL> ] - Current = '0' - } } - - Constants [19] { - Constant [ string YAR_VERSION ] { 2.0.7 } + - Constants [20] { + Constant [ string YAR_VERSION ] { 2.1.0 } Constant [ int YAR_OPT_PACKAGER ] { 1 } Constant [ int YAR_OPT_PERSISTENT ] { 2 } Constant [ int YAR_OPT_TIMEOUT ] { 4 } Constant [ int YAR_OPT_CONNECT_TIMEOUT ] { 8 } Constant [ int YAR_OPT_HEADER ] { 16 } + Constant [ int YAR_OPT_RESOLVE ] { 32 } Constant [ int YAR_CLIENT_PROTOCOL_HTTP ] { 1 } Constant [ int YAR_CLIENT_PROTOCOL_TCP ] { 2 } Constant [ int YAR_CLIENT_PROTOCOL_UNIX ] { 4 } diff --git a/internal.php b/internal.php new file mode 100644 index 0000000..fe7fc38 --- /dev/null +++ b/internal.php @@ -0,0 +1,7 @@ +<?php +error_reporting(-1); +class Service_Provider Extends SplFixedArray { +} + +$yar = new Yar_Server(new Service_Provider()); +$yar->handle(); diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec index 9cf0801..22ac9f5 100644 --- a/php-pecl-yar.spec +++ b/php-pecl-yar.spec @@ -29,7 +29,7 @@ Summary: Light, concurrent RPC framework Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 2.0.7 +Version: 2.1.0 %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 @@ -40,6 +40,9 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz License: PHP URL: https://pecl.php.net/package/%{pecl_name} +Source1: https://raw.githubusercontent.com/laruence/yar/yar-2.1.0/tests/htdocs/internal.php +Patch0: https://patch-diff.githubusercontent.com/raw/laruence/yar/pull/151.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: curl-devel BuildRequires: %{?scl_prefix}php-devel > 7 @@ -114,6 +117,9 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +cp %{SOURCE1} tests/htdocs/internal.php +%patch0 -p1 + # 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 @@ -137,7 +143,6 @@ cat > %{ini_name} << 'EOF' extension=%{pecl_name}.so ; Configuration -;yar.allow_persistent=0 ;yar.connect_timeout=1000 ;yar.content_type=application/octet-stream ;yar.debug=Off @@ -217,6 +222,9 @@ fi %check +# fails in mock with: curl exec failed 'Couldn't connect to server' +rm ?TS/tests/022.phpt + : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=json.so \ @@ -267,6 +275,13 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR %changelog +* Mon Mar 16 2020 Remi Collet <remi@remirepo.net> - 2.1.0-1 +- update to 2.1.0 +- fix build with msgpack using patch from + https://github.com/laruence/yar/pull/151 +- add missing file from upstream git repo and + open https://github.com/laruence/yar/pull/152 + * Mon Jan 6 2020 Remi Collet <remi@remirepo.net> - 2.0.7-1 - update to 2.0.7 |