From 18689b68b9beba429739846a90533c0a1dad987d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Sep 2019 11:12:58 +0200 Subject: update to 7.4.0RC1 --- 10-opcache.ini | 30 ++- 20-ffi.ini | 8 + failed.txt | 10 +- php-5.6.3-embed.patch | 24 --- php-7.1.7-httpd.patch | 28 --- php-7.2.4-dlopen.patch | 30 --- php-7.3.0-phpize.patch | 35 ---- php-7.3.3-pdooci.patch | 269 --------------------------- php-7.4.0-embed.patch | 24 +++ php-7.4.0-httpd.patch | 27 +++ php-7.4.0-phpize.patch | 35 ++++ php-fpm.init | 111 ----------- php.ini | 77 +++----- php74.spec | 485 ++++++++++++++++++++----------------------------- 14 files changed, 342 insertions(+), 851 deletions(-) create mode 100644 20-ffi.ini delete mode 100644 php-5.6.3-embed.patch delete mode 100644 php-7.1.7-httpd.patch delete mode 100644 php-7.2.4-dlopen.patch delete mode 100644 php-7.3.0-phpize.patch delete mode 100644 php-7.3.3-pdooci.patch create mode 100644 php-7.4.0-embed.patch create mode 100644 php-7.4.0-httpd.patch create mode 100644 php-7.4.0-phpize.patch delete mode 100755 php-fpm.init diff --git a/10-opcache.ini b/10-opcache.ini index 063a8e4..db2ac5e 100644 --- a/10-opcache.ini +++ b/10-opcache.ini @@ -8,14 +8,14 @@ opcache.enable=1 ;opcache.enable_cli=0 ; The OPcache shared memory storage size. -opcache.memory_consumption=128 +;opcache.memory_consumption=128 ; The amount of memory for interned strings in Mbytes. -opcache.interned_strings_buffer=8 +;opcache.interned_strings_buffer=8 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 1000000 are allowed. -opcache.max_accelerated_files=4000 +;opcache.max_accelerated_files=10000 ; The maximum percentage of "wasted" memory until a restart is scheduled. ;opcache.max_wasted_percentage=5 @@ -47,7 +47,7 @@ opcache.max_accelerated_files=4000 ; A bitmask, where each bit enables or disables the appropriate OPcache ; passes -;opcache.optimization_level=0x7FFEBFFF +;opcache.optimization_level=0x7FFFBFFF ; This hack should only be enabled to work around "Cannot redeclare class" ; errors. @@ -109,6 +109,10 @@ opcache.blacklist_filename=/etc/php.d/opcache*.blacklist ; cache is required. ;opcache.file_cache_fallback=1 +; Enables or disables copying of PHP code (text segment) into HUGE PAGES. +; This should improve performance, but requires appropriate OS configuration. +opcache.huge_code_pages=0 + ; Validate cached file permissions. ; Leads OPcache to check file readability on each access to cached file. ; This directive should be enabled in shared hosting environment, when few @@ -124,3 +128,21 @@ opcache.blacklist_filename=/etc/php.d/opcache*.blacklist ; If specified, it produces opcode dumps for debugging different stages of ; optimizations. ;opcache.opt_debug_level=0 + +; Specifies a PHP script that is going to be compiled and executed at server +; start-up. +; http://php.net/opcache.preload +;opcache.preload= + +; Preloading code as root is not allowed for security reasons. This directive +; facilitates to let the preloading to be run as another user. +; http://php.net/opcache.preload_user +;opcache.preload_user= + +; Prevents caching files that are less than this number of seconds old. It +; protects from caching of incompletely updated files. In case all file updates +; on your site are atomic, you may increase performance by setting it to "0". +;opcache.file_update_protection=2 + +; Absolute path used to store shared lockfiles (for *nix only). +;opcache.lockfile_path=/tmp diff --git a/20-ffi.ini b/20-ffi.ini new file mode 100644 index 0000000..751cdcb --- /dev/null +++ b/20-ffi.ini @@ -0,0 +1,8 @@ +; Enable ffi extension module +extension=ffi + +; FFI API restriction. Possibe values: +; "preload" - enabled in CLI scripts and preloaded files (default) +; "false" - always disabled +; "true" - always enabled +;ffi.enable=preload diff --git a/failed.txt b/failed.txt index 3d019f4..43881a5 100644 --- a/failed.txt +++ b/failed.txt @@ -1,11 +1,9 @@ -===== 7.3.9 (2019-08-29) +===== 7.4.0RC1 (2019-09-05) -$ grep -r 'Tests failed' /var/lib/mock/{fc,el}*/build.log +$ grep -ar 'Tests failed' /var/lib/mock/{fc,el}*/build.log -/var/lib/mock/el6i/build.log:Tests failed : 1 -/var/lib/mock/el6x/build.log:Tests failed : 0 /var/lib/mock/el7x/build.log:Tests failed : 0 -/var/lib/mock/el8x73/build.log:Tests failed : 14 +/var/lib/mock/el8x74/build.log:Tests failed : 14 /var/lib/mock/fc29i/build.log:Tests failed : 0 /var/lib/mock/fc29x/build.log:Tests failed : 0 /var/lib/mock/fc30i/build.log:Tests failed : 0 @@ -14,8 +12,6 @@ $ grep -r 'Tests failed' /var/lib/mock/{fc,el}*/build.log /var/lib/mock/fc31x/build.log:Tests failed : 0 -el6i - 1 Bug #60120 proc_open hangs with stdin/out with 2048+ bytes [ext/standard/tests/streams/proc_open_bug60120.phpt] el8x, fc28i, fc28x: 6 Bug #78338 (Array cross-border reading in PCRE) [ext/pcre/tests/bug78338.phpt] el8x: diff --git a/php-5.6.3-embed.patch b/php-5.6.3-embed.patch deleted file mode 100644 index d9c04f6..0000000 --- a/php-5.6.3-embed.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- php-5.6.3/sapi/embed/config.m4.embed -+++ php-5.6.3/sapi/embed/config.m4 -@@ -12,7 +12,8 @@ if test "$PHP_EMBED" != "no"; then - case "$PHP_EMBED" in - yes|shared) - PHP_EMBED_TYPE=shared -- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib" -+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" -+ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)" - ;; - static) - PHP_EMBED_TYPE=static -diff -up php-5.5.30/scripts/php-config.in.old php-5.5.30/scripts/php-config.in ---- php-5.5.30/scripts/php-config.in.old 2015-10-19 15:17:31.944747715 +0200 -+++ php-5.5.30/scripts/php-config.in 2015-10-19 15:17:58.278858083 +0200 -@@ -18,7 +18,7 @@ exe_extension="@EXEEXT@" - php_cli_binary=NONE - php_cgi_binary=NONE - configure_options="@CONFIGURE_OPTIONS@" --php_sapis="@PHP_INSTALLED_SAPIS@" -+php_sapis="apache2handler embed fpm @PHP_INSTALLED_SAPIS@" - - # Set php_cli_binary and php_cgi_binary if available - for sapi in $php_sapis; do diff --git a/php-7.1.7-httpd.patch b/php-7.1.7-httpd.patch deleted file mode 100644 index acb3d2c..0000000 --- a/php-7.1.7-httpd.patch +++ /dev/null @@ -1,28 +0,0 @@ -Disable MPM detection - -mod_php is build twice -- as NTS without option -- as ZTS using --enable-maintainer-zts - -diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 -index 2e64b21..ec4799f 100644 ---- a/sapi/apache2handler/config.m4 -+++ b/sapi/apache2handler/config.m4 -@@ -116,17 +116,6 @@ if test "$PHP_APXS2" != "no"; then - ;; - esac - -- if test "$APACHE_VERSION" -lt 2004001; then -- APXS_MPM=`$APXS -q MPM_NAME` -- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then -- PHP_BUILD_THREAD_SAFE -- fi -- else -- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` -- if test -n "$APACHE_THREADED_MPM"; then -- PHP_BUILD_THREAD_SAFE -- fi -- fi - AC_MSG_RESULT(yes) - PHP_SUBST(APXS) - else diff --git a/php-7.2.4-dlopen.patch b/php-7.2.4-dlopen.patch deleted file mode 100644 index 3c76474..0000000 --- a/php-7.2.4-dlopen.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen php-7.2.4RC1/sapi/litespeed/lsapilib.c ---- php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen 2018-03-13 12:40:25.330885880 +0100 -+++ php-7.2.4RC1/sapi/litespeed/lsapilib.c 2018-03-13 12:41:35.797251042 +0100 -@@ -755,7 +755,7 @@ static int (*fp_lve_leave)(struct liblve - static int (*fp_lve_jail)( struct passwd *, char *) = NULL; - static int lsapi_load_lve_lib(void) - { -- s_liblve = dlopen("liblve.so.0", RTLD_LAZY); -+ s_liblve = dlopen("liblve.so.0", RTLD_NOW); - if (s_liblve) - { - fp_lve_is_available = dlsym(s_liblve, "lve_is_available"); -diff -up php-7.2.4RC1/Zend/zend_portability.h.dlopen php-7.2.4RC1/Zend/zend_portability.h ---- php-7.2.4RC1/Zend/zend_portability.h.dlopen 2018-03-13 12:33:38.000000000 +0100 -+++ php-7.2.4RC1/Zend/zend_portability.h 2018-03-13 12:40:25.330885880 +0100 -@@ -144,11 +144,11 @@ - # endif - - # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT) --# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT) -+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT) - # elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__) --# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND) -+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND) - # else --# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL) -+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL) - # endif - # define DL_UNLOAD dlclose - # if defined(DLSYM_NEEDS_UNDERSCORE) diff --git a/php-7.3.0-phpize.patch b/php-7.3.0-phpize.patch deleted file mode 100644 index 0114617..0000000 --- a/php-7.3.0-phpize.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up php-7.3.0RC4/scripts/phpize.in.headers php-7.3.0RC4/scripts/phpize.in ---- php-7.3.0RC4/scripts/phpize.in.headers 2018-10-23 11:32:20.000000000 +0200 -+++ php-7.3.0RC4/scripts/phpize.in 2018-10-23 13:35:55.382870481 +0200 -@@ -162,6 +162,15 @@ phpize_autotools() - $PHP_AUTOHEADER || exit 1 - } - -+phpize_check_headers() -+{ -+ if test ! -f $includedir/main/php.h; then -+ echo "Can't find PHP headers in $includedir" -+ echo "The php-devel package is required for use of this command." -+ exit 1 -+ fi -+} -+ - # Main script - - case "$1" in -@@ -180,12 +189,15 @@ case "$1" in - - # Version - --version|-v) -+ phpize_check_headers - phpize_print_api_numbers - exit 0 - ;; - - # Default - *) -+ phpize_check_headers -+ - phpize_check_configm4 0 - - phpize_check_build_files diff --git a/php-7.3.3-pdooci.patch b/php-7.3.3-pdooci.patch deleted file mode 100644 index bd54849..0000000 --- a/php-7.3.3-pdooci.patch +++ /dev/null @@ -1,269 +0,0 @@ -diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c -index f2c43b9a69..79733c2c57 100644 ---- a/ext/pdo_oci/oci_statement.c -+++ b/ext/pdo_oci/oci_statement.c -@@ -2,7 +2,7 @@ - +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ -- | Copyright (c) 1997-2018 The PHP Group | -+ | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | -@@ -525,7 +525,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ - pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; - OCIParam *param = NULL; - text *colname; -- ub2 dtype, data_size, scale, precis; -+ ub2 dtype, data_size, precis; - ub4 namelen; - struct pdo_column_data *col = &stmt->columns[colno]; - zend_bool dyn = FALSE; -@@ -541,10 +541,6 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ - STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_DATA_SIZE", - (param, OCI_DTYPE_PARAM, &data_size, 0, OCI_ATTR_DATA_SIZE, S->err)); - -- /* scale ? */ -- STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_SCALE", -- (param, OCI_DTYPE_PARAM, &scale, 0, OCI_ATTR_SCALE, S->err)); -- - /* precision ? */ - STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_PRECISION", - (param, OCI_DTYPE_PARAM, &precis, 0, OCI_ATTR_PRECISION, S->err)); -@@ -553,7 +549,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ - STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_NAME", - (param, OCI_DTYPE_PARAM, &colname, &namelen, OCI_ATTR_NAME, S->err)); - -- col->precision = scale; -+ col->precision = precis; - col->maxlen = data_size; - col->name = zend_string_init((char *)colname, namelen, 0); - -@@ -598,7 +594,7 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ - S->cols[colno].datalen = 1024; - #endif - } else if (dtype == SQLT_BIN) { -- S->cols[colno].datalen = (ub4) col->maxlen * 2; // raw characters to hex digits -+ S->cols[colno].datalen = (ub4) col->maxlen * 2; /* raw characters to hex digits */ - } else { - S->cols[colno].datalen = (ub4) (col->maxlen * S->H->max_char_width); - } -@@ -793,20 +789,207 @@ static int oci_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len - } - } /* }}} */ - -+ -+static int oci_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) /* {{{ */ -+{ -+ pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; -+ OCIParam *param = NULL; -+ ub2 dtype, precis; -+ sb1 scale; -+ zval flags; -+ ub1 isnull, charset_form; -+ if (!S->stmt) { -+ return FAILURE; -+ } -+ if (colno >= stmt->column_count) { -+ /* error invalid column */ -+ return FAILURE; -+ } -+ -+ array_init(return_value); -+ array_init(&flags); -+ -+ /* describe the column */ -+ STMT_CALL(OCIParamGet, (S->stmt, OCI_HTYPE_STMT, S->err, (dvoid*)¶m, colno+1)); -+ -+ /* column data type */ -+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_DATA_TYPE", -+ (param, OCI_DTYPE_PARAM, &dtype, 0, OCI_ATTR_DATA_TYPE, S->err)); -+ -+ /* column precision */ -+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_PRECISION", -+ (param, OCI_DTYPE_PARAM, &precis, 0, OCI_ATTR_PRECISION, S->err)); -+ -+ /* column scale */ -+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_SCALE", -+ (param, OCI_DTYPE_PARAM, &scale, 0, OCI_ATTR_SCALE, S->err)); -+ -+ /* string column charset form */ -+ if (dtype == SQLT_CHR || dtype == SQLT_VCS || dtype == SQLT_AFC || dtype == SQLT_CLOB) { -+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_CHARSET_FORM", -+ (param, OCI_DTYPE_PARAM, &charset_form, 0, OCI_ATTR_CHARSET_FORM, S->err)); -+ } -+ -+ -+ if (dtype) { -+ /* if there is a declared type */ -+ switch (dtype) { -+#ifdef SQLT_TIMESTAMP -+ case SQLT_TIMESTAMP: -+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP"); -+ add_assoc_string(return_value, "native_type", "TIMESTAMP"); -+ break; -+#endif -+#ifdef SQLT_TIMESTAMP_TZ -+ case SQLT_TIMESTAMP_TZ: -+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP WITH TIMEZONE"); -+ add_assoc_string(return_value, "native_type", "TIMESTAMP WITH TIMEZONE"); -+ break; -+#endif -+#ifdef SQLT_TIMESTAMP_LTZ -+ case SQLT_TIMESTAMP_LTZ: -+ add_assoc_string(return_value, "oci:decl_type", "TIMESTAMP WITH LOCAL TIMEZONE"); -+ add_assoc_string(return_value, "native_type", "TIMESTAMP WITH LOCAL TIMEZONE"); -+ break; -+#endif -+#ifdef SQLT_INTERVAL_YM -+ case SQLT_INTERVAL_YM: -+ add_assoc_string(return_value, "oci:decl_type", "INTERVAL YEAR TO MONTH"); -+ add_assoc_string(return_value, "native_type", "INTERVAL YEAR TO MONTH"); -+ break; -+#endif -+#ifdef SQLT_INTERVAL_DS -+ case SQLT_INTERVAL_DS: -+ add_assoc_string(return_value, "oci:decl_type", "INTERVAL DAY TO SECOND"); -+ add_assoc_string(return_value, "native_type", "INTERVAL DAY TO SECOND"); -+ break; -+#endif -+ case SQLT_DAT: -+ add_assoc_string(return_value, "oci:decl_type", "DATE"); -+ add_assoc_string(return_value, "native_type", "DATE"); -+ break; -+ case SQLT_FLT : -+ case SQLT_NUM: -+ /* if the precision is nonzero and scale is -127 then it is a FLOAT */ -+ if (scale == -127 && precis != 0) { -+ add_assoc_string(return_value, "oci:decl_type", "FLOAT"); -+ add_assoc_string(return_value, "native_type", "FLOAT"); -+ } else { -+ add_assoc_string(return_value, "oci:decl_type", "NUMBER"); -+ add_assoc_string(return_value, "native_type", "NUMBER"); -+ } -+ break; -+ case SQLT_LNG: -+ add_assoc_string(return_value, "oci:decl_type", "LONG"); -+ add_assoc_string(return_value, "native_type", "LONG"); -+ break; -+ case SQLT_BIN: -+ add_assoc_string(return_value, "oci:decl_type", "RAW"); -+ add_assoc_string(return_value, "native_type", "RAW"); -+ break; -+ case SQLT_LBI: -+ add_assoc_string(return_value, "oci:decl_type", "LONG RAW"); -+ add_assoc_string(return_value, "native_type", "LONG RAW"); -+ break; -+ case SQLT_CHR: -+ case SQLT_VCS: -+ if (charset_form == SQLCS_NCHAR) { -+ add_assoc_string(return_value, "oci:decl_type", "NVARCHAR2"); -+ add_assoc_string(return_value, "native_type", "NVARCHAR2"); -+ } else { -+ add_assoc_string(return_value, "oci:decl_type", "VARCHAR2"); -+ add_assoc_string(return_value, "native_type", "VARCHAR2"); -+ } -+ break; -+ case SQLT_AFC: -+ if (charset_form == SQLCS_NCHAR) { -+ add_assoc_string(return_value, "oci:decl_type", "NCHAR"); -+ add_assoc_string(return_value, "native_type", "NCHAR"); -+ } else { -+ add_assoc_string(return_value, "oci:decl_type", "CHAR"); -+ add_assoc_string(return_value, "native_type", "CHAR"); -+ } -+ break; -+ case SQLT_BLOB: -+ add_assoc_string(return_value, "oci:decl_type", "BLOB"); -+ add_next_index_string(&flags, "blob"); -+ add_assoc_string(return_value, "native_type", "BLOB"); -+ break; -+ case SQLT_CLOB: -+ if (charset_form == SQLCS_NCHAR) { -+ add_assoc_string(return_value, "oci:decl_type", "NCLOB"); -+ add_assoc_string(return_value, "native_type", "NCLOB"); -+ } else { -+ add_assoc_string(return_value, "oci:decl_type", "CLOB"); -+ add_assoc_string(return_value, "native_type", "CLOB"); -+ } -+ add_next_index_string(&flags, "blob"); -+ break; -+ case SQLT_BFILE: -+ add_assoc_string(return_value, "oci:decl_type", "BFILE"); -+ add_next_index_string(&flags, "blob"); -+ add_assoc_string(return_value, "native_type", "BFILE"); -+ break; -+ case SQLT_RDD: -+ add_assoc_string(return_value, "oci:decl_type", "ROWID"); -+ add_assoc_string(return_value, "native_type", "ROWID"); -+ break; -+ case SQLT_BFLOAT: -+ case SQLT_IBFLOAT: -+ add_assoc_string(return_value, "oci:decl_type", "BINARY_FLOAT"); -+ add_assoc_string(return_value, "native_type", "BINARY_FLOAT"); -+ break; -+ case SQLT_BDOUBLE: -+ case SQLT_IBDOUBLE: -+ add_assoc_string(return_value, "oci:decl_type", "BINARY_DOUBLE"); -+ add_assoc_string(return_value, "native_type", "BINARY_DOUBLE"); -+ break; -+ default: -+ add_assoc_long(return_value, "oci:decl_type", dtype); -+ add_assoc_string(return_value, "native_type", "UNKNOWN"); -+ } -+ } else { -+ /* if the column is NULL */ -+ add_assoc_long(return_value, "oci:decl_type", 0); -+ add_assoc_string(return_value, "native_type", "NULL"); -+ } -+ -+ /* column can be null */ -+ STMT_CALL_MSG(OCIAttrGet, "OCI_ATTR_IS_NULL", -+ (param, OCI_DTYPE_PARAM, &isnull, 0, OCI_ATTR_IS_NULL, S->err)); -+ -+ if (isnull) { -+ add_next_index_string(&flags, "nullable"); -+ } else { -+ add_next_index_string(&flags, "not_null"); -+ } -+ -+ /* PDO type */ -+ switch (dtype) { -+ case SQLT_BFILE: -+ case SQLT_BLOB: -+ case SQLT_CLOB: -+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_LOB); -+ break; -+ default: -+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_STR); -+ } -+ -+ add_assoc_long(return_value, "scale", scale); -+ add_assoc_zval(return_value, "flags", &flags); -+ -+ OCIDescriptorFree(param, OCI_DTYPE_PARAM); -+ return SUCCESS; -+} /* }}} */ -+ - const struct pdo_stmt_methods oci_stmt_methods = { - oci_stmt_dtor, - oci_stmt_execute, - oci_stmt_fetch, - oci_stmt_describe, - oci_stmt_get_col, -- oci_stmt_param_hook -+ oci_stmt_param_hook, -+ NULL, /* set_attr */ -+ NULL, /* get_attr */ -+ oci_stmt_col_meta - }; -- --/* -- * Local variables: -- * tab-width: 4 -- * c-basic-offset: 4 -- * End: -- * vim600: noet sw=4 ts=4 fdm=marker -- * vim<600: noet sw=4 ts=4 -- */ diff --git a/php-7.4.0-embed.patch b/php-7.4.0-embed.patch new file mode 100644 index 0000000..1bfd1da --- /dev/null +++ b/php-7.4.0-embed.patch @@ -0,0 +1,24 @@ +--- php-5.6.3/sapi/embed/config.m4.embed ++++ php-5.6.3/sapi/embed/config.m4 +@@ -11,7 +11,8 @@ if test "$PHP_EMBED" != "no"; then + case "$PHP_EMBED" in + yes|shared) + PHP_EMBED_TYPE=shared +- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib" ++ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" ++ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)" + ;; + static) + PHP_EMBED_TYPE=static +diff -up php-5.5.30/scripts/php-config.in.old php-5.5.30/scripts/php-config.in +--- php-5.5.30/scripts/php-config.in.old 2015-10-19 15:17:31.944747715 +0200 ++++ php-5.5.30/scripts/php-config.in 2015-10-19 15:17:58.278858083 +0200 +@@ -18,7 +18,7 @@ exe_extension="@EXEEXT@" + php_cli_binary=NONE + php_cgi_binary=NONE + configure_options="@CONFIGURE_OPTIONS@" +-php_sapis="@PHP_INSTALLED_SAPIS@" ++php_sapis="apache2handler embed fpm @PHP_INSTALLED_SAPIS@" + ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@" + ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@" + diff --git a/php-7.4.0-httpd.patch b/php-7.4.0-httpd.patch new file mode 100644 index 0000000..34f7c8a --- /dev/null +++ b/php-7.4.0-httpd.patch @@ -0,0 +1,27 @@ +Disable MPM detection + +mod_php is build twice +- as NTS without option +- as ZTS using --enable-maintainer-zts + +diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -105,17 +105,6 @@ if test "$PHP_APXS2" != "no"; then + ;; + esac + +- if test "$APACHE_VERSION" -lt 2004001; then +- APXS_MPM=`$APXS -q MPM_NAME` +- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then +- PHP_BUILD_THREAD_SAFE +- fi +- else +- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'` +- if test -n "$APACHE_THREADED_MPM"; then +- PHP_BUILD_THREAD_SAFE +- fi +- fi + AC_MSG_RESULT(yes) + PHP_SUBST(APXS) + else diff --git a/php-7.4.0-phpize.patch b/php-7.4.0-phpize.patch new file mode 100644 index 0000000..fb99f3e --- /dev/null +++ b/php-7.4.0-phpize.patch @@ -0,0 +1,35 @@ +diff -up ./scripts/phpize.in.headers ./scripts/phpize.in +--- ./scripts/phpize.in.headers 2019-07-23 10:05:11.000000000 +0200 ++++ ./scripts/phpize.in 2019-07-23 10:18:13.648098089 +0200 +@@ -165,6 +165,15 @@ phpize_autotools() + $PHP_AUTOHEADER || exit 1 + } + ++phpize_check_headers() ++{ ++ if test ! -f $includedir/main/php.h; then ++ echo "Can't find PHP headers in $includedir" ++ echo "The php-devel package is required for use of this command." ++ exit 1 ++ fi ++} ++ + # Main script + + case "$1" in +@@ -183,12 +192,15 @@ case "$1" in + + # Version + --version|-v) ++ phpize_check_headers + phpize_print_api_numbers + exit 0 + ;; + + # Default + *) ++ phpize_check_headers ++ + phpize_check_configm4 0 + + phpize_check_build_files diff --git a/php-fpm.init b/php-fpm.init deleted file mode 100755 index 63aac66..0000000 --- a/php-fpm.init +++ /dev/null @@ -1,111 +0,0 @@ -#! /bin/sh -# -# chkconfig: - 84 16 -# description: PHP FastCGI Process Manager -# processname: php-fpm -# config: /etc/php-fpm.conf -# config: /etc/sysconfig/php-fpm -# pidfile: /var/run/php-fpm/php-fpm.pid -# -### BEGIN INIT INFO -# Provides: php-fpm -# Required-Start: $local_fs $remote_fs $network $named -# Required-Stop: $local_fs $remote_fs $network -# Short-Description: start and stop PHP FPM -# Description: PHP FastCGI Process Manager -### END INIT INFO - -# Standard LSB functions -#. /lib/lsb/init-functions - -# Source function library. -. /etc/init.d/functions - -# Check that networking is up. -. /etc/sysconfig/network - -# Additional environment file -if [ -f /etc/sysconfig/php-fpm ]; then - . /etc/sysconfig/php-fpm -fi - -if [ "$NETWORKING" = "no" ] -then - exit 0 -fi - -RETVAL=0 -prog="php-fpm" -pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid} -lockfile=${LOCKFILE-/var/lock/subsys/php-fpm} - -start () { - echo -n $"Starting $prog: " - dir=$(dirname ${pidfile}) - [ -d $dir ] || mkdir $dir - daemon --pidfile ${pidfile} /usr/sbin/php-fpm --daemonize - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch ${lockfile} -} -stop () { - echo -n $"Stopping $prog: " - killproc -p ${pidfile} php-fpm - RETVAL=$? - echo - if [ $RETVAL -eq 0 ] ; then - rm -f ${lockfile} ${pidfile} - fi -} - -restart () { - stop - start -} - -reload () { - echo -n $"Reloading $prog: " - if ! /usr/sbin/php-fpm --test ; then - RETVAL=6 - echo $"not reloading due to configuration syntax error" - failure $"not reloading $prog due to configuration syntax error" - else - killproc -p ${pidfile} php-fpm -USR2 - RETVAL=$? - fi - echo -} - - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status -p ${pidfile} php-fpm - RETVAL=$? - ;; - restart) - restart - ;; - reload|force-reload) - reload - ;; - configtest) - /usr/sbin/php-fpm --test - RETVAL=$? - ;; - condrestart|try-restart) - [ -f ${lockfile} ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart|configtest}" - RETVAL=2 - ;; -esac - -exit $RETVAL diff --git a/php.ini b/php.ini index d52aeaa..e7db839 100644 --- a/php.ini +++ b/php.ini @@ -108,11 +108,6 @@ ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; html_errors -; Default Value: On -; Development Value: On -; Production value: On - ; log_errors ; Default Value: Off ; Development Value: On @@ -153,11 +148,6 @@ ; Development Value: Off ; Production Value: Off -; track_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - ; variables_order ; Default Value: "EGPCS" ; Development Value: "GPCS" @@ -364,6 +354,12 @@ zend.enable_gc = On ; Default: "" ;zend.script_encoding = +; Allows to include or exclude arguments from stack traces generated for exceptions +; Default: Off +; In production, it is recommended to turn this setting on to prohibit the output +; of sensitive information in stack traces +zend.exception_ignore_args = On + ;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; @@ -516,7 +512,7 @@ ignore_repeated_errors = Off ignore_repeated_source = Off ; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if +; stdout or in the log). This is only effective in a debug compile, and if ; error reporting includes E_WARNING in the allowed list ; http://php.net/report-memleaks report_memleaks = On @@ -545,11 +541,8 @@ report_memleaks = On ; error message as HTML for easier reading. This directive controls whether ; the error message is formatted as HTML or not. ; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: On ; http://php.net/html-errors -html_errors = On +;html_errors = On ; If html_errors is set to On *and* docref_root is not empty, then PHP ; produces clickable error messages that direct to a page describing the error @@ -603,6 +596,7 @@ html_errors = On ; ascii (all printable ASCII characters and NL) ; no-ctrl (all characters except control characters) ; all (all characters) +; raw (like "all", but messages are not split at newlines) ; http://php.net/syslog.filter ;syslog.filter = ascii @@ -673,7 +667,7 @@ register_argc_argv = Off ; first used (Just In Time) instead of when the script starts. If these ; variables are not used within a script, having this directive on will result ; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any affect. +; for this directive to have any effect. ; http://php.net/auto-globals-jit auto_globals_jit = On @@ -1084,37 +1078,6 @@ odbc.defaultlrl = 4096 ; http://php.net/odbc.defaultbinmode odbc.defaultbinmode = 1 -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - [MySQLi] ; Maximum number of persistent links. -1 means no limit. @@ -1145,11 +1108,11 @@ mysqli.default_port = 3306 ; http://php.net/mysqli.default-socket mysqli.default_socket = -; Default host for mysql_connect() (doesn't apply in safe mode). +; Default host for mysqli_connect() (doesn't apply in safe mode). ; http://php.net/mysqli.default-host mysqli.default_host = -; Default user for mysql_connect() (doesn't apply in safe mode). +; Default user for mysqli_connect() (doesn't apply in safe mode). ; http://php.net/mysqli.default-user mysqli.default_user = @@ -1198,6 +1161,9 @@ mysqlnd.collect_memory_statistics = Off ; key. ;mysqlnd.sha256_server_public_key = +[OCI8] +; see /etc/php.d/20-oci8.ini + [PostgreSQL] ; Allow or prevent persistent links. ; http://php.net/pgsql.allow-persistent @@ -1597,6 +1563,11 @@ zend.assertions = -1 ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) ;mbstring.http_output_conv_mimetype= +; This directive specifies maximum stack depth for mbstring regular expressions. It is similar +; to the pcre.recursion_limit for PCRE. +; Default: 100000 +;mbstring.regex_stack_limit=100000 + [gd] ; Tell the jpeg decode to ignore warnings and try to create ; a gd image. The warning will then be displayed as notices @@ -1671,6 +1642,9 @@ ldap.max_links = -1 [dba] ;dba.default_handler= +[opcache] +; see /etc/php.d/10-opcache.ini + [curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. @@ -1694,6 +1668,5 @@ ldap.max_links = -1 ; SSL stream context option. ;openssl.capath= -; Local Variables: -; tab-width: 4 -; End: +[ffi] +; see /etc/php.d/20-ffi.ini diff --git a/php74.spec b/php74.spec index bdc7231..8070b45 100644 --- a/php74.spec +++ b/php74.spec @@ -8,30 +8,24 @@ # Please preserve changelog entries # # API/ABI check -%global apiver 20180731 -%global zendver 20180731 +%global apiver 20190902 +%global zendver 20190902 %global pdover 20170320 # Extension version %global fileinfover 1.0.5 %global oci8ver 2.2.0 %global zipver 1.13.0 -%global jsonver 1.7.0 # Adds -z now to the linker flags %global _hardened_build 1 # version used for php embedded library soname -%global embed_version 7.3 +%global embed_version 7.4 %global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock) -%if 0%{?rhel} == 6 -%global oraclever 18.3 -%global oraclelib 18.1 -%else %global oraclever 19.3 %global oraclelib 19.1 -%endif # Build for LiteSpeed Web Server (LSAPI) %global with_lsws 1 @@ -54,8 +48,6 @@ %endif %global with_onig 1 -%global with_sqlite3 1 - # until firebird available in EPEL %if 0%{?rhel} == 8 %global with_firebird 0 @@ -86,12 +78,6 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) -# systemd to manage the service, with notify mode, with additional service config -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%global with_systemd 1 -%else -%global with_systemd 0 -%endif # httpd 2.4.10 with httpd-filesystem and sethandler support %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 %global with_httpd2410 1 @@ -110,15 +96,9 @@ %global with_libzip 1 %global with_zip 0 -%if 0%{?fedora} < 18 && 0%{?rhel} < 7 -%global db_devel db4-devel -%else -%global db_devel libdb-devel -%endif - -%global upver 7.3.9 -#global rcver RC1 -#global lower RC1 +%global upver 7.4.0 +%global rcver RC1 +%global lower RC1 Summary: PHP scripting language for creating dynamic web sites Name: php @@ -153,29 +133,25 @@ Source14: nginx-php.conf Source50: 10-opcache.ini Source51: opcache-default.blacklist Source52: 20-oci8.ini -Source99: php-fpm.init +Source53: 20-ffi.ini # Build fixes -Patch1: php-7.1.7-httpd.patch +Patch1: php-7.4.0-httpd.patch Patch5: php-7.2.0-includedir.patch -Patch6: php-5.6.3-embed.patch -Patch7: php-5.3.0-recode.patch +Patch6: php-7.4.0-embed.patch Patch8: php-7.2.0-libdb.patch Patch9: php-7.0.7-curl.patch # Functional changes -Patch40: php-7.2.4-dlopen.patch Patch42: php-7.3.3-systzdata-v18.patch # See http://bugs.php.net/53436 -Patch43: php-7.3.0-phpize.patch +Patch43: php-7.4.0-phpize.patch # Use -lldap_r for OpenLDAP Patch45: php-7.2.3-ldap_r.patch # Make php_config.h constant across builds Patch46: php-7.2.4-fixheader.patch # drop "Configure command" from phpinfo output Patch47: php-5.6.3-phpinfo.patch -# backport PDOStatement::getColumnMeta from 7.4 -Patch48: php-7.3.3-pdooci.patch # RC Patch Patch91: php-7.2.0-oci8conf.patch @@ -190,8 +166,10 @@ Patch300: php-7.0.10-datetests.patch # WIP -BuildRequires: bzip2-devel, curl-devel >= 7.9 -BuildRequires: httpd-devel >= 2.0.46-1, pam-devel +BuildRequires: bzip2-devel +BuildRequires: pkgconfig(libcurl) >= 7.15.5 +BuildRequires: httpd-devel >= 2.0.46-1 +BuildRequires: pam-devel %if %{with_httpd2410} # to ensure we are using httpd with filesystem feature (see #1081453) BuildRequires: httpd-filesystem @@ -200,16 +178,15 @@ BuildRequires: httpd-filesystem # to ensure we are using nginx with filesystem feature (see #1142298) BuildRequires: nginx-filesystem %endif -BuildRequires: %{?dtsprefix}libstdc++-devel, openssl-devel -%if %{with_sqlite3} -# For Sqlite3 extension -BuildRequires: sqlite-devel >= 3.6.0 -%else -BuildRequires: sqlite-devel >= 3.0.0 -%endif -BuildRequires: zlib-devel, smtpdaemon, libedit-devel +BuildRequires: %{?dtsprefix}libstdc++-devel +# no pkgconfig to avoid compat-openssl10 +BuildRequires: openssl-devel >= 1.0.1 +BuildRequires: pkgconfig(sqlite3) >= 3.7.4 +BuildRequires: pkgconfig(zlib) >= 1.2.0.4 +BuildRequires: smtpdaemon +BuildRequires: pkgconfig(libedit) %if %{with_libpcre} -BuildRequires: pcre2-devel >= 10.30 +BuildRequires: pkgconfig(libpcre2-8) >= 10.30 %else Provides: bundled(pcre2) = 10.32 %endif @@ -224,14 +201,15 @@ BuildRequires: libtool-ltdl-devel %if %{with_dtrace} BuildRequires: %{?dtsprefix}systemtap-sdt-devel %endif -BuildRequires: libargon2-devel #BuildRequires: bison +#BuildRequires: re2c # used for tests BuildRequires: /bin/ps %if 0%{?rhel} Obsoletes: php53, php53u, php54w, php55u, php55w, php56u, php56w, mod_php70u, php70w, mod_php71u, mod_php71w, mod_php72u, mod_php72w Obsoletes: mod_php73, mod_php73w +Obsoletes: mod_php74, mod_php74w %endif # Avoid obsoleting php54 from RHSCL Obsoletes: php54 > 5.4 @@ -244,8 +222,6 @@ Provides: php-zts%{?_isa} = %{version}-%{release} Requires: httpd-mmn = %{_httpd_mmn} Provides: mod_php = %{version}-%{release} Requires: php-common%{?_isa} = %{version}-%{release} -# For backwards-compatibility, require php-cli for the time being: -Requires: php-cli%{?_isa} = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: %if %{with_httpd2410} Requires(pre): httpd-filesystem @@ -255,6 +231,8 @@ Requires(pre): httpd # php engine for Apache httpd webserver Provides: php(httpd) %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +# For backwards-compatibility, require php-cli for the time being: +Recommends: php-cli%{?_isa} = %{version}-%{release} # httpd have threaded MPM by default Recommends: php-fpm%{?_isa} = %{version}-%{release} # as "php" is now mostly a meta-package, commonly used extensions @@ -262,7 +240,11 @@ Recommends: php-json%{?_isa} = %{version}-%{release} Recommends: php-mbstring%{?_isa} = %{version}-%{release} Recommends: php-opcache%{?_isa} = %{version}-%{release} Recommends: php-pdo%{?_isa} = %{version}-%{release} +Recommends: php-sodium%{?_isa} = %{version}-%{release} Recommends: php-xml%{?_isa} = %{version}-%{release} +%else +# For backwards-compatibility, require php-cli for the time being: +Requires: php-cli%{?_isa} = %{version}-%{release} %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -298,6 +280,7 @@ Provides: php-readline, php-readline%{?_isa} Obsoletes: php53-cli, php53u-cli, php54-cli, php54w-cli, php55u-cli, php55w-cli, php56u-cli, php56w-cli Obsoletes: php70u-cli, php70w-cli, php71u-cli, php71w-cli, php72u-cli, php72w-cli Obsoletes: php73-cli, php73w-cli +Obsoletes: php74-cli, php74w-cli %endif %description cli @@ -312,6 +295,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} %if 0%{?rhel} Obsoletes: php56u-dbg, php56w-dbg, php70u-dbg, php70w-phpdbg, php71u-dbg, php71w-phpdbg, php72u-dbg, php72w-phpdbg Obsoletes: php73-dbg, php73w-phpdbg +Obsoletes: php74-dbg, php74w-phpdbg %endif %description dbg The php-dbg package contains the interactive PHP debugger. @@ -321,20 +305,14 @@ The php-dbg package contains the interactive PHP debugger. Group: Development/Languages Summary: PHP FastCGI Process Manager BuildRequires: libacl-devel +BuildRequires: pkgconfig(libsystemd) >= 209 Requires: php-common%{?_isa} = %{version}-%{release} Requires(pre): /usr/sbin/useradd -%if %{with_systemd} -BuildRequires: systemd-devel %{?systemd_requires} # This is actually needed for the %%triggerun script but Requires(triggerun) # is not valid. We can use %%post because this particular %%triggerun script # should fire just after this package is installed. Requires(post): systemd-sysv -%else -# This is for /sbin/service -Requires(preun): initscripts -Requires(postun): initscripts -%endif %if %{with_httpd2410} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd-filesystem @@ -352,6 +330,7 @@ Requires: nginx-filesystem Obsoletes: php53-fpm, php53u-fpm, php54-fpm, php54w-fpm, php55u-fpm, php55w-fpm, php56u-fpm, php56w-fpm Obsoletes: php70u-fpm, php70w-fpm, php71u-fpm, php71w-fpm, php72u-fpm, php72w-fpm Obsoletes: php73-fpm, php73w-fpm +Obsoletes: php74-fpm, php74w-fpm %endif %description fpm @@ -368,6 +347,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php53-litespeed, php53u-litespeed, php54-litespeed, php54w-litespeed, php55u-litespeed, php55w-litespeed, php56u-litespeed, php56w-litespeed Obsoletes: php70u-litespeed, php70w-litespeed, php71u-litespeed, php71w-litespeed, php72u-litespeed, php72w-litespeed Obsoletes: php73-litespeed, php73w-litespeed +Obsoletes: php74-litespeed, php74w-litespeed %endif %description litespeed @@ -383,8 +363,8 @@ Summary: Common files for PHP # regex, libmagic are licensed under BSD License: PHP and BSD # ABI/API check - Arch specific -Provides: php(api) = %{apiver}%{isasuffix} -Provides: php(zend-abi) = %{zendver}%{isasuffix} +Provides: php(api) = %{apiver}-%{__isa_bits} +Provides: php(zend-abi) = %{zendver}-%{__isa_bits} Provides: php(language) = %{version}, php(language)%{?_isa} = %{version} # Provides for all builtin/shared modules: Provides: php-bz2, php-bz2%{?_isa} @@ -428,6 +408,7 @@ Obsoletes: php53-mhash, php53u-mhash Obsoletes: php53-common, php53u-common, php54-common, php54w-common, php55u-common, php55w-common, php56u-common, php56w-common Obsoletes: php70u-common, php70w-common, php71u-common, php71w-common, php72u-common, php72w-common Obsoletes: php73-common, php73w-common +Obsoletes: php74-common, php74w-common %endif %description common @@ -446,17 +427,16 @@ Requires: gcc-c++ Requires: libtool # see "php-config --libs" Requires: krb5-devel%{?_isa} -Requires: libargon2-devel%{?_isa} Requires: libedit-devel%{?_isa} Requires: libxml2-devel%{?_isa} -Requires: openssl-devel%{?_isa} +Requires: openssl-devel%{?_isa} >= 1.0.1 %if %{with_libpcre} Requires: pcre2-devel%{?_isa} %endif Requires: zlib-devel%{?_isa} Obsoletes: php-pecl-pdo-devel -Obsoletes: php-pecl-json-devel < %{jsonver} -Obsoletes: php-pecl-jsonc-devel < %{jsonver} +Obsoletes: php-pecl-json-devel < %{version} +Obsoletes: php-pecl-jsonc-devel < %{version} %if %{with_zts} Provides: php-zts-devel = %{version}-%{release} Provides: php-zts-devel%{?_isa} = %{version}-%{release} @@ -465,6 +445,7 @@ Provides: php-zts-devel%{?_isa} = %{version}-%{release} Obsoletes: php53-devel, php53u-devel, php54-devel, php54w-devel, php55u-devel, php55w-devel, php56u-devel, php56w-devel Obsoletes: php70u-devel, php70w-devel, php71u-devel, php71w-devel, php72u-devel, php72w-devel Obsoletes: php73-devel, php73w-devel +Obsoletes: php74-devel, php74w-devel %endif %description devel @@ -486,6 +467,7 @@ Provides: php-pecl(opcache)%{?_isa} = %{version} Obsoletes: php55u-opcache, php55w-opcache, php56u-opcache, php56w-opcache Obsoletes: php70u-opcache, php70w-opcache, php71u-opcache, php71w-opcache, php72u-opcache, php72w-opcache Obsoletes: php73-opcache, php73w-opcache +Obsoletes: php74-opcache, php74w-opcache %endif %description opcache @@ -502,11 +484,15 @@ Group: Development/Languages License: PHP Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: mod_php3-imap, stronghold-php-imap -BuildRequires: krb5-devel, openssl-devel, libc-client-devel +BuildRequires: pkgconfig(krb5) +BuildRequires: pkgconfig(krb5-gssapi) +BuildRequires: openssl-devel >= 1.0.1 +BuildRequires: libc-client-devel %if 0%{?rhel} Obsoletes: php53-imap, php53u-imap, php54-imap, php54w-imap, php55u-imap, php55w-imap, php56u-imap, php56w-imap Obsoletes: php70u-imap, php70w-imap, php71u-imap, php71w-imap, php72u-imap, php72w-imap Obsoletes: php73-imap, php73w-imap +Obsoletes: php74-imap, php74w-imap %endif %description imap @@ -520,11 +506,14 @@ Group: Development/Languages # All files licensed under PHP version 3.01 License: PHP Requires: php-common%{?_isa} = %{version}-%{release} -BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel +BuildRequires: pkgconfig(libsasl2) +BuildRequires: openldap-devel +BuildRequires: openssl-devel >= 1.0.1 %if 0%{?rhel} Obsoletes: php53-ldap, php53u-ldap, php54-ldap, php54w-ldap, php55u-ldap, php55w-ldap, php56u-ldap, php56w-ldap Obsoletes: php70u-ldap, php70w-ldap, php71u-ldap, php71w-ldap, php72u-ldap, php72w-ldap Obsoletes: php73-ldap, php73w-ldap +Obsoletes: php74-ldap, php74w-ldap %endif %description ldap @@ -540,16 +529,15 @@ Group: Development/Languages License: PHP Requires: php-common%{?_isa} = %{version}-%{release} # ABI/API check - Arch specific -Provides: php-pdo-abi = %{pdover}%{isasuffix} -Provides: php(pdo-abi) = %{pdover}%{isasuffix} -%if %{with_sqlite3} +Provides: php-pdo-abi = %{pdover}-%{__isa_bits} +Provides: php(pdo-abi) = %{pdover}-%{__isa_bits} Provides: php-sqlite3, php-sqlite3%{?_isa} -%endif Provides: php-pdo_sqlite, php-pdo_sqlite%{?_isa} %if 0%{?rhel} Obsoletes: php53-pdo, php53u-pdo, php54-pdo, php54w-pdo, php55u-pdo, php55w-pdo, php56u-pdo, php56w-pdo Obsoletes: php70u-pdo, php70w-pdo, php71u-pdo, php71w-pdo, php72u-pdo, php72w-pdo Obsoletes: php73-pdo, php73w-pdo +Obsoletes: php74-pdo, php74w-pdo %endif %description pdo @@ -573,9 +561,9 @@ Obsoletes: php-mysql < %{version}-%{release} Obsoletes: php53-mysqlnd, php53u-mysqlnd, php54-mysqlnd, php54w-mysqlnd, php55u-mysqlnd, php55w-mysqlnd, php56u-mysqlnd, php56w-mysqlnd Obsoletes: php70u-mysqlnd, php70w-mysqlnd, php71u-mysqlnd, php71w-mysqlnd, php72u-mysqlnd, php72w-mysqlnd Obsoletes: php73-mysqlnd, php73w-mysqlnd +Obsoletes: php74-mysqlnd, php74w-mysqlnd Obsoletes: php53-mysql, php53u-mysql, php54-mysql, php54w-mysql, php55u-mysql, php55w-mysql, php56u-mysql, php56w-mysql Obsoletes: php70u-mysql, php70w-mysql, php71u-mysql, php71w-mysql, php72u-mysql, php72w-mysql -Obsoletes: php73-mysql, php73w-mysql %endif %description mysqlnd @@ -595,11 +583,14 @@ License: PHP Requires: php-pdo%{?_isa} = %{version}-%{release} Provides: php_database Provides: php-pdo_pgsql, php-pdo_pgsql%{?_isa} -BuildRequires: krb5-devel, openssl-devel, postgresql-devel +BuildRequires: krb5-devel +BuildRequires: openssl-devel >= 1.0.1 +BuildRequires: postgresql-devel %if 0%{?rhel} Obsoletes: php53-pgsql, php53u-pgsql, php54-pgsql, php54w-pgsql, php55u-pgsql, php55w-pgsql, php56u-pgsql, php56w-pgsql Obsoletes: php70u-pgsql, php70w-pgsql, php71u-pgsql, php71w-pgsql, php72u-pgsql, php72w-pgsql Obsoletes: php73-pgsql, php73w-pgsql +Obsoletes: php74-pgsql, php74w-pgsql %endif %description pgsql @@ -625,6 +616,7 @@ Provides: php-sysvmsg, php-sysvmsg%{?_isa} Obsoletes: php53-process, php53u-process, php54-process, php54w-process, php55u-process, php55w-process, php56u-process, php56w-process Obsoletes: php70u-process, php70w-process, php71u-process, php71w-process, php72u-process, php72w-process Obsoletes: php73-process, php73w-process +Obsoletes: php74-process, php74w-process %endif %description process @@ -641,11 +633,13 @@ License: PHP Requires: php-pdo%{?_isa} = %{version}-%{release} Provides: php_database Provides: php-pdo_odbc, php-pdo_odbc%{?_isa} +# EL-7 version don't have pkgconfig BuildRequires: unixODBC-devel %if 0%{?rhel} Obsoletes: php53-odbc, php53u-odbc, php54-odbc, php54w-odbc, php55u-odbc, php55w-odbc, php56u-odbc, php56w-odbc Obsoletes: php70u-odbc, php70w-odbc, php71u-odbc, php71w-odbc, php72u-odbc, php72w-odbc Obsoletes: php73-odbc, php73w-odbc +Obsoletes: php74-odbc, php74w-odbc %endif %description odbc @@ -663,11 +657,12 @@ Group: Development/Languages # All files licensed under PHP version 3.01 License: PHP Requires: php-common%{?_isa} = %{version}-%{release} -BuildRequires: libxml2-devel +BuildRequires: pkgconfig(libxml-2.0) %if 0%{?rhel} Obsoletes: php53-soap, php53u-soap, php54-soap, php54w-soap, php55u-soap, php55w-soap, php56u-soap, php56w-soap Obsoletes: php70u-soap, php70w-soap, php71u-soap, php71w-soap, php72u-soap, php72w-soap Obsoletes: php73-soap, php73w-soap +Obsoletes: php74-soap, php74w-soap %endif %description soap @@ -675,34 +670,25 @@ The php-soap package contains a dynamic shared object that will add support to PHP for using the SOAP web services protocol. %if %{with_firebird} -%package interbase -Summary: A module for PHP applications that use Interbase/Firebird databases +%package pdo-firebird +Summary: PDO driver for Interbase/Firebird databases Group: Development/Languages # All files licensed under PHP version 3.01 License: PHP BuildRequires: firebird-devel Requires: php-pdo%{?_isa} = %{version}-%{release} Provides: php_database -Provides: php-firebird, php-firebird%{?_isa} Provides: php-pdo_firebird, php-pdo_firebird%{?_isa} %if 0%{?rhel} Obsoletes: php53-interbase, php53u-interbase, php54-interbase, php54w-interbase, php55u-interbase, php55w-interbase, php56u-interbase, php56w-interbase Obsoletes: php70u-interbase, php70w-interbase, php71u-interbase, php71w-interbase, php72u-interbase, php72w-interbase Obsoletes: php73-interbase, php73w-interbase +Obsoletes: php74-pdo-firebird, php74w-pdo-firebird %endif -%description interbase -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. - -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. +%description pdo-firebird +The %{?scl_prefix}php-interbase package contains the PDO driver for +Interbase/Firebird databases. %endif %if %{with_oci8} @@ -726,6 +712,7 @@ AutoReq: 0 Obsoletes: php53-oci8, php53u-oci8, php54-oci8, php54w-oci8, php55u-oci8, php55w-oci8, php56u-oci8, php56w-oci8 Obsoletes: php70u-oci8, php70w-oci8, php71u-oci8, php71w-oci8, php72u-oci8, php72w-oci8 Obsoletes: php73-oci8, php73w-oci8 +Obsoletes: php74-oci8, php74w-oci8 %endif %description oci8 @@ -758,6 +745,7 @@ BuildRequires: net-snmp-devel Obsoletes: php53-snmp, php53u-snmp, php54-snmp, php54w-snmp, php55u-snmp, php55w-snmp, php56u-snmp, php56w-snmp Obsoletes: php70u-snmp, php70w-snmp, php71u-snmp, php71w-snmp, php72u-snmp, php72w-snmp Obsoletes: php73-snmp, php73w-snmp +Obsoletes: php74-snmp, php74w-snmp %endif %description snmp @@ -775,15 +763,17 @@ Requires: php-common%{?_isa} = %{version}-%{release} Provides: php-dom, php-dom%{?_isa} Provides: php-domxml, php-domxml%{?_isa} Provides: php-simplexml, php-simplexml%{?_isa} -Provides: php-wddx, php-wddx%{?_isa} Provides: php-xmlreader, php-xmlreader%{?_isa} Provides: php-xmlwriter, php-xmlwriter%{?_isa} Provides: php-xsl, php-xsl%{?_isa} -BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1 +BuildRequires: pkgconfig(libxslt) >= 1.1 +BuildRequires: pkgconfig(libexslt) +BuildRequires: pkgconfig(libxml-2.0) >= 2.7.6 %if 0%{?rhel} Obsoletes: php53-xml, php53u-xml, php54-xml, php54w-xml, php55u-xml, php55w-xml, php56u-xml, php56w-xml Obsoletes: php70u-xml, php70w-xml, php71u-xml, php71w-xml, php72u-xml, php72w-xml Obsoletes: php73-xml, php73w-xml +Obsoletes: php74-xml, php74w-xml %endif %description xml @@ -802,6 +792,7 @@ Requires: php-xml%{?_isa} = %{version}-%{release} Obsoletes: php53-xmlrpc, php53u-xmlrpc, php54-xmlrpc, php54w-xmlrpc, php55u-xmlrpc, php55w-xmlrpc, php56u-xmlrpc, php56w-xmlrpc Obsoletes: php70u-xmlrpc, php70w-xmlrpc, php71u-xmlrpc, php71w-xmlrpc, php72u-xmlrpc, php72w-xmlrpc Obsoletes: php73-xmlrpc, php73w-xmlrpc +Obsoletes: php74-xmlrpc, php74w-xmlrpc %endif %description xmlrpc @@ -818,9 +809,9 @@ Group: Development/Languages License: PHP and LGPLv2 and BSD and OpenLDAP %if %{with_onig} # ensure we have soname 5 -BuildRequires: oniguruma-devel >= 6.8 +BuildRequires: pkgconfig(oniguruma) >= 6.8 %else -Provides: bundled(oniguruma) = 6.9.0 +Provides: bundled(oniguruma) = 6.9.3 %endif Provides: bundled(libmbfl) = 1.3.2 Requires: php-common%{?_isa} = %{version}-%{release} @@ -828,6 +819,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php53-mbstring, php53u-mbstring, php54-mbstring, php54w-mbstring, php55u-mbstring, php55w-mbstring, php56u-mbstring, php56w-mbstring Obsoletes: php70u-mbstring, php70w-mbstring, php71u-mbstring, php71w-mbstring, php72u-mbstring, php72w-mbstring Obsoletes: php73-mbstring, php73w-mbstring +Obsoletes: php74-mbstring, php74w-mbstring %endif %description mbstring @@ -846,7 +838,7 @@ License: PHP and BSD %endif Requires: php-common%{?_isa} = %{version}-%{release} %if %{with_libgd} -BuildRequires: gd-devel >= 2.1.1 +BuildRequires: pkgconfig(gdlib) >= 2.1.1 %if 0%{?fedora} <= 19 && 0%{?rhel} <= 7 Requires: gd-last%{?_isa} >= 2.1.1 %else @@ -854,17 +846,19 @@ Requires: gd%{?_isa} >= 2.1.1 %endif %else # Required to build the bundled GD library -BuildRequires: libjpeg-devel -BuildRequires: libpng-devel -BuildRequires: freetype-devel -BuildRequires: libXpm-devel -BuildRequires: libwebp-devel +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(libwebp) Provides: bundled(gd) = 2.0.35 %endif %if 0%{?rhel} Obsoletes: php53-gd, php53u-gd, php54-gd, php54w-gd, php55u-gd, php55w-gd, php56u-gd, php56w-gd Obsoletes: php70u-gd, php70w-gd, php71u-gd, php71w-gd, php72u-gd, php72w-gd Obsoletes: php73-gd, php73w-gd +Obsoletes: php74-gd, php74w-gd %endif %description gd @@ -882,6 +876,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php53-bcmath, php53u-bcmath, php54-bcmath, php54w-bcmath, php55u-bcmath, php55w-bcmath, php56u-bcmath, php56w-bcmath Obsoletes: php70u-bcmath, php70w-bcmath, php71u-bcmath, php71w-bcmath, php72u-bcmath, php72w-bcmath Obsoletes: php73-bcmath, php73w-bcmath +Obsoletes: php74-bcmath, php74w-bcmath %endif Provides: bundled(libbcmath) @@ -900,6 +895,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php53-gmp, php53u-gmp, php54-gmp, php54w-gmp, php55u-gmp, php55w-gmp, php56u-gmp, php56w-gmp Obsoletes: php70u-gmp, php70w-gmp, php71u-gmp, php71w-gmp, php72u-gmp, php72w-gmp Obsoletes: php73-gmp, php73w-gmp +Obsoletes: php74-gmp, php74w-gmp %endif %description gmp @@ -911,7 +907,7 @@ Summary: A database abstraction layer module for PHP applications Group: Development/Languages # All files licensed under PHP version 3.01 License: PHP -BuildRequires: %{db_devel} +BuildRequires: libdb-devel BuildRequires: tokyocabinet-devel BuildRequires: gdbm-devel BuildRequires: lmdb-devel @@ -920,6 +916,7 @@ Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php53-dba, php53u-dba, php54-dba, php54w-dba, php55u-dba, php55w-dba, php56u-dba, php56w-dba Obsoletes: php70u-dba, php70w-dba, php71u-dba, php71w-dba, php72u-dba, php72w-dba Obsoletes: php73-dba, php73w-dba +Obsoletes: php74-dba, php74w-dba %endif %description dba @@ -937,6 +934,7 @@ BuildRequires: libtidy-devel Obsoletes: php53-tidy, php53u-tidy, php54-tidy, php54w-tidy, php55u-tidy, php55w-tidy, php56u-tidy, php56w-tidy Obsoletes: php70u-tidy, php70w-tidy, php71u-tidy, php71w-tidy, php72u-tidy, php72w-tidy Obsoletes: php73-tidy, php73w-tidy +Obsoletes: php74-tidy, php74w-tidy %endif %description tidy @@ -944,7 +942,7 @@ The php-tidy package contains a dynamic shared object that will add support for using the tidy library to PHP. %package pdo-dblib -Summary: PDO driver Microsoft SQL Server and Sybase databases +Summary: PDO driver for Microsoft SQL Server and Sybase databases # All files licensed under PHP version 3.01 License: PHP Requires: php-pdo%{?_isa} = %{version}-%{release} @@ -955,6 +953,7 @@ Obsoletes: php-mssql < %{version}-%{release} Obsoletes: php53-mssql, php53u-mssql, php54-mssql, php54w-mssql, php55u-mssql, php55w-mssql, php56u-mssql, php56w-mssql Obsoletes: php70u-pdo-dblib, php70w-pdo_dblib, php71u-pdo-dblib, php71w-pdo_dblib, php72u-pdo-dblib, php72w-pdo_dblib Obsoletes: php73-pdo-dblib, php73w-pdo_dblib +Obsoletes: php74-pdo-dblib, php74w-pdo_dblib %endif %description pdo-dblib @@ -973,6 +972,7 @@ Provides: php-embedded-devel%{?_isa} = %{version}-%{release} Obsoletes: php53-embedded, php53u-embedded, php54-embedded, php54w-embedded, php55u-embedded, php55w-embedded, php56u-embedded, php56w-embedded Obsoletes: php70u-embedded, php70w-embedded, php71u-embedded, php71w-embedded, php72u-embedded, php72w-embedded Obsoletes: php73-embedded, php73w-embedded +Obsoletes: php74-embedded, php74w-embedded %endif %description embedded @@ -990,41 +990,27 @@ BuildRequires: aspell-devel >= 0.50.0 Obsoletes: php53-pspell, php53u-pspell, php54-pspell, php54w-pspell, php55u-pspell, php55w-pspell, php56u-pspell, php56w-pspell Obsoletes: php70u-pspell, php70w-pspell, php71u-pspell, php71w-pspell, php72u-pspell, php72w-pspell Obsoletes: php73-pspell, php73w-pspell +Obsoletes: php74-pspell, php74w-pspell %endif %description pspell The php-pspell package contains a dynamic shared object that will add support for using the pspell library to PHP. -%package recode -Summary: A module for PHP applications for using the recode library -Group: System Environment/Libraries -# All files licensed under PHP version 3.01 -License: PHP -Requires: php-common%{?_isa} = %{version}-%{release} -BuildRequires: recode-devel -%if 0%{?rhel} -Obsoletes: php53-recode, php53u-recode, php54-recode, php54w-recode, php55u-recode, php55w-recode, php56u-recode, php56w-recode -Obsoletes: php70u-recode, php70w-recode, php71u-recode, php71w-recode, php72u-recode, php72w-recode -Obsoletes: php73-recode, php73w-recode -%endif - -%description recode -The php-recode package contains a dynamic shared object that will add -support for using the recode library to PHP. - %package intl Summary: Internationalization extension for PHP applications Group: System Environment/Libraries # All files licensed under PHP version 3.01 License: PHP Requires: php-common%{?_isa} = %{version}-%{release} -# Upstream requires 4.0, we require 50 to ensure use of libicu-last / libicu62 -BuildRequires: libicu-devel >= 50 +BuildRequires: pkgconfig(icu-i18n) >= 50.1 +BuildRequires: pkgconfig(icu-io) >= 50.1 +BuildRequires: pkgconfig(icu-uc) >= 50.1 %if 0%{?rhel} Obsoletes: php53-intl, php53u-intl, php54-intl, php54w-intl, php55u-intl, php55w-intl, php56u-intl, php56w-intl Obsoletes: php70u-intl, php70w-intl, php71u-intl, php71w-intl, php72u-intl, php72w-intl Obsoletes: php73-intl, php73w-intl +Obsoletes: php74-intl, php74w-intl %endif %description intl @@ -1037,11 +1023,12 @@ Group: System Environment/Libraries # All files licensed under PHP version 3.0 License: PHP Requires: php-common%{?_isa} = %{version}-%{release} -BuildRequires: enchant-devel >= 1.2.4 +BuildRequires: pkgconfig(enchant) %if 0%{?rhel} Obsoletes: php53-enchant, php53u-enchant, php54-enchant, php54w-enchant, php55u-enchant, php55w-enchant, php56u-enchant, php56w-enchant Obsoletes: php70u-enchant, php70w-enchant, php71u-enchant, php71w-enchant, php72u-enchant, php72w-enchant Obsoletes: php73-enchant, php73w-enchant +Obsoletes: php74-enchant, php74w-enchant %endif %description enchant @@ -1064,10 +1051,10 @@ Provides: php-pecl-zip%{?_isa} = %{zipver} Obsoletes: php53-zip, php53u-zip, php54-zip, php54w-zip, php55u-zip, php55w-zip, php56u-zip, php56w-zip Obsoletes: php70u-zip, php70w-zip, php71u-zip, php71w-zip, php72u-zip, php72w-zip Obsoletes: php73-zip, php73w-zip +Obsoletes: php74-zip, php74w-zip %endif %if %{with_libzip} -# 0.11.1 required, but 1.0.1 is bundled -BuildRequires: pkgconfig(libzip) >= 1.0.1 +BuildRequires: pkgconfig(libzip) >= 0.11 %endif %description zip @@ -1081,17 +1068,18 @@ Summary: JavaScript Object Notation extension for PHP License: PHP Group: System Environment/Libraries Requires: php-common%{?_isa} = %{version}-%{release} -Obsoletes: php-pecl-json < %{jsonver} -Obsoletes: php-pecl-jsonc < %{jsonver} -Provides: php-pecl(json) = %{jsonver} -Provides: php-pecl(json)%{?_isa} = %{jsonver} -Provides: php-pecl-json = %{jsonver} -Provides: php-pecl-json%{?_isa} = %{jsonver} +Obsoletes: php-pecl-json < %{version} +Obsoletes: php-pecl-jsonc < %{version} +Provides: php-pecl(json) = %{version} +Provides: php-pecl(json)%{?_isa} = %{version} +Provides: php-pecl-json = %{version} +Provides: php-pecl-json%{?_isa} = %{version} %if 0%{?rhel} Obsoletes: php53-json, php53u-json, php54-json, php54w-json, php55u-json, php55w-json, php56u-json, php56w-json Obsoletes: php55u-pecl-jsonc, php56u-pecl-jsonc Obsoletes: php70u-json, php70w-json, php71u-json, php71w-json, php72u-json, php72w-json Obsoletes: php73-json, php73w-json +Obsoletes: php74-json, php74w-json %endif %description json @@ -1104,8 +1092,8 @@ Summary: Wrapper for the Sodium cryptographic library # All files licensed under PHP version 3.0.1 License: PHP Group: System Environment/Libraries -# Ensure libsodium-last is used (upstream 1.0.9) -BuildRequires: pkgconfig(libsodium) >= 1.0.13 +# Minimal is 1.0.8, 1.0.14 is needed for argon2 password +BuildRequires: pkgconfig(libsodium) >= 1.0.14 Requires: php-common%{?_isa} = %{version}-%{release} Obsoletes: php-pecl-libsodium2 < 3 @@ -1114,6 +1102,7 @@ Provides: php-pecl(libsodium)%{?_isa} = %{version} %if 0%{?rhel} Obsoletes: php72u-sodium, php72w-sodium Obsoletes: php73-sodium, php73w-sodium +Obsoletes: php74-sodium, php74w-sodium %endif %description sodium @@ -1121,6 +1110,27 @@ The php-sodium package provides a simple, low-level PHP extension for the libsodium cryptographic library. +%package ffi +Summary: Foreign Function Interface +# All files licensed under PHP version 3.0.1 +License: PHP +Group: System Environment/Libraries +BuildRequires: pkgconfig(libffi) + +Requires: php-common%{?_isa} = %{version}-%{release} +%if 0%{?rhel} +Obsoletes: php74-ffi, php74w-ffi +%endif + +%description ffi +FFI is one of the features that made Python and LuaJIT very useful for fast +prototyping. It allows calling C functions and using C data types from pure +scripting language and therefore develop “system code” more productively. + +For PHP, FFI opens a way to write PHP extensions and bindings to C libraries +in pure PHP. + + %prep : CIBLE = %{name}-%{version}-%{release} oci8=%{with_oci8} libzip=%{with_libzip} @@ -1129,13 +1139,11 @@ low-level PHP extension for the libsodium cryptographic library. %patch1 -p1 -b .mpmcheck %patch5 -p1 -b .includedir %patch6 -p1 -b .embed -%patch7 -p1 -b .recode %patch8 -p1 -b .libdb %if 0%{?rhel} %patch9 -p1 -b .curltls %endif -%patch40 -p1 -b .dlopen %if 0%{?fedora} >= 28 || 0%{?rhel} >= 6 %patch42 -p1 -b .systzdata %endif @@ -1145,7 +1153,6 @@ low-level PHP extension for the libsodium cryptographic library. %endif %patch46 -p1 -b .fixheader %patch47 -p1 -b .phpinfo -%patch48 -p1 -b .pdooci %patch91 -p1 -b .remi-oci8 @@ -1169,10 +1176,8 @@ cp ext/gd/libgd/COPYING libgd_COPYING %endif cp sapi/fpm/LICENSE fpm_LICENSE cp ext/mbstring/libmbfl/LICENSE libmbfl_LICENSE -cp ext/mbstring/oniguruma/COPYING oniguruma_COPYING -cp ext/mbstring/ucgendat/OPENLDAP_LICENSE ucgendat_LICENSE cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE -cp ext/bcmath/libbcmath/COPYING.LIB libbcmath_COPYING +cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE cp ext/date/lib/LICENSE.rst timelib_LICENSE # Multiple builds for multiple SAPIs @@ -1256,13 +1261,6 @@ if test "$ver" != "%{zipver}"; then fi %endif -ver=$(sed -n '/#define PHP_JSON_VERSION /{s/.* "//;s/".*$//;p}' ext/json/php_json.h) -if test "$ver" != "%{jsonver}"; then - : Error: Upstream JSON version is now ${ver}, expecting %{jsonver}. - : Update the %{jsonver} macro and rebuild. - exit 1 -fi - # https://bugs.php.net/63362 - Not needed but installed headers. # Drop some Windows specific headers to avoid installation, # before build to ensure they are really not needed. @@ -1279,21 +1277,12 @@ find . -name \*.[ch] -exec chmod 644 {} \; chmod 644 README.* # Some extensions have their own configuration file -cp %{SOURCE50} 10-opcache.ini -%if 0%{?rhel} != 6 -cat << EOF >>10-opcache.ini - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -opcache.huge_code_pages=0 -EOF -%endif -cp %{SOURCE52} 20-oci8.ini +cp %{SOURCE50} %{SOURCE51} %{SOURCE52} %{SOURCE53} . # Regenerated bison files # to force, rm Zend/zend_{language,ini}_parser.[ch] if [ ! -f Zend/zend_language_parser.c ]; then - ./genfiles + scripts/dev/genfiles fi @@ -1303,9 +1292,6 @@ fi # Set build date from https://reproducible-builds.org/specs/source-date-epoch/ export SOURCE_DATE_EPOCH=$(date +%s -r NEWS) -# aclocal workaround - to be improved -cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >>aclocal.m4 - # Force use of system libtool: libtoolize --force --copy cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4 @@ -1342,7 +1328,7 @@ fi # Always static: # date, filter, libxml, reflection, spl: not supported # hash: for PHAR_SIG_SHA256 and PHAR_SIG_SHA512 -# session: dep on hash, used by soap and wddx +# session: dep on hash, used by soap # pcre: used by filter, zip # pcntl, readline: only used by CLI sapi # openssl: for PHAR_SIG_OPENSSL @@ -1350,6 +1336,7 @@ fi ln -sf ../configure %configure \ + --enable-rtld-now \ --cache-file=../config.cache \ --with-libdir=%{_lib} \ --with-config-file-path=%{_sysconfdir} \ @@ -1359,25 +1346,21 @@ ln -sf ../configure --disable-rpath \ --without-pear \ --with-exec-dir=%{_bindir} \ - --with-freetype-dir=%{_prefix} \ - --with-png-dir=%{_prefix} \ - --with-xpm-dir=%{_prefix} \ --without-gdbm \ - --with-jpeg-dir=%{_prefix} \ --with-openssl \ --with-system-ciphers \ %if %{with_libpcre} - --with-pcre-regex=%{_prefix} \ + --with-external-pcre \ %endif --with-zlib \ --with-layout=GNU \ --with-kerberos \ - --with-libxml-dir=%{_prefix} \ + --with-libxml \ %if 0%{?fedora} >= 28 || 0%{?rhel} >= 6 --with-system-tzdata \ %endif --with-mhash \ - --with-password-argon2 \ + --without-password-argon2 \ %if %{with_dtrace} --enable-dtrace \ %endif @@ -1401,21 +1384,19 @@ build --libdir=%{_libdir}/php \ --enable-pcntl \ --enable-opcache \ --enable-opcache-file \ -%if 0%{?rhel} == 6 - --disable-huge-code-pages \ -%endif --enable-phpdbg \ --with-imap=shared --with-imap-ssl \ --enable-mbstring=shared \ -%if %{with_onig} - --with-onig=%{_prefix} \ -%endif --enable-mbregex \ %if %{with_libgd} - --with-gd=shared,%{_prefix} \ + --enable-gd=shared \ + --with-external-gd \ %else - --with-gd=shared \ - --with-webp-dir=%{_prefix} \ + --enable-gd=shared \ + --with-webp \ + --with-jpeg \ + --with-xpm \ + --with-freetype \ %endif --with-gmp=shared \ --enable-calendar=shared \ @@ -1447,36 +1428,27 @@ build --libdir=%{_libdir}/php \ %endif %endif %if %{with_firebird} - --with-interbase=shared \ --with-pdo-firebird=shared \ %endif --enable-dom=shared \ --with-pgsql=shared \ --enable-simplexml=shared \ --enable-xml=shared \ - --enable-wddx=shared \ --with-snmp=shared,%{_prefix} \ --enable-soap=shared \ --with-xsl=shared,%{_prefix} \ --enable-xmlreader=shared --enable-xmlwriter=shared \ - --with-curl=shared,%{_prefix} \ + --with-curl=shared \ --enable-pdo=shared \ --with-pdo-odbc=shared,unixODBC,%{_prefix} \ --with-pdo-mysql=shared,mysqlnd \ --with-pdo-pgsql=shared,%{_prefix} \ - --with-pdo-sqlite=shared,%{_prefix} \ + --with-pdo-sqlite=shared \ --with-pdo-dblib=shared,%{_prefix} \ -%if %{with_sqlite3} - --with-sqlite3=shared,%{_prefix} \ -%else - --without-sqlite3 \ -%endif + --with-sqlite3=shared \ --enable-json=shared \ %if %{with_zip} - --enable-zip=shared \ -%if %{with_libzip} - --with-libzip \ -%endif + --with-zip=shared \ %endif --without-readline \ --with-libedit \ @@ -1488,21 +1460,21 @@ build --libdir=%{_libdir}/php \ --enable-posix=shared \ --with-unixODBC=shared,%{_prefix} \ --enable-fileinfo=shared \ + --with-ffi=shared \ --with-sodium=shared \ --enable-intl=shared \ - --with-icu-dir=%{_prefix} \ - --with-enchant=shared,%{_prefix} \ - --with-recode=shared,%{_prefix} + --with-enchant=shared popd -without_shared="--without-gd \ +without_shared="--disable-gd \ --disable-dom --disable-dba --without-unixODBC \ --disable-opcache \ --disable-json \ + --without-ffi \ --disable-xmlreader --disable-xmlwriter \ --without-sodium \ --without-sqlite3 --disable-phar --disable-fileinfo \ - --without-pspell --disable-wddx \ + --without-pspell \ --without-curl --disable-posix --disable-xml \ --disable-simplexml --disable-exif --without-gettext \ --without-iconv --disable-ftp --without-bz2 --disable-ctype \ @@ -1514,7 +1486,7 @@ pushd build-apache build --with-apxs2=%{_httpd_apxs} \ --libdir=%{_libdir}/php \ %if %{with_lsws} - --with-litespeed \ + --enable-litespeed \ %endif --without-mysqli \ --disable-pdo \ @@ -1524,9 +1496,7 @@ popd # Build php-fpm pushd build-fpm build --enable-fpm \ -%if %{with_systemd} --with-fpm-systemd \ -%endif --with-fpm-acl \ --libdir=%{_libdir}/php \ --without-mysqli \ @@ -1556,20 +1526,18 @@ build --includedir=%{_includedir}/php-zts \ --enable-pcntl \ --enable-opcache \ --enable-opcache-file \ -%if 0%{?rhel} == 6 - --disable-huge-code-pages \ -%endif --with-imap=shared --with-imap-ssl \ --enable-mbstring=shared \ -%if %{with_onig} - --with-onig=%{_prefix} \ -%endif --enable-mbregex \ %if %{with_libgd} - --with-gd=shared,%{_prefix} \ + --enable-gd=shared \ + --with-external-gd \ %else - --with-gd=shared \ - --with-webp-dir=%{_prefix} \ + --enable-gd=shared \ + --with-webp \ + --with-jpeg \ + --with-xpm \ + --with-freetype \ %endif --with-gmp=shared \ --enable-calendar=shared \ @@ -1602,36 +1570,27 @@ build --includedir=%{_includedir}/php-zts \ %endif %endif %if %{with_firebird} - --with-interbase=shared \ --with-pdo-firebird=shared \ %endif --enable-dom=shared \ --with-pgsql=shared \ --enable-simplexml=shared \ --enable-xml=shared \ - --enable-wddx=shared \ --with-snmp=shared,%{_prefix} \ --enable-soap=shared \ --with-xsl=shared,%{_prefix} \ --enable-xmlreader=shared --enable-xmlwriter=shared \ - --with-curl=shared,%{_prefix} \ + --with-curl=shared \ --enable-pdo=shared \ --with-pdo-odbc=shared,unixODBC,%{_prefix} \ --with-pdo-mysql=shared,mysqlnd \ --with-pdo-pgsql=shared,%{_prefix} \ - --with-pdo-sqlite=shared,%{_prefix} \ + --with-pdo-sqlite=shared \ --with-pdo-dblib=shared,%{_prefix} \ -%if %{with_sqlite3} - --with-sqlite3=shared,%{_prefix} \ -%else - --without-sqlite3 \ -%endif + --with-sqlite3=shared \ --enable-json=shared \ %if %{with_zip} - --enable-zip=shared \ -%if %{with_libzip} - --with-libzip \ -%endif + --with-zip=shared \ %endif --without-readline \ --with-libedit \ @@ -1643,11 +1602,10 @@ build --includedir=%{_includedir}/php-zts \ --enable-posix=shared \ --with-unixODBC=shared,%{_prefix} \ --enable-fileinfo=shared \ + --with-ffi=shared \ --with-sodium=shared \ --enable-intl=shared \ - --with-icu-dir=%{_prefix} \ - --with-enchant=shared,%{_prefix} \ - --with-recode=shared,%{_prefix} + --with-enchant=shared popd # Build a special thread-safe Apache SAPI @@ -1676,7 +1634,7 @@ export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 export SKIP_ONLINE_TESTS=1 export SKIP_IO_CAPTURE_TESTS=1 unset TZ LANG LC_ALL -if ! make test; then +if ! make test TESTS=%{?_smp_mflags}; then set +x for f in $(find .. -name \*.diff -type f -print); do if ! grep -q XFAIL "${f/.diff/.phpt}" @@ -1714,11 +1672,9 @@ make -C build-fpm install-fpm \ make -C build-cgi install \ INSTALL_ROOT=$RPM_BUILD_ROOT -# Install the default configuration file and icons +# Install the default configuration file install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.ini -install -m 755 -d $RPM_BUILD_ROOT%{_httpd_contentdir}/icons -install -m 644 php.gif $RPM_BUILD_ROOT%{_httpd_contentdir}/icons/php.gif # For third-party packaging: install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/php @@ -1733,21 +1689,13 @@ install -m 755 build-zts/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp7 %endif # Apache config fragment -%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}" -# Single config file with httpd < 2.4 (fedora <= 17) -install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf -%if %{with_zts} -cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf -%endif -cat %{SOURCE1} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf -%else # Dual config file with httpd >= 2.4 (fedora >= 18) install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf %if %{with_zts} && 0%{?fedora} < 27 && 0%{?rhel} < 8 cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf %endif install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf -%endif + %if %{with_httpd2410} cat %{SOURCE11} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf %else @@ -1800,7 +1748,6 @@ install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm %endif -%if %{with_systemd} install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm # install systemd unit files and scripts for handling server startup # this folder requires systemd >= 204 @@ -1810,15 +1757,6 @@ install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf %endif -%else -sed -ne '1,2p' -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm -install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm -sed -i -e 's:/run:/var/run:' $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf -sed -i -e 's:/run:/var/run:' $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm -# Service -install -m 755 -d $RPM_BUILD_ROOT%{_initrddir} -install -m 755 %{SOURCE99} $RPM_BUILD_ROOT%{_initrddir}/php-fpm -%endif %if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 sed -e '/EnvironmentFile/d' -i $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service @@ -1859,21 +1797,20 @@ for mod in pgsql odbc ldap snmp xmlrpc imap json \ oci8 pdo_oci \ %endif %if %{with_firebird} - interbase pdo_firebird \ + pdo_firebird \ %endif -%if %{with_sqlite3} sqlite3 \ -%endif enchant phar fileinfo intl \ - tidy pdo_dblib pspell curl wddx \ + ffi \ + tidy pdo_dblib pspell curl \ sodium \ - posix shmop sysvshm sysvsem sysvmsg recode xml \ + posix shmop sysvshm sysvsem sysvmsg xml \ ; do case $mod in opcache) # Zend extensions ini=10-${mod}.ini;; - pdo_*|mysqli|wddx|xmlreader|xmlrpc) + pdo_*|mysqli|xmlreader|xmlrpc) # Extensions with dependencies on 20-* ini=30-${mod}.ini;; *) @@ -1909,7 +1846,7 @@ EOF done # The dom, xsl and xml* modules are all packaged in php-xml -cat files.dom files.xsl files.xml{reader,writer} files.wddx \ +cat files.dom files.xsl files.xml{reader,writer} \ files.simplexml >> files.xml # mysqlnd @@ -1923,9 +1860,6 @@ cat files.pdo_odbc >> files.odbc %if %{with_oci8} cat files.pdo_oci >> files.oci8 %endif -%if %{with_firebird} -cat files.pdo_firebird >> files.interbase -%endif # sysv* and posix in packaged in php-process cat files.shmop files.sysv* files.posix > files.process @@ -1933,9 +1867,7 @@ cat files.shmop files.sysv* files.posix > files.process # Package sqlite3 and pdo_sqlite with pdo; isolating the sqlite dependency # isn't useful at this time since rpm itself requires sqlite. cat files.pdo_sqlite >> files.pdo -%if %{with_sqlite3} cat files.sqlite3 >> files.pdo -%endif # Package curl, phar and fileinfo in -common. cat files.curl files.phar files.fileinfo \ @@ -1952,9 +1884,9 @@ sed -e '/blacklist_filename/s/php.d/php-zts.d/' \ %endif # Install the macros file: -sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" \ - -e "s/@PHP_ZENDVER@/%{zendver}%{isasuffix}/" \ - -e "s/@PHP_PDOVER@/%{pdover}%{isasuffix}/" \ +sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \ + -e "s/@PHP_ZENDVER@/%{zendver}-%{__isa_bits}/" \ + -e "s/@PHP_PDOVER@/%{pdover}-%{__isa_bits}/" \ -e "s/@PHP_VERSION@/%{upver}/" \ %if ! %{with_zts} -e "/zts/d" \ @@ -1996,35 +1928,14 @@ exit 0 %endif %post fpm -%if %{with_systemd} %systemd_post php-fpm.service -%else -if [ $1 = 1 ]; then - # Initial installation - /sbin/chkconfig --add php-fpm -fi -%endif %preun fpm -%if %{with_systemd} %systemd_preun php-fpm.service -%else -if [ $1 = 0 ]; then - # Package removal, not upgrade - /sbin/service php-fpm stop >/dev/null 2>&1 - /sbin/chkconfig --del php-fpm -fi -%endif %if 0%{?fedora} < 27 && 0%{?rhel} < 8 %postun fpm -%if %{with_systemd} %systemd_postun_with_restart php-fpm.service -%else -if [ $1 -ge 1 ]; then - /sbin/service php-fpm condrestart >/dev/null 2>&1 || : -fi -%endif %endif %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 @@ -2068,13 +1979,10 @@ fi %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/wsdlcache %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/opcache %config(noreplace) %{_httpd_confdir}/php.conf -%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %config(noreplace) %{_httpd_modconfdir}/15-php.conf -%endif -%{_httpd_contentdir}/icons/php.gif %files common -f files.common -%doc CODING_STANDARDS CREDITS EXTENSIONS NEWS README* +%doc EXTENSIONS NEWS UPGRADING* README.REDIST.BINS *md docs %license LICENSE TSRM_LICENSE %license libmagic_LICENSE %license timelib_LICENSE @@ -2112,7 +2020,6 @@ fi %{_mandir}/man1/phar.phar.1* %{_mandir}/man1/phpize.1* %{_mandir}/man1/zts-phpize.1* -%doc sapi/cgi/README* sapi/cli/README %files dbg %{_bindir}/phpdbg @@ -2144,7 +2051,6 @@ fi %config(noreplace) %{_sysconfdir}/nginx/conf.d/php-fpm.conf %config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf %endif -%if %{with_systemd} %{_unitdir}/php-fpm.service %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 %{_unitdir}/httpd.service.d/%{?scl_prefix}php-fpm.conf @@ -2152,10 +2058,6 @@ fi %endif %dir %{_sysconfdir}/systemd/system/php-fpm.service.d %dir %ghost /run/php-fpm -%else -%{_initrddir}/php-fpm -%dir %{_localstatedir}/run/php-fpm -%endif %{_sbindir}/php-fpm %dir %{_sysconfdir}/php-fpm.d # log owned by apache for log @@ -2196,8 +2098,6 @@ fi %files xmlrpc -f files.xmlrpc %files mbstring -f files.mbstring %license libmbfl_LICENSE -%license oniguruma_COPYING -%license ucgendat_LICENSE %files gd -f files.gd %if ! %{with_libgd} %license libgd_README @@ -2205,7 +2105,7 @@ fi %endif %files soap -f files.soap %files bcmath -f files.bcmath -%license libbcmath_COPYING +%license libbcmath_LICENSE %files gmp -f files.gmp %files dba -f files.dba %files pdo -f files.pdo @@ -2214,9 +2114,8 @@ fi %files pspell -f files.pspell %files intl -f files.intl %files process -f files.process -%files recode -f files.recode %if %{with_firebird} -%files interbase -f files.interbase +%files pdo-firebird -f files.pdo_firebird %endif %files enchant -f files.enchant %files mysqlnd -f files.mysqlnd @@ -2231,9 +2130,13 @@ fi %endif %files json -f files.json %files sodium -f files.sodium +%files ffi -f files.ffi %changelog +* Thu Sep 5 2019 Remi Collet - 7.4.0~RC1-1 +- update to 7.4.0RC1 + * Wed Aug 28 2019 Remi Collet - 7.3.9-1 - Update to 7.3.9 - http://www.php.net/releases/7_3_9.php -- cgit