From 0fd1a18e85baa301ddf0a577a7e79f1feb685140 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Mar 2017 12:28:13 +0200 Subject: add upstream patch to fix FTBFS with 7.1.4RC1, reported by Koschei --- f220c0400bd1875879da58788187774a04430ecb.patch | 68 ++++++++++++++++++++++++++ php-pecl-yaml.spec | 9 +++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 f220c0400bd1875879da58788187774a04430ecb.patch diff --git a/f220c0400bd1875879da58788187774a04430ecb.patch b/f220c0400bd1875879da58788187774a04430ecb.patch new file mode 100644 index 0000000..7e93b43 --- /dev/null +++ b/f220c0400bd1875879da58788187774a04430ecb.patch @@ -0,0 +1,68 @@ +From f220c0400bd1875879da58788187774a04430ecb Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 29 Mar 2017 10:45:07 +0200 +Subject: [PATCH] relax test to pass with 7.1.4RC1 + +--- + tests/yaml_parse_003.phpt | 4 ++-- + tests/yaml_parse_004.phpt | 2 +- + tests/yaml_parse_006.phpt | 8 ++++---- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/yaml_parse_003.phpt b/tests/yaml_parse_003.phpt +index a7197ce..5ffab2c 100644 +--- a/tests/yaml_parse_003.phpt ++++ b/tests/yaml_parse_003.phpt +@@ -12,8 +12,8 @@ grave-accent: `text + ')); + ?> + --EXPECTF-- +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 16), context while scanning for the next token (line 2, column 16) in %syaml_parse_003.php on line 4 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 16), context while scanning for the next token (line 2, column 16) in %syaml_parse_003.php on line %d + bool(false) + +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 15), context while scanning for the next token (line 2, column 15) in %syaml_parse_003.php on line 7 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 15), context while scanning for the next token (line 2, column 15) in %syaml_parse_003.php on line %d + bool(false) +diff --git a/tests/yaml_parse_004.phpt b/tests/yaml_parse_004.phpt +index ea7c08f..5c97721 100644 +--- a/tests/yaml_parse_004.phpt ++++ b/tests/yaml_parse_004.phpt +@@ -16,5 +16,5 @@ reference: *broken_pointer_to_define + ')); + ?> + --EXPECTF-- +-Warning: yaml_parse(): alias broken_pointer_to_define is not registered (line 6, column 37) in %syaml_parse_004.php on line 8 ++Warning: yaml_parse(): alias broken_pointer_to_define is not registered (line 6, column 37) in %syaml_parse_004.php on line %d + bool(false) +diff --git a/tests/yaml_parse_006.phpt b/tests/yaml_parse_006.phpt +index dc24955..f82d58c 100644 +--- a/tests/yaml_parse_006.phpt ++++ b/tests/yaml_parse_006.phpt +@@ -33,10 +33,10 @@ var_dump(yaml_parse('--- + ')); + ?> + --EXPECTF-- +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 1), context while scanning for the next token (line 2, column 1) in %syaml_parse_006.php on line 5 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 1), context while scanning for the next token (line 2, column 1) in %syaml_parse_006.php on line %d + bool(false) + +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 3), context while scanning for the next token (line 2, column 3) in %syaml_parse_006.php on line 9 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 3), context while scanning for the next token (line 2, column 3) in %syaml_parse_006.php on line %d + bool(false) + array(1) { + ["key"]=> +@@ -47,8 +47,8 @@ array(1) { + string(26) "space and tab before value" + } + +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 2), context while scanning for the next token (line 2, column 2) in %syaml_parse_006.php on line 21 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 2), context while scanning for the next token (line 2, column 2) in %syaml_parse_006.php on line %d + bool(false) + +-Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 4), context while scanning for the next token (line 2, column 4) in %syaml_parse_006.php on line 25 ++Warning: yaml_parse(): scanning error encountered during parsing: found character that cannot start any token (line 2, column 4), context while scanning for the next token (line 2, column 4) in %syaml_parse_006.php on line %d + bool(false) +-- +2.1.4 + diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index b498b05..a51a71d 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -22,13 +22,15 @@ Summary: PHP Bindings for yaml Name: %{?sub_prefix}php-pecl-yaml Version: 2.0.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT Group: Development/Languages URL: http://pecl.php.net/package/yaml Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Patch0: f220c0400bd1875879da58788187774a04430ecb.patch + BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-pear BuildRequires: libyaml-devel @@ -90,6 +92,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .upstream + # Check upstream version (often broken) extver=$(sed -n '/#define PHP_YAML_VERSION/{s/.* "//;s/".*$//;p}' php_yaml.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -234,6 +238,9 @@ fi %changelog +* Wed Mar 29 2017 Remi Collet - 2.0.0-3 +- add upstream patch to fix FTBFS with 7.1.4RC1, reported by Koschei + * Thu Dec 1 2016 Remi Collet - 2.0.0-2 - rebuild with PHP 7.1.0 GA -- cgit