From 70b90e2425953ec2aaedb29633cb4b58c5361a04 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Jun 2014 10:30:29 +0200 Subject: [PATCH] - php 5.6.0RC1 https://fedoraproject.org/wiki/Changes/Php56 - add php-dbg subpackage - update php.ini and opcache.ini from upstream production template - move zts-php to php-cli * bootstrap build * --- .gitignore | 1 + opcache.ini | 2 +- php-5.5.10-pcre834.patch | 55 ---- php-5.5.2-system-libzip.patch | 511 ---------------------------------- php-5.6.0-noNO.patch | 43 +++ php-5.6.0-oldpcre.patch | 39 +++ php-bug67326.patch | 32 --- php-fpm.conf | 2 +- php-reg67072.patch | 68 ----- php-reg67118.patch | 166 ----------- php.ini | 126 ++++++--- php.spec | 132 +++++---- sources | 2 +- 13 files changed, 256 insertions(+), 923 deletions(-) delete mode 100644 php-5.5.10-pcre834.patch delete mode 100644 php-5.5.2-system-libzip.patch create mode 100644 php-5.6.0-noNO.patch create mode 100644 php-5.6.0-oldpcre.patch delete mode 100644 php-bug67326.patch delete mode 100644 php-reg67072.patch delete mode 100644 php-reg67118.patch diff --git a/.gitignore b/.gitignore index adfef4c..d359c30 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ php-5.4.*.bz2 /php-5.5.11-strip.tar.xz /php-5.5.12-strip.tar.xz /php-5.5.13-strip.tar.xz +/php-5.6.0RC1-strip.tar.xz diff --git a/opcache.ini b/opcache.ini index 0b85b67..fb3e9a9 100644 --- a/opcache.ini +++ b/opcache.ini @@ -39,7 +39,7 @@ opcache.max_accelerated_files=4000 ;opcache.revalidate_path=0 ; If disabled, all PHPDoc comments are dropped from the code to reduce the - ;size of the optimized code. +; size of the optimized code. ;opcache.save_comments=1 ; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" diff --git a/php-5.5.10-pcre834.patch b/php-5.5.10-pcre834.patch deleted file mode 100644 index 636d60b..0000000 --- a/php-5.5.10-pcre834.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ab32d36ec65c17b3f890d488d30eb3a8ba012812 Mon Sep 17 00:00:00 2001 -From: Anatol Belski -Date: Tue, 4 Feb 2014 10:34:11 +0100 -Subject: [PATCH] pcre tests go with 8.34 upgrade - ---- - ext/pcre/tests/bug37911.phpt | 2 +- - ext/pcre/tests/grep2.phpt | 10 ++++++++-- - ext/pcre/tests/match_flags3.phpt | 2 +- - 3 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/ext/pcre/tests/bug37911.phpt b/ext/pcre/tests/bug37911.phpt -index f788119..2b7481a 100644 ---- a/ext/pcre/tests/bug37911.phpt -+++ b/ext/pcre/tests/bug37911.phpt -@@ -37,5 +37,5 @@ array(3) { - string(4) "blub" - } - --Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line 14 -+Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d - NULL -diff --git a/ext/pcre/tests/grep2.phpt b/ext/pcre/tests/grep2.phpt -index 0cf8d4a..1a8476c 100644 ---- a/ext/pcre/tests/grep2.phpt -+++ b/ext/pcre/tests/grep2.phpt -@@ -40,6 +40,12 @@ array(1) { - string(1) "1" - } - bool(true) --array(0) { -+array(3) { -+ [5]=> -+ string(1) "a" -+ ["xyz"]=> -+ string(2) "q6" -+ [6]=> -+ string(3) "h20" - } --bool(true) -+bool(false) -diff --git a/ext/pcre/tests/match_flags3.phpt b/ext/pcre/tests/match_flags3.phpt -index f22205e..84deb0b 100644 ---- a/ext/pcre/tests/match_flags3.phpt -+++ b/ext/pcre/tests/match_flags3.phpt -@@ -42,5 +42,5 @@ array(1) { - } - } - --Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line 14 -+Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d - bool(false) --- -1.8.4.3 - diff --git a/php-5.5.2-system-libzip.patch b/php-5.5.2-system-libzip.patch deleted file mode 100644 index b014e72..0000000 --- a/php-5.5.2-system-libzip.patch +++ /dev/null @@ -1,511 +0,0 @@ -diff -up php-5.5.2RC1/ext/zip/config.m4.systzip php-5.5.2RC1/ext/zip/config.m4 ---- php-5.5.2RC1/ext/zip/config.m4.systzip 2013-07-31 10:41:15.000000000 +0200 -+++ php-5.5.2RC1/ext/zip/config.m4 2013-08-08 09:24:07.577567241 +0200 -@@ -13,65 +13,116 @@ fi - PHP_ARG_WITH(pcre-dir, pcre install prefix, - [ --with-pcre-dir ZIP: pcre install prefix], no, no) - -+PHP_ARG_WITH(libzip, libzip, -+[ --with-libzip[=DIR] ZIP: use libzip], no, no) -+ - if test "$PHP_ZIP" != "no"; then -+ if test "$PHP_LIBZIP" != "no"; then -+ -+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -+ -+ dnl system libzip, depends on libzip -+ AC_MSG_CHECKING(for libzip) -+ if test -r $PHP_LIBZIP/include/zip.h; then -+ LIBZIP_CFLAGS="-I$PHP_LIBZIP/include" -+ LIBZIP_LIBDIR="$PHP_LIBZIP/$PHP_LIBDIR" -+ AC_MSG_RESULT(from option: found in $PHP_LIBZIP) -+ -+ elif test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libzip; then -+ LIBZIP_CFLAGS=`$PKG_CONFIG libzip --cflags` -+ LIBZIP_LIBDIR=`$PKG_CONFIG libzip --variable=libdir` -+ AC_MSG_RESULT(from pkgconfig: found in $LIBZIP_LIBDIR) - -- if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then -- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then -- PHP_ZLIB_DIR="$PHP_ZLIB_DIR" -- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib" -- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then -- PHP_ZLIB_DIR="$PHP_ZLIB_DIR" -- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include" - else -- AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"]) -+ for i in /usr/local /usr; do -+ if test -r $i/include/zip.h; then -+ LIBZIP_CFLAGS="-I$i/include" -+ LIBZIP_LIBDIR="$i/$PHP_LIBDIR" -+ AC_MSG_RESULT(in default path: found in $i) -+ break -+ fi -+ done - fi -+ -+ if test -z "$LIBZIP_LIBDIR"; then -+ AC_MSG_RESULT(not found) -+ AC_MSG_ERROR(Please reinstall the libzip distribution) -+ fi -+ -+ dnl Could not think of a simple way to check libzip for overwrite support -+ PHP_CHECK_LIBRARY(zip, zip_open, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_LIBDIR, ZIP_SHARED_LIBADD) -+ AC_DEFINE(HAVE_LIBZIP,1,[ ]) -+ ], [ -+ AC_MSG_ERROR(could not find usable libzip) -+ ], [ -+ -L$LIBZIP_LIBDIR -+ ]) -+ -+ AC_DEFINE(HAVE_ZIP,1,[ ]) -+ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared,, $LIBZIP_CFLAGS) -+ PHP_SUBST(ZIP_SHARED_LIBADD) - else -- for i in /usr/local /usr; do -- if test -f "$i/include/zlib/zlib.h"; then -- PHP_ZLIB_DIR="$i" -- PHP_ZLIB_INCDIR="$i/include/zlib" -- elif test -f "$i/include/zlib.h"; then -- PHP_ZLIB_DIR="$i" -- PHP_ZLIB_INCDIR="$i/include" -+ -+ dnl bundled libzip, depends on zlib -+ if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then -+ if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then -+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR" -+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib" -+ elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then -+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR" -+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include" -+ else -+ AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"]) - fi -- done -- fi -+ else -+ for i in /usr/local /usr; do -+ if test -f "$i/include/zlib/zlib.h"; then -+ PHP_ZLIB_DIR="$i" -+ PHP_ZLIB_INCDIR="$i/include/zlib" -+ elif test -f "$i/include/zlib.h"; then -+ PHP_ZLIB_DIR="$i" -+ PHP_ZLIB_INCDIR="$i/include" -+ fi -+ done -+ fi - -- dnl # zlib -- AC_MSG_CHECKING([for the location of zlib]) -- if test "$PHP_ZLIB_DIR" = "no"; then -- AC_MSG_ERROR([zip support requires ZLIB. Use --with-zlib-dir= to specify prefix where ZLIB include and library are located]) -- else -- AC_MSG_RESULT([$PHP_ZLIB_DIR]) -- PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD) -- PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR) -- fi -+ dnl # zlib -+ AC_MSG_CHECKING([for the location of zlib]) -+ if test "$PHP_ZLIB_DIR" = "no"; then -+ AC_MSG_ERROR([zip support requires ZLIB. Use --with-zlib-dir= to specify prefix where ZLIB include and library are located]) -+ else -+ AC_MSG_RESULT([$PHP_ZLIB_DIR]) -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, ZIP_SHARED_LIBADD) -+ PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR) -+ fi - -- dnl This is PECL build, check if bundled PCRE library is used -- old_CPPFLAGS=$CPPFLAGS -- CPPFLAGS=$INCLUDES -- AC_EGREP_CPP(yes,[ -+ dnl This is PECL build, check if bundled PCRE library is used -+ old_CPPFLAGS=$CPPFLAGS -+ CPPFLAGS=$INCLUDES -+ AC_EGREP_CPP(yes,[ - #include
- #if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) - yes - #endif -- ],[ -- PHP_PCRE_REGEX=yes -- ],[ -- AC_EGREP_CPP(yes,[ -+ ],[ -+ PHP_PCRE_REGEX=yes -+ ],[ -+ AC_EGREP_CPP(yes,[ - #include
- #if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) - yes - #endif -- ],[ -- PHP_PCRE_REGEX=pecl -- ],[ -- PHP_PCRE_REGEX=no -+ ],[ -+ PHP_PCRE_REGEX=pecl -+ ],[ -+ PHP_PCRE_REGEX=no -+ ]) - ]) -- ]) -- CPPFLAGS=$old_CPPFLAGS -+ CPPFLAGS=$old_CPPFLAGS - -- PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ -+ PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ - lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c \ - lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \ - lib/zip_file_error_get.c lib/zip_free.c lib/zip_rename.c \ -@@ -98,10 +149,11 @@ yes - lib/zip_source_open.c lib/zip_source_pkware.c lib/zip_source_pop.c \ - lib/zip_source_read.c lib/zip_source_stat.c" - -- AC_DEFINE(HAVE_ZIP,1,[ ]) -- PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared) -- PHP_ADD_BUILD_DIR($ext_builddir/lib, 1) -- PHP_SUBST(ZIP_SHARED_LIBADD) -+ AC_DEFINE(HAVE_ZIP,1,[ ]) -+ PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared) -+ PHP_ADD_BUILD_DIR($ext_builddir/lib, 1) -+ PHP_SUBST(ZIP_SHARED_LIBADD) -+ fi - - dnl so we always include the known-good working hack. - PHP_ADD_MAKEFILE_FRAGMENT -diff -up php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip php-5.5.2RC1/ext/zip/libzip-missing-0.10.h ---- php-5.5.2RC1/ext/zip/libzip-missing-0.10.h.systzip 2013-08-08 09:34:53.338910267 +0200 -+++ php-5.5.2RC1/ext/zip/libzip-missing-0.10.h 2013-08-08 09:26:21.244072278 +0200 -@@ -0,0 +1,219 @@ -+/* Copied from libzip 0.10 */ -+ -+/* state of change of a file in zip archive */ -+ -+enum zip_state { ZIP_ST_UNCHANGED, ZIP_ST_DELETED, ZIP_ST_REPLACED, -+ ZIP_ST_ADDED, ZIP_ST_RENAMED }; -+ -+/* error source for layered sources */ -+ -+enum zip_les { ZIP_LES_NONE, ZIP_LES_UPPER, ZIP_LES_LOWER, ZIP_LES_INVAL }; -+ -+typedef zip_int64_t (*zip_source_layered_callback)(struct zip_source *, void *, -+ void *, zip_uint64_t, -+ enum zip_source_cmd); -+ -+struct zip_error { -+ int zip_err; /* libzip error code (ZIP_ER_*) */ -+ int sys_err; /* copy of errno (E*) or zlib error code */ -+ char *str; /* string representation or NULL */ -+}; -+ -+/* zip archive, part of API */ -+ -+struct zip { -+ char *zn; /* file name */ -+ FILE *zp; /* file */ -+ struct zip_error error; /* error information */ -+ -+ unsigned int flags; /* archive global flags */ -+ unsigned int ch_flags; /* changed archive global flags */ -+ -+ char *default_password; /* password used when no other supplied */ -+ -+ struct zip_cdir *cdir; /* central directory */ -+ char *ch_comment; /* changed archive comment */ -+ int ch_comment_len; /* length of changed zip archive -+ * comment, -1 if unchanged */ -+ zip_uint64_t nentry; /* number of entries */ -+ zip_uint64_t nentry_alloc; /* number of entries allocated */ -+ struct zip_entry *entry; /* entries */ -+ int nfile; /* number of opened files within archive */ -+ int nfile_alloc; /* number of files allocated */ -+ struct zip_file **file; /* opened files within archive */ -+}; -+ -+/* file in zip archive, part of API */ -+ -+struct zip_file { -+ struct zip *za; /* zip archive containing this file */ -+ struct zip_error error; /* error information */ -+ int eof; -+ struct zip_source *src; /* data source */ -+}; -+ -+/* zip archive directory entry (central or local) */ -+ -+struct zip_dirent { -+ unsigned short version_madeby; /* (c) version of creator */ -+ unsigned short version_needed; /* (cl) version needed to extract */ -+ unsigned short bitflags; /* (cl) general purpose bit flag */ -+ unsigned short comp_method; /* (cl) compression method used */ -+ time_t last_mod; /* (cl) time of last modification */ -+ unsigned int crc; /* (cl) CRC-32 of uncompressed data */ -+ unsigned int comp_size; /* (cl) size of commpressed data */ -+ unsigned int uncomp_size; /* (cl) size of uncommpressed data */ -+ char *filename; /* (cl) file name (NUL-terminated) */ -+ unsigned short filename_len; /* (cl) length of filename (w/o NUL) */ -+ char *extrafield; /* (cl) extra field */ -+ unsigned short extrafield_len; /* (cl) length of extra field */ -+ char *comment; /* (c) file comment */ -+ unsigned short comment_len; /* (c) length of file comment */ -+ unsigned short disk_number; /* (c) disk number start */ -+ unsigned short int_attrib; /* (c) internal file attributes */ -+ unsigned int ext_attrib; /* (c) external file attributes */ -+ unsigned int offset; /* (c) offset of local header */ -+}; -+ -+/* zip archive central directory */ -+ -+struct zip_cdir { -+ struct zip_dirent *entry; /* directory entries */ -+ int nentry; /* number of entries */ -+ -+ unsigned int size; /* size of central direcotry */ -+ unsigned int offset; /* offset of central directory in file */ -+ char *comment; /* zip archive comment */ -+ unsigned short comment_len; /* length of zip archive comment */ -+}; -+ -+struct zip_source { -+ struct zip_source *src; -+ union { -+ zip_source_callback f; -+ zip_source_layered_callback l; -+ } cb; -+ void *ud; -+ enum zip_les error_source; -+ int is_open; -+}; -+ -+/* entry in zip archive directory */ -+ -+struct zip_entry { -+ enum zip_state state; -+ struct zip_source *source; -+ char *ch_filename; -+ char *ch_extra; -+ int ch_extra_len; -+ char *ch_comment; -+ int ch_comment_len; -+}; -+ -+void _zip_dirent_finalize(struct zip_dirent *zde) -+{ -+ free(zde->filename); -+ zde->filename = NULL; -+ free(zde->extrafield); -+ zde->extrafield = NULL; -+ free(zde->comment); -+ zde->comment = NULL; -+} -+ -+void _zip_cdir_free(struct zip_cdir *cd) -+{ -+ int i; -+ -+ if (!cd) -+ return; -+ -+ for (i=0; inentry; i++) -+ _zip_dirent_finalize(cd->entry+i); -+ free(cd->comment); -+ free(cd->entry); -+ free(cd); -+} -+ -+void _zip_error_fini(struct zip_error *err) -+{ -+ free(err->str); -+ err->str = NULL; -+} -+ -+void _zip_error_init(struct zip_error *err) -+{ -+ err->zip_err = ZIP_ER_OK; -+ err->sys_err = 0; -+ err->str = NULL; -+} -+ -+void _zip_unchange_data(struct zip_entry *ze) -+{ -+ if (ze->source) { -+ zip_source_free(ze->source); -+ ze->source = NULL; -+ } -+ -+ ze->state = ze->ch_filename ? ZIP_ST_RENAMED : ZIP_ST_UNCHANGED; -+} -+ -+void _zip_entry_free(struct zip_entry *ze) -+{ -+ free(ze->ch_filename); -+ ze->ch_filename = NULL; -+ free(ze->ch_extra); -+ ze->ch_extra = NULL; -+ ze->ch_extra_len = -1; -+ free(ze->ch_comment); -+ ze->ch_comment = NULL; -+ ze->ch_comment_len = -1; -+ -+ _zip_unchange_data(ze); -+} -+ -+void -+_zip_error_set(struct zip_error *err, int ze, int se) -+{ -+ if (err) { -+ err->zip_err = ze; -+ err->sys_err = se; -+ } -+} -+ -+void _zip_free(struct zip *za) -+{ -+ int i; -+ -+ if (za == NULL) -+ return; -+ -+ if (za->zn) -+ free(za->zn); -+ -+ if (za->zp) -+ fclose(za->zp); -+ -+ free(za->default_password); -+ _zip_cdir_free(za->cdir); -+ free(za->ch_comment); -+ -+ if (za->entry) { -+ for (i=0; inentry; i++) { -+ _zip_entry_free(za->entry+i); -+ } -+ free(za->entry); -+ } -+ -+ for (i=0; infile; i++) { -+ if (za->file[i]->error.zip_err == ZIP_ER_OK) { -+ _zip_error_set(&za->file[i]->error, ZIP_ER_ZIPCLOSED, 0); -+ za->file[i]->za = NULL; -+ } -+ } -+ -+ free(za->file); -+ free(za); -+ return; -+} -+ -+ -diff -up php-5.5.2RC1/ext/zip/php_zip.c.systzip php-5.5.2RC1/ext/zip/php_zip.c ---- php-5.5.2RC1/ext/zip/php_zip.c.systzip 2013-07-31 10:41:15.000000000 +0200 -+++ php-5.5.2RC1/ext/zip/php_zip.c 2013-08-08 09:33:59.367735224 +0200 -@@ -30,8 +30,20 @@ - #include "ext/pcre/php_pcre.h" - #include "ext/standard/php_filestat.h" - #include "php_zip.h" -+ -+#if defined(HAVE_LIBZIP) -+#include -+ -+#if LIBZIP_VERSION_MAJOR == 0 && LIBZIP_VERSION_MINOR == 10 -+#include "libzip-missing-0.10.h" -+#else -+#error "Only libzip 0.10 supported for now" -+#endif -+ -+#else - #include "lib/zip.h" - #include "lib/zipint.h" -+#endif - - /* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */ - static PHP_NAMED_FUNCTION(zif_zip_open); -@@ -1631,6 +1643,10 @@ static ZIPARCHIVE_METHOD(addEmptyDir) - } - - idx = zip_stat(intern, s, 0, &sb); -+ /* We don't care about the NOENT status error here. */ -+ if (intern->error.zip_err == ZIP_ER_NOENT) { -+ _zip_error_set(&intern->error, ZIP_ER_OK, 0); -+ } - if (idx >= 0) { - RETVAL_FALSE; - } else { -@@ -1853,6 +1869,10 @@ static ZIPARCHIVE_METHOD(addFromString) - } - - cur_idx = zip_name_locate(intern, (const char *)name, 0); -+ /* We don't care about the NOENT status error here. */ -+ if (intern->error.zip_err == ZIP_ER_NOENT) { -+ _zip_error_set(&intern->error, ZIP_ER_OK, 0); -+ } - /* TODO: fix _zip_replace */ - if (cur_idx >= 0) { - if (zip_delete(intern, cur_idx) == -1) { -@@ -2877,5 +2897,9 @@ static PHP_MINFO_FUNCTION(zip) - php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING); -- php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION); -+#if defined(HAVE_LIBZIP) -+ php_info_print_table_row(2, "Compiled against libzip version", LIBZIP_VERSION); -+#else -+ php_info_print_table_row(2, "Bundled libzip version", LIBZIP_VERSION); -+#endif - - php_info_print_table_end(); - } -diff -up php-5.5.2RC1/ext/zip/php_zip.h.systzip php-5.5.2RC1/ext/zip/php_zip.h ---- php-5.5.2RC1/ext/zip/php_zip.h.systzip 2013-07-31 10:41:15.000000000 +0200 -+++ php-5.5.2RC1/ext/zip/php_zip.h 2013-08-08 09:24:07.579567249 +0200 -@@ -28,7 +28,11 @@ extern zend_module_entry zip_module_entr - #include "TSRM.h" - #endif - -+#if defined(HAVE_LIBZIP) -+#include -+#else - #include "lib/zip.h" -+#endif - - #define PHP_ZIP_VERSION_STRING "1.11.0" - -diff -up php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip php-5.5.2RC1/ext/zip/tests/bug38943.phpt ---- php-5.5.2RC1/ext/zip/tests/bug38943.phpt.systzip 2013-07-31 10:41:15.000000000 +0200 -+++ php-5.5.2RC1/ext/zip/tests/bug38943.phpt 2013-08-08 09:24:07.579567249 +0200 -@@ -27,7 +27,7 @@ array(1) { - [0]=> - int(1) - } --object(myZip)#1 (%d) { -+object(myZip)#%d (%d) { - ["test":"myZip":private]=> - int(0) - ["testp"]=> -diff -up php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip php-5.5.2RC1/ext/zip/tests/pecl12414.phpt ---- php-5.5.2RC1/ext/zip/tests/pecl12414.phpt.systzip 2013-07-31 10:41:15.000000000 +0200 -+++ php-5.5.2RC1/ext/zip/tests/pecl12414.phpt 2013-08-08 09:24:07.579567249 +0200 -@@ -5,6 +5,8 @@ Bug #12414 ( extracting files from damag - /*$ */ - if(!extension_loaded('zip')) die('skip'); - ?> -+--XFAIL-- -+Doesn't work with system libzip (zip_readfile could not read from ...) - --FILE-- - -+#else - #include "lib/zip.h" -+#endif - - #include "php_streams.h" - #include "ext/standard/file.h" diff --git a/php-5.6.0-noNO.patch b/php-5.6.0-noNO.patch new file mode 100644 index 0000000..52f54ab --- /dev/null +++ b/php-5.6.0-noNO.patch @@ -0,0 +1,43 @@ +--- ext/standard/tests/strings/setlocale_variation2.phpt.orig 2014-06-11 16:10:00.259326468 +0200 ++++ ext/standard/tests/strings/setlocale_variation2.phpt 2014-06-11 16:16:14.396138997 +0200 +@@ -52,6 +52,7 @@ + //try different locale names + $failure_locale = array(); + $success_count = 0; ++$expected = 0; + + echo "-- Test setlocale() with all available locale in the system --\n"; + // gather all locales installed in the system(stored $all_system_locales), +@@ -61,6 +62,10 @@ + if(setlocale(LC_ALL,$value )){ + $success_count++; + } ++ else if ($value == 'no_NO.ISO-8859-1') { ++ // ignore this one, see rhbz #971416 ++ $expected++; ++ } + else{ + //failure values are put in to an array $failure_locale + $failure_locale[] = $value; +@@ -69,11 +74,11 @@ + + echo "No of locales found on the machine = ".count($all_system_locales)."\n"; + echo "No of setlocale() success = ".$success_count."\n"; +-echo "Expected no of failures = 0\n"; ++echo "Expected no of failures = $expected\n"; + echo "Test "; + // check if there were any failure of setlocale() function earlier, if any + // failure then dump the list of failing locales +-if($success_count != count($all_system_locales)){ ++if(($success_count + $expected) != count($all_system_locales)){ + echo "FAILED\n"; + echo "Names of locale() for which setlocale() failed ...\n"; + var_dump($failure_locale); +@@ -89,6 +94,6 @@ + -- Test setlocale() with all available locale in the system -- + No of locales found on the machine = %d + No of setlocale() success = %d +-Expected no of failures = 0 ++Expected no of failures = %d + Test PASSED + Done diff --git a/php-5.6.0-oldpcre.patch b/php-5.6.0-oldpcre.patch new file mode 100644 index 0000000..df6edb2 --- /dev/null +++ b/php-5.6.0-oldpcre.patch @@ -0,0 +1,39 @@ +diff -up ./ext/pcre/tests/bug37911.phpt.pcre834 ./ext/pcre/tests/bug37911.phpt +--- ./ext/pcre/tests/bug37911.phpt.pcre834 2014-03-26 14:10:18.285452752 +0100 ++++ ./ext/pcre/tests/bug37911.phpt 2014-03-26 14:10:40.028526763 +0100 +@@ -37,5 +37,5 @@ array(3) { + string(4) "blub" + } + +-Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d ++Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line %d + NULL +diff -up ./ext/pcre/tests/grep2.phpt.pcre834 ./ext/pcre/tests/grep2.phpt +--- ./ext/pcre/tests/grep2.phpt.pcre834 2014-03-26 14:08:26.583072531 +0100 ++++ ./ext/pcre/tests/grep2.phpt 2014-03-26 14:09:09.345218089 +0100 +@@ -40,12 +40,6 @@ array(1) { + string(1) "1" + } + bool(true) +-array(3) { +- [5]=> +- string(1) "a" +- ["xyz"]=> +- string(2) "q6" +- [6]=> +- string(3) "h20" ++array(0) { + } +-bool(false) ++bool(true) +diff -up ./ext/pcre/tests/match_flags3.phpt.pcre834 ./ext/pcre/tests/match_flags3.phpt +--- ./ext/pcre/tests/match_flags3.phpt.pcre834 2014-03-26 14:06:48.792739665 +0100 ++++ ./ext/pcre/tests/match_flags3.phpt 2014-03-26 14:07:31.820886128 +0100 +@@ -42,5 +42,5 @@ array(1) { + } + } + +-Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d ++Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line %d + bool(false) +diff -up ./ext/standard/tests/strings/setlocale_variation2.phpt.pcre834 ./ext/standard/tests/strings/setlocale_variation2.phpt diff --git a/php-bug67326.patch b/php-bug67326.patch deleted file mode 100644 index 2e7b0b1..0000000 --- a/php-bug67326.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4fcb9a9d1b1063a65fbeb27395de4979c75bd962 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 3 Jun 2014 11:05:00 +0200 -Subject: [PATCH] Fix bug #67326 fileinfo: cdf_read_short_sector insufficient - boundary check - -Upstream fix https://github.com/file/file/commit/6d209c1c489457397a5763bca4b28e43aac90391.patch -Only revelant part applied ---- - ext/fileinfo/libmagic/cdf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c -index 4712e84..16649f1 100644 ---- a/ext/fileinfo/libmagic/cdf.c -+++ b/ext/fileinfo/libmagic/cdf.c -@@ -365,10 +365,10 @@ cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs, - size_t ss = CDF_SHORT_SEC_SIZE(h); - size_t pos = CDF_SHORT_SEC_POS(h, id); - assert(ss == len); -- if (pos > CDF_SEC_SIZE(h) * sst->sst_len) { -+ if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) { - DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %" - SIZE_T_FORMAT "u\n", -- pos, CDF_SEC_SIZE(h) * sst->sst_len)); -+ pos + len, CDF_SEC_SIZE(h) * sst->sst_len)); - return -1; - } - (void)memcpy(((char *)buf) + offs, --- -1.9.2 - diff --git a/php-fpm.conf b/php-fpm.conf index 44ab39c..a919add 100644 --- a/php-fpm.conf +++ b/php-fpm.conf @@ -80,7 +80,7 @@ error_log = /var/log/php-fpm/error.log ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes -daemonize = no +daemonize = yes ; Set open file descriptor rlimit for the master process. ; Default Value: system defined value diff --git a/php-reg67072.patch b/php-reg67072.patch deleted file mode 100644 index 0258d95..0000000 --- a/php-reg67072.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 20568e502814fffc41d91a22edaf75ff5ae19d5c Mon Sep 17 00:00:00 2001 -From: Anatol Belski -Date: Tue, 3 Jun 2014 20:43:58 +0200 -Subject: [PATCH] Fixed regression introduced by patch for bug #67072 - -This applies to 5.4 and 5.5 only as a legacy fix. ---- - ext/standard/tests/serialize/005.phpt | 8 ++--- - ext/standard/var_unserializer.c | 68 ++++++++++++++++++----------------- - ext/standard/var_unserializer.re | 6 +++- - 3 files changed, 44 insertions(+), 38 deletions(-) - -diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt -index 2df2701..07d47bd 100644 ---- a/ext/standard/tests/serialize/005.phpt -+++ b/ext/standard/tests/serialize/005.phpt -@@ -156,11 +156,9 @@ object(TestNAOld)#%d (0) { - } - ===NANew=== - unserializer(TestNANew) -- --Warning: Erroneous data format for unserializing 'TestNANew' in %s005.php on line %d -- --Notice: unserialize(): Error at offset 19 of 20 bytes in %s005.php on line %d --bool(false) -+TestNew::__wakeup() -+object(TestNANew)#1 (0) { -+} - ===NANew2=== - unserializer(TestNANew2) - TestNew::unserialize() -diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c -index 003bac9..29d2e0f 100644 ---- a/ext/standard/var_unserializer.c -+++ b/ext/standard/var_unserializer.c -@@ -396,7 +396,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) - - (*p) += 2; - -- if (ce->serialize == NULL) { -+ /* The internal class check here is a BC fix only, userspace classes implementing the -+ Serializable interface have eventually an inconsistent behavior at this place when -+ unserialized from a manipulated string. Additionaly the interal classes can possibly -+ crash PHP so they're still disabled here. */ -+ if (ce->serialize == NULL || ZEND_INTERNAL_CLASS != ce->type) { - object_init_ex(*rval, ce); - } else { - /* If this class implements Serializable, it should not land here but in object_custom(). The passed string -diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re -index b3f5d29..cd4d53b 100644 ---- a/ext/standard/var_unserializer.re -+++ b/ext/standard/var_unserializer.re -@@ -400,7 +400,11 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) - - (*p) += 2; - -- if (ce->serialize == NULL) { -+ /* The internal class check here is a BC fix only, userspace classes implementing the -+ Serializable interface have eventually an inconsistent behavior at this place when -+ unserialized from a manipulated string. Additionaly the interal classes can possibly -+ crash PHP so they're still disabled here. */ -+ if (ce->serialize == NULL || ZEND_INTERNAL_CLASS != ce->type) { - object_init_ex(*rval, ce); - } else { - /* If this class implements Serializable, it should not land here but in object_custom(). The passed string --- -1.9.2 - diff --git a/php-reg67118.patch b/php-reg67118.patch deleted file mode 100644 index 744ae23..0000000 --- a/php-reg67118.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 1fe9f1e4f572d7b4d5a3872f41ea61e71fb563bf Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 5 Jun 2014 13:39:46 +0200 -Subject: [PATCH] Fix regression introduce in fix for bug #67118 - -The fix was correct but break some code (at least in Horde) -This is a temporary workaround to fix regressioni in 5.4, 5.5 and 5.6 - -This make php_date_initialize more consistent -- on success return 1 + time initiliazed -- on failure return 0 + time = zero - which is check by DATE_CHECK_INITIALIZED by later method call - -Will restore consistency with other date classes in master. ---- - ext/date/php_date.c | 6 +++--- - ext/date/tests/bug67118.phpt | 18 +++++++++--------- - 2 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/ext/date/php_date.c b/ext/date/php_date.c -index a2bf001..595b0b0 100644 ---- a/ext/date/php_date.c -+++ b/ext/date/php_date.c -@@ -2441,6 +2441,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, - err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message); - } - if (err && err->error_count) { -+ timelib_time_dtor(dateobj->time); -+ dateobj->time = 0; - return 0; - } - -@@ -2548,9 +2550,7 @@ PHP_METHOD(DateTime, __construct) - - zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC); - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) { -- if (!php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC)) { -- ZVAL_NULL(getThis()); -- } -+ php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC); - } - zend_restore_error_handling(&error_handling TSRMLS_CC); - } -diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt -index 6371757..973b4eb 100644 ---- a/ext/date/tests/bug67118.phpt -+++ b/ext/date/tests/bug67118.phpt -@@ -1,5 +1,5 @@ - --TEST-- --Bug #67118 php-cgi crashes regularly on IIS 7 -+Bug #67118 crashes in DateTime when this used after failed __construct - --INI-- - date.timezone=Europe/Berlin - --FILE-- -@@ -12,16 +12,16 @@ - $tz = new DateTimeZone($tz); - } - -- @parent::__construct($time, $tz); -+ try { -+ @parent::__construct($time, $tz); -+ } catch (Exception $e) { -+ echo "Bad date" . $this->format("Y") . "\n"; -+ } - } - - }; - - new mydt("Funktionsansvarig rÄdgivning och juridik", "UTC"); - --EXPECTF-- --Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Funktionsansvarig rÄdgivning och juridik) at position 0 (F): The timezone could not be found in the database' in %sbug67118.php:%d --Stack trace: --#0 %sbug67118.php(%d): DateTime->__construct('Funktionsansvar...', Object(DateTimeZone)) --#1 %sbug67118.php(%d): mydt->__construct('Funktionsansvar...', 'UTC') --#2 {main} -- thrown in %sbug67118.php on line %d -+Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug67118.php on line %d -+Bad date --- -1.9.2 - -From 15d8c80ead75be976c18a66b0933cf52f3e6579f Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 5 Jun 2014 14:00:00 +0200 -Subject: [PATCH] add test for previous fix - ---- - ext/date/tests/bug67118_2.phpt | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - create mode 100644 ext/date/tests/bug67118_2.phpt - -diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt -new file mode 100644 -index 0000000..b517a3b ---- /dev/null -+++ b/ext/date/tests/bug67118_2.phpt -@@ -0,0 +1,35 @@ -+--TEST-- -+Regression introduce in fix for Bug #67118 -+--INI-- -+date.timezone=Europe/Paris -+--FILE-- -+ -+Done -+--EXPECTF-- -+First try -+Second try -+object(Foo)#1 (3) { -+ ["date"]=> -+ string(26) "2007-09-12 15:49:12.000000" -+ ["timezone_type"]=> -+ int(3) -+ ["timezone"]=> -+ string(3) "UTC" -+} -+Done -\ No newline at end of file --- -1.9.2 - -From 127651e9aeb4294c6be8c450fc1e7344570045f3 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 5 Jun 2014 17:33:40 +0200 -Subject: [PATCH] fix test for 5.4/5.5 - ---- - ext/date/tests/bug67118_2.phpt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt -index b517a3b..b4904a1 100644 ---- a/ext/date/tests/bug67118_2.phpt -+++ b/ext/date/tests/bug67118_2.phpt -@@ -26,10 +26,10 @@ First try - Second try - object(Foo)#1 (3) { - ["date"]=> -- string(26) "2007-09-12 15:49:12.000000" -+ string(%d) "2007-09-12 15:49:%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(3) "UTC" - } --Done -\ No newline at end of file -+Done --- -1.9.2 - diff --git a/php.ini b/php.ini index dece0ac..42e85a5 100644 --- a/php.ini +++ b/php.ini @@ -78,9 +78,9 @@ ; compatibility with older or less security conscience applications. We ; recommending using the production ini in production and testing environments. -; php.ini-development is very similar to its production variant, except it's -; much more verbose when it comes to errors. We recommending using the -; development version only in development environments as errors shown to +; php.ini-development is very similar to its production variant, except it is +; much more verbose when it comes to errors. We recommend using the +; development version only in development environments, as errors shown to ; application users can inadvertently leak otherwise secure information. ; This is php.ini-production INI file. @@ -423,7 +423,7 @@ memory_limit = 128M ; E_NOTICE - run-time notices (these are warnings which often result ; from a bug in your code, but it's possible that it was ; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an +; relying on the fact it is automatically initialized to an ; empty string) ; E_STRICT - run-time notices, enable to have PHP suggest changes ; to your code which will ensure the best interoperability @@ -456,8 +456,8 @@ error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT ; it could be very dangerous in production environments. Depending on the code ; which is triggering the error, sensitive information could potentially leak ; out of your application such as database usernames and passwords or worse. -; It's recommended that errors be logged on production servers rather than -; having the errors sent to STDOUT. +; For production environments, we recommend logging errors rather than +; sending them to STDOUT. ; Possible Values: ; Off = Do not display any errors ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) @@ -471,8 +471,8 @@ display_errors = Off ; The display of errors which occur during PHP's startup sequence are handled ; separately from display_errors. PHP's default behavior is to suppress those ; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. But, it's strongly recommended that you -; leave this setting off on production servers. +; debugging configuration problems. We strongly recommend you +; set this to 'off' for production servers. ; Default Value: Off ; Development Value: On ; Production Value: Off @@ -573,7 +573,7 @@ html_errors = On ; http://php.net/error-log ; Example: ;error_log = php_errors.log -; Log errors to syslog (Event Log on Windows). +; Log errors to syslog. ;error_log = syslog ;windows.show_crt_warning @@ -680,13 +680,29 @@ default_mimetype = "text/html" ; PHP's default character set is set to empty. ; http://php.net/default-charset -;default_charset = "UTF-8" +default_charset = "UTF-8" + +; PHP internal character encoding is set to empty. +; If empty, default_charset is used. +; http://php.net/internal-encoding +;internal_encoding = + +; PHP input character encoding is set to empty. +; http://php.net/input-encoding +;input_encoding = + +; PHP output character encoding is set to empty. +; mbstring or iconv output handler is used. +; See also output_buffer. +; http://php.net/output-encoding +;output_encoding = ; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is -; to disable this feature. If post reading is disabled through -; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated. +; to disable this feature and it will be removed in a future version. +; If post reading is disabled through enable_post_data_reading, +; $HTTP_RAW_POST_DATA is *NOT* populated. ; http://php.net/always-populate-raw-post-data -;always_populate_raw_post_data = On +;always_populate_raw_post_data = -1 ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; @@ -770,8 +786,8 @@ enable_dl = Off ;fastcgi.logging = 0 ; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send +; use when sending HTTP response code. If set to 0, PHP sends Status: header that +; is supported by Apache. When this option is set to 1, PHP will send ; RFC2616 compliant header. ; Default is zero. ; http://php.net/cgi.rfc2616-headers @@ -892,9 +908,22 @@ cli_server.color = On ;filter.default_flags = [iconv] -;iconv.input_encoding = ISO-8859-1 -;iconv.internal_encoding = ISO-8859-1 -;iconv.output_encoding = ISO-8859-1 +; Use of this INI entry is deprecated, use global input_encoding instead. +; If empty, default_charset or input_encoding or iconv.input_encoding is used. +; The precedence is: default_charset < intput_encoding < iconv.input_encoding +;iconv.input_encoding = + +; Use of this INI entry is deprecated, use global internal_encoding instead. +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;iconv.internal_encoding = + +; Use of this INI entry is deprecated, use global output_encoding instead. +; If empty, default_charset or output_encoding or iconv.output_encoding is used. +; The precedence is: default_charset < output_encoding < iconv.output_encoding +; To use an output encoding conversion, iconv's output handler must be set +; otherwise output encoding conversion cannot be performed. +;iconv.output_encoding = [intl] ;intl.default_locale = @@ -964,7 +993,7 @@ mail.add_x_header = On ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = -; Log mail to syslog (Event Log on Windows). +; Log mail to syslog; ;mail.log = syslog [SQL] @@ -1320,9 +1349,9 @@ session.save_handler = files ; ; where N is an integer. Instead of storing all the session files in ; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. +; store the session data in those directories. This is useful if +; your OS has problems with many files in one directory, and is +; a more efficient layout for servers that handle many sessions. ; ; NOTE 1: PHP will not create this directory structure automatically. ; You can use the script in the ext/session dir for that purpose. @@ -1361,7 +1390,7 @@ session.use_cookies = 1 ; This option forces PHP to fetch and use a cookie for storing and maintaining ; the session id. We encourage this operation as it's very helpful in combating ; session hijacking when not specifying and managing your own session id. It is -; not the end all be all of session hijacking defense, but it's a good start. +; not the be-all and end-all of session hijacking defense, but it's a good start. ; http://php.net/session.use-only-cookies session.use_only_cookies = 1 @@ -1461,7 +1490,7 @@ session.cache_limiter = nocache session.cache_expire = 180 ; trans sid support is disabled by default. -; Use of trans sid may risk your users security. +; Use of trans sid may risk your users' security. ; Use this option with caution. ; - User may send URL contains active session ID ; to other person via. email/irc/etc. @@ -1626,23 +1655,33 @@ mssql.secure_connection = Off [mbstring] ; language for internal character representation. +; This affects mb_send_mail() and mbstrig.detect_order. ; http://php.net/mbstring.language ;mbstring.language = Japanese +; Use of this INI entry is deprecated, use global internal_encoding instead. ; internal/script encoding. -; Some encoding cannot work as internal encoding. -; (e.g. SJIS, BIG5, ISO-2022-*) -; http://php.net/mbstring.internal-encoding -;mbstring.internal_encoding = UTF-8 +; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;mbstring.internal_encoding = +; Use of this INI entry is deprecated, use global input_encoding instead. ; http input encoding. +; mbstring.encoding_traslation = On is needed to use this setting. +; If empty, default_charset or input_encoding or mbstring.input is used. +; The precedence is: default_charset < intput_encoding < mbsting.http_input ; http://php.net/mbstring.http-input -;mbstring.http_input = UTF-8 +;mbstring.http_input = -; http output encoding. mb_output_handler must be -; registered as output buffer to function -; http://php.net/mbstring.http-output -;mbstring.http_output = pass +; Use of this INI entry is deprecated, use global output_encoding instead. +; http output encoding. +; mb_output_handler must be registered as output buffer to function. +; If empty, default_charset or output_encoding or mbstring.http_output is used. +; The precedence is: default_charset < output_encoding < mbstring.http_output +; To use an output encoding conversion, mbstring's output handler must be set +; otherwise output encoding conversion cannot be performed. +;mbstring.http_output = ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are @@ -1653,7 +1692,7 @@ mssql.secure_connection = Off ;mbstring.encoding_translation = Off ; automatic encoding detection order. -; auto means +; "auto" detect order is changed accoding to mbstring.language ; http://php.net/mbstring.detect-order ;mbstring.detect_order = auto @@ -1674,6 +1713,7 @@ mssql.secure_connection = Off ;mbstring.func_overload = 0 ; enable strict encoding detection. +; Default: Off ;mbstring.strict_detection = On ; This directive specifies the regex pattern of content types for which mb_output_handler() @@ -1771,6 +1811,24 @@ ldap.max_links = -1 ; absolute path. ;curl.cainfo = +[openssl] +; The location of a Certificate Authority (CA) file on the local filesystem +; to use when verifying the identity of SSL/TLS peers. Most users should +; not specify a value for this directive as PHP will attempt to use the +; OS-managed cert stores in its absence. If specified, this value may still +; be overridden on a per-stream basis via the "cafile" SSL stream context +; option. +;openssl.cafile= + +; If openssl.cafile is not specified or if the CA file is not found, the +; directory pointed to by openssl.capath is searched for a suitable +; certificate. This value must be a correctly hashed certificate directory. +; Most users should not specify a value for this directive as PHP will +; attempt to use the OS-managed cert stores in its absence. If specified, +; this value may still be overridden on a per-stream basis via the "capath" +; SSL stream context option. +;openssl.capath= + ; Local Variables: ; tab-width: 4 ; End: diff --git a/php.spec b/php.spec index ab6155d..200f2b9 100644 --- a/php.spec +++ b/php.spec @@ -1,20 +1,27 @@ # API/ABI check -%global apiver 20121113 -%global zendver 20121212 +%global apiver 20131106 +%global zendver 20131226 %global pdover 20080721 # Extension version %global opcachever 7.0.4-dev +# Use for first build of PHP (before pecl/zip and pecl/jsonc) +%global php_bootstrap 1 + # Adds -z now to the linker flags %global _hardened_build 1 # version used for php embedded library soname -%global embed_version 5.5 +%global embed_version 5.6 %global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock) # Regression tests take a long time, you can skip 'em with this -%{!?runselftest: %{expand: %%global runselftest 1}} +%if %{php_bootstrap} +%global runselftest 0 +%else +%{!?runselftest: %global runselftest 1} +%endif # Use the arch-specific mysql_config binary to avoid mismatch with the # arch detection heuristic used by bindir/mysql_config. @@ -50,13 +57,8 @@ %global with_libgd 1 %endif -%if 0%{?fedora} == 17 || 0%{?fedora} == 18 || 0%{?fedora} == 19 || 0%{?rhel} == 7 -%global with_zip 1 -%global with_libzip 1 -%else %global with_zip 0 %global with_libzip 0 -%endif %if 0%{?fedora} < 18 && 0%{?rhel} < 7 %global db_devel db4-devel @@ -64,12 +66,12 @@ %global db_devel libdb-devel %endif -#global rcver RC3 +%global rcver RC1 Summary: PHP scripting language for creating dynamic web sites Name: php -Version: 5.5.13 -Release: 3%{?dist} +Version: 5.6.0 +Release: 0.0.%{rcver}%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -111,8 +113,6 @@ Patch40: php-5.4.0-dlopen.patch Patch42: php-5.3.1-systzdata-v10.patch # See http://bugs.php.net/53436 Patch43: php-5.4.0-phpize.patch -# Use system libzip instead of bundled one -Patch44: php-5.5.2-system-libzip.patch # Use -lldap_r for OpenLDAP Patch45: php-5.4.8-ldap_r.patch # Make php_config.h constant across builds @@ -121,15 +121,14 @@ Patch46: php-5.4.9-fixheader.patch Patch47: php-5.4.9-phpinfo.patch # Upstream fixes (100+) -Patch100: php-reg67072.patch -Patch101: php-bug67326.patch -Patch102: php-reg67118.patch # Security fixes (200+) # Fixes for tests (300+) -# Revert changes for pcre 8.34 -Patch301: php-5.5.10-pcre834.patch +# Revert changes for pcre < 8.34 +Patch301: php-5.6.0-oldpcre.patch +# see https://bugzilla.redhat.com/971416 +Patch302: php-5.6.0-noNO.patch BuildRequires: bzip2-devel, curl-devel >= 7.9 @@ -141,8 +140,7 @@ BuildRequires: pcre-devel >= 6.6 BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++ BuildRequires: libtool-ltdl-devel %if %{with_libzip} -BuildRequires: libzip-devel >= 0.10 -BuildRequires: libzip-devel < 0.11 +BuildRequires: libzip-devel >= 0.11 %endif %if %{with_dtrace} BuildRequires: systemtap-sdt-devel @@ -162,12 +160,13 @@ Requires: php-cli%{?_isa} = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd - +%if 0%{?fedora} < 20 # Don't provides extensions, which are not shared library, as .so %{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_libdir}/php-zts/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$} %{?filter_setup} +%endif %description @@ -176,7 +175,7 @@ easy for developers to write dynamically generated web pages. PHP also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled webpage with PHP is fairly simple. The most common -use of PHP coding is probably as a replacement for CGI scripts. +use of PHP coding is probably as a replacement for CGI scripts. The php package contains the module (often referred to as mod_php) which adds support for the PHP language to Apache HTTP Server. @@ -190,10 +189,19 @@ Provides: php-pcntl, php-pcntl%{?_isa} Provides: php-readline, php-readline%{?_isa} %description cli -The php-cli package contains the command-line interface +The php-cli package contains the command-line interface executing PHP scripts, /usr/bin/php, and the CGI interface. +%package dbg +Group: Development/Languages +Summary: The interactive PHP debugger +Requires: php-common%{?_isa} = %{version}-%{release} + +%description dbg +The php-dbg package contains the interactive PHP debugger. + + %package fpm Group: Development/Languages Summary: PHP FastCGI Process Manager @@ -253,8 +261,9 @@ Provides: php-sockets, php-sockets%{?_isa} Provides: php-spl, php-spl%{?_isa} Provides: php-standard = %{version}, php-standard%{?_isa} = %{version} Provides: php-tokenizer, php-tokenizer%{?_isa} -# Temporary circular dep (to remove for bootstrap) +%if ! %{php_bootstrap} Requires: php-pecl-jsonc%{?_isa} +%endif %if %{with_zip} Provides: php-zip, php-zip%{?_isa} Obsoletes: php-pecl-zip < 1.11 @@ -277,8 +286,9 @@ Requires: pcre-devel%{?_isa} Provides: php-zts-devel = %{version}-%{release} Provides: php-zts-devel%{?_isa} = %{version}-%{release} %endif -# Temporary circular dep (to remove for bootstrap) +%if ! %{php_bootstrap} Requires: php-pecl-jsonc-devel%{?_isa} +%endif %description devel The php-devel package contains the files needed for building PHP @@ -345,7 +355,7 @@ Provides: php-pdo_sqlite, php-pdo_sqlite%{?_isa} %description pdo The php-pdo package contains a dynamic shared object that will add a database access abstraction layer to PHP. This module provides -a common interface for accessing MySQL, PostgreSQL or other +a common interface for accessing MySQL, PostgreSQL or other databases. %if %{with_libmysql} @@ -478,11 +488,11 @@ The php-interbase package contains a dynamic shared object that will add database support through Interbase/Firebird to PHP. InterBase is the name of the closed-source variant of this RDBMS that was -developed by Borland/Inprise. +developed by Borland/Inprise. -Firebird is a commercially independent project of C and C++ programmers, -technical advisors and supporters developing and enhancing a multi-platform -relational database management system based on the source code released by +Firebird is a commercially independent project of C and C++ programmers, +technical advisors and supporters developing and enhancing a multi-platform +relational database management system based on the source code released by Inprise Corp (now known as Borland Software Corp) under the InterBase Public License. @@ -712,6 +722,9 @@ support for using the enchant library to PHP. %prep %setup -q -n php-%{version}%{?rcver} +# ensure than current httpd use prefork MPM. +httpd -V | grep -q 'threaded:.*yes' && exit 1 + %patch5 -p1 -b .includedir %patch6 -p1 -b .embed %patch7 -p1 -b .recode @@ -722,23 +735,22 @@ support for using the enchant library to PHP. %patch40 -p1 -b .dlopen %patch42 -p1 -b .systzdata %patch43 -p1 -b .headers -%if %{with_libzip} -%patch44 -p1 -b .systzip -%endif %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %patch45 -p1 -b .ldap_r %endif %patch46 -p1 -b .fixheader %patch47 -p1 -b .phpinfo -%patch100 -p1 -b .reg67072 -%patch101 -p1 -b .bug67326 -%patch102 -p1 -b .reg67118 +# upstream patches +# security patches + +# Fixes for tests %if 0%{?fedora} < 21 -# Only revert when system libpcre < 8.34 -%patch301 -p1 -R -b .pcre84 +# Only apply when system libpcre < 8.34 +%patch301 -p1 -b .pcre834 %endif +%patch302 -p0 -b .971416 # Prevent %%doc confusion over LICENSE files @@ -766,9 +778,11 @@ mkdir build-cgi build-apache build-embedded \ # ----- Manage known as failed test ------- # affected by systzdata patch -rm -f ext/date/tests/timezone_location_get.phpt +rm ext/date/tests/timezone_location_get.phpt # fails sometime -rm -f ext/sockets/tests/mcast_ipv?_recv.phpt +rm ext/sockets/tests/mcast_ipv?_recv.phpt +# cause stack exhausion +rm Zend/tests/bug54268.phpt # Safety check for API version change. pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h) @@ -803,7 +817,7 @@ fi # Check for some extension version ver=$(sed -n '/#define PHP_ZENDOPCACHE_VERSION /{s/.* "//;s/".*$//;p}' ext/opcache/ZendAccelerator.h) if test "$ver" != "%{opcachever}"; then - : Error: Upstream PHAR version is now ${ver}, expecting %{opcachever}. + : Error: Upstream OPCACHE version is now ${ver}, expecting %{opcachever}. : Update the opcachever macro and rebuild. exit 1 fi @@ -899,7 +913,7 @@ ln -sf ../configure --enable-dtrace \ %endif $* -if test $? != 0; then +if test $? != 0; then tail -500 config.log : configure failed exit 1 @@ -914,6 +928,7 @@ pushd build-cgi build --libdir=%{_libdir}/php \ --enable-pcntl \ --enable-opcache \ + --enable-phpdbg \ --with-imap=shared --with-imap-ssl \ --enable-mbstring=shared \ --enable-mbregex \ @@ -1140,11 +1155,8 @@ popd %check %if %runselftest - -# Increase stack size (required by bug54268.phpt) -ulimit -s 32712 - cd build-apache + # Run tests, using the CLI SAPI export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 export SKIP_ONLINE_TESTS=1 @@ -1249,7 +1261,6 @@ install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf %if %{with_zts} cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf %endif - install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf %endif @@ -1294,15 +1305,16 @@ for mod in pgsql odbc ldap snmp xmlrpc imap \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ sockets tokenizer opcache \ pdo pdo_pgsql pdo_odbc pdo_sqlite \ - sqlite3 interbase pdo_firebird \ +%if %{with_zip} + zip \ +%endif + interbase pdo_firebird \ + sqlite3 \ enchant phar fileinfo intl \ mcrypt tidy pdo_dblib mssql pspell curl wddx \ posix shmop sysvshm sysvsem sysvmsg recode xml \ %if %{with_libmysql} mysql mysqli pdo_mysql \ -%endif -%if %{with_zip} - zip \ %endif ; do case $mod in @@ -1464,6 +1476,9 @@ exit 0 %files cli %{_bindir}/php +%if %{with_zts} +%{_bindir}/zts-php +%endif %{_bindir}/php-cgi %{_bindir}/phar.phar %{_bindir}/phar @@ -1476,6 +1491,10 @@ exit 0 %{_mandir}/man1/phpize.1* %doc sapi/cgi/README* sapi/cli/README +%files dbg +%{_bindir}/phpdbg +%doc sapi/phpdbg/{README.md,CREDITS} + %files fpm %doc php-fpm.conf.default %doc fpm_LICENSE @@ -1505,8 +1524,6 @@ exit 0 %{_bindir}/zts-php-config %{_includedir}/php-zts %{_bindir}/zts-phpize -# usefull only to test other module during build -%{_bindir}/zts-php %{_libdir}/php-zts/build %endif %{_mandir}/man1/php-config.1* @@ -1557,6 +1574,13 @@ exit 0 %changelog +* Thu Jun 19 2014 Remi Collet 5.6.0-0.1.RC1 +- php 5.6.0RC1 + https://fedoraproject.org/wiki/Changes/Php56 +- add php-dbg subpackage +- update php.ini and opcache.ini from upstream production template +- move zts-php to php-cli + * Thu Jun 5 2014 Remi Collet 5.5.13-3 - fix regression introduce in fix for #67118 diff --git a/sources b/sources index 5e1b4e4..8fd2f5c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -76f198cf4f9a601141e995e8d7596583 php-5.5.13-strip.tar.xz +634264f034944644e2192fba206d5ffa php-5.6.0RC1-strip.tar.xz