summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-16 08:30:09 +0200
committerRemi Collet <remi@php.net>2022-09-16 08:30:09 +0200
commit55aae11197e474d7b43287b72ea614370c9c98a5 (patch)
treeb7821da458a6898b94c44bfc1c9ba7ab0b77f5e3
parent3429775ff9b63de4d984daf812afd0416f9190a5 (diff)
update to 1.21.1
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-zip.spec15
-rw-r--r--zip-upstream.patch196
4 files changed, 11 insertions, 204 deletions
diff --git a/PHPINFO b/PHPINFO
index 4345309..492c809 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
zip
Zip => enabled
-Zip version => 1.21.0
+Zip version => 1.21.1
Libzip version => 1.9.2
BZIP2 compression => Yes
XZ compression => Yes
diff --git a/REFLECTION b/REFLECTION
index 3044070..9b1f3db 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #66 zip version 1.21.0 ] {
+Extension [ <persistent> extension #66 zip version 1.21.1 ] {
- Functions {
Function [ <internal, deprecated:zip> function zip_open ] {
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index 7919458..b73231b 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -24,7 +24,7 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name zip
-%global upstream_version 1.21.0
+%global upstream_version 1.21.1
#global upstream_prever dev
#global upstream_lower DEV
@@ -40,15 +40,13 @@
Summary: A ZIP archive management extension
Name: %{?scl_prefix}php-pecl-zip
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 5%{?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: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/zip
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-Patch0: %{pecl_name}-upstream.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -144,8 +142,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php7/php_zip.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}" -a "x${extver}" != "x%{upstream_version}-%{?upstream_prever}"; then
@@ -227,11 +223,13 @@ cd NTS
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: upstream test suite for NTS extension
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
TEST_PHP_EXECUTABLE=%{_bindir}/php \
%{_bindir}/php -n run-tests.php $OPT
+%endif
%if %{with_zts}
cd ../ZTS
@@ -240,12 +238,14 @@ cd ../ZTS
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: upstream test suite for ZTS extension
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
%{_bindir}/zts-php -n run-tests.php $OPT
%endif
+%endif
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
@@ -283,6 +283,9 @@ fi
%changelog
+* Fri Sep 16 2022 Remi Collet <remi@remirepo.net> - 1.21.1-1
+- update to 1.21.1
+
* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.21.0-5
- rebuild for PHP 8.2.0RC1
diff --git a/zip-upstream.patch b/zip-upstream.patch
deleted file mode 100644
index 8783350..0000000
--- a/zip-upstream.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From e8de7d2a4dbe91a80bb23642eaf07342503f691a Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 12 Jul 2022 14:37:51 +0200
-Subject: [PATCH 1/3] Support the actual `#[\SensitiveParameter]` attribute in
- stubs (for upcoming 8.2.0beta1)
-
----
- php81/php_zip.c | 3 ---
- php81/php_zip.stub.php | 9 +++------
- php81/php_zip_arginfo.h | 17 +++++++++++++----
- 3 files changed, 16 insertions(+), 13 deletions(-)
-
-diff --git a/php81/php_zip.c b/php81/php_zip.c
-index 0de9189..29a067d 100644
---- a/php81/php_zip.c
-+++ b/php81/php_zip.c
-@@ -29,9 +29,6 @@
- #include "zend_attributes.h"
- #include "zend_interfaces.h"
- #include "php_zip.h"
--#if PHP_VERSION_ID < 80200
--#define zend_mark_function_parameter_as_sensitive(a,b,c)
--#endif
- #include "php_zip_arginfo.h"
-
- #ifdef HAVE_GLOB
-diff --git a/php81/php_zip.stub.php b/php81/php_zip.stub.php
-index a0866e1..aa7d783 100644
---- a/php81/php_zip.stub.php
-+++ b/php81/php_zip.stub.php
-@@ -83,10 +83,9 @@ class ZipArchive implements Countable
- public function open(string $filename, int $flags = 0): bool|int {}
-
- /**
-- * @sensitive-param $password
- * @tentative-return-type
- */
-- public function setPassword(string $password): bool {}
-+ public function setPassword(#[\SensitiveParameter] string $password): bool {}
-
- /** @tentative-return-type */
- public function close(): bool {}
-@@ -227,16 +226,14 @@ class ZipArchive implements Countable
-
- #ifdef HAVE_ENCRYPTION
- /**
-- * @sensitive-param $password
- * @tentative-return-type
- */
-- public function setEncryptionName(string $name, int $method, ?string $password = null): bool {}
-+ public function setEncryptionName(string $name, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
-
- /**
-- * @sensitive-param $password
- * @tentative-return-type
- */
-- public function setEncryptionIndex(int $index, int $method, ?string $password = null): bool {}
-+ public function setEncryptionIndex(int $index, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
- #endif
-
- #ifdef HAVE_PROGRESS_CALLBACK
-diff --git a/php81/php_zip_arginfo.h b/php81/php_zip_arginfo.h
-index 6f00051..a3ec214 100644
---- a/php81/php_zip_arginfo.h
-+++ b/php81/php_zip_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: f8ec36ea62bfbdb74cfa6472227e08d9282413a2 */
-+ * Stub hash: 9c44d8bcf6b97804d539a9dd566d5faca60074ba */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
-@@ -530,12 +530,21 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
- zend_declare_typed_property(class_entry, property_comment_name, &property_comment_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
- zend_string_release(property_comment_name);
-
-- zend_mark_function_parameter_as_sensitive(&class_entry->function_table, "setpassword", 0);
-+
-+ zend_string *attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0, 0);
-+ zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0);
- #if defined(HAVE_ENCRYPTION)
-- zend_mark_function_parameter_as_sensitive(&class_entry->function_table, "setencryptionname", 2);
-+
-+ zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2, 0);
-+ zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2);
- #endif
- #if defined(HAVE_ENCRYPTION)
-- zend_mark_function_parameter_as_sensitive(&class_entry->function_table, "setencryptionindex", 2);
-+
-+ zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2, 0);
-+ zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2);
- #endif
-
- return class_entry;
---
-2.35.3
-
-From f94c6772a49e5d9860b0abffc32a56a0a33a6216 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 18 Jul 2022 12:32:56 +0200
-Subject: [PATCH 2/3] add SensitiveParameter as known string and use it in
- arginfo
-
----
- php81/php_zip_arginfo.h | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/php81/php_zip_arginfo.h b/php81/php_zip_arginfo.h
-index a3ec214..8fb3bb9 100644
---- a/php81/php_zip_arginfo.h
-+++ b/php81/php_zip_arginfo.h
-@@ -531,20 +531,14 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
- zend_string_release(property_comment_name);
-
-
-- zend_string *attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-- zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0, 0);
-- zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
- #if defined(HAVE_ENCRYPTION)
-
-- zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-- zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2, 0);
-- zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
- #endif
- #if defined(HAVE_ENCRYPTION)
-
-- zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2 = zend_string_init("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-- zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2, 0);
-- zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2);
-+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
- #endif
-
- return class_entry;
---
-2.35.3
-
-From cbaf00ce8f6f5165399d81ff345cc6cc6f8a75d7 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 20 Jul 2022 07:29:36 +0200
-Subject: [PATCH 3/3] compat for 8.1
-
----
- php81/php_zip.stub.php | 5 ++++-
- php81/php_zip_arginfo.h | 4 +++-
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/php81/php_zip.stub.php b/php81/php_zip.stub.php
-index aa7d783..bab802c 100644
---- a/php81/php_zip.stub.php
-+++ b/php81/php_zip.stub.php
-@@ -1,6 +1,9 @@
- <?php
-
--/** @generate-class-entries */
-+/**
-+ * @generate-class-entries
-+ * @generate-legacy-arginfo 80100
-+ */
-
- /**
- * @return resource|int|false
-diff --git a/php81/php_zip_arginfo.h b/php81/php_zip_arginfo.h
-index 8fb3bb9..da387d6 100644
---- a/php81/php_zip_arginfo.h
-+++ b/php81/php_zip_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: 9c44d8bcf6b97804d539a9dd566d5faca60074ba */
-+ * Stub hash: e077100efd41822053ca2e1ee6c62c764714e325 */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
-@@ -529,6 +529,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
- zend_string *property_comment_name = zend_string_init("comment", sizeof("comment") - 1, 1);
- zend_declare_typed_property(class_entry, property_comment_name, &property_comment_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
- zend_string_release(property_comment_name);
-+#if (PHP_VERSION_ID >= 80200)
-
-
- zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
-@@ -539,6 +540,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
- #if defined(HAVE_ENCRYPTION)
-
- zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
-+#endif
- #endif
-
- return class_entry;
---
-2.35.3
-