diff --git a/.gitignore b/.gitignore index 5645540..6985230 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,6 @@ clog /php-phpseclib-2.0.26-09655fc.tgz /php-phpseclib-2.0.27-34620af.tgz /php-phpseclib-2.0.28-d1ca58c.tgz +/php-phpseclib-2.0.29-497856a.tgz +/php-phpseclib-2.0.30-136b9ca.tgz +/php-phpseclib-2.0.31-233a920.tgz diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 06b35c4..3b028be 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,12 +3,12 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit d1ca58cf33cb21046d702ae3a7b14fdacd9f3260 +%global github_commit 233a920cb38636a43b18d428f9a8db1f0a1a08f4 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %bcond_without tests Name: php-%{composer_vendor} -Version: 2.0.28 +Version: 2.0.31 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -23,11 +23,15 @@ BuildArch: noarch %if %{with tests} BuildRequires: php-composer(fedora/autoloader) +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bindir}/phpunit9 +%else %if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 %global phpunit %{_bindir}/phpunit6 %else %global phpunit %{_bindir}/phpunit %endif +%endif BuildRequires: %{phpunit} BuildRequires: %{_bindir}/phpab # Optional at runtime, to avoid too muck skipped tests @@ -81,13 +85,33 @@ require "%{buildroot}%{_datadir}/php/%{composer_vendor}/autoload.php"; date_default_timezone_set('UTC'); EOF +# from travis/run-phpunit.sh +if %{phpunit} --atleast-version 8 +then + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUpBeforeClass()/n setUpBeforeClass(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUp()/n setUp(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n tearDown()/n tearDown(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsArray([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringContainsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringNotContainsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Crypt_\(AES\|Hash\|RSA\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_File_\(X509\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Math_\(BigInteger\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_\(Crypt\|File\|Math\|Net\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Functional_Net_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/extends Unit_Crypt_Hash_\(SHA512Test\|SHA256Test\)/extends \1/g' +fi + +# avoid already defined class +sed -e '/require /d' -i tests/Unit/Crypt/Hash/SHA*_96Test.php # testAuthorityInfoAccess fails without internet access ret=0 -for cmd in "php %{phpunit}" php72 php73 php74 php80; do +for cmd in "php %{phpunit}" php73 php74 php80; do if which $cmd; then set $cmd - $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} \ + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \ --filter '^((?!(testAuthorityInfoAccess)).)*$' \ --verbose || ret=1 fi @@ -104,6 +128,16 @@ exit $ret %changelog +* Tue Apr 6 2021 Remi Collet - 2.0.31-1 +- update to 2.0.31 + +* Thu Dec 17 2020 Remi Collet - 2.0.30-1 +- update to 2.0.30 +- switch to phpunit9 on Fedora + +* Tue Sep 8 2020 Remi Collet - 2.0.29-1 +- update to 2.0.29 + * Wed Jul 8 2020 Remi Collet - 2.0.28-1 - update to 2.0.28 diff --git a/sources b/sources index 1ad50fc..a42360c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.28-d1ca58c.tgz) = 0c8f0602d735c91778eaf24d98b6f4acea1383130440eec24fa3cbceec97bffd83eb32c322715a500ed6e8e2eeeefaaf8273f96dfa035ad38df87e8677050b10 +SHA512 (php-phpseclib-2.0.31-233a920.tgz) = 316104716f7a83c476680d1e8185931b304b9891d92a80c340fd9c74ab5641283ab7f8799895dd3ed34db08698f236959fe29dd30bc457d8cf54ed6fd6770830