From 26426e80196853ed37e86d103048f159d291082e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 25 Jun 2019 07:12:41 +0200 Subject: [PATCH] v2.0.3 --- .gitignore | 1 + 125.patch | 36 ++++++++++++++++++++++++++++++++++++ msgpack-pr118.patch | 31 ------------------------------- php-pecl-msgpack.spec | 32 +++++++++++++++++--------------- sources | 2 +- 5 files changed, 55 insertions(+), 47 deletions(-) create mode 100644 125.patch delete mode 100644 msgpack-pr118.patch diff --git a/.gitignore b/.gitignore index f1ac61e..eb1b8ad 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ clog /msgpack-0.5.7.tgz /msgpack-2.0.1.tgz /msgpack-2.0.2.tgz +/msgpack-2.0.3.tgz diff --git a/125.patch b/125.patch new file mode 100644 index 0000000..7744d05 --- /dev/null +++ b/125.patch @@ -0,0 +1,36 @@ +From 98d4af769b3c1ee42240c7dfb3799a2ce5edb3f3 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 26 Jun 2018 14:56:03 +0200 +Subject: [PATCH] fix ce->name is a zend_string + +--- + msgpack_convert.c | 2 +- + msgpack_unpack.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/msgpack_convert.c b/msgpack_convert.c +index 117727e..85d1da6 100644 +--- a/msgpack_convert.c ++++ b/msgpack_convert.c +@@ -314,7 +314,7 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */ + if (zend_call_function(&fci, &fcc) == FAILURE) { + MSGPACK_WARNING( + "[msgpack] (%s) Invocation of %s's constructor failed", +- __FUNCTION__, ce->name); ++ __FUNCTION__, ZSTR_VAL(ce->name)); + + return FAILURE; + } +diff --git a/msgpack_unpack.c b/msgpack_unpack.c +index 263341b..6c3f30b 100644 +--- a/msgpack_unpack.c ++++ b/msgpack_unpack.c +@@ -557,7 +557,7 @@ int msgpack_unserialize_map_item(msgpack_unserialize_data *unpack, zval **contai + if (ce->unserialize == NULL) { + MSGPACK_WARNING( + "[msgpack] (%s) Class %s has no unserializer", +- __FUNCTION__, ce->name); ++ __FUNCTION__, ZSTR_VAL(ce->name)); + + MSGPACK_UNSERIALIZE_FINISH_MAP_ITEM(unpack, key, val); + diff --git a/msgpack-pr118.patch b/msgpack-pr118.patch deleted file mode 100644 index b740b51..0000000 --- a/msgpack-pr118.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 99f9db8cd68cf458b330047b8d1cc0f15240abf2 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 14 Apr 2017 09:23:39 +0200 -Subject: [PATCH] use spl_autoload_register (to avoid deprecation warning with - 7.2) - ---- - tests/019.phpt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/019.phpt b/tests/019.phpt -index 46cccb3..693f5cf 100644 ---- a/tests/019.phpt -+++ b/tests/019.phpt -@@ -17,7 +17,7 @@ function test($type, $variable, $test) { - echo $test || $unserialized->b == 2 ? 'OK' : 'ERROR', PHP_EOL; - } - --function __autoload($classname) { -+function test_autoload($classname) { - class Obj { - var $a; - var $b; -@@ -28,6 +28,7 @@ function __autoload($classname) { - } - } - } -+spl_autoload_register('test_autoload'); - - test('autoload', '83c0a34f626aa16101a16202', false); - ?> diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec index b7f94c8..40870fa 100644 --- a/php-pecl-msgpack.spec +++ b/php-pecl-msgpack.spec @@ -1,6 +1,6 @@ # Fedora spec file for php-pecl-msgpack # -# Copyright (c) 2012-2018 Remi Collet +# Copyright (c) 2012-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -19,14 +19,14 @@ Summary: API for communicating with MessagePack serialization Name: php-pecl-msgpack -Version: 2.0.2 -Release: 8%{?dist} +Version: 2.0.3 +Release: 1%{?dist} +Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz License: BSD Group: Development/Languages URL: http://pecl.php.net/package/msgpack -Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: %{pecl_name}-pr118.patch +Patch2: https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-php/pull/125.patch BuildRequires: php-devel > 7 BuildRequires: php-pear @@ -74,13 +74,13 @@ These are the files needed to compile programs using MessagePack serializer. %prep -%setup -q -c - +%setup -qc mv %{pecl_name}-%{version} NTS + sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd NTS -%patch0 -p1 -b .pr118 +%patch2 -p1 -b .pr125 %if %{with_msgpack} # use system library @@ -92,8 +92,8 @@ rm -rf msgpack # Sanity check, really often broken extver=$(sed -n '/#define PHP_MSGPACK_VERSION/{s/.* "//;s/".*$//;p}' php_msgpack.h) -if test "x${extver}" != "x%{version}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}. +if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}. exit 1 fi cd .. @@ -147,7 +147,8 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Test & Documentation cd NTS for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i +do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i + [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i done for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i @@ -157,8 +158,6 @@ done %check # Erratic results rm */tests/034.phpt -# Benchmark failing on slow arm builder -rm */tests/035.phpt # Known by upstream as failed test (travis result) rm */tests/041.phpt rm */tests/040*.phpt @@ -173,7 +172,7 @@ cd NTS TEST_PHP_EXECUTABLE=%{_bindir}/php \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ +REPORT_EXIT_STATUS=0 \ %{_bindir}/php -n run-tests.php --show-diff %if %{with_zts} @@ -187,7 +186,7 @@ cd ../ZTS TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ +REPORT_EXIT_STATUS=0 \ %{__ztsphp} -n run-tests.php --show-diff %endif @@ -216,6 +215,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Dec 20 2018 Remi Collet - 2.0.3-1 +- update to 2.0.3 + * Fri Jul 13 2018 Fedora Release Engineering - 2.0.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 82709d3..51ff50a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -02f7e109d438072c4b642b01cf78533e msgpack-2.0.2.tgz +SHA512 (msgpack-2.0.3.tgz) = 4eaf5d2cd50796349414d8272e210f1c8c2e82d72383f440e13d31742a75b0e2fa1f48bd916c057b4c65778bd90eace7dcc0cdb86931620963e666f3aa6905db