Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Steph Fox

Hi Marcus,


I'm pretty sure this is a wrong fix - the check for not shared replaces
the original check for HAVE_HASH_EXT, which is effectively a global
equivalent to $PHP_HASH. So it should be something like:



 if test $PHP_HASH != no; then
  if test $PHP_HASH_SHARED != yes; then
AC_DEFINE(PHAR_HASH_OK,1,[ ])
  else
AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if 
ext/hash

is built shared])
  fi
 fi


As far as I can tell that acomplishes the same. Onlz zou


German kb? ;)


changed the
original logic a lot rather then trzing to keep as much of it as possible.


Nope. The *original* logic said 'is it there?' Greg changed that to 'is it 
!shared?' You changed it back to 'is it there?' It needs to be 'is it there 
 !shared?'



The ext/hash files are already included as appropriate in phar_internal.h
and don't/shouldn't need re-including anywhere else.


Doesnät matter. This helps me figuring out what is wrong.


In CVS?


Also - it looks like ext/hash needs adding to phar_deps in phar.c (as
ZEND_MOD_OPTIONAL).


Zep, that's a good point.

And config.w32 needs updating to define PHAR_HASH_OK, since there'll be 
zero
hash support under doze otherwise.  HAVE_HASH_EXT is at least 
automatic...!


Since I cannot test on windows I need windows developers like zou to fix
it.


I haven't been able to test 5.3 in months.. I'll fix/test/merge out of PECL 
 5.2 once it's working under *nix, but currently it doesn't seem to be 
working anywhere :)


- Steph


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Marcus Boerger
Hello Steph,

Tuesday, November 4, 2008, 2:42:05 PM, you wrote:

 Hi Marcus,

 I'm pretty sure this is a wrong fix - the check for not shared replaces
 the original check for HAVE_HASH_EXT, which is effectively a global
 equivalent to $PHP_HASH. So it should be something like:

  if test $PHP_HASH != no; then
   if test $PHP_HASH_SHARED != yes; then
 AC_DEFINE(PHAR_HASH_OK,1,[ ])
   else
 AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if 
 ext/hash
 is built shared])
   fi
  fi

 As far as I can tell that acomplishes the same. Onlz zou

 German kb? ;)

oops

 changed the
 original logic a lot rather then trzing to keep as much of it as possible.

 Nope. The *original* logic said 'is it there?' Greg changed that to 'is it 
 !shared?' You changed it back to 'is it there?' It needs to be 'is it there
  !shared?'

read again. It says if it is shared then issue an error. If it is present
then use it.

 The ext/hash files are already included as appropriate in phar_internal.h
 and don't/shouldn't need re-including anywhere else.

 Doesnät matter. This helps me figuring out what is wrong.

 In CVS?

 Also - it looks like ext/hash needs adding to phar_deps in phar.c (as
 ZEND_MOD_OPTIONAL).

 Zep, that's a good point.

 And config.w32 needs updating to define PHAR_HASH_OK, since there'll be 
 zero
 hash support under doze otherwise.  HAVE_HASH_EXT is at least 
 automatic...!

 Since I cannot test on windows I need windows developers like zou to fix
 it.

 I haven't been able to test 5.3 in months.. I'll fix/test/merge out of PECL
  5.2 once it's working under *nix, but currently it doesn't seem to be 
 working anywhere :)

 - Steph




Best regards,
 Marcus


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Steph Fox

Hi Marcus,

I'm pretty sure this is a wrong fix - the check for not shared replaces 
the original check for HAVE_HASH_EXT, which is effectively a global 
equivalent to $PHP_HASH. So it should be something like:


if test $PHP_HASH != no; then
 if test $PHP_HASH_SHARED != yes; then
   AC_DEFINE(PHAR_HASH_OK,1,[ ])
 else
   AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash 
is built shared])

 fi
fi

The ext/hash files are already included as appropriate in phar_internal.h 
and don't/shouldn't need re-including anywhere else.


Also - it looks like ext/hash needs adding to phar_deps in phar.c (as 
ZEND_MOD_OPTIONAL).


And config.w32 needs updating to define PHAR_HASH_OK, since there'll be zero 
hash support under doze otherwise.  HAVE_HASH_EXT is at least automatic...!


- Steph


- Original Message - 
From: Marcus Boerger [EMAIL PROTECTED]

To: php-cvs@lists.php.net
Sent: Tuesday, November 04, 2008 1:27 AM
Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c



helly Tue Nov  4 01:27:52 2008 UTC

 Modified files:  (Branch: PHP_5_3)
   /php-src/ext/phar config.m4 util.c
 Log:
 - MFH Fix dependency from Phar to hash

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/config.m4?r1=1.27.2.7r2=1.27.2.8diff_format=u
Index: php-src/ext/phar/config.m4
diff -u php-src/ext/phar/config.m4:1.27.2.7 
php-src/ext/phar/config.m4:1.27.2.8

