From f562138f214788dcd942e8f5abbfd5748258aa5b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Sep 2020 07:32:13 +0200 Subject: [PATCH 1/3] v2.0.29 (cherry picked from commit cc9c74cb414dcf358b5b7adfd12a98bc9596c29e) --- .gitignore | 1 + php-phpseclib.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5645540..a53bbd5 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ 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 diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 06b35c4..053b810 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 497856a8d997f640b4a516062f84228a772a48a8 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %bcond_without tests Name: php-%{composer_vendor} -Version: 2.0.28 +Version: 2.0.29 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -84,7 +84,7 @@ EOF # testAuthorityInfoAccess fails without internet access ret=0 -for cmd in "php %{phpunit}" php72 php73 php74 php80; do +for cmd in "php %{phpunit}" php72 php73 php74; do if which $cmd; then set $cmd $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} \ @@ -104,6 +104,9 @@ exit $ret %changelog +* 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..48acdb9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.28-d1ca58c.tgz) = 0c8f0602d735c91778eaf24d98b6f4acea1383130440eec24fa3cbceec97bffd83eb32c322715a500ed6e8e2eeeefaaf8273f96dfa035ad38df87e8677050b10 +SHA512 (php-phpseclib-2.0.29-497856a.tgz) = 25cd67195588ea0e48f2fcb1d31ff22290b713cea9ea2295da92257393a7fc8341ad080fd3f5db54c00e38220affe1828ddbbb87a56460674a6782da9dc2113c From 18023537200ac2d0facb7367b0059d4b74e3abb5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Dec 2020 08:36:51 +0100 Subject: [PATCH 2/3] update to 2.0.30 switch to phpunit9 on Fedora (cherry picked from commit 655d22cd47e0097db4b94990d4d803ed8a396f50) --- .gitignore | 1 + php-phpseclib.spec | 36 ++++++++++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a53bbd5..88daa9e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ clog /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 diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 053b810..72dc1d3 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,12 +3,12 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit 497856a8d997f640b4a516062f84228a772a48a8 +%global github_commit 136b9ca7eebef78be14abf90d65c5e57b6bc5d36 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %bcond_without tests Name: php-%{composer_vendor} -Version: 2.0.29 +Version: 2.0.30 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; 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,10 @@ exit $ret %changelog +* 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 diff --git a/sources b/sources index 48acdb9..0b671cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.29-497856a.tgz) = 25cd67195588ea0e48f2fcb1d31ff22290b713cea9ea2295da92257393a7fc8341ad080fd3f5db54c00e38220affe1828ddbbb87a56460674a6782da9dc2113c +SHA512 (php-phpseclib-2.0.30-136b9ca.tgz) = 47f2c29ddd5d8501610d7171ce49a32f921571c55fe1c9f54a08a4c84b3dace3b2645e9358c5ca5a5cfb03115b3fa023c4864ee847a60a9fdce3cf6cd42f2faf From ea47eedeb7609517b76b200ffcd72e9965ca74a0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 6 Apr 2021 16:22:55 +0200 Subject: [PATCH 3/3] v2.0.31 (cherry picked from commit 7f789fef7ce24774a1243cf314ed31353762ac18) (cherry picked from commit 8688ad3ad6cec253a0fc174e8a25832f34d4e5e9) --- .gitignore | 1 + php-phpseclib.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 88daa9e..6985230 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ clog /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 72dc1d3..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 136b9ca7eebef78be14abf90d65c5e57b6bc5d36 +%global github_commit 233a920cb38636a43b18d428f9a8db1f0a1a08f4 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %bcond_without tests Name: php-%{composer_vendor} -Version: 2.0.30 +Version: 2.0.31 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -128,6 +128,9 @@ 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 diff --git a/sources b/sources index 0b671cf..a42360c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.30-136b9ca.tgz) = 47f2c29ddd5d8501610d7171ce49a32f921571c55fe1c9f54a08a4c84b3dace3b2645e9358c5ca5a5cfb03115b3fa023c4864ee847a60a9fdce3cf6cd42f2faf +SHA512 (php-phpseclib-2.0.31-233a920.tgz) = 316104716f7a83c476680d1e8185931b304b9891d92a80c340fd9c74ab5641283ab7f8799895dd3ed34db08698f236959fe29dd30bc457d8cf54ed6fd6770830