]> 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>
Thu, 19 Nov 2015 21:55:10 +0000 (23:55 +0200)
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 [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 b5699547c145f217d119b7605de6dea0f3b8d734..35d23aa1194da3a8dce4964e75c1b2c180eb4132 100644 (file)
--- 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]
 %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
 
This page took 0.045571 seconds and 4 git commands to generate.