--- php-src/ext/phar/config.m4:1.27.2.7 Thu Oct  9 00:50:46 2008
+++ php-src/ext/phar/config.m4 Tue Nov  4 01:27:52 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.27.2.7 2008/10/09 00:50:46 cellog Exp $
+dnl $Id: config.m4,v 1.27.2.8 2008/11/04 01:27:52 helly Exp $
dnl config.m4 for extension phar

PHP_ARG_ENABLE(phar, for phar archive support,
@@ -8,7 +8,9 @@
  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)

  AC_MSG_CHECKING([for phar openssl support])
  if test $PHP_HASH_SHARED != yes; then
-AC_DEFINE(PHAR_HASH_OK,1,[ ])
+if test $PHP_HASH != no; then
+  AC_DEFINE(PHAR_HASH_OK,1,[ ])
+fi
  else
AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if 
ext/hash is built shared])

  fi
@@ -22,6 +24,7 @@
  AC_MSG_RESULT([no])
fi
  fi
+  PHP_ADD_EXTENSION_DEP(phar, hash, true)
  PHP_ADD_EXTENSION_DEP(phar, spl, true)
  PHP_ADD_MAKEFILE_FRAGMENT
fi
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.39r2=1.55.2.40diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.39 
php-src/ext/phar/util.c:1.55.2.40

--- php-src/ext/phar/util.c:1.55.2.39 Sun Oct 26 05:49:09 2008
+++ php-src/ext/phar/util.c Tue Nov  4 01:27:52 2008
@@ -18,9 +18,12 @@
  +--+
*/

-/* $Id: util.c,v 1.55.2.39 2008/10/26 05:49:09 cellog Exp $ */
+/* $Id: util.c,v 1.55.2.40 2008/11/04 01:27:52 helly Exp $ */

#include phar_internal.h
+#ifdef PHAR_HASH_OK
+#include ext/hash/php_hash_sha.h
+#endif

#ifdef PHAR_HAVE_OPENSSL
/* OpenSSL includes */



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Steph Fox
Nope. The *original* logic said 'is it there?' Greg changed that to 'is 
it
!shared?' You changed it back to 'is it there?' It needs to be 'is it 
there

 !shared?'


read again. It says if it is shared then issue an error. If it is present
then use it.


Args, sorry. I misread the commit and thought you'd removed the first line 
in that block, so yes the check is now correct in config.m4.


But - since when is hash not optional?

- Steph 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Marcus Boerger
Hello Steph,

Tuesday, November 4, 2008, 2:52:48 PM, you wrote:

 Nope. The *original* logic said 'is it there?' Greg changed that to 'is 
 it
 !shared?' You changed it back to 'is it there?' It needs to be 'is it 
 there
  !shared?'

 read again. It says if it is shared then issue an error. If it is present
 then use it.

 Args, sorry. I misread the commit and thought you'd removed the first line 
 in that block, so yes the check is now correct in config.m4.

 But - since when is hash not optional?

It still is optional :-)

Only if it is shared we cannot rely on it for higher SHA.

Best regards,
 Marcus


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Steph Fox

But - since when is hash not optional?


It still is optional :-)

Only if it is shared we cannot rely on it for higher SHA.


Grr no exports. OK, gotcha now, sorry for the noise.

- Steph


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-04 Thread Marcus Boerger
Hello Steph,

Tuesday, November 4, 2008, 1:12:32 PM, you wrote:

 Hi Marcus,

 I'm pretty sure this is a wrong fix - the check for not shared replaces 
 the original check for HAVE_HASH_EXT, which is effectively a global 
 equivalent to $PHP_HASH. So it should be something like:

  if test $PHP_HASH != no; then
   if test $PHP_HASH_SHARED != yes; then
 AC_DEFINE(PHAR_HASH_OK,1,[ ])
   else
 AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash
 is built shared])
   fi
  fi

As far as I can tell that acomplishes the same. Onlz zou changed the
original logic a lot rather then trzing to keep as much of it as possible.

 The ext/hash files are already included as appropriate in phar_internal.h 
 and don't/shouldn't need re-including anywhere else.

Doesnät matter. This helps me figuring out what is wrong.

 Also - it looks like ext/hash needs adding to phar_deps in phar.c (as 
 ZEND_MOD_OPTIONAL).

Zep, that's a good point.

 And config.w32 needs updating to define PHAR_HASH_OK, since there'll be zero
 hash support under doze otherwise.  HAVE_HASH_EXT is at least automatic...!

