diff options
author | Remi Collet <remi@remirepo.net> | 2020-10-02 07:43:18 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-10-02 07:43:18 +0200 |
commit | 9b1b7e9bcc8043d512f0fe24bae4d6d0236277fa (patch) | |
tree | d2df0eba137f5f2f006bb0a948e1aa0b5c4af62f | |
parent | f922bdd772021397bb270b345181ff18c440cd0c (diff) |
update to 0.3.7
drop patch merged upstream
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 26.patch | 50 | ||||
-rw-r--r-- | 9f78918579daa110baa7aa70eaa969ba1c23725d.patch | 24 | ||||
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 8 | ||||
-rw-r--r-- | ef4f39b2149765cac1f9a7bc5a360e09e9e506e6.patch | 201 | ||||
-rw-r--r-- | php-lz4.spec | 20 |
7 files changed, 15 insertions, 292 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/26.patch b/26.patch deleted file mode 100644 index e6a7553..0000000 --- a/26.patch +++ /dev/null @@ -1,50 +0,0 @@ -From ffa7fd32ebd7e64a69868cae3ae1059ef33790ab Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 22 Sep 2020 15:38:38 +0200 -Subject: [PATCH] parameter => argument in 8.0.0beta4 - ---- - tests/002_b.phpt | 4 ++-- - tests/005_b.phpt | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/002_b.phpt b/tests/002_b.phpt -index a56dac8..a2dc434 100644 ---- a/tests/002_b.phpt -+++ b/tests/002_b.phpt -@@ -50,13 +50,13 @@ try { - *** Testing lz4_compress() : error conditions *** - - -- Testing lz4_compress() function with Zero arguments -- --ArgumentCountError: lz4_compress() expects at least 1 parameter, 0 given in %s:%d -+ArgumentCountError: lz4_compress() expects at least 1 argument, 0 given in %s:%d - Stack trace: - #0 %s(%d): lz4_compress() - #1 {main} - - -- Testing lz4_compress() function with more than expected no. of arguments -- --ArgumentCountError: lz4_compress() expects at most 3 parameters, 4 given in %s:%d -+ArgumentCountError: lz4_compress() expects at most 3 arguments, 4 given in %s:%d - Stack trace: - #0 %s(%d): lz4_compress(%s) - #1 {main} -diff --git a/tests/005_b.phpt b/tests/005_b.phpt -index afb5158..c212d24 100644 ---- a/tests/005_b.phpt -+++ b/tests/005_b.phpt -@@ -57,13 +57,13 @@ try { - *** Testing lz4_uncompress() : error conditions *** - - -- Testing lz4_uncompress() function with Zero arguments -- --ArgumentCountError: lz4_uncompress() expects at least 1 parameter, 0 given in %s:%d -+ArgumentCountError: lz4_uncompress() expects at least 1 argument, 0 given in %s:%d - Stack trace: - #0 %s(%d): lz4_uncompress() - #1 {main} - - -- Testing lz4_uncompress() function with more than expected no. of arguments -- --ArgumentCountError: lz4_uncompress() expects at most 3 parameters, 4 given in %s:%d -+ArgumentCountError: lz4_uncompress() expects at most 3 arguments, 4 given in %s:%d - Stack trace: - #0 %s(%d): lz4_uncompress(%s) - #1 {main} diff --git a/9f78918579daa110baa7aa70eaa969ba1c23725d.patch b/9f78918579daa110baa7aa70eaa969ba1c23725d.patch deleted file mode 100644 index 168b6ad..0000000 --- a/9f78918579daa110baa7aa70eaa969ba1c23725d.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9f78918579daa110baa7aa70eaa969ba1c23725d Mon Sep 17 00:00:00 2001 -From: kj <kjclev@gmail.com> -Date: Tue, 27 Aug 2019 08:32:40 +0900 -Subject: [PATCH] Fixed for parameter arguments in nightly - ---- - php_lz4.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/php_lz4.h b/php_lz4.h -index 000582b..8786614 100644 ---- a/php_lz4.h -+++ b/php_lz4.h -@@ -47,4 +47,10 @@ extern zend_module_entry lz4_module_entry; - #define LZ4_G(v) (lz4_globals.v) - #endif - -+#if ZEND_MODULE_API_NO >= 20190128 -+#ifndef TSRMLS_CC -+#define TSRMLS_CC -+#endif -+#endif -+ - #endif /* PHP_LZ4_H */ @@ -2,5 +2,5 @@ lz4 LZ4 support => enabled -Extension Version => 0.3.6 +Extension Version => 0.3.7 LZ4 Version => 1.9.2 @@ -1,9 +1,9 @@ -Extension [ <persistent> extension #114 lz4 version 0.3.6 ] { +Extension [ <persistent> extension #82 lz4 version 0.3.7 ] { - Constants [3] { - Constant [ integer LZ4_CLEVEL_MIN ] { 3 } - Constant [ integer LZ4_CLEVEL_MAX ] { 12 } - Constant [ integer LZ4_VERSION ] { 10902 } + Constant [ int LZ4_CLEVEL_MIN ] { 3 } + Constant [ int LZ4_CLEVEL_MAX ] { 12 } + Constant [ int LZ4_VERSION ] { 10902 } } - Functions { diff --git a/ef4f39b2149765cac1f9a7bc5a360e09e9e506e6.patch b/ef4f39b2149765cac1f9a7bc5a360e09e9e506e6.patch deleted file mode 100644 index cba330d..0000000 --- a/ef4f39b2149765cac1f9a7bc5a360e09e9e506e6.patch +++ /dev/null @@ -1,201 +0,0 @@ -From ef4f39b2149765cac1f9a7bc5a360e09e9e506e6 Mon Sep 17 00:00:00 2001 -From: kj <kjclev@gmail.com> -Date: Tue, 27 Aug 2019 08:49:35 +0900 -Subject: [PATCH] Fixed for tests in nightly - ---- - tests/002.phpt | 4 ++- - tests/002_b.phpt | 68 +++++++++++++++++++++++++++++++++++++++++ - tests/005.phpt | 2 ++ - tests/005_b.phpt | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 151 insertions(+), 1 deletion(-) - create mode 100644 tests/002_b.phpt - create mode 100644 tests/005_b.phpt - -diff --git a/tests/002.phpt b/tests/002.phpt -index 5e1f519..adf8509 100644 ---- a/tests/002.phpt -+++ b/tests/002.phpt -@@ -1,8 +1,10 @@ - --TEST-- - Test lz4_compress() function : error conditions - --SKIPIF-- -+<?php -+if (version_compare(PHP_VERSION, '8.0', '>=')) die('skip PHP is too old'); - --FILE-- --<?php -+<?php - if (!extension_loaded('lz4')) { - dl('lz4.' . PHP_SHLIB_SUFFIX); - } -diff --git a/tests/002_b.phpt b/tests/002_b.phpt -new file mode 100644 -index 0000000..a56dac8 ---- /dev/null -+++ b/tests/002_b.phpt -@@ -0,0 +1,68 @@ -+--TEST-- -+Test lz4_compress() function : error conditions -+--SKIPIF-- -+<?php -+if (version_compare(PHP_VERSION, '8.0', '<')) die('skip PHP is too new'); -+--FILE-- -+<?php -+if (!extension_loaded('lz4')) { -+ dl('lz4.' . PHP_SHLIB_SUFFIX); -+} -+ -+include(dirname(__FILE__) . '/data.inc'); -+ -+echo "*** Testing lz4_compress() : error conditions ***\n"; -+ -+// Zero arguments -+echo "\n-- Testing lz4_compress() function with Zero arguments --\n"; -+try { -+ var_dump(lz4_compress()); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+ -+//Test lz4_compress with one more than the expected number of arguments -+echo "\n-- Testing lz4_compress() function with more than expected no. of arguments --\n"; -+$data = 'string_val'; -+$extra_arg = 10; -+try { -+ var_dump(lz4_compress($data, 6, false, $extra_arg)); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+ -+class Tester { -+ function Hello() { -+ echo "Hello\n"; -+ } -+} -+ -+echo "\n-- Testing with incorrect parameters --\n"; -+$testclass = new Tester(); -+try { -+ var_dump(lz4_compress($testclass)); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+?> -+===Done=== -+--EXPECTF-- -+*** Testing lz4_compress() : error conditions *** -+ -+-- Testing lz4_compress() function with Zero arguments -- -+ArgumentCountError: lz4_compress() expects at least 1 parameter, 0 given in %s:%d -+Stack trace: -+#0 %s(%d): lz4_compress() -+#1 {main} -+ -+-- Testing lz4_compress() function with more than expected no. of arguments -- -+ArgumentCountError: lz4_compress() expects at most 3 parameters, 4 given in %s:%d -+Stack trace: -+#0 %s(%d): lz4_compress(%s) -+#1 {main} -+ -+-- Testing with incorrect parameters -- -+ -+Warning: lz4_compress : expects parameter to be string. in %s on line %d -+bool(false) -+===Done=== -diff --git a/tests/005.phpt b/tests/005.phpt -index 19add34..6133d83 100644 ---- a/tests/005.phpt -+++ b/tests/005.phpt -@@ -1,6 +1,8 @@ - --TEST-- - Test lz4_uncompress() function : error conditions - --SKIPIF-- -+<?php -+if (version_compare(PHP_VERSION, '8.0', '>=')) die('skip PHP is too old'); - --FILE-- - <?php - if (!extension_loaded('lz4')) { -diff --git a/tests/005_b.phpt b/tests/005_b.phpt -new file mode 100644 -index 0000000..afb5158 ---- /dev/null -+++ b/tests/005_b.phpt -@@ -0,0 +1,78 @@ -+--TEST-- -+Test lz4_uncompress() function : error conditions -+--SKIPIF-- -+<?php -+if (version_compare(PHP_VERSION, '8.0', '<')) die('skip PHP is too new'); -+--FILE-- -+<?php -+if (!extension_loaded('lz4')) { -+ dl('lz4.' . PHP_SHLIB_SUFFIX); -+} -+ -+echo "*** Testing lz4_uncompress() : error conditions ***\n"; -+ -+// Zero arguments -+echo "\n-- Testing lz4_uncompress() function with Zero arguments --\n"; -+try { -+ var_dump( lz4_uncompress() ); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+ -+//Test lz4_uncompress with one more than the expected number of arguments -+echo "\n-- Testing lz4_uncompress() function with more than expected no. of arguments --\n"; -+$data = 'string_val'; -+$extra_arg = 10; -+try { -+ var_dump( lz4_uncompress($data, -1, -1, $extra_arg) ); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+ -+ -+echo "\n-- Testing with incorrect arguments --\n"; -+try { -+ var_dump(lz4_uncompress(123)); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+ -+class Tester -+{ -+ function Hello() -+ { -+ echo "Hello\n"; -+ } -+} -+ -+$testclass = new Tester(); -+try { -+ var_dump(lz4_uncompress($testclass)); -+} catch (Error $e) { -+ echo $e, PHP_EOL; -+} -+?> -+===DONE=== -+--EXPECTF-- -+*** Testing lz4_uncompress() : error conditions *** -+ -+-- Testing lz4_uncompress() function with Zero arguments -- -+ArgumentCountError: lz4_uncompress() expects at least 1 parameter, 0 given in %s:%d -+Stack trace: -+#0 %s(%d): lz4_uncompress() -+#1 {main} -+ -+-- Testing lz4_uncompress() function with more than expected no. of arguments -- -+ArgumentCountError: lz4_uncompress() expects at most 3 parameters, 4 given in %s:%d -+Stack trace: -+#0 %s(%d): lz4_uncompress(%s) -+#1 {main} -+ -+-- Testing with incorrect arguments -- -+ -+Warning: lz4_uncompress : expects parameter to be string. in %s on line %d -+bool(false) -+ -+Warning: lz4_uncompress : expects parameter to be string. in %s on line %d -+bool(false) -+===DONE=== diff --git a/php-lz4.spec b/php-lz4.spec index 0748ff6..856900c 100644 --- a/php-lz4.spec +++ b/php-lz4.spec @@ -19,7 +19,7 @@ %global with_liblz4 0 %endif -%global gh_commit 3daf64b7981416115ecc0a94d9b43d8290e2ce14 +%global gh_commit eba37043ec2bbceabb4134e46ef301f10827d3d7 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner kjdev %global gh_project php-ext-lz4 @@ -30,11 +30,11 @@ Summary: LZ4 Extension for PHP Name: %{?sub_prefix}php-lz4 -Version: 0.3.6 +Version: 0.3.7 %if 0%{?gh_date:1} -Release: 3%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 4%{?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;')}} %endif License: MIT Group: Development/Languages @@ -43,10 +43,6 @@ Source0: %{pkg_name}-%{version}-%{gh_short}.tgz # retrieve a recursive git snapshot with submodule Source1: makesrc.sh -Patch0: https://github.com/kjdev/php-ext-lz4/commit/9f78918579daa110baa7aa70eaa969ba1c23725d.patch -Patch1: https://github.com/kjdev/php-ext-lz4/commit/ef4f39b2149765cac1f9a7bc5a360e09e9e506e6.patch -Patch2: https://patch-diff.githubusercontent.com/raw/kjdev/php-ext-lz4/pull/26.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel %if %{?with_liblz4} @@ -89,10 +85,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{gh_project}-%{gh_commit} NTS cd NTS -%patch0 -p1 -b .up0 -%patch1 -p1 -b .up1 -%patch2 -p1 -b .pr26 - %if %{?with_liblz4} # Use the system library rm -r lz4 @@ -207,6 +199,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Oct 2 2020 Remi Collet <remi@remirepo.net> - 0.3.7-1 +- update to 0.3.7 +- drop patch merged upstream + * Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 0.3.6-4 - rebuild for PHP 8.0.0RC1 |