From 39d5bd939cace186596af8ffb99105dba1952f24 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Feb 20 2018 07:40:34 +0000 Subject: Update to 2.0.10 use phpunit6 when available skip tests with PHPUnit < 4.8.35 (EPEL-6) --- diff --git a/.gitignore b/.gitignore index 1bbf2d1..20f80bb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ clog /php-phpseclib-2.0.6-34a7699.tgz /php-phpseclib-2.0.7-f4b6a52.tgz /php-phpseclib-2.0.9-c9a3fe3.tgz +/php-phpseclib-2.0.10-d305b78.tgz diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 9ca9b14..498766b 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,18 +3,17 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit c9a3fe35e20eb6eeaca716d6a23cde03f52d1558 +%global github_commit d305b780829ea4252ed9400b3f5937c2c99b51d4 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global with_tests 0%{!?_without_tests:1} Name: php-%{composer_vendor} -Version: 2.0.9 -Release: 2%{?dist} +Version: 2.0.10 +Release: 1%{?dist} Summary: PHP Secure Communications Library - -Group: System Environment/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} + Source0: %{name}-%{version}-%{github_short}.tgz Source1: %{name}-autoload.php # Generate a full archive from git snapshot, with tests @@ -24,7 +23,12 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php-composer(fedora/autoloader) -BuildRequires: %{_bindir}/phpunit +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} BuildRequires: %{_bindir}/phpab # Optional at runtime, to avoid too muck skipped tests BuildRequires: php-bcmath @@ -75,13 +79,18 @@ date_default_timezone_set('UTC'); EOF -ret=0 -for cmd in php php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit || ret=1 - fi -done -exit $ret +if php %{phpunit} --atleast-version 4.8.35; then + ret=0 + for cmd in "php %{phpunit}" php70 php71 php72; do + if which $cmd; then + set $cmd + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + fi + done + exit $ret +else + : Skip test as PHPUnit is too old +fi %endif @@ -93,6 +102,11 @@ exit $ret %changelog +* Tue Feb 20 2018 Remi Collet - 2.0.10-1 +- Update to 2.0.10 +- use phpunit6 when available +- skip tests with PHPUnit < 4.8.35 (EPEL-6) + * Fri Feb 09 2018 Fedora Release Engineering - 2.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 3c89951..19d2dc5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.9-c9a3fe3.tgz) = a139cb0eb19e45f5159fa5f767ac1534665eccbf476cb5ea67f3b10aa1b5d29dcf08517e659275673547472899238b1bfe6dc2e610a2cbe6bc23eb2b2cadcf8b +SHA512 (php-phpseclib-2.0.10-d305b78.tgz) = e11f37c320f458c77d77e34c35c59cb3e93100cff4a46d327de8d9a1a34b6da1a7e303b61d9ed7a734a8ace50859abf7301828b3b099b3a7c0c83ce8c09aa629