summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-10-11 09:26:48 +0200
committerRemi Collet <remi@php.net>2023-10-11 09:26:48 +0200
commit934ac713c6508ca29cd9117d2cb29f4412975b58 (patch)
tree9f4f2a589ef33a5de34d2756acf777a8be2c24a2
parent9de04ecd747e7dac836c32a09c6e1f43ddded0f7 (diff)
update to 8.2.12RC1
add internal UTC if tzdata is missing
-rw-r--r--failed.txt8
-rw-r--r--php-8.1.0-systzdata-v24.patch (renamed from php-8.1.0-systzdata-v23.patch)57
-rw-r--r--php82.spec10
3 files changed, 53 insertions, 22 deletions
diff --git a/failed.txt b/failed.txt
index 9412ae4..445f268 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,4 +1,4 @@
-===== 8.2.11 (2023-09-28)
+===== 8.2.12RC1 (2023-10-12)
$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
@@ -7,13 +7,15 @@ $ grep -ar 'Tests failed' /var/lib/mock/*/build.log
/var/lib/mock/el8x82/build.log:Tests failed : 0
/var/lib/mock/el9a82/build.log:Tests failed : 0
/var/lib/mock/el9x82/build.log:Tests failed : 0
-/var/lib/mock/fc37x82/build.log:Tests failed : 0
+/var/lib/mock/fc37x82/build.log:Tests failed : 1
/var/lib/mock/fc38x82/build.log:Tests failed : 2
/var/lib/mock/fc39a82/build.log:Tests failed : 2
/var/lib/mock/fc39x82/build.log:Tests failed : 2
-fc38x, fc39x:
+el9a, el9x, fc37x,
+ 3 GH-11956 (PCRE regular expressions with JIT enabled gives different result) [ext/pcre/tests/gh11956.phpt]
+fc38x, fc39a, fc39x:
3 openssl_error_string() tests (OpenSSL >= 3.0) [ext/openssl/tests/openssl_error_string_basic_openssl3.phpt]
3 openssl_private_decrypt() tests [ext/openssl/tests/openssl_private_decrypt_basic.phpt]
diff --git a/php-8.1.0-systzdata-v23.patch b/php-8.1.0-systzdata-v24.patch
index 3157660..ca6e634 100644
--- a/php-8.1.0-systzdata-v23.patch
+++ b/php-8.1.0-systzdata-v24.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:
+f24: add internal UTC if tzdata is missing
r23: fix possible buffer overflow
r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi
r21: adapt for timelib 2021.03 (in 8.1.0)
@@ -34,8 +35,9 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
r2: add filesystem trawl to set up name alias index
r1: initial revision
+
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
-index 18b8106bd2..3d1f63c758 100644
+index 6b803bf33e..53c3cdb3f4 100644
--- a/ext/date/config0.m4
+++ b/ext/date/config0.m4
@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h])
@@ -59,10 +61,10 @@ index 18b8106bd2..3d1f63c758 100644
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 --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
-index e41315efdb..4b6547c0a3 100644
+index c7f93580d7..ec196a98b6 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
-@@ -26,9 +26,22 @@
+@@ -26,9 +26,33 @@
#include "timelib.h"
#include "timelib_private.h"
@@ -75,6 +77,17 @@ index e41315efdb..4b6547c0a3 100644
+
+#include "php_scandir.h"
+
++static const unsigned char internal_utc[] = {
++ 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
++ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x0a, 0x55, 0x54, 0x43,
++ 0x30, 0x0a
++};
++
+#else
#define TIMELIB_SUPPORTS_V2DATA
#define TIMELIB_SUPPORT_SLIM_FILE
@@ -85,7 +98,7 @@ index e41315efdb..4b6547c0a3 100644
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
-@@ -95,6 +108,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
+@@ -95,6 +119,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
{
uint32_t version;
@@ -97,7 +110,7 @@ index e41315efdb..4b6547c0a3 100644
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -577,7 +595,467 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
+@@ -577,7 +606,475 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
@@ -441,6 +454,9 @@ index e41315efdb..4b6547c0a3 100644
+
+ qsort(db_index, index_next, sizeof *db_index, sysdbcmp);
+
++ if (!index_next) {
++ db_index[index_next++].id = strdup("UTC");
++ }
+ db->index = db_index;
+ db->index_size = index_next;
+
@@ -547,7 +563,12 @@ index e41315efdb..4b6547c0a3 100644
+
+ fd = open(fname, O_RDONLY);
+ if (fd == -1) {
-+ return NULL;
++ if (strcmp(timezone, "UTC")) {
++ return NULL;
++ } else {
++ *length = sizeof(internal_utc);
++ return internal_utc;
++ }
+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) {
+ close(fd);
+ return NULL;
@@ -566,7 +587,7 @@ index e41315efdb..4b6547c0a3 100644
{
int left = 0, right = tzdb->index_size - 1;
-@@ -603,9 +1081,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
+@@ -603,9 +1100,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
return 0;
}
@@ -600,7 +621,7 @@ index e41315efdb..4b6547c0a3 100644
+ if (timezonedb_system == NULL) {
+ timelib_tzdb *tmp = malloc(sizeof *tmp);
+
-+ tmp->version = "0.system";
++ tmp->version = "0";
+ tmp->data = NULL;
+ create_zone_index(tmp);
+ retrieve_zone_version(tmp);
@@ -616,7 +637,7 @@ index e41315efdb..4b6547c0a3 100644
}
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -617,7 +1135,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
+@@ -617,7 +1154,32 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
@@ -630,7 +651,9 @@ index e41315efdb..4b6547c0a3 100644
+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
+ return 0;
+ }
-+
++ if (!strcmp(timezone, "UTC")) {
++ return 1;
++ }
+ if (system_location_table) {
+ if (find_zone_info(system_location_table, timezone) != NULL) {
+ /* found in cache */
@@ -648,7 +671,7 @@ index e41315efdb..4b6547c0a3 100644
}
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -662,6 +1203,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name)
+@@ -662,6 +1224,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name)
timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
{
const unsigned char *tzf;
@@ -657,7 +680,7 @@ index e41315efdb..4b6547c0a3 100644
timelib_tzinfo *tmp;
int version;
int transitions_result, types_result;
-@@ -669,7 +1212,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
+@@ -669,7 +1233,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
*error_code = TIMELIB_ERROR_NO_ERROR;
@@ -666,7 +689,7 @@ index e41315efdb..4b6547c0a3 100644
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type);
-@@ -712,11 +1255,36 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
+@@ -712,11 +1276,38 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
return NULL;
}
@@ -689,7 +712,9 @@ index e41315efdb..4b6547c0a3 100644
+ }
+
+ /* Now done with the mmap segment - discard it. */
-+ munmap(memmap, maplen);
++ if (memmap != internal_utc) {
++ munmap(memmap, maplen);
++ }
+ } else {
+#endif
if (type == TIMELIB_TZINFO_PHP) {
@@ -704,10 +729,10 @@ index e41315efdb..4b6547c0a3 100644
*error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
tmp = NULL;
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
-index cf4a11b8a2..cd49abc78d 100644
+index 48c82bf7ec..443299c089 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
-@@ -457,7 +457,11 @@ PHP_MINFO_FUNCTION(date)
+@@ -490,7 +490,11 @@ PHP_MINFO_FUNCTION(date)
php_info_print_table_row(2, "date/time support", "enabled");
php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION);
php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version);
diff --git a/php82.spec b/php82.spec
index 6186dbc..dd908f9 100644
--- a/php82.spec
+++ b/php82.spec
@@ -120,8 +120,8 @@
%bcond_without libgd
%bcond_with zip
-%global upver 8.2.11
-#global rcver RC1
+%global upver 8.2.12
+%global rcver RC1
Summary: PHP scripting language for creating dynamic web sites
Name: php
@@ -172,7 +172,7 @@ Patch10: php-8.2.0-curl.patch
# Use system nikic/php-parser
Patch41: php-8.2.0-parser.patch
# use system tzdata
-Patch42: php-8.1.0-systzdata-v23.patch
+Patch42: php-8.1.0-systzdata-v24.patch
# See http://bugs.php.net/53436
Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
@@ -2200,6 +2200,10 @@ fi
%changelog
+* Wed Oct 11 2023 Remi Collet <remi@remirepo.net> - 8.2.12~RC1-1
+- update to 8.2.12RC1
+- add internal UTC if tzdata is missing
+
* Tue Sep 26 2023 Remi Collet <remi@remirepo.net> - 8.2.11-1
- Update to 8.2.11 - http://www.php.net/releases/8_2_11.php