diff options
-rw-r--r-- | 24.patch | 83 | ||||
-rw-r--r-- | PHPINFO | 4 | ||||
-rw-r--r-- | REFLECTION | 6 | ||||
-rw-r--r-- | php-zstd.spec | 20 |
4 files changed, 15 insertions, 98 deletions
diff --git a/24.patch b/24.patch deleted file mode 100644 index 3ae7dfe..0000000 --- a/24.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 479c32d63619e3164f3a49bca856eed0c7cef333 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 23 Jul 2019 16:52:30 +0200 -Subject: [PATCH 1/2] fix for stream changes in 7.4.0beta1 - ---- - zstd.c | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/zstd.c b/zstd.c -index 46bfc8e..8319abb 100644 ---- a/zstd.c -+++ b/zstd.c -@@ -488,9 +488,16 @@ static int php_zstd_comp_close(php_stream *stream, int close_handle TSRMLS_DC) - } - - -+#if PHP_VERSION_ID < 70400 - static size_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) - { -- size_t x, res, ret = 0; -+ size_t ret = 0; -+#else -+static ssize_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) -+{ -+ ssize_t ret = 0; -+#endif -+ size_t x, res; - STREAM_DATA_FROM_STREAM(); - - while (count > 0) { -@@ -536,9 +543,16 @@ static size_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count T - } - - -+#if PHP_VERSION_ID < 70400 - static size_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) - { -- size_t res, x, ret = 0; -+ size_t ret = 0; -+#else -+static ssize_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) -+{ -+ ssize_t ret = 0; -+#endif -+ size_t x, res; - - STREAM_DATA_FROM_STREAM(); - - -From 419542ad635c0aa8fdfc5f49ea6c2ae1ea815220 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 23 Jul 2019 16:58:39 +0200 -Subject: [PATCH 2/2] report error to PHP stream wrapper - ---- - zstd.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/zstd.c b/zstd.c -index 8319abb..b8f851e 100644 ---- a/zstd.c -+++ b/zstd.c -@@ -525,6 +525,9 @@ static ssize_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count - res = ZSTD_decompressStream(self->dctx, &self->output , &self->input); - if (ZSTD_isError(res)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "libzstd error %s\n", ZSTD_getErrorName(res)); -+#if PHP_VERSION_ID >= 70400 -+ return -1; -+#endif - } - /* for us */ - self->output.size = self->output.pos; -@@ -586,6 +589,9 @@ static ssize_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t c - #endif - if (ZSTD_isError(res)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "libzstd error %s\n", ZSTD_getErrorName(res)); -+#if PHP_VERSION_ID >= 70400 -+ return -1; -+#endif - } - php_stream_write(self->stream, self->bufout, self->output.pos); - } while (self->input.pos != self->input.size); @@ -2,5 +2,5 @@ zstd Zstd support => enabled -Extension Version => 0.7.3 -Interface Version => 1.4.0 +Extension Version => 0.7.4 +Interface Version => 1.4.3 @@ -1,11 +1,11 @@ -Extension [ <persistent> extension #188 zstd version 0.7.3 ] { +Extension [ <persistent> extension #184 zstd version 0.7.4 ] { - Constants [5] { Constant [ integer ZSTD_COMPRESS_LEVEL_MIN ] { 1 } Constant [ integer ZSTD_COMPRESS_LEVEL_MAX ] { 22 } Constant [ integer ZSTD_COMPRESS_LEVEL_DEFAULT ] { 3 } - Constant [ integer LIBZSTD_VERSION_NUMBER ] { 10400 } - Constant [ string LIBZSTD_VERSION_STRING ] { 1.4.0 } + Constant [ integer LIBZSTD_VERSION_NUMBER ] { 10403 } + Constant [ string LIBZSTD_VERSION_STRING ] { 1.4.3 } } - Functions { diff --git a/php-zstd.spec b/php-zstd.spec index 768dff1..dd0671a 100644 --- a/php-zstd.spec +++ b/php-zstd.spec @@ -17,14 +17,14 @@ %global pkg_name %{name} %endif -%if 0%{?fedora} >= 28 || 0%{?rhel} >= 6 +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 %global with_libzstd 1 %else %global with_libzstd 0 %endif -%global zstdver 1.4.0 +%global zstdver 1.4.3 -%global gh_commit d4fa116c59d7fd31c2fb242b0ad8ad02bdeccd67 +%global gh_commit 43a3b41081a3ecf50c6e2ac7bbee9d388de8c1b8 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner kjdev %global gh_project php-ext-zstd @@ -36,11 +36,11 @@ Summary: Zstd Extension for PHP Name: %{?sub_prefix}php-%{pecl_name} -Version: 0.7.3 +Version: 0.7.4 %if 0%{?gh_date:1} -Release: 2%{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 %if %{?with_libzstd} License: MIT @@ -53,8 +53,6 @@ Source0: %{pkg_name}-%{version}-%{gh_short}.tgz # retrieve a recursive git snapshot with submodule Source1: makesrc.sh -Patch0: https://patch-diff.githubusercontent.com/raw/kjdev/php-ext-zstd/pull/24.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel %if %{?with_libzstd} @@ -116,8 +114,6 @@ These are the files needed to compile programs using %{name}. mv %{gh_project}-%{gh_commit} NTS cd NTS -%patch0 -p1 - # replace symlink rm LICENSE-zstd mv zstd/LICENSE LICENSE-libzstd @@ -251,6 +247,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ %changelog +* Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 0.7.4-1 +- update to 0.7.4 with bundled libzstd 1.4.3 +- drop patch merged upstream + * Wed Jul 24 2019 Remi Collet <remi@remirepo.net> - 0.7.3-4 - add patch for 7.4.0beta1 from https://github.com/kjdev/php-ext-zstd/pull/24 |