Since I cannot test on windows I need windows developers like zou to fix
it.

 - Steph


 - Original Message - 
 From: Marcus Boerger [EMAIL PROTECTED]
 To: php-cvs@lists.php.net
 Sent: Tuesday, November 04, 2008 1:27 AM
 Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c


 helly Tue Nov  4 01:27:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar config.m4 util.c
  Log:
  - MFH Fix dependency from Phar to hash

 http://cvs.php.net/viewvc.cgi/php-src/ext/phar/config.m4?r1=1.27.2.7r2=1.27.2.8diff_format=u
 Index: php-src/ext/phar/config.m4
 diff -u php-src/ext/phar/config.m4:1.27.2.7 
 php-src/ext/phar/config.m4:1.27.2.8
 --- php-src/ext/phar/config.m4:1.27.2.7 Thu Oct  9 00:50:46 2008
 +++ php-src/ext/phar/config.m4 Tue Nov  4 01:27:52 2008
 @@ -1,4 +1,4 @@
 -dnl $Id: config.m4,v 1.27.2.7 2008/10/09 00:50:46 cellog Exp $
 +dnl $Id: config.m4,v 1.27.2.8 2008/11/04 01:27:52 helly Exp $
 dnl config.m4 for extension phar

 PHP_ARG_ENABLE(phar, for phar archive support,
 @@ -8,7 +8,9 @@
   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)
   AC_MSG_CHECKING([for phar openssl support])
   if test $PHP_HASH_SHARED != yes; then
 -AC_DEFINE(PHAR_HASH_OK,1,[ ])
 +if test $PHP_HASH != no; then
 +  AC_DEFINE(PHAR_HASH_OK,1,[ ])
 +fi
   else
 AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if 
 ext/hash is built shared])
   fi
 @@ -22,6 +24,7 @@
   AC_MSG_RESULT([no])
 fi
   fi
 +  PHP_ADD_EXTENSION_DEP(phar, hash, true)
   PHP_ADD_EXTENSION_DEP(phar, spl, true)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
 http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.39r2=1.55.2.40diff_format=u
 Index: php-src/ext/phar/util.c
 diff -u php-src/ext/phar/util.c:1.55.2.39 
 php-src/ext/phar/util.c:1.55.2.40
 --- php-src/ext/phar/util.c:1.55.2.39 Sun Oct 26 05:49:09 2008
 +++ php-src/ext/phar/util.c Tue Nov  4 01:27:52 2008
 @@ -18,9 +18,12 @@
   +--+
 */

 -/* $Id: util.c,v 1.55.2.39 2008/10/26 05:49:09 cellog Exp $ */
 +/* $Id: util.c,v 1.55.2.40 2008/11/04 01:27:52 helly Exp $ */

 #include phar_internal.h
 +#ifdef PHAR_HASH_OK
 +#include ext/hash/php_hash_sha.h
 +#endif

 #ifdef PHAR_HAVE_OPENSSL
 /* OpenSSL includes */



 -- 
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 





Best regards,
 Marcus


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.m4 util.c

2008-11-03 Thread Marcus Boerger
helly   Tue Nov  4 01:27:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   config.m4 util.c 
  Log:
  - MFH Fix dependency from Phar to hash
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/config.m4?r1=1.27.2.7r2=1.27.2.8diff_format=u
Index: php-src/ext/phar/config.m4
diff -u php-src/ext/phar/config.m4:1.27.2.7 php-src/ext/phar/config.m4:1.27.2.8
--- php-src/ext/phar/config.m4:1.27.2.7 Thu Oct  9 00:50:46 2008
+++ php-src/ext/phar/config.m4  Tue Nov  4 01:27:52 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.27.2.7 2008/10/09 00:50:46 cellog Exp $
+dnl $Id: config.m4,v 1.27.2.8 2008/11/04 01:27:52 helly Exp $
 dnl config.m4 for extension phar
 
 PHP_ARG_ENABLE(phar, for phar archive support,
@@ -8,7 +8,9 @@
   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)
   AC_MSG_CHECKING([for phar openssl support])
   if test $PHP_HASH_SHARED != yes; then
-AC_DEFINE(PHAR_HASH_OK,1,[ ])
+if test $PHP_HASH != no; then
+  AC_DEFINE(PHAR_HASH_OK,1,[ ])
+fi
   else
 AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash is 
built shared])
   fi
@@ -22,6 +24,7 @@
   AC_MSG_RESULT([no])
 fi
   fi
+  PHP_ADD_EXTENSION_DEP(phar, hash, true)
   PHP_ADD_EXTENSION_DEP(phar, spl, true)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.39r2=1.55.2.40diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.39 php-src/ext/phar/util.c:1.55.2.40
--- php-src/ext/phar/util.c:1.55.2.39   Sun Oct 26 05:49:09 2008
+++ php-src/ext/phar/util.c Tue Nov  4 01:27:52 2008
@@ -18,9 +18,12 @@
   +--+
 */
 
-/* $Id: util.c,v 1.55.2.39 2008/10/26 05:49:09 cellog Exp $ */
+/* $Id: util.c,v 1.55.2.40 2008/11/04 01:27:52 helly Exp $ */
 
 #include phar_internal.h
+#ifdef PHAR_HASH_OK
+#include ext/hash/php_hash_sha.h
+#endif
 
 #ifdef PHAR_HAVE_OPENSSL
 /* OpenSSL includes */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php