[packages/php/PHP_5_6] make phar to support SHA-256, SHA-512 hashes

glen glen at pld-linux.org
Sun Apr 24 00:17:06 CEST 2016


commit 97b0b3102385a45f15e7fb860266c590cf0ff27b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Nov 19 23:55:10 2015 +0200

    make phar to support SHA-256, SHA-512 hashes
    
    thus phar requires hash extension now
    
    test phar:
    https://phar.phpunit.de/phpunit-4.8.16.phar
    
    see problem analyze here:
    https://github.com/sebastianbergmann/phpunit/issues/1948
    
    cherry-picked 56b53eba1605562c6d2417174d69bcefaf60fc51

 phar-hash-shared.patch | 21 +++++++++++++++++++++
 php.spec               |  6 +++---
 2 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/php.spec b/php.spec
index 7e8cbc0..482ca8e 100644
--- a/php.spec
+++ b/php.spec
@@ -18,9 +18,6 @@
 # - wddx: restore session support (not compiled in due DL extension check)
 # - make additional headers and checking added by mail patch configurable
 # - modularize standard (output from pure php -m)?
-# - WARNING: Phar: sha256/sha512 signature support disabled if ext/hash is
-#   built shared, also PHAR_HAVE_OPENSSL is false if openssl is built shared.
-#   make it runtime dep and add Suggests (or php warning messages)
 # - some mods should be shared:
 #$ php -m
 # [PHP Modules]
@@ -234,6 +231,7 @@ Patch67:	mysql-lib-ver-mismatch.patch
 
 Patch69:	fpm-conf-split.patch
 Patch70:	mysqlnd-ssl.patch
+Patch72:	phar-hash-shared.patch
 URL:		http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -1519,6 +1517,7 @@ Summary(pl.UTF-8):	Moduł phar dla PHP
 Group:		Libraries
 URL:		http://www.php.net/manual/en/book.phar.php
 Requires:	%{name}-common = %{epoch}:%{version}-%{release}
+Requires:	%{name}-hash = %{epoch}:%{version}-%{release}
 Requires:	%{name}-spl = %{epoch}:%{version}-%{release}
 Requires:	alternatives
 Suggests:	%{name}-cli
@@ -2089,6 +2088,7 @@ exit 1
 %patch67 -p1
 
 %patch70 -p1
+%patch72 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
diff --git a/phar-hash-shared.patch b/phar-hash-shared.patch
new file mode 100644
index 0000000..47c4af8
--- /dev/null
+++ b/phar-hash-shared.patch
@@ -0,0 +1,21 @@
+--- php-7.0.0RC6/ext/phar/config.m4~	2015-10-27 21:24:16.000000000 +0200
++++ php-7.0.0RC6/ext/phar/config.m4	2015-11-17 19:13:50.877662712 +0200
+@@ -7,13 +7,13 @@
+ if test "$PHP_PHAR" != "no"; then
+   PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+   AC_MSG_CHECKING([for phar openssl support])
+-  if test "$PHP_HASH_SHARED" != "yes"; then
+-    if test "$PHP_HASH" != "no"; then
++dnl  if test "$PHP_HASH_SHARED" != "yes"; then
++dnl    if test "$PHP_HASH" != "no"; then
+       AC_DEFINE(PHAR_HASH_OK,1,[ ])
+-    fi
+-  else
++dnl    fi
++dnl  else
+     AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash is built shared])
+-  fi
++dnl  fi
+   if test "$PHP_OPENSSL_SHARED" = "yes"; then
+     AC_MSG_RESULT([no (shared openssl)])
+   else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/a013a9dc8e5bb4c1df21481dafbdceae1ca79977



More information about the pld-cvs-commit mailing list