From eab68552edbcb1287e572466f4052236daa4ef62 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 7 Dec 2016 07:58:17 +0100 Subject: php-pecl-yaconf: 1.0.4 --- REFLECTION | 2 +- php-pecl-yaconf.spec | 11 +++--- yaconf-upstream.patch | 99 --------------------------------------------------- 3 files changed, 6 insertions(+), 106 deletions(-) delete mode 100644 yaconf-upstream.patch diff --git a/REFLECTION b/REFLECTION index bf0ddf4..cd9d66b 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #143 yaconf version 1.0.3 ] { +Extension [ extension #143 yaconf version 1.0.4 ] { - INI { Entry [ yaconf.directory ] diff --git a/php-pecl-yaconf.spec b/php-pecl-yaconf.spec index 8b5092f..6790abd 100644 --- a/php-pecl-yaconf.spec +++ b/php-pecl-yaconf.spec @@ -19,20 +19,18 @@ Summary: Yet Another Configurations Container Name: %{?scl_prefix}php-pecl-yaconf -Version: 1.0.3 +Version: 1.0.4 %if 0%{?gh_date:1} Release: 0.8.%{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}/%{gh_project}-%{version}-%{gh_short}.tar.gz %else -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;')}} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif License: PHP Group: Development/Languages URL: https://github.com/%{gh_owner}/%{gh_project} -Patch0: %{pecl_name}-upstream.patch - BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear @@ -95,8 +93,6 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS -%patch0 -p1 -b .upstream - # Sanity check, really often broken extver=$(sed -n '/#define PHP_YACONF_VERSION/{s/.* "//;s/".*$//;p}' php_yaconf.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -237,6 +233,9 @@ fi %changelog +* Wed Dec 7 2016 Remi Collet - 1.0.4-1 +- Update to 1.0.4 + * Thu Dec 1 2016 Remi Collet - 1.0.3-3 - add upstream patch to fix segfaults - re-enable ZTS extension diff --git a/yaconf-upstream.patch b/yaconf-upstream.patch deleted file mode 100644 index 8545c84..0000000 --- a/yaconf-upstream.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 950ed708b9da956025597c006a202ce1a0dc8b3f Mon Sep 17 00:00:00 2001 -From: Xinchen Hui -Date: Thu, 1 Dec 2016 18:13:33 +0800 -Subject: [PATCH] Fixed issue #20 (Segfault during test suite with 7.1.0GA - (TS)) - ---- - yaconf.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/yaconf.c b/yaconf.c -index f98ab30..4606eff 100644 ---- a/yaconf.c -+++ b/yaconf.c -@@ -527,7 +527,7 @@ PHP_MINIT_FUNCTION(yaconf) - ZVAL_UNDEF(&active_ini_file_section); - YACONF_G(parse_err) = 0; - php_yaconf_hash_init(&result, 128); -- if (zend_parse_ini_file(&fh, 0, 0 /* ZEND_INI_SCANNER_NORMAL */, -+ if (zend_parse_ini_file(&fh, 1, 0 /* ZEND_INI_SCANNER_NORMAL */, - php_yaconf_ini_parser_cb, (void *)&result) == FAILURE || YACONF_G(parse_err)) { - if (!YACONF_G(parse_err)) { - php_error(E_WARNING, "Parsing '%s' failed", ini_file); -@@ -622,12 +622,12 @@ PHP_RINIT_FUNCTION(yaconf) - ZVAL_UNDEF(&active_ini_file_section); - YACONF_G(parse_err) = 0; - php_yaconf_hash_init(&result, 128); -- if (zend_parse_ini_file(&fh, 0, 0 /* ZEND_INI_SCANNER_NORMAL */, -+ if (zend_parse_ini_file(&fh, 1, 0 /* ZEND_INI_SCANNER_NORMAL */, - php_yaconf_ini_parser_cb, (void *)&result) == FAILURE || YACONF_G(parse_err)) { -- YACONF_G(parse_err) = 0; - if (!YACONF_G(parse_err)) { - php_error(E_WARNING, "Parsing '%s' failed", ini_file); - } -+ YACONF_G(parse_err) = 0; - php_yaconf_hash_destroy(Z_ARRVAL(result)); - free(namelist[i]); - continue; -From 0ca4a280b6db9095f74f74fbd9edbae61017a22d Mon Sep 17 00:00:00 2001 -From: Xinchen Hui -Date: Thu, 1 Dec 2016 18:28:10 +0800 -Subject: [PATCH] Added test for issue #20 - ---- - tests/009.phpt | 11 +++++++++++ - tests/inis/err/err/a.ini | 1 + - yaconf.c | 6 ------ - 3 files changed, 12 insertions(+), 6 deletions(-) - create mode 100644 tests/009.phpt - create mode 100644 tests/inis/err/err/a.ini - -diff --git a/tests/009.phpt b/tests/009.phpt -new file mode 100644 -index 0000000..e689f71 ---- /dev/null -+++ b/tests/009.phpt -@@ -0,0 +1,11 @@ -+--TEST-- -+Check for INI errors -+--SKIPIF-- -+ -+--INI-- -+yaconf.directory={PWD}/inis/err/err -+--FILE-- -+ -+--EXPECTF-- -+PHP: syntax error, unexpected ')' in %sa.ini on line 1 -diff --git a/tests/inis/err/err/a.ini b/tests/inis/err/err/a.ini -new file mode 100644 -index 0000000..ffb9485 ---- /dev/null -+++ b/tests/inis/err/err/a.ini -@@ -0,0 +1 @@ -+skdjflksdjfkl.2)X(D)*_)(_ -diff --git a/yaconf.c b/yaconf.c -index 4606eff..c7c2eff 100644 ---- a/yaconf.c -+++ b/yaconf.c -@@ -529,9 +529,6 @@ PHP_MINIT_FUNCTION(yaconf) - php_yaconf_hash_init(&result, 128); - if (zend_parse_ini_file(&fh, 1, 0 /* ZEND_INI_SCANNER_NORMAL */, - php_yaconf_ini_parser_cb, (void *)&result) == FAILURE || YACONF_G(parse_err)) { -- if (!YACONF_G(parse_err)) { -- php_error(E_WARNING, "Parsing '%s' failed", ini_file); -- } - YACONF_G(parse_err) = 0; - php_yaconf_hash_destroy(Z_ARRVAL(result)); - free(namelist[i]); -@@ -624,9 +621,6 @@ PHP_RINIT_FUNCTION(yaconf) - php_yaconf_hash_init(&result, 128); - if (zend_parse_ini_file(&fh, 1, 0 /* ZEND_INI_SCANNER_NORMAL */, - php_yaconf_ini_parser_cb, (void *)&result) == FAILURE || YACONF_G(parse_err)) { -- if (!YACONF_G(parse_err)) { -- php_error(E_WARNING, "Parsing '%s' failed", ini_file); -- } - YACONF_G(parse_err) = 0; - php_yaconf_hash_destroy(Z_ARRVAL(result)); - free(namelist[i]); -- cgit