update to 2.0.30
switch to phpunit9 on Fedora
This commit is contained in:
parent
cc9c74cb41
commit
655d22cd47
3 changed files with 34 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <remi@remirepo.net> - 2.0.30-1
|
||||
- update to 2.0.30
|
||||
- switch to phpunit9 on Fedora
|
||||
|
||||
* Tue Sep 8 2020 Remi Collet <remi@remirepo.net> - 2.0.29-1
|
||||
- update to 2.0.29
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-phpseclib-2.0.29-497856a.tgz) = 25cd67195588ea0e48f2fcb1d31ff22290b713cea9ea2295da92257393a7fc8341ad080fd3f5db54c00e38220affe1828ddbbb87a56460674a6782da9dc2113c
|
||||
SHA512 (php-phpseclib-2.0.30-136b9ca.tgz) = 47f2c29ddd5d8501610d7171ce49a32f921571c55fe1c9f54a08a4c84b3dace3b2645e9358c5ca5a5cfb03115b3fa023c4864ee847a60a9fdce3cf6cd42f2faf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue