From 022f4fefbd0349af535f7e2c36317025cc0210cb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Mar 2023 08:02:32 +0100 Subject: update to 2.2.3 drop patch merged upstream --- PHPINFO | 2 +- REFLECTION | 2 +- php-pecl-yaml.spec | 38 ++++++--------- yaml-pr66.patch | 137 ---------------------------------------------------- yaml-upstream.patch | 22 --------- 5 files changed, 17 insertions(+), 184 deletions(-) delete mode 100644 yaml-pr66.patch delete mode 100644 yaml-upstream.patch diff --git a/PHPINFO b/PHPINFO index 005244c..ed141de 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,7 +2,7 @@ yaml LibYAML Support => enabled -Module Version => 2.2.2 +Module Version => 2.2.3 LibYAML Version => 0.2.5 Directive => Local Value => Master Value diff --git a/REFLECTION b/REFLECTION index 5adab13..37098b7 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #106 yaml version 2.2.2 ] { +Extension [ extension #106 yaml version 2.2.3 ] { - Dependencies { Dependency [ date (Optional) ] diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index 7db8acc..93b9e89 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-yaml # -# Copyright (c) 2012-2022 Remi Collet +# Copyright (c) 2012-2023 Remi Collet # Fedora spec file for php-pecl-yaml # @@ -10,29 +10,27 @@ # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-yaml %endif +%bcond_without tests + %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name yaml %global ini_name 40-%{pecl_name}.ini -%global upstream_version 2.2.2 +%global upstream_version 2.2.3 #global upstream_prever b2 Summary: PHP Bindings for yaml -Name: %{?sub_prefix}php-pecl-yaml +Name: %{?scl_prefix}php-pecl-yaml Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 3%{?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;')}} License: MIT URL: https://pecl.php.net/package/yaml Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -Patch0: %{pecl_name}-pr66.patch -Patch1: %{pecl_name}-upstream.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.1 @@ -47,12 +45,8 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php71u-pecl-%{pecl_name} <= %{version} @@ -65,12 +59,6 @@ Obsoletes: php73-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} %endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif %endif @@ -93,9 +81,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr66 -%patch1 -p1 -b .up - # Check upstream version (often broken) extver=$(sed -n '/#define PHP_YAML_VERSION/{s/.* "//;s/".*$//;p}' php_yaml.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -184,10 +169,12 @@ cd NTS --define extension=modules/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -q -P --show-diff +%endif %if %{with_zts} cd ../ZTS @@ -196,11 +183,12 @@ cd ../ZTS --define extension=modules/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php -q -P --show-diff - +%endif %endif @@ -239,6 +227,10 @@ fi %changelog +* Mon Mar 6 2023 Remi Collet - 2.2.3-1 +- update to 2.2.3 +- drop patch merged upstream + * Fri Sep 9 2022 Remi Collet - 2.2.2-3 - add upstream patch for test suite with PHP 8.2 diff --git a/yaml-pr66.patch b/yaml-pr66.patch deleted file mode 100644 index 94e9c9e..0000000 --- a/yaml-pr66.patch +++ /dev/null @@ -1,137 +0,0 @@ -From b3ba97abde6c503a305631649e8be01320078fb1 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 22 Feb 2022 11:57:38 +0100 -Subject: [PATCH 1/2] Fix #65 yaml_parse_url method not working - ---- - yaml.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/yaml.c b/yaml.c -index e06b145..4ca2cfe 100644 ---- a/yaml.c -+++ b/yaml.c -@@ -476,7 +476,6 @@ PHP_FUNCTION(yaml_parse_url) - - php_stream *stream = { 0 }; - zend_string *input; -- size_t size = 0; - - parser_state_t state; - zval yaml; -@@ -516,7 +515,7 @@ PHP_FUNCTION(yaml_parse_url) - } - - yaml_parser_initialize(&state.parser); -- yaml_parser_set_input_string(&state.parser, (unsigned char *)input, size); -+ yaml_parser_set_input_string(&state.parser, (unsigned char *)ZSTR_VAL(input), ZSTR_LEN(input)); - - if (pos < 0) { - php_yaml_read_all(&state, &ndocs, &yaml); - -From 2cd4463594345a8c844a86c33e3539f5a44f3156 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 22 Feb 2022 12:03:54 +0100 -Subject: [PATCH 2/2] add test for #65 - ---- - package.xml | 1 + - tests/yaml_parse_url_001.phpt | 89 +++++++++++++++++++++++++++++++++++ - 2 files changed, 90 insertions(+) - create mode 100644 tests/yaml_parse_url_001.phpt - -diff --git a/tests/yaml_parse_url_001.phpt b/tests/yaml_parse_url_001.phpt -new file mode 100644 -index 0000000..7c5efc4 ---- /dev/null -+++ b/tests/yaml_parse_url_001.phpt -@@ -0,0 +1,89 @@ -+--TEST-- -+yaml_parse_url - general -+--SKIPIF-- -+ -+--INI-- -+yaml.decode_timestamp=1 -+date.timezone=GMT -+--FILE-- -+ -+--EXPECT-- -+array(8) { -+ ["invoice"]=> -+ int(34843) -+ ["date"]=> -+ int(980208000) -+ ["bill-to"]=> -+ &array(3) { -+ ["given"]=> -+ string(5) "Chris" -+ ["family"]=> -+ string(6) "Dumars" -+ ["address"]=> -+ array(4) { -+ ["lines"]=> -+ string(27) "458 Walkman Dr. -+Suite #292 -+" -+ ["city"]=> -+ string(9) "Royal Oak" -+ ["state"]=> -+ string(2) "MI" -+ ["postal"]=> -+ int(48046) -+ } -+ } -+ ["ship-to"]=> -+ &array(3) { -+ ["given"]=> -+ string(5) "Chris" -+ ["family"]=> -+ string(6) "Dumars" -+ ["address"]=> -+ array(4) { -+ ["lines"]=> -+ string(27) "458 Walkman Dr. -+Suite #292 -+" -+ ["city"]=> -+ string(9) "Royal Oak" -+ ["state"]=> -+ string(2) "MI" -+ ["postal"]=> -+ int(48046) -+ } -+ } -+ ["product"]=> -+ array(2) { -+ [0]=> -+ array(4) { -+ ["sku"]=> -+ string(6) "BL394D" -+ ["quantity"]=> -+ int(4) -+ ["description"]=> -+ string(10) "Basketball" -+ ["price"]=> -+ float(450) -+ } -+ [1]=> -+ array(4) { -+ ["sku"]=> -+ string(7) "BL4438H" -+ ["quantity"]=> -+ int(1) -+ ["description"]=> -+ string(10) "Super Hoop" -+ ["price"]=> -+ float(2392) -+ } -+ } -+ ["tax"]=> -+ float(251.42) -+ ["total"]=> -+ float(4443.52) -+ ["comments"]=> -+ string(68) "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338." -+} diff --git a/yaml-upstream.patch b/yaml-upstream.patch deleted file mode 100644 index 9457a57..0000000 --- a/yaml-upstream.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 534124b8227d26e0e914dabb05425ddc160d9f31 Mon Sep 17 00:00:00 2001 -From: Andy Postnikov -Date: Fri, 10 Jun 2022 12:42:20 +0300 -Subject: [PATCH] Fix test for PHP 8.2 - ---- - tests/bug_79866.phpt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/bug_79866.phpt b/tests/bug_79866.phpt -index 8d8d62f..2189b90 100644 ---- a/tests/bug_79866.phpt -+++ b/tests/bug_79866.phpt -@@ -35,7 +35,7 @@ foreach( $floats as $idx => $float ) { - $expect = "--- {$native}\n...\n"; - $got = yaml_emit($float); - if ( $got !== $expect ) { -- echo "== FAIL! ${idx} ==\n"; -+ echo "== FAIL! {$idx} ==\n"; - echo "expected:\n{$expect}\n"; - echo "got:{$got}\n"; - } -- cgit