diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-05-14 11:14:51 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-05-14 11:14:51 +0200 |
commit | 8ddb8636eda645d3fdbe3d224ff1e00e7008246c (patch) | |
tree | 67fde5ad2b7f0f61b79948d9f16d8051a982e4da | |
parent | 97b4f1e66a8b8bbbcb6513152e4f3db489c450e1 (diff) |
PHP 5.5.25
-rw-r--r-- | php-5.5.24-datetests.patch | 258 | ||||
-rw-r--r-- | php-5.5.25-systzdata-v12.patch (renamed from php-5.5.19-systzdata-v11.patch) | 123 | ||||
-rw-r--r-- | php55.spec | 10 |
3 files changed, 73 insertions, 318 deletions
diff --git a/php-5.5.24-datetests.patch b/php-5.5.24-datetests.patch index 9e78cc7..81f42f6 100644 --- a/php-5.5.24-datetests.patch +++ b/php-5.5.24-datetests.patch @@ -25,264 +25,6 @@ Backport various fix from 5.6 [timezone_type] => 3 [timezone] => GB-Eire ) -From cd93b120c3cfb129bca7365f48015c46abeb0333 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Sat, 18 Apr 2015 07:47:47 +0200 -Subject: [PATCH] Make date transitions tests more flexible - -zic in recent glibc (2.20) introduce a new transitionn -so use a range to avoid failure when total number -of transitions is different (243/244) ---- - ext/date/tests/DateTimeZone_getTransitions_basic1.phpt | 6 +++--- - ext/date/tests/timezone_transitions_get_basic1.phpt | 10 +++++----- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt b/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt -index f3640d1..d178080 100644 ---- a/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt -+++ b/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt -@@ -16,7 +16,7 @@ date_default_timezone_set("Europe/London"); - // Create a DateTimeZone object - $tz = new DateTimeZone("Europe/London"); - --$tran = $tz->getTransitions(); -+$tran = $tz->getTransitions(-306972000, -37241999); - - if (!is_array($tran)) { - echo "TEST FAILED: Expected an array\n"; -@@ -25,14 +25,14 @@ if (!is_array($tran)) { - echo "\n-- Total number of transitions: " . count($tran). " --\n"; - - echo "\n-- Format a sample entry for Spring 1963 --\n"; --var_dump( $tran[97] ); -+var_dump( $tran[6] ); - - ?> - ===DONE=== - --EXPECT-- - *** Testing DateTimeZone::getTransitions() : basic functionality *** - ---- Total number of transitions: 243 -- -+-- Total number of transitions: 18 -- - - -- Format a sample entry for Spring 1963 -- - array(5) { -diff --git a/ext/date/tests/timezone_transitions_get_basic1.phpt b/ext/date/tests/timezone_transitions_get_basic1.phpt -index eb6cf99..97c5f0c 100644 ---- a/ext/date/tests/timezone_transitions_get_basic1.phpt -+++ b/ext/date/tests/timezone_transitions_get_basic1.phpt -@@ -18,24 +18,24 @@ $tz = timezone_open("Europe/London"); - - $tran = timezone_transitions_get($tz); - --echo "\n-- Get all transitions --\n"; --$tran = timezone_transitions_get($tz); -+echo "\n-- Get all 60s transitions --\n"; -+$tran = timezone_transitions_get($tz, -306972000, -37241999); - var_dump( gettype($tran) ); - - echo "\n-- Total number of transitions: " . count($tran). " --\n"; - - echo "\n-- Format a sample entry pfor Spring 1963 --\n"; --var_dump( $tran[97] ); -+var_dump( $tran[6] ); - - ?> - ===DONE=== - --EXPECT-- - *** Testing timezone_transitions_get() : basic functionality *** - ---- Get all transitions -- -+-- Get all 60s transitions -- - string(5) "array" - ---- Total number of transitions: 243 -- -+-- Total number of transitions: 18 -- - - -- Format a sample entry pfor Spring 1963 -- - array(5) { --- -2.1.4 - -From 984f4b09e028b93e6ab3b738d9bde670fca6fc95 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Sat, 18 Apr 2015 09:11:39 +0200 -Subject: [PATCH] relax bigbang content (new zic) - ---- - ext/date/tests/bug48058.phpt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/ext/date/tests/bug48058.phpt b/ext/date/tests/bug48058.phpt -index 46a1918..87d2190 100644 ---- a/ext/date/tests/bug48058.phpt -+++ b/ext/date/tests/bug48058.phpt -@@ -20,10 +20,10 @@ array(5) { - ["time"]=> - string(%d) "%s" - ["offset"]=> -- int(3600) -+ int(%s) - ["isdst"]=> -- bool(true) -+ bool(%s) - ["abbr"]=> -- string(3) "BST" -+ string(%d) "%s" - } - 10000002008-02-28T12:00:00+0000 --- -2.1.4 - -From 3c81e945a3c61ea3ec00eeb946e95a1f9b92b956 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Sat, 18 Apr 2015 09:28:29 +0200 -Subject: [PATCH] relax test for date < INT32_MIN (new zic) - ---- - ext/date/tests/mktime-3-64bit.phpt | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/ext/date/tests/mktime-3-64bit.phpt b/ext/date/tests/mktime-3-64bit.phpt -index a3649cd..cbb441f 100644 ---- a/ext/date/tests/mktime-3-64bit.phpt -+++ b/ext/date/tests/mktime-3-64bit.phpt -@@ -24,7 +24,7 @@ foreach ($tzs as $tz) { - echo "\n"; - } - ?> ----EXPECT-- -+--EXPECTF-- - America/Toronto - Y: 0 - January 2000-01-01T01:01:01-0500 - Y: 69 - January 2069-01-01T01:01:01-0500 -@@ -32,11 +32,11 @@ Y: 70 - January 1970-01-01T01:01:01-0500 - Y: 71 - January 1971-01-01T01:01:01-0500 - Y: 99 - January 1999-01-01T01:01:01-0500 - Y: 100 - January 2000-01-01T01:01:01-0500 --Y: 101 - January 0101-01-01T01:01:01-0500 --Y: 105 - January 0105-01-01T01:01:01-0500 --Y: 110 - January 0110-01-01T01:01:01-0500 --Y: 1900 - January 1900-01-01T01:01:01-0500 --Y: 1901 - January 1901-01-01T01:01:01-0500 -+Y: 101 - January 0101-01-01T01:01:01-0%d -+Y: 105 - January 0105-01-01T01:01:01-0%d -+Y: 110 - January 0110-01-01T01:01:01-0%d -+Y: 1900 - January 1900-01-01T01:01:01-0%d -+Y: 1901 - January 1901-01-01T01:01:01-0%d - Y: 1902 - January 1902-01-01T01:01:01-0500 - Y: 1999 - January 1999-01-01T01:01:01-0500 - Y: 2000 - January 2000-01-01T01:01:01-0500 -@@ -49,11 +49,11 @@ Y: 70 - January 1970-01-01T01:01:01+0100 - Y: 71 - January 1971-01-01T01:01:01+0100 - Y: 99 - January 1999-01-01T01:01:01+0100 - Y: 100 - January 2000-01-01T01:01:01+0100 --Y: 101 - January 0101-01-01T01:01:01+0100 --Y: 105 - January 0105-01-01T01:01:01+0100 --Y: 110 - January 0110-01-01T01:01:01+0100 --Y: 1900 - January 1900-01-01T01:01:01+0100 --Y: 1901 - January 1901-01-01T01:01:01+0100 -+Y: 101 - January 0101-01-01T01:01:01+0%d -+Y: 105 - January 0105-01-01T01:01:01+0%d -+Y: 110 - January 0110-01-01T01:01:01+0%d -+Y: 1900 - January 1900-01-01T01:01:01+0%d -+Y: 1901 - January 1901-01-01T01:01:01+0%d - Y: 1902 - January 1902-01-01T01:01:01+0100 - Y: 1999 - January 1999-01-01T01:01:01+0100 - Y: 2000 - January 2000-01-01T01:01:01+0100 --- -2.1.4 - -From 3bbfb96e1a1eef0a6cf6891532f9ac419c95dbd8 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Sat, 18 Apr 2015 09:37:06 +0200 -Subject: [PATCH] ignore second value for huge timestamp test (new zic) - ---- - ext/date/tests/getdate_variation7.phpt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/date/tests/getdate_variation7.phpt b/ext/date/tests/getdate_variation7.phpt -index 2088fa1..c757ac7 100644 ---- a/ext/date/tests/getdate_variation7.phpt -+++ b/ext/date/tests/getdate_variation7.phpt -@@ -27,7 +27,7 @@ var_dump( getdate($timestamp) ); - -- Testing getdate\(\) function by passing float 12.3456789000e10 value to timestamp -- - array\(11\) { - \["seconds"\]=> -- int\((36|0)\) -+ int\((.+)\) - \["minutes"\]=> - int\((43|0)\) - \["hours"\]=> -@@ -53,7 +53,7 @@ array\(11\) { - -- Testing getdate\(\) function by passing float -12.3456789000e10 value to timestamp -- - array\(11\) { - \["seconds"\]=> -- int\((44|12|20)\) -+ int\((.+)\) - \["minutes"\]=> - int\((39|23)\) - \["hours"\]=> --- -2.1.4 - -From 1302eb7f7275c3f0b2b3af964dde91c44b769bbc Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Sat, 18 Apr 2015 10:00:15 +0200 -Subject: [PATCH] relax tests with huge year (new zic) - ---- - ext/date/tests/DateTime_add-massive.phpt | 6 +++--- - ext/date/tests/DateTime_diff-massive.phpt | 6 +++--- - ext/date/tests/DateTime_sub-massive.phpt | 6 +++--- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/ext/date/tests/DateTime_add-massive.phpt b/ext/date/tests/DateTime_add-massive.phpt -index ca5bef9..6093d05 100644 ---- a/ext/date/tests/DateTime_add-massive.phpt -+++ b/ext/date/tests/DateTime_add-massive.phpt -@@ -10,6 +10,6 @@ define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD); - require 'DateTime_data-massive.inc'; - - ?> ----EXPECT-- --test_massive_positive: ADD: -333333-01-01 16:18:02 EST + P+666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 EST** --test_massive_negative: ADD: 333333-01-01 16:18:02 EST + P-666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 EST** -+--EXPECTF-- -+test_massive_positive: ADD: -333333-01-01 16:18:02 %s + P+666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 %s** -+test_massive_negative: ADD: 333333-01-01 16:18:02 %s + P-666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 %s** -diff --git a/ext/date/tests/DateTime_diff-massive.phpt b/ext/date/tests/DateTime_diff-massive.phpt -index 2199f84..12a7d0f 100644 ---- a/ext/date/tests/DateTime_diff-massive.phpt -+++ b/ext/date/tests/DateTime_diff-massive.phpt -@@ -10,6 +10,6 @@ define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF); - require 'DateTime_data-massive.inc'; - - ?> ----EXPECT-- --test_massive_positive: DIFF: 333333-01-01 16:18:02 EST - -333333-01-01 16:18:02 EST = **P+666666Y0M0DT0H0M0S** --test_massive_negative: DIFF: -333333-01-01 16:18:02 EST - 333333-01-01 16:18:02 EST = **P-666666Y0M0DT0H0M0S** -+--EXPECTF-- -+test_massive_positive: DIFF: 333333-01-01 16:18:02 %s - -333333-01-01 16:18:02 %s = **P+666666Y0M0DT0H%s** -+test_massive_negative: DIFF: -333333-01-01 16:18:02 %s - 333333-01-01 16:18:02 %s = **P-666666Y0M0DT0H%s** -diff --git a/ext/date/tests/DateTime_sub-massive.phpt b/ext/date/tests/DateTime_sub-massive.phpt -index a0520ec..e143056 100644 ---- a/ext/date/tests/DateTime_sub-massive.phpt -+++ b/ext/date/tests/DateTime_sub-massive.phpt -@@ -10,6 +10,6 @@ define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_SUB); - require 'DateTime_data-massive.inc'; - - ?> ----EXPECT-- --test_massive_positive: SUB: 333333-01-01 16:18:02 EST - P+666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 EST** --test_massive_negative: SUB: -333333-01-01 16:18:02 EST - P-666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 EST** -+--EXPECTF-- -+test_massive_positive: SUB: 333333-01-01 16:18:02 %s - P+666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 %s** -+test_massive_negative: SUB: -333333-01-01 16:18:02 %s - P-666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 %s** --- -2.1.4 From 7cbd8f8b8a662c1e74cb1c97dac6f606f8f477c9 Mon Sep 17 00:00:00 2001 From: krakjoe <joe.watkins@live.co.uk> Date: Thu, 21 Aug 2014 10:03:48 +0100 diff --git a/php-5.5.19-systzdata-v11.patch b/php-5.5.25-systzdata-v12.patch index bfca49b..c4e56ae 100644 --- a/php-5.5.19-systzdata-v11.patch +++ b/php-5.5.25-systzdata-v12.patch @@ -2,13 +2,14 @@ Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: +r12: adapt for upstream changes for new zic r11: use canonical names to avoid more case sensitivity issues round lat/long from zone.tab towards zero per builtin db r10: make timezone case insensitive r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) r8: fix compile error without --with-system-tzdata configured r7: improve check for valid timezone id to exclude directories -r6: fix fd leak in r5, fix country code/BC flag use in +r6: fix fd leak in r5, fix country code/BC flag use in timezone_identifiers_list() using system db, fix use of PECL timezonedb to override system db, r5: reverts addition of "System/Localtime" fake tzname. @@ -19,10 +20,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/lib/parse_tz.c b/ext/date/lib/parse_tz.c -index 5d2aec9..671b398 100644 ---- a/ext/date/lib/parse_tz.c -+++ b/ext/date/lib/parse_tz.c +diff -up php-5.5.25RC1/ext/date/lib/parse_tz.c.systzdata php-5.5.25RC1/ext/date/lib/parse_tz.c +--- php-5.5.25RC1/ext/date/lib/parse_tz.c.systzdata 2015-04-29 11:24:07.000000000 +0200 ++++ php-5.5.25RC1/ext/date/lib/parse_tz.c 2015-04-29 14:21:29.069617493 +0200 @@ -20,6 +20,16 @@ #include "timelib.h" @@ -53,25 +53,18 @@ index 5d2aec9..671b398 100644 #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) -@@ -51,9 +66,14 @@ - - static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -53,6 +68,10 @@ static int read_preamble(const unsigned { -- /* skip ID */ -- *tzf += 4; -- -+ if (memcmp(tzf, "TZif", 4) == 0) { -+ *tzf += 20; -+ return; -+ } -+ -+ /* skip ID */ -+ *tzf += 4; -+ - /* read BC flag */ - tz->bc = (**tzf == '\1'); - *tzf += 1; -@@ -256,7 +276,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) + uint32_t version; + ++ if (memcmp(*tzf, "TZif", 4) == 0) { ++ *tzf += 20; ++ return 0; ++ } + /* read ID */ + version = (*tzf)[3] - '0'; + *tzf += 4; +@@ -296,7 +315,418 @@ void timelib_dump_tzinfo(timelib_tzinfo } } @@ -491,11 +484,11 @@ index 5d2aec9..671b398 100644 { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -295,36 +726,135 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const +@@ -335,21 +765,89 @@ static int seek_to_tz_position(const uns return 0; } -+static int seek_to_tz_position(const unsigned char **tzf, char *timezone, ++static int seek_to_tz_position(const unsigned char **tzf, char *timezone, + char **map, size_t *maplen, + const timelib_tzdb *tzdb) +{ @@ -507,15 +500,15 @@ index 5d2aec9..671b398 100644 + if (orig == NULL) { + return 0; + } -+ ++ + (*tzf) = (unsigned char *)orig ; + *map = orig; -+ -+ return 1; ++ ++ return 1; + } -+ else ++ else +#endif -+ { ++ { + return inmem_seek_to_tz_position(tzf, timezone, tzdb); + } +} @@ -530,11 +523,10 @@ index 5d2aec9..671b398 100644 + tmp->data = NULL; + create_zone_index(tmp); + system_location_table = create_location_table(); -+ fake_data_segment(tmp, system_location_table); ++ fake_data_segment(tmp, system_location_table); + timezonedb_system = tmp; + } + -+ + return timezonedb_system; +#else return &timezonedb_builtin; @@ -558,45 +550,55 @@ index 5d2aec9..671b398 100644 - return (seek_to_tz_position(&tzf, timezone, tzdb)); + +#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char fname[PATH_MAX]; -+ struct stat st; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return 0; -+ } -+ -+ if (system_location_table) { -+ if (find_zone_info(system_location_table, timezone) != NULL) { -+ /* found in cache */ -+ return 1; -+ } -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); -+ } ++ if (tzdb == timezonedb_system) { ++ char fname[PATH_MAX]; ++ struct stat st; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return 0; ++ } ++ ++ if (system_location_table) { ++ if (find_zone_info(system_location_table, timezone) != NULL) { ++ /* found in cache */ ++ return 1; ++ } ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st); ++ } +#endif + + return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); } + static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -374,24 +872,54 @@ static void read_64bit_header(const unsi timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; + char *memmap = NULL; + size_t maplen; timelib_tzinfo *tmp; + int version; - if (seek_to_tz_position(&tzf, timezone, tzdb)) { + if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { tmp = timelib_tzinfo_ctor(timezone); - read_preamble(&tzf, tmp); + version = read_preamble(&tzf, tmp); read_header(&tzf, tmp); read_transistions(&tzf, tmp); read_types(&tzf, tmp); +- if (version == 2) { +- skip_64bit_preamble(&tzf, tmp); +- read_64bit_header(&tzf, tmp); +- skip_64bit_transistions(&tzf, tmp); +- skip_64bit_types(&tzf, tmp); +- skip_posix_string(&tzf, tmp); +- } - read_location(&tzf, tmp); + +#ifdef HAVE_SYSTEM_TZDATA @@ -624,16 +626,22 @@ index 5d2aec9..671b398 100644 + } else +#endif + { ++ if (version == 2) { ++ skip_64bit_preamble(&tzf, tmp); ++ read_64bit_header(&tzf, tmp); ++ skip_64bit_transistions(&tzf, tmp); ++ skip_64bit_types(&tzf, tmp); ++ skip_posix_string(&tzf, tmp); ++ } + /* PHP-style - use the embedded info. */ + read_location(&tzf, tmp); -+ } ++ } } else { tmp = NULL; } -diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 -index c725572..4c837c7 100644 ---- a/ext/date/lib/timelib.m4 -+++ b/ext/date/lib/timelib.m4 +diff -up php-5.5.25RC1/ext/date/lib/timelib.m4.systzdata php-5.5.25RC1/ext/date/lib/timelib.m4 +--- php-5.5.25RC1/ext/date/lib/timelib.m4.systzdata 2015-04-29 11:24:07.000000000 +0200 ++++ php-5.5.25RC1/ext/date/lib/timelib.m4 2015-04-29 14:16:11.211251692 +0200 @@ -78,3 +78,17 @@ stdlib.h dnl Check for strtoll, atoll @@ -652,4 +660,3 @@ index c725572..4c837c7 100644 + fi +fi + - @@ -124,7 +124,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php -Version: 5.5.24 +Version: 5.5.25 %if 0%{?snapdate:1}%{?rcver:1} Release: 0.1.%{?snapdate}%{?rcver}%{?dist} %else @@ -173,7 +173,7 @@ Patch21: php-5.4.7-odbctimer.patch # Functional changes Patch40: php-5.4.0-dlopen.patch -Patch42: php-5.5.19-systzdata-v11.patch +Patch42: php-5.5.25-systzdata-v12.patch # See http://bugs.php.net/53436 Patch43: php-5.4.0-phpize.patch # Use system libzip instead of bundled one @@ -985,6 +985,8 @@ mkdir build-cgi build-apache build-embedded \ rm ext/date/tests/timezone_location_get.phpt rm ext/date/tests/timezone_version_get.phpt rm ext/date/tests/timezone_version_get_basic1.phpt +# Should be skipped but fails sometime +rm ext/standard/tests/file/file_get_contents_error001.phpt # fails sometime rm ext/sockets/tests/mcast_ipv?_recv.phpt @@ -1951,6 +1953,10 @@ fi %changelog +* Thu May 14 2015 Remi Collet <remi@fedoraproject.org> 5.5.25-1 +- Update to 5.5.25 + http://www.php.net/releases/5_5_25.php + * Wed Apr 15 2015 Remi Collet <remi@fedoraproject.org> 5.5.24-1 - Update to 5.5.24 http://www.php.net/releases/5_5_24.php |