summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-04 16:22:06 +0200
committerRemi Collet <remi@remirepo.net>2021-06-04 16:22:06 +0200
commit53c65d18b140a02b58b50467ce55ed1922a0cf05 (patch)
tree8526a3e72e6337c27238d7f39188f0a43e7f7be9
parent01001a538a5789c91d7c218729563e15b9ff5e75 (diff)
update to 8.1.0-dev
-rw-r--r--failed.txt18
-rw-r--r--php-8.0.0-phpinfo.patch118
-rw-r--r--php-8.0.6-deprecated.patch400
-rw-r--r--php-8.1.0-phpinfo.patch44
-rw-r--r--php-8.1.0-systzdata-v20.patch (renamed from php-8.0.0-systzdata-v19.patch)26
-rw-r--r--php.conf52
-rw-r--r--php.conf214
-rw-r--r--php.spec38
8 files changed, 162 insertions, 548 deletions
diff --git a/failed.txt b/failed.txt
new file mode 100644
index 0000000..bb0dbf9
--- /dev/null
+++ b/failed.txt
@@ -0,0 +1,18 @@
+===== 8.1.0-DEV (2021-06-04)
+
+$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
+
+/var/lib/mock/scl81el7x/build.log:Tests failed : 0
+/var/lib/mock/scl81el8x/build.log:Tests failed : 0
+/var/lib/mock/scl81fc33x/build.log:Tests failed : 0
+/var/lib/mock/scl81fc34x/build.log:Tests failed : 0
+
+
+
+
+(1) proc_open give erratic test results :(
+(2) test issue (fixed upstream)
+(3) known issue
+(4) related to tzdata
+(5) need investigation
+(6) // issue
diff --git a/php-8.0.0-phpinfo.patch b/php-8.0.0-phpinfo.patch
deleted file mode 100644
index 391d996..0000000
--- a/php-8.0.0-phpinfo.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-
-Drop "Configure Command" from phpinfo as it doesn't
-provide any useful information.
-The available extensions are not related to this command.
-
-Replace full GCC name by gcc in php -v output
-
-
-Also apply
-
-From 9bf43c45908433d382f0499d529849172d0d8206 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 28 Dec 2020 08:33:09 +0100
-Subject: [PATCH] rename COMPILER and ARCHITECTURE macro (too generic)
-
----
- configure.ac | 4 ++--
- ext/standard/info.c | 8 ++++----
- sapi/cli/php_cli.c | 8 ++++----
- win32/build/confutils.js | 10 +++++-----
- 4 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9d9c8b155b07..143dc061346b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1289,10 +1289,10 @@ if test -n "${PHP_BUILD_PROVIDER}"; then
- AC_DEFINE_UNQUOTED(PHP_BUILD_PROVIDER,"$PHP_BUILD_PROVIDER",[build provider])
- fi
- if test -n "${PHP_BUILD_COMPILER}"; then
-- AC_DEFINE_UNQUOTED(COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
-+ AC_DEFINE_UNQUOTED(PHP_BUILD_COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
- fi
- if test -n "${PHP_BUILD_ARCH}"; then
-- AC_DEFINE_UNQUOTED(ARCHITECTURE,"$PHP_BUILD_ARCH",[build architecture])
-+ AC_DEFINE_UNQUOTED(PHP_BUILD_ARCH,"$PHP_BUILD_ARCH",[build architecture])
- fi
-
- PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
-diff --git a/ext/standard/info.c b/ext/standard/info.c
-index 153cb6cde014..8ceef31d9fe4 100644
---- a/ext/standard/info.c
-+++ b/ext/standard/info.c
-@@ -798,11 +798,11 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
- #ifdef PHP_BUILD_PROVIDER
- php_info_print_table_row(2, "Build Provider", PHP_BUILD_PROVIDER);
- #endif
--#ifdef COMPILER
-- php_info_print_table_row(2, "Compiler", COMPILER);
-+#ifdef PHP_BUILD_COMPILER
-+ php_info_print_table_row(2, "Compiler", PHP_BUILD_COMPILER);
- #endif
--#ifdef ARCHITECTURE
-- php_info_print_table_row(2, "Architecture", ARCHITECTURE);
-+#ifdef PHP_BUILD_ARCH
-+ php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
- #endif
- #ifdef CONFIGURE_COMMAND
- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
-diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
-index 5092fb0ffd68..9d296acec631 100644
---- a/sapi/cli/php_cli.c
-+++ b/sapi/cli/php_cli.c
-@@ -640,12 +640,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
- #else
- "NTS "
- #endif
--#ifdef COMPILER
-- COMPILER
-+#ifdef PHP_BUILD_COMPILER
-+ PHP_BUILD_COMPILER
- " "
- #endif
--#ifdef ARCHITECTURE
-- ARCHITECTURE
-+#ifdef PHP_BUILD_ARCH
-+ PHP_BUILD_ARCH
- " "
- #endif
- #if ZEND_DEBUG
-
-diff -up ./ext/standard/info.c.phpinfo ./ext/standard/info.c
---- ./ext/standard/info.c.phpinfo 2020-07-21 10:49:31.000000000 +0200
-+++ ./ext/standard/info.c 2020-07-21 11:41:56.295633523 +0200
-@@ -804,9 +804,6 @@ PHPAPI ZEND_COLD void php_print_info(int
- #ifdef PHP_BUILD_ARCH
- php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
- #endif
--#ifdef CONFIGURE_COMMAND
-- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
--#endif
-
- if (sapi_module.pretty_name) {
- php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
-diff -up ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo ./ext/standard/tests/general_functions/phpinfo.phpt
---- ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo 2020-07-21 10:49:31.000000000 +0200
-+++ ./ext/standard/tests/general_functions/phpinfo.phpt 2020-07-21 11:41:56.296633522 +0200
-@@ -17,7 +17,6 @@ PHP Version => %s
-
- System => %s
- Build Date => %s%a
--Configure Command => %s
- Server API => Command Line Interface
- Virtual Directory Support => %s
- Configuration File (php.ini) Path => %s
-diff -up ./sapi/cli/php_cli.c.phpinfo ./sapi/cli/php_cli.c
---- ./sapi/cli/php_cli.c.phpinfo 2020-07-21 11:43:38.812475300 +0200
-+++ ./sapi/cli/php_cli.c 2020-07-21 11:43:45.783464540 +0200
-@@ -641,8 +641,7 @@ static int do_cli(int argc, char **argv)
- "NTS "
- #endif
- #ifdef PHP_BUILD_COMPILER
-- PHP_BUILD_COMPILER
-- " "
-+ "gcc "
- #endif
- #ifdef PHP_BUILD_ARCH
- PHP_BUILD_ARCH
diff --git a/php-8.0.6-deprecated.patch b/php-8.0.6-deprecated.patch
deleted file mode 100644
index 1e6b93b..0000000
--- a/php-8.0.6-deprecated.patch
+++ /dev/null
@@ -1,400 +0,0 @@
-From 4dc8b3c0efaae25b08c8f59b068f17c97c59d0ae Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 5 May 2021 15:41:00 +0200
-Subject: [PATCH] get rid of inet_aton and inet_ntoa use inet_ntop iand
- inet_pton where available standardize buffer size
-
----
- ext/sockets/sockaddr_conv.c | 4 ++++
- ext/sockets/sockets.c | 48 +++++++++++++++++++++++++------------
- ext/standard/dns.c | 16 ++++++++++++-
- main/network.c | 20 ++++++++++++++--
- 4 files changed, 70 insertions(+), 18 deletions(-)
-
-diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c
-index 57996612d2d7e..65c8418fb3a6f 100644
---- a/ext/sockets/sockaddr_conv.c
-+++ b/ext/sockets/sockaddr_conv.c
-@@ -87,7 +87,11 @@ int php_set_inet_addr(struct sockaddr_in *sin, char *string, php_socket *php_soc
- struct in_addr tmp;
- struct hostent *host_entry;
-
-+#ifdef HAVE_INET_PTON
-+ if (inet_pton(AF_INET, string, &tmp)) {
-+#else
- if (inet_aton(string, &tmp)) {
-+#endif
- sin->sin_addr.s_addr = tmp.s_addr;
- } else {
- if (strlen(string) > MAXFQDNLEN || ! (host_entry = php_network_gethostbyname(string))) {
-diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
-index 16ad3e8013a4c..85c938d1b97b1 100644
---- a/ext/sockets/sockets.c
-+++ b/ext/sockets/sockets.c
-@@ -220,8 +220,10 @@ zend_module_entry sockets_module_entry = {
- ZEND_GET_MODULE(sockets)
- #endif
-
-+#ifndef HAVE_INET_NTOP
- /* inet_ntop should be used instead of inet_ntoa */
- int inet_ntoa_lock = 0;
-+#endif
-
- static int php_open_listen_sock(php_socket *sock, int port, int backlog) /* {{{ */
- {
-@@ -1082,10 +1084,12 @@ PHP_FUNCTION(socket_getsockname)
- struct sockaddr_in *sin;
- #if HAVE_IPV6
- struct sockaddr_in6 *sin6;
-- char addr6[INET6_ADDRSTRLEN+1];
-+#endif
-+#ifdef HAVE_INET_NTOP
-+ char addrbuf[INET6_ADDRSTRLEN];
- #endif
- struct sockaddr_un *s_un;
-- char *addr_string;
-+ const char *addr_string;
- socklen_t salen = sizeof(php_sockaddr_storage);
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz|z", &arg1, socket_ce, &addr, &port) == FAILURE) {
-@@ -1106,8 +1110,8 @@ PHP_FUNCTION(socket_getsockname)
- #if HAVE_IPV6
- case AF_INET6:
- sin6 = (struct sockaddr_in6 *) sa;
-- inet_ntop(AF_INET6, &sin6->sin6_addr, addr6, INET6_ADDRSTRLEN);
-- ZEND_TRY_ASSIGN_REF_STRING(addr, addr6);
-+ inet_ntop(AF_INET6, &sin6->sin6_addr, addrbuf, sizeof(addrbuf));
-+ ZEND_TRY_ASSIGN_REF_STRING(addr, addrbuf);
-
- if (port != NULL) {
- ZEND_TRY_ASSIGN_REF_LONG(port, htons(sin6->sin6_port));
-@@ -1117,11 +1121,14 @@ PHP_FUNCTION(socket_getsockname)
- #endif
- case AF_INET:
- sin = (struct sockaddr_in *) sa;
-+#ifdef HAVE_INET_NTOP
-+ addr_string = inet_ntop(AF_INET, &sin->sin_addr, addrbuf, sizeof(addrbuf));
-+#else
- while (inet_ntoa_lock == 1);
- inet_ntoa_lock = 1;
- addr_string = inet_ntoa(sin->sin_addr);
- inet_ntoa_lock = 0;
--
-+#endif
- ZEND_TRY_ASSIGN_REF_STRING(addr, addr_string);
-
- if (port != NULL) {
-@@ -1154,10 +1161,12 @@ PHP_FUNCTION(socket_getpeername)
- struct sockaddr_in *sin;
- #if HAVE_IPV6
- struct sockaddr_in6 *sin6;
-- char addr6[INET6_ADDRSTRLEN+1];
-+#endif
-+#ifdef HAVE_INET_NTOP
-+ char addrbuf[INET6_ADDRSTRLEN];
- #endif
- struct sockaddr_un *s_un;
-- char *addr_string;
-+ const char *addr_string;
- socklen_t salen = sizeof(php_sockaddr_storage);
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oz|z", &arg1, socket_ce, &arg2, &arg3) == FAILURE) {
-@@ -1178,9 +1187,9 @@ PHP_FUNCTION(socket_getpeername)
- #if HAVE_IPV6
- case AF_INET6:
- sin6 = (struct sockaddr_in6 *) sa;
-- inet_ntop(AF_INET6, &sin6->sin6_addr, addr6, INET6_ADDRSTRLEN);
-+ inet_ntop(AF_INET6, &sin6->sin6_addr, addrbuf, sizeof(addrbuf));
-
-- ZEND_TRY_ASSIGN_REF_STRING(arg2, addr6);
-+ ZEND_TRY_ASSIGN_REF_STRING(arg2, addrbuf);
-
- if (arg3 != NULL) {
- ZEND_TRY_ASSIGN_REF_LONG(arg3, htons(sin6->sin6_port));
-@@ -1191,11 +1200,14 @@ PHP_FUNCTION(socket_getpeername)
- #endif
- case AF_INET:
- sin = (struct sockaddr_in *) sa;
-+#ifdef HAVE_INET_NTOP
-+ addr_string = inet_ntop(AF_INET, &sin->sin_addr, addrbuf, sizeof(addrbuf));
-+#else
- while (inet_ntoa_lock == 1);
- inet_ntoa_lock = 1;
- addr_string = inet_ntoa(sin->sin_addr);
- inet_ntoa_lock = 0;
--
-+#endif
- ZEND_TRY_ASSIGN_REF_STRING(arg2, addr_string);
-
- if (arg3 != NULL) {
-@@ -1527,12 +1539,14 @@ PHP_FUNCTION(socket_recvfrom)
- struct sockaddr_in sin;
- #if HAVE_IPV6
- struct sockaddr_in6 sin6;
-- char addr6[INET6_ADDRSTRLEN];
-+#endif
-+#ifdef HAVE_INET_NTOP
-+ char addrbuf[INET6_ADDRSTRLEN];
- #endif
- socklen_t slen;
- int retval;
- zend_long arg3, arg4;
-- char *address;
-+ const char *address;
- zend_string *recv_buf;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ozllz|z", &arg1, socket_ce, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
-@@ -1590,7 +1604,11 @@ PHP_FUNCTION(socket_recvfrom)
- ZSTR_LEN(recv_buf) = retval;
- ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
-
-+#ifdef HAVE_INET_NTOP
-+ address = inet_ntop(AF_INET, &sin.sin_addr, addrbuf, sizeof(addrbuf));
-+#else
- address = inet_ntoa(sin.sin_addr);
-+#endif
-
- ZEND_TRY_ASSIGN_REF_NEW_STR(arg2, recv_buf);
- ZEND_TRY_ASSIGN_REF_STRING(arg5, address ? address : "0.0.0.0");
-@@ -1617,11 +1635,11 @@ PHP_FUNCTION(socket_recvfrom)
- ZSTR_LEN(recv_buf) = retval;
- ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
-
-- memset(addr6, 0, INET6_ADDRSTRLEN);
-- inet_ntop(AF_INET6, &sin6.sin6_addr, addr6, INET6_ADDRSTRLEN);
-+ memset(addrbuf, 0, INET6_ADDRSTRLEN);
-+ inet_ntop(AF_INET6, &sin6.sin6_addr, addrbuf, sizeof(addrbuf));
-
- ZEND_TRY_ASSIGN_REF_NEW_STR(arg2, recv_buf);
-- ZEND_TRY_ASSIGN_REF_STRING(arg5, addr6[0] ? addr6 : "::");
-+ ZEND_TRY_ASSIGN_REF_STRING(arg5, addrbuf[0] ? addrbuf : "::");
- ZEND_TRY_ASSIGN_REF_LONG(arg6, ntohs(sin6.sin6_port));
- break;
- #endif
-diff --git a/ext/standard/dns.c b/ext/standard/dns.c
-index 41b98424edb60..6efdbbe894b46 100644
---- a/ext/standard/dns.c
-+++ b/ext/standard/dns.c
-@@ -228,6 +228,9 @@ PHP_FUNCTION(gethostbynamel)
- struct hostent *hp;
- struct in_addr in;
- int i;
-+#ifdef HAVE_INET_NTOP
-+ char addr4[INET_ADDRSTRLEN];
-+#endif
-
- ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_PATH(hostname, hostname_len)
-@@ -255,7 +258,11 @@ PHP_FUNCTION(gethostbynamel)
- }
-
- in = *h_addr_entry;
-+#ifdef HAVE_INET_NTOP
-+ add_next_index_string(return_value, inet_ntop(AF_INET, &in, addr4, INET_ADDRSTRLEN));
-+#else
- add_next_index_string(return_value, inet_ntoa(in));
-+#endif
- }
- }
- /* }}} */
-@@ -266,7 +273,10 @@ static zend_string *php_gethostbyname(char *name)
- struct hostent *hp;
- struct in_addr *h_addr_0; /* Don't call this h_addr, it's a macro! */
- struct in_addr in;
-- char *address;
-+#ifdef HAVE_INET_NTOP
-+ char addr4[INET_ADDRSTRLEN];
-+#endif
-+ const char *address;
-
- hp = php_network_gethostbyname(name);
- if (!hp) {
-@@ -281,7 +291,11 @@ static zend_string *php_gethostbyname(char *name)
-
- memcpy(&in.s_addr, h_addr_0, sizeof(in.s_addr));
-
-+#ifdef HAVE_INET_NTOP
-+ address = inet_ntop(AF_INET, &in, addr4, INET_ADDRSTRLEN);
-+#else
- address = inet_ntoa(in);
-+#endif
- return zend_string_init(address, strlen(address), 0);
- }
- /* }}} */
-diff --git a/main/network.c b/main/network.c
-index 2c504952b2dd1..7f2f714ec42df 100644
---- a/main/network.c
-+++ b/main/network.c
-@@ -236,8 +236,12 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
- } while ((sai = sai->ai_next) != NULL);
-
- freeaddrinfo(res);
-+#else
-+#ifdef HAVE_INET_PTON
-+ if (!inet_pton(AF_INET, host, &in)) {
- #else
- if (!inet_aton(host, &in)) {
-+#endif
- if(strlen(host) > MAXFQDNLEN) {
- host_info = NULL;
- errno = E2BIG;
-@@ -555,7 +559,11 @@ PHPAPI int php_network_parse_network_address_with_port(const char *addr, zend_lo
- goto out;
- }
- #endif
-+#ifdef HAVE_INET_PTON
-+ if (inet_pton(AF_INET, tmp, &in4->sin_addr) > 0) {
-+#else
- if (inet_aton(tmp, &in4->sin_addr) > 0) {
-+#endif
- in4->sin_port = htons(port);
- in4->sin_family = AF_INET;
- *sl = sizeof(struct sockaddr_in);
-@@ -617,15 +625,19 @@ PHPAPI void php_network_populate_name_from_sockaddr(
- }
-
- if (textaddr) {
--#if HAVE_IPV6 && HAVE_INET_NTOP
-+#ifdef HAVE_INET_NTOP
- char abuf[256];
- #endif
-- char *buf = NULL;
-+ const char *buf = NULL;
-
- switch (sa->sa_family) {
- case AF_INET:
- /* generally not thread safe, but it *is* thread safe under win32 */
-+#ifdef HAVE_INET_NTOP
-+ buf = inet_ntop(AF_INET, &((struct sockaddr_in*)sa)->sin_addr, (char *)&abuf, sizeof(abuf));
-+#else
- buf = inet_ntoa(((struct sockaddr_in*)sa)->sin_addr);
-+#endif
- if (buf) {
- *textaddr = strpprintf(0, "%s:%d",
- buf, ntohs(((struct sockaddr_in*)sa)->sin_port));
-@@ -862,7 +874,11 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short
-
- in4->sin_family = sa->sa_family;
- in4->sin_port = htons(bindport);
-+#ifdef HAVE_INET_PTON
-+ if (!inet_pton(AF_INET, bindto, &in4->sin_addr)) {
-+#else
- if (!inet_aton(bindto, &in4->sin_addr)) {
-+#endif
- php_error_docref(NULL, E_WARNING, "Invalid IP Address: %s", bindto);
- goto skip_bind;
- }
-From e5b6f43ec7813392d83ea586b7902e0396a1f792 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 6 May 2021 14:21:29 +0200
-Subject: [PATCH] get rid of inet_addr usage
-
----
- main/fastcgi.c | 4 ++++
- sapi/litespeed/lsapilib.c | 4 ++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/main/fastcgi.c b/main/fastcgi.c
-index 071f69d3a7f0..c936d42405de 100644
---- a/main/fastcgi.c
-+++ b/main/fastcgi.c
-@@ -688,8 +688,12 @@ int fcgi_listen(const char *path, int backlog)
- if (!*host || !strncmp(host, "*", sizeof("*")-1)) {
- sa.sa_inet.sin_addr.s_addr = htonl(INADDR_ANY);
- } else {
-+#ifdef HAVE_INET_PTON
-+ if (!inet_pton(AF_INET, host, &sa.sa_inet.sin_addr)) {
-+#else
- sa.sa_inet.sin_addr.s_addr = inet_addr(host);
- if (sa.sa_inet.sin_addr.s_addr == INADDR_NONE) {
-+#endif
- struct hostent *hep;
-
- if(strlen(host) > MAXFQDNLEN) {
-diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
-index a72b5dc1b988..305f3326a682 100644
---- a/sapi/litespeed/lsapilib.c
-+++ b/sapi/litespeed/lsapilib.c
-@@ -2672,8 +2672,12 @@ int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
- ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl( INADDR_LOOPBACK );
- else
- {
-+#ifdef HAVE_INET_PTON
-+ if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr))
-+#else
- ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p );
- if ( ((struct sockaddr_in *)pAddr)->sin_addr.s_addr == INADDR_BROADCAST)
-+#endif
- {
- doAddrInfo = 1;
- }
-From 99d67d121acd4c324738509679d23acaf759d065 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 6 May 2021 16:35:48 +0200
-Subject: [PATCH] use getnameinfo instead of gethostbyaddr
-
----
- ext/standard/dns.c | 34 ++++++++++++++++++++++------------
- 1 file changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/ext/standard/dns.c b/ext/standard/dns.c
-index edd9a4549f5c..540c777faaba 100644
---- a/ext/standard/dns.c
-+++ b/ext/standard/dns.c
-@@ -169,20 +169,30 @@ PHP_FUNCTION(gethostbyaddr)
- static zend_string *php_gethostbyaddr(char *ip)
- {
- #if HAVE_IPV6 && HAVE_INET_PTON
-- struct in6_addr addr6;
--#endif
-- struct in_addr addr;
-- struct hostent *hp;
-+ struct sockaddr_in sa4;
-+ struct sockaddr_in6 sa6;
-+ char out[NI_MAXHOST];
-
--#if HAVE_IPV6 && HAVE_INET_PTON
-- if (inet_pton(AF_INET6, ip, &addr6)) {
-- hp = gethostbyaddr((char *) &addr6, sizeof(addr6), AF_INET6);
-- } else if (inet_pton(AF_INET, ip, &addr)) {
-- hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
-- } else {
-- return NULL;
-+ if (inet_pton(AF_INET6, ip, &sa6.sin6_addr)) {
-+ sa6.sin6_family = AF_INET6;
-+
-+ if (getnameinfo((struct sockaddr *)&sa6, sizeof(sa6), out, sizeof(out), NULL, 0, NI_NAMEREQD) < 0) {
-+ return zend_string_init(ip, strlen(ip), 0);
-+ }
-+ return zend_string_init(out, strlen(out), 0);
-+ } else if (inet_pton(AF_INET, ip, &sa4.sin_addr)) {
-+ sa4.sin_family = AF_INET;
-+
-+ if (getnameinfo((struct sockaddr *)&sa4, sizeof(sa4), out, sizeof(out), NULL, 0, NI_NAMEREQD) < 0) {
-+ return zend_string_init(ip, strlen(ip), 0);
-+ }
-+ return zend_string_init(out, strlen(out), 0);
- }
-+ return NULL; /* not a valid IP */
- #else
-+ struct in_addr addr;
-+ struct hostent *hp;
-+
- addr.s_addr = inet_addr(ip);
-
- if (addr.s_addr == -1) {
-@@ -190,13 +200,13 @@ static zend_string *php_gethostbyaddr(char *ip)
- }
-
- hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
--#endif
-
- if (!hp || hp->h_name == NULL || hp->h_name[0] == '\0') {
- return zend_string_init(ip, strlen(ip), 0);
- }
-
- return zend_string_init(hp->h_name, strlen(hp->h_name), 0);
-+#endif
- }
- /* }}} */
-
diff --git a/php-8.1.0-phpinfo.patch b/php-8.1.0-phpinfo.patch
new file mode 100644
index 0000000..d19b2f4
--- /dev/null
+++ b/php-8.1.0-phpinfo.patch
@@ -0,0 +1,44 @@
+
+Drop "Configure Command" from phpinfo as it doesn't
+provide any useful information.
+The available extensions are not related to this command.
+
+Replace full GCC name by gcc in php -v output
+
+
+diff -up ./ext/standard/info.c.phpinfo ./ext/standard/info.c
+--- ./ext/standard/info.c.phpinfo 2020-07-21 10:49:31.000000000 +0200
++++ ./ext/standard/info.c 2020-07-21 11:41:56.295633523 +0200
+@@ -805,9 +805,6 @@ PHPAPI ZEND_COLD void php_print_info(int
+ #ifdef PHP_BUILD_ARCH
+ php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
+ #endif
+-#ifdef CONFIGURE_COMMAND
+- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
+-#endif
+
+ if (sapi_module.pretty_name) {
+ php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
+diff -up ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo ./ext/standard/tests/general_functions/phpinfo.phpt
+--- ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo 2020-07-21 10:49:31.000000000 +0200
++++ ./ext/standard/tests/general_functions/phpinfo.phpt 2020-07-21 11:41:56.296633522 +0200
+@@ -17,7 +17,6 @@ PHP Version => %s
+
+ System => %s
+ Build Date => %s%a
+-Configure Command => %s
+ Server API => Command Line Interface
+ Virtual Directory Support => %s
+ Configuration File (php.ini) Path => %s
+diff -up ./sapi/cli/php_cli.c.phpinfo ./sapi/cli/php_cli.c
+--- ./sapi/cli/php_cli.c.phpinfo 2020-07-21 11:43:38.812475300 +0200
++++ ./sapi/cli/php_cli.c 2020-07-21 11:43:45.783464540 +0200
+@@ -645,7 +645,7 @@ static int do_cli(int argc, char **argv)
+ "NTS"
+ #endif
+ #ifdef PHP_BUILD_COMPILER
+- " " PHP_BUILD_COMPILER
++ " gcc"
+ #endif
+ #ifdef PHP_BUILD_ARCH
+ " " PHP_BUILD_ARCH
diff --git a/php-8.0.0-systzdata-v19.patch b/php-8.1.0-systzdata-v20.patch
index 902d3ce..a2e3827 100644
--- a/php-8.0.0-systzdata-v19.patch
+++ b/php-8.1.0-systzdata-v20.patch
@@ -5,6 +5,7 @@ Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired.
History:
+r20: adapt for timelib 2021.03 (in 8.1.0)
r19: adapt for timelib 2020.02 (in 8.0.0beta2)
r18: adapt for autotool change in 7.3.3RC1
r17: adapt for timelib 2018.01 (in 7.3.2RC1)
@@ -50,13 +51,13 @@ diff -up php-8.0.0beta3/ext/date/config0.m4.systzdata php-8.0.0beta3/ext/date/co
+ fi
+fi
+
- PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
- timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
+ PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
+ timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/date/lib/parse_tz.c
--- php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata 2020-09-01 19:13:26.000000000 +0200
+++ php-8.0.0beta3/ext/date/lib/parse_tz.c 2020-09-02 08:07:51.039979873 +0200
-@@ -26,8 +26,21 @@
+@@ -26,9 +26,22 @@
#include "timelib.h"
#include "timelib_private.h"
@@ -71,6 +72,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
+
+#else
#define TIMELIB_SUPPORTS_V2DATA
+ #define TIMELIB_SUPPORT_SLIM_FILE
#include "timezonedb.h"
+#endif
+
@@ -78,7 +80,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
-@@ -94,6 +107,11 @@ static int read_php_preamble(const unsig
+@@ -95,6 +108,11 @@ static int read_php_preamble(const unsig
{
uint32_t version;
@@ -90,7 +92,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -418,7 +436,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -566,7 +584,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
}
}
@@ -521,7 +523,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
{
int left = 0, right = tzdb->index_size - 1;
-@@ -444,9 +884,48 @@ static int seek_to_tz_position(const uns
+@@ -592,9 +1032,48 @@ static int seek_to_tz_position(const uns
return 0;
}
@@ -570,7 +572,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
}
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -458,7 +937,30 @@ const timelib_tzdb_index_entry *timelib_
+@@ -606,7 +1085,30 @@ const timelib_tzdb_index_entry *timelib_
int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
@@ -602,7 +604,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
}
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -500,12 +1002,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -651,6 +1153,8 @@ static timelib_tzinfo* timelib_tzinfo_ct
timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
{
const unsigned char *tzf;
@@ -611,16 +613,18 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
timelib_tzinfo *tmp;
int version;
int transitions_result, types_result;
- unsigned int type; /* TIMELIB_TZINFO_PHP or TIMELIB_TZINFO_ZONEINFO */
+@@ -658,7 +1162,7 @@ timelib_tzinfo *timelib_parse_tzfile(con
+
+ *error_code = TIMELIB_ERROR_NO_ERROR;
- if (seek_to_tz_position(&tzf, timezone, tzdb)) {
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type);
-@@ -540,11 +1044,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
+@@ -699,11 +1203,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
+ return NULL;
}
- skip_posix_string(&tzf, tmp);
+#ifdef HAVE_SYSTEM_TZDATA
+ if (memmap) {
diff --git a/php.conf b/php.conf
new file mode 100644
index 0000000..0639c0a
--- /dev/null
+++ b/php.conf
@@ -0,0 +1,52 @@
+#
+# The following lines prevent .user.ini files from being viewed by Web clients.
+#
+<Files ".user.ini">
+ <IfModule mod_authz_core.c>
+ Require all denied
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ Order allow,deny
+ Deny from all
+ Satisfy All
+ </IfModule>
+</Files>
+
+#
+# Allow php to handle Multiviews
+#
+AddType text/html .php
+
+#
+# Add index.php to the list of files that will be served as directory
+# indexes.
+#
+DirectoryIndex index.php
+
+# mod_php options
+<IfModule mod_php.c>
+ #
+ # Cause the PHP interpreter to handle files with a .php extension.
+ #
+ <FilesMatch \.(php|phar)$>
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+
+ #
+ # Uncomment the following lines to allow PHP to pretty-print .phps
+ # files as PHP source code:
+ #
+ #<FilesMatch \.phps$>
+ # SetHandler application/x-httpd-php-source
+ #</FilesMatch>
+
+ #
+ # Apache specific PHP configuration options
+ # those can be override in each configured vhost
+ #
+ php_value session.save_handler "files"
+ php_value session.save_path "/var/lib/php/session"
+ php_value soap.wsdl_cache_dir "/var/lib/php/wsdlcache"
+
+ #php_value opcache.file_cache "/var/lib/php/opcache"
+</IfModule>
diff --git a/php.conf2 b/php.conf2
new file mode 100644
index 0000000..cdd7640
--- /dev/null
+++ b/php.conf2
@@ -0,0 +1,14 @@
+
+# Redirect to local php-fpm if mod_php (5, 7 or 8) is not available
+<IfModule !mod_php5.c>
+ <IfModule !mod_php7.c>
+ <IfModule !mod_php.c>
+ # Enable http authorization headers
+ SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
+
+ <FilesMatch \.(php|phar)$>
+ SetHandler "proxy:fcgi://127.0.0.1:9000"
+ </FilesMatch>
+ </IfModule>
+ </IfModule>
+</IfModule>
diff --git a/php.spec b/php.spec
index d9a2aa5..14cff68 100644
--- a/php.spec
+++ b/php.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php80-php
+# remirepo spec file for php81-php
# with SCL and backport stuff, adapted from
#
# Fedora spec file for php
@@ -23,8 +23,8 @@
%endif
# API/ABI check
-%global apiver 20200930
-%global zendver 20200930
+%global apiver 20201009
+%global zendver 20201009
%global pdover 20170320
# Extension version
%global oci8ver 3.0.1
@@ -33,7 +33,7 @@
%global _hardened_build 1
# version used for php embedded library soname
-%global embed_version 8.0
+%global embed_version 8.1
# Ugly hack. Harcoded values to avoid relocation.
%global _httpd_mmn %(cat %{_root_includedir}/httpd/.mmn 2>/dev/null || echo 0)
@@ -93,14 +93,14 @@
%global with_httpd2410 0
%endif
-%global gh_commit 18f2ef094af2b1ad961408fbaf222b9448df2750
+%global gh_commit 953143d8503cd0e861f02d7262f2304dbb58ec5c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-#global gh_date 20200615
+%global gh_date 20210604
%global gh_owner php
%global gh_project php-src
-%global upver 8.0.7
-#global rcver RC1
-#global lower RC1
+%global upver 8.1.0
+#global rcver dev
+%global lower DEV
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
@@ -145,8 +145,6 @@ Patch1: php-7.4.0-httpd.patch
Patch5: php-7.2.0-includedir.patch
Patch6: php-8.0.0-embed.patch
Patch8: php-7.4.0-libdb.patch
-# get rid of deprecated functions from 8.1
-Patch9: php-8.0.6-deprecated.patch
# RHEL backports
Patch10: php-7.0.7-curl.patch
@@ -154,14 +152,14 @@ Patch10: php-7.0.7-curl.patch
# Use system nikic/php-parser
Patch41: php-8.0.0-parser.patch
# use system tzdata
-Patch42: php-8.0.0-systzdata-v19.patch
+Patch42: php-8.1.0-systzdata-v20.patch
# See http://bugs.php.net/53436
Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
Patch45: php-7.4.0-ldap_r.patch
# drop "Configure command" from phpinfo output
# and only use gcc (instead of full version)
-Patch47: php-8.0.0-phpinfo.patch
+Patch47: php-8.1.0-phpinfo.patch
# RC Patch
Patch91: php-7.2.0-oci8conf.patch
@@ -188,7 +186,7 @@ BuildRequires: httpd-filesystem
%endif
BuildRequires: %{?dtsprefix}libstdc++-devel
# no pkgconfig to avoid compat-openssl10
-BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: openssl-devel >= 1.0.2
BuildRequires: pkgconfig(sqlite3) >= 3.7.4
BuildRequires: pkgconfig(zlib) >= 1.2.0.4
BuildRequires: smtpdaemon
@@ -393,7 +391,7 @@ Requires: libtool
# see "php-config --libs"
Requires: krb5-devel%{?_isa}
Requires: libxml2-devel%{?_isa}
-Requires: openssl-devel%{?_isa} >= 1.0.1
+Requires: openssl-devel%{?_isa} >= 1.0.2
%if %{with libpcre}
Requires: pcre2-devel%{?_isa} >= 10.30
%endif
@@ -431,7 +429,7 @@ License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(krb5-gssapi)
-BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: openssl-devel >= 1.0.2
BuildRequires: libc-client-devel
%description imap
@@ -447,7 +445,7 @@ License: PHP
Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(libsasl2)
BuildRequires: openldap-devel
-BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: openssl-devel >= 1.0.2
%description ldap
The %{?scl_prefix}php-ldap package adds Lightweight Directory Access Protocol (LDAP)
@@ -501,7 +499,7 @@ Requires: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release}
Provides: %{?scl_prefix}php_database
Provides: %{?scl_prefix}php-pdo_pgsql, %{?scl_prefix}php-pdo_pgsql%{?_isa}
BuildRequires: krb5-devel
-BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: openssl-devel >= 1.0.2
BuildRequires: postgresql-devel
%description pgsql
@@ -915,7 +913,6 @@ in pure PHP.
%patch5 -p1 -b .includedir
%patch6 -p1 -b .embed
%patch8 -p1 -b .libdb
-%patch9 -p1 -b .deprecated
%if 0%{?rhel}
%patch10 -p1 -b .curltls
%endif
@@ -1807,6 +1804,9 @@ fi
%changelog
+* Fri Jun 4 2021 Remi Collet <remi@remirepo.net> - 8.1.0~DEV.20210604-1
+- update to 8.1.0-dev
+
* Wed Jun 2 2021 Remi Collet <remi@remirepo.net> - 8.0.7-1
- Update to 8.0.7 - http://www.php.net/releases/8_0_7.php