]> git.pld-linux.org Git - packages/php.git/commitdiff
make phar to support SHA-256, SHA-512 hashes
authorElan Ruusamäe <glen@delfi.ee>
Thu, 19 Nov 2015 21:55:10 +0000 (23:55 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 23 Apr 2016 21:59:02 +0000 (00:59 +0300)
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 [new file with mode: 0644]
php.spec

diff --git a/phar-hash-shared.patch b/phar-hash-shared.patch
new file mode 100644 (file)
index 0000000..47c4af8
--- /dev/null
@@ -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
index 7e8cbc0085c1e04ec6844694189eb9f9ccb65425..482ca8e55162341e617549bb393e78a2b43d7068 100644 (file)
--- 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
 
This page took 0.053771 seconds and 4 git commands to generate.