diff options
-rw-r--r-- | PHPINFO | 4 | ||||
-rw-r--r-- | REFLECTION | 95 | ||||
-rw-r--r-- | php-pecl-zip.spec | 113 | ||||
-rw-r--r-- | zip-upstream.patch | 196 |
4 files changed, 152 insertions, 256 deletions
@@ -2,8 +2,8 @@ zip Zip => enabled -Zip version => 1.21.0 -Libzip version => 1.9.2 +Zip version => 1.22.3 +Libzip version => 1.10.1 BZIP2 compression => Yes XZ compression => Yes ZSTD compression => Yes @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #66 zip version 1.21.0 ] { +Extension [ <persistent> extension #66 zip version 1.22.3 ] { - Functions { Function [ <internal, deprecated:zip> function zip_open ] { @@ -77,7 +77,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Classes [1] { Class [ <internal:zip> class ZipArchive implements Countable ] { - - Constants [100] { + - Constants [109] { Constant [ public int CREATE ] { 1 } Constant [ public int EXCL ] { 2 } Constant [ public int CHECKCONS ] { 4 } @@ -97,6 +97,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Constant [ public int FL_ENC_STRICT ] { 128 } Constant [ public int FL_ENC_UTF_8 ] { 2048 } Constant [ public int FL_ENC_CP437 ] { 4096 } + Constant [ public int FL_OPEN_FILE_NOW ] { 1073741824 } Constant [ public int CM_DEFAULT ] { -1 } Constant [ public int CM_STORE ] { 0 } Constant [ public int CM_SHRINK ] { 1 } @@ -150,6 +151,12 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Constant [ public int ER_TELL ] { 30 } Constant [ public int ER_COMPRESSED_DATA ] { 31 } Constant [ public int ER_CANCELLED ] { 32 } + Constant [ public int ER_DATA_LENGTH ] { 33 } + Constant [ public int ER_NOT_ALLOWED ] { 34 } + Constant [ public int AFL_RDONLY ] { 2 } + Constant [ public int AFL_IS_TORRENTZIP ] { 4 } + Constant [ public int AFL_WANT_TORRENTZIP ] { 8 } + Constant [ public int AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE ] { 16 } Constant [ public int OPSYS_DOS ] { 0 } Constant [ public int OPSYS_AMIGA ] { 1 } Constant [ public int OPSYS_OPENVMS ] { 2 } @@ -177,7 +184,9 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Constant [ public int EM_AES_192 ] { 258 } Constant [ public int EM_AES_256 ] { 259 } Constant [ public int EM_UNKNOWN ] { 65535 } - Constant [ public string LIBZIP_VERSION ] { 1.9.2 } + Constant [ public string LIBZIP_VERSION ] { 1.10.1 } + Constant [ public int LENGTH_TO_END ] { 0 } + Constant [ public int LENGTH_UNCHECKED ] { -2 } } - Static properties [0] { @@ -204,21 +213,22 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { } - Properties [6] { - Property [ public $lastId = NULL ] - Property [ public $status = NULL ] - Property [ public $statusSys = NULL ] - Property [ public $numFiles = NULL ] - Property [ public $filename = NULL ] - Property [ public $comment = NULL ] + Property [ public int $lastId ] + Property [ public int $status ] + Property [ public int $statusSys ] + Property [ public int $numFiles ] + Property [ public string $filename ] + Property [ public string $comment ] } - - Methods [48] { + - Methods [50] { Method [ <internal:zip> public method open ] { - Parameters [2] { Parameter #0 [ <required> string $filename ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ int|bool ] } Method [ <internal:zip> public method setPassword ] { @@ -226,24 +236,28 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> string $password ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method close ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip, prototype Countable> public method count ] { - Parameters [0] { } + - Tentative return [ int ] } Method [ <internal:zip> public method getStatusString ] { - Parameters [0] { } + - Tentative return [ string ] } Method [ <internal:zip> public method clearError ] { @@ -259,6 +273,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $dirname ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method addFromString ] { @@ -268,6 +283,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> string $content ] Parameter #2 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method addFile ] { @@ -276,9 +292,10 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $filepath ] Parameter #1 [ <optional> string $entryname = "" ] Parameter #2 [ <optional> int $start = 0 ] - Parameter #3 [ <optional> int $length = 0 ] + Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ] Parameter #4 [ <optional> int $flags = ZipArchive::FL_OVERWRITE ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method replaceFile ] { @@ -287,9 +304,10 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $filepath ] Parameter #1 [ <required> int $index ] Parameter #2 [ <optional> int $start = 0 ] - Parameter #3 [ <optional> int $length = 0 ] + Parameter #3 [ <optional> int $length = ZipArchive::LENGTH_TO_END ] Parameter #4 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method addGlob ] { @@ -299,6 +317,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <optional> int $flags = 0 ] Parameter #2 [ <optional> array $options = [] ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method addPattern ] { @@ -308,6 +327,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <optional> string $path = "." ] Parameter #2 [ <optional> array $options = [] ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method renameIndex ] { @@ -316,6 +336,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> int $index ] Parameter #1 [ <required> string $new_name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method renameName ] { @@ -324,6 +345,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $name ] Parameter #1 [ <required> string $new_name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setArchiveComment ] { @@ -331,6 +353,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> string $comment ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getArchiveComment ] { @@ -338,6 +361,25 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] + } + + Method [ <internal:zip> public method setArchiveFlag ] { + + - Parameters [2] { + Parameter #0 [ <required> int $flag ] + Parameter #1 [ <required> int $value ] + } + - Return [ bool ] + } + + Method [ <internal:zip> public method getArchiveFlag ] { + + - Parameters [2] { + Parameter #0 [ <required> int $flag ] + Parameter #1 [ <optional> int $flags = 0 ] + } + - Return [ int ] } Method [ <internal:zip> public method setCommentIndex ] { @@ -346,6 +388,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> int $index ] Parameter #1 [ <required> string $comment ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCommentName ] { @@ -354,6 +397,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $name ] Parameter #1 [ <required> string $comment ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setMtimeIndex ] { @@ -363,6 +407,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $timestamp ] Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setMtimeName ] { @@ -372,6 +417,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $timestamp ] Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getCommentIndex ] { @@ -380,6 +426,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> int $index ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method getCommentName ] { @@ -388,6 +435,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $name ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method deleteIndex ] { @@ -395,6 +443,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> int $index ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method deleteName ] { @@ -402,6 +451,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> string $name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method statName ] { @@ -410,6 +460,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $name ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method statIndex ] { @@ -418,6 +469,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> int $index ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ array|false ] } Method [ <internal:zip> public method locateName ] { @@ -426,6 +478,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $name ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ int|false ] } Method [ <internal:zip> public method getNameIndex ] { @@ -434,18 +487,21 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> int $index ] Parameter #1 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method unchangeArchive ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeAll ] { - Parameters [0] { } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeIndex ] { @@ -453,6 +509,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> int $index ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method unchangeName ] { @@ -460,6 +517,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> string $name ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method extractTo ] { @@ -468,6 +526,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> string $pathto ] Parameter #1 [ <optional> array|string|null $files = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getFromName ] { @@ -477,6 +536,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <optional> int $len = 0 ] Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method getFromIndex ] { @@ -486,6 +546,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <optional> int $len = 0 ] Parameter #2 [ <optional> int $flags = 0 ] } + - Tentative return [ string|false ] } Method [ <internal:zip> public method getStreamIndex ] { @@ -519,6 +580,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #2 [ <required> int $attr ] Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setExternalAttributesIndex ] { @@ -529,6 +591,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #2 [ <required> int $attr ] Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getExternalAttributesName ] { @@ -539,6 +602,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #2 [ <required> &$attr ] Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method getExternalAttributesIndex ] { @@ -549,6 +613,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #2 [ <required> &$attr ] Parameter #3 [ <optional> int $flags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCompressionName ] { @@ -558,6 +623,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $method ] Parameter #2 [ <optional> int $compflags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setCompressionIndex ] { @@ -567,6 +633,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $method ] Parameter #2 [ <optional> int $compflags = 0 ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setEncryptionName ] { @@ -576,6 +643,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $method ] Parameter #2 [ <optional> ?string $password = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method setEncryptionIndex ] { @@ -585,6 +653,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #1 [ <required> int $method ] Parameter #2 [ <optional> ?string $password = null ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method registerProgressCallback ] { @@ -593,6 +662,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { Parameter #0 [ <required> float $rate ] Parameter #1 [ <required> callable $callback ] } + - Tentative return [ bool ] } Method [ <internal:zip> public method registerCancelCallback ] { @@ -600,6 +670,7 @@ Extension [ <persistent> extension #66 zip version 1.21.0 ] { - Parameters [1] { Parameter #0 [ <required> callable $callback ] } + - Tentative return [ bool ] } } } diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec index 7919458..aa4658f 100644 --- a/php-pecl-zip.spec +++ b/php-pecl-zip.spec @@ -3,32 +3,39 @@ # # fedora spec file for php-pecl-zip # -# Copyright (c) 2013-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-zip} -%{?scl: %scl_package php-pecl-zip} +# For PHP < 5.6 and EPEL-9 +%{!?__phpize: %global __phpize %{_bindir}/phpize} +%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize} +%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config} +%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config} %if ( 0%{?scl:1} && 0%{?rhel} == 8 ) || 0%{?rhel} >= 9 -%bcond_without move_to_opt +%bcond_without move_to_opt %else -%bcond_with move_to_opt +%bcond_with move_to_opt %endif +%bcond_without tests + %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zip -%global upstream_version 1.21.0 +%global upstream_version 1.22.3 #global upstream_prever dev #global upstream_lower DEV +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure -%global libzip_version 1.9.2 +%global libzip_version 1.10.1 %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini @@ -40,14 +47,12 @@ 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;')}} -License: PHP +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 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 +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -72,14 +77,13 @@ Requires: libzip%{?_isa} >= %{libzip_version} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} @@ -113,12 +117,6 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version} Obsoletes: php74-pecl-%{pecl_name} <= %{version} Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif %endif %if "%{php_version}" > "7.0" @@ -136,33 +134,30 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS -%patch0 -p1 - +cd %{sources} # 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 : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 fi - cd .. + : Create the configuration file cat >%{ini_name} << 'EOF' ; Enable ZIP extension module extension=%{pecl_name}.so EOF +mkdir NTS %if %{with_zts} -: Duplicate sources tree for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif @@ -173,22 +168,23 @@ cp -pr NTS ZTS export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig %endif -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -209,42 +205,45 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -cd NTS +cd %{sources} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check +cd %{sources} OPT="-q --show-diff" %if "%{php_version}" > "8.0" OPT="$OPT %{?_smp_mflags}" %endif -cd NTS : minimal load test of NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \ --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" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/php \ -%{_bindir}/php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__php} \ +%{__php} -n run-tests.php $OPT +%endif %if %{with_zts} -cd ../ZTS : minimal load test of ZTS extension -%{_bindir}/zts-php --no-php-ini \ +%{__ztsphp} --no-php-ini \ --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" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ -%{_bindir}/zts-php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +%{__ztsphp} -n run-tests.php $OPT +%endif %endif @@ -269,7 +268,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -283,6 +282,28 @@ fi %changelog +* Tue Nov 14 2023 Remi Collet <remi@remirepo.net> - 1.22.3-1 +- update to 1.22.3 +- build out of sources tree + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.22.2-2 +- rebuild for PHP 8.3.0RC1 + +* Wed Aug 23 2023 Remi Collet <remi@remirepo.net> - 1.22.2-1 +- update to 1.22.2 + +* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.22.1-1 +- update to 1.22.1 + +* Mon Jun 26 2023 Remi Collet <remi@remirepo.net> - 1.22.0-1 +- update to 1.22.0 + +* Mon Jun 5 2023 Remi Collet <remi@remirepo.net> - 1.21.1-2 +- add upstream patches for 8.3 + +* 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 - |