diff --git a/.gitignore b/.gitignore index 8b1544d..0420d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /php-paragonie-constant-time-encoding-d96e63b.tar.gz /php-paragonie-constant-time-encoding-6111a38.tar.gz /php-paragonie-constant-time-encoding-75e54b9.tar.gz +/php-paragonie-constant-time-encoding-2132f0f.tar.gz diff --git a/840f7d9757207c72a3836d303242a74f747bfce3.patch b/840f7d9757207c72a3836d303242a74f747bfce3.patch new file mode 100644 index 0000000..ecd5c1b --- /dev/null +++ b/840f7d9757207c72a3836d303242a74f747bfce3.patch @@ -0,0 +1,32 @@ +From 840f7d9757207c72a3836d303242a74f747bfce3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Kooman?= +Date: Fri, 11 May 2018 11:22:21 +0200 +Subject: [PATCH] fix unit tests on older PHP versions by using non-namespaced + bools + +--- + src/Base32.php | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Base32.php b/src/Base32.php +index 4ede73a..265090f 100644 +--- a/src/Base32.php ++++ b/src/Base32.php +@@ -76,7 +76,7 @@ public static function encode($src) + */ + public static function encodeUnpadded($src) + { +- return static::doEncode($src, false, false); ++ return static::doEncode($src, \false, \false); + } + + /** +@@ -99,7 +99,7 @@ public static function encodeUpper($src) + */ + public static function encodeUpperUnpadded($src) + { +- return static::doEncode($src, true, false); ++ return static::doEncode($src, \true, \false); + } + + /** diff --git a/php-paragonie-constant-time-encoding.spec b/php-paragonie-constant-time-encoding.spec index de57149..c254a38 100644 --- a/php-paragonie-constant-time-encoding.spec +++ b/php-paragonie-constant-time-encoding.spec @@ -5,13 +5,13 @@ %global github_owner paragonie %global github_name constant_time_encoding -%global commit0 75e54b9bc1d8eddc59bca721cd0f3d263c70503c +%global commit0 2132f0f293d856026d7d11bd81b9f4a23a1dc1f6 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: php-%{composer_vendor}-constant-time-encoding -Version: 1.0.3 -Release: 1%{?dist} +Version: 1.0.4 +Release: 2%{?dist} Summary: Constant-Time Character Encoding in PHP Projects Group: System Environment/Libraries @@ -19,7 +19,8 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz - +# https://github.com/paragonie/constant_time_encoding/pull/16 +Patch0: 840f7d9757207c72a3836d303242a74f747bfce3.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.0 @@ -45,6 +46,7 @@ misses. %prep %setup -n %{github_name}-%{commit0} +%patch0 -p1 %build cat <<'AUTOLOAD' | tee src/autoload.php @@ -74,6 +76,12 @@ phpunit --no-coverage --verbose %license LICENSE.txt %changelog +* Mon Aug 20 2018 François Kooman - 1.0.4-2 +- add patch to fix unit tests on EPEL + +* Fri May 11 2018 François Kooman - 1.0.4-1 +- update to 1.0.4 + * Mon Apr 30 2018 François Kooman - 1.0.3-1 - update to 1.0.3 diff --git a/sources b/sources index af11804..c9f21b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-paragonie-constant-time-encoding-75e54b9.tar.gz) = f13e4168dfaf1e34ae9d7c560f0814d0f4b6233ba49e9b3d714e55761340ce0c3e5a85d197bf67eb4b6edbd763a4f4f37f48ba6615609fca19236f1f95c98418 +SHA512 (php-paragonie-constant-time-encoding-2132f0f.tar.gz) = da6bf32743a02b783e5da596bdf7e78a8d2b81db89f2d9fb2cdbe5e65868134cfa2cd57464b765e3e64563f7be3322af316597c0d77fc5d129aa8dfeab2e8fa1