[packages/php] make phar to support SHA-256, SHA-512 hashes
glen
glen at pld-linux.org
Fri Nov 20 11:14:09 CET 2015
commit 56b53eba1605562c6d2417174d69bcefaf60fc51
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
phar-hash-shared.patch | 21 +++++++++++++++++++++
php.spec | 8 ++++----
2 files changed, 25 insertions(+), 4 deletions(-)
---
diff --git a/php.spec b/php.spec
index b569954..35d23aa 100644
--- a/php.spec
+++ b/php.spec
@@ -16,9 +16,6 @@
# - ttyname_r() misdetected http://bugs.php.net/bug.php?id=48820
# - wddx: restore session support (not compiled in due DL extension check)
# - 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]
@@ -139,7 +136,7 @@
%undefine with_filter
%endif
-%define rel 2
+%define rel 3
%define subver RC7
%define orgname php
%define ver_suffix 70
@@ -222,6 +219,7 @@ Patch68: php-mysql-ssl-context.patch
Patch69: fpm-conf-split.patch
Patch70: mysqlnd-ssl.patch
Patch71: libdb-info.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}
@@ -1448,6 +1446,7 @@ Group: Libraries
URL: http://www.php.net/manual/en/book.phar.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
+Requires: %{name}-hash = %{epoch}:%{version}-%{release}
Suggests: %{name}-cli
# zlib is required by phar program, but as phar cli is optional should the dep be too
Suggests: %{name}-zlib
@@ -2002,6 +2001,7 @@ exit 1
#%patch68 -p1 DROP or update to 7.0 APIs
%patch70 -p1
%patch71 -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/56b53eba1605562c6d2417174d69bcefaf60fc51
More information about the pld-cvs-commit
mailing list