[packages/php-pecl-libsodium] up to 1.0.6

glen glen at pld-linux.org
Mon Dec 12 20:13:44 CET 2016


commit ce01d2b921fa27c5025adddc5145ba7c9657c81c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Dec 12 21:11:46 2016 +0200

    up to 1.0.6

 libsodium-pr70.patch    | 39 ---------------------------------------
 php-pecl-libsodium.spec | 18 ++++++------------
 tests-php53.patch       | 33 ---------------------------------
 3 files changed, 6 insertions(+), 84 deletions(-)
---
diff --git a/php-pecl-libsodium.spec b/php-pecl-libsodium.spec
index 3a93e30..02ee6dd 100644
--- a/php-pecl-libsodium.spec
+++ b/php-pecl-libsodium.spec
@@ -1,23 +1,20 @@
-%define	buildver   %(pkg-config --silence-errors --modversion libsodium 2>/dev/null || echo 65536)
-
 #
 # Conditional build:
 %bcond_without	tests		# build without tests
 
+%define	buildver   %(pkg-config --silence-errors --modversion libsodium 2>/dev/null || echo 65536)
+
 %define		php_name	php%{?php_suffix}
 %define		modname	libsodium
 Summary:	Wrapper for the Sodium cryptographic library
-Name:		php-pecl-%{modname}
-Version:	1.0.2
+Name:		%{php_name}-pecl-%{modname}
+Version:	1.0.6
 Release:	1
 License:	BSD
 Group:		Development/Languages
 Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
-# Source0-md5:	b4083271f4fe0a94b8ae69320878a5e8
+# Source0-md5:	ad76fd81a44a7122dae9683ca18f3be6
 URL:		http://pecl.php.net/package/libsodium
-# See https://github.com/jedisct1/libsodium-php/pull/70
-Patch0:		%{modname}-pr70.patch
-Patch1:		tests-php53.patch
 BuildRequires:	%{php_name}-devel >= 4:5.3
 BuildRequires:	libsodium-devel >= 0.6.0
 BuildRequires:	pkgconfig
@@ -40,9 +37,7 @@ Documentation: https://paragonie.com/book/pecl-libsodium
 %setup -qc
 mv %{modname}-%{version}/* .
 
-%patch0 -p1
-%patch1 -p1
-
+%build
 # Sanity check, really often broken
 extver=$(sed -n '/#define PHP_LIBSODIUM_VERSION/{s/.* "//;s/".*$//;p}' php_libsodium.h)
 if test "x${extver}" != "x%{version}"; then
@@ -50,7 +45,6 @@ if test "x${extver}" != "x%{version}"; then
 	exit 1
 fi
 
-%build
 phpize
 %configure
 %{__make}
diff --git a/libsodium-pr70.patch b/libsodium-pr70.patch
deleted file mode 100644
index b97287f..0000000
--- a/libsodium-pr70.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ca45bd4a55541d58136c21b38b9b90e750fedfbc Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora at famillecollet.com>
-Date: Mon, 30 Nov 2015 18:31:42 +0100
-Subject: [PATCH] fix test
-
----
- tests/crypto_auth.phpt | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/tests/crypto_auth.phpt b/tests/crypto_auth.phpt
-index c72451e..76f30eb 100644
---- a/tests/crypto_auth.phpt
-+++ b/tests/crypto_auth.phpt
-@@ -18,13 +18,9 @@ var_dump(\Sodium\crypto_auth_verify($mac, $badmsg, $key));
- 
- // Let's flip a bit pseudo-randomly
- $badmsg = $msg;
--$badmsg[mt_rand(0, 999)] = \chr(
--    \ord($msg[0]) ^ (
--        // Mask out higher bits (thus 256 => 0)
--        0xFF & (
--            // 1, 2, 4, 8, 16, 32, 64, 128, 256
--            1 << mt_rand(0, 8)
--        )
-+$badmsg[$i=mt_rand(0, 999)] = \chr(
-+    \ord($msg[$i]) ^ (
-+        1 << mt_rand(0, 7)
-     )
- );
- 
-@@ -32,7 +28,7 @@ var_dump(\Sodium\crypto_auth_verify($mac, $badmsg, $key));
- 
- // Now let's change a bit in the MAC
- $badmac = $mac;
--$badmac[0] = \chr(\ord($badmsg[0]) ^ 0x80);
-+$badmac[0] = \chr(\ord($badmac[0]) ^ 0x80);
- var_dump(\Sodium\crypto_auth_verify($badmac, $msg, $key));
- ?>
- --EXPECT--
diff --git a/tests-php53.patch b/tests-php53.patch
deleted file mode 100644
index 2b28550..0000000
--- a/tests-php53.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-
-upstream:
-https://github.com/jedisct1/libsodium-php/pull/81
-https://github.com/jedisct1/libsodium-php/issues/82
-
---- php-pecl-libsodium-1.0.2/tests/utils.phpt	2016-01-28 21:43:00.641808352 +0200
-+++ php-pecl-libsodium-1.0.2/tests/utils.phpt	2016-01-28 21:45:37.116534064 +0200
-@@ -11,15 +11,15 @@
- $c = 'string';
- var_dump(!\Sodium\memcmp($b, $c));
- var_dump(!\Sodium\memcmp($b, 'String'));
--$v = hex2bin('FFFF800102030405060708');
-+$v = ""."\xFF\xFF\x80\x01\x02\x03\x04\x05\x06\x07\x08";
- \Sodium\increment($v);
- var_dump(bin2hex($v));
- 
- if (\Sodium\library_version_major() > 7 ||
-     (\Sodium\library_version_major() == 7 &&
-      \Sodium\library_version_minor() >= 6)) {
--    $v_1 = hex2bin('0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F');
--    $v_2 = hex2bin('0202030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F');
-+    $v_1 = ""."\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
-+    $v_2 = ""."\x02\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
-     var_dump(\Sodium\compare($v_1, $v_2));
-     \Sodium\increment($v_1);
-     var_dump(\Sodium\compare($v_1, $v_2));
-@@ -32,5 +32,5 @@
- $str = 'stdClass';
- \Sodium\memzero($str);
--$obj = json_decode(json_encode(['foo' => 'bar']));
-+$obj = json_decode(json_encode(array('foo' => 'bar')));
- var_dump($obj);
- ?>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-libsodium.git/commitdiff/ce01d2b921fa27c5025adddc5145ba7c9657c81c



More information about the pld-cvs-commit mailing list