diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-11-02 09:39:16 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-11-02 09:39:16 +0100 |
commit | 52ddfa984e49a01d62c3718f2aed5a6fe49ea663 (patch) | |
tree | ef6e5ba6ed1614352c648cdcbf4423e56c28fc2d | |
parent | a276585dc339de0938159df25ff9d2b49747d8d3 (diff) |
php 5.5: - update to 5.5.19RC1
- new version of systzdata patch, fix case sensitivity
- disable opcache.fast_shutdown in default config
-rw-r--r-- | opcache.ini | 2 | ||||
-rw-r--r-- | php-5.5.19-systzdata-v11.patch (renamed from php-5.3.1-systzdata-v10.patch) | 48 | ||||
-rw-r--r-- | php55.spec | 12 |
3 files changed, 43 insertions, 19 deletions
diff --git a/opcache.ini b/opcache.ini index 0b85b67..dd117db 100644 --- a/opcache.ini +++ b/opcache.ini @@ -48,7 +48,7 @@ opcache.max_accelerated_files=4000 ;opcache.load_comments=1 ; If enabled, a fast shutdown sequence is used for the accelerated code -opcache.fast_shutdown=1 +;opcache.fast_shutdown=0 ; Allow file existence override (file_exists, etc.) performance feature. ;opcache.enable_file_override=0 diff --git a/php-5.3.1-systzdata-v10.patch b/php-5.5.19-systzdata-v11.patch index b262fae..bfca49b 100644 --- a/php-5.3.1-systzdata-v10.patch +++ b/php-5.5.19-systzdata-v11.patch @@ -2,7 +2,9 @@ Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: -r10 : make timezone case insensitive +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 @@ -17,6 +19,8 @@ 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 @@ -20,6 +20,16 @@ @@ -67,7 +71,7 @@ r1: initial revision /* read BC flag */ tz->bc = (**tzf == '\1'); *tzf += 1; -@@ -256,7 +276,405 @@ +@@ -256,7 +276,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) } } @@ -165,7 +169,7 @@ r1: initial revision + /* Round to five decimal place, not because it's a good idea, + * but, because the builtin data uses rounded data, so, match + * that. */ -+ *result = round(v * sign * 100000.0) / 100000.0; ++ *result = trunc(v * sign * 100000.0) / 100000.0; + + return p; +} @@ -293,7 +297,7 @@ r1: initial revision +{ + const timelib_tzdb_index_entry *alpha = first, *beta = second; + -+ return strcmp(alpha->id, beta->id); ++ return strcasecmp(alpha->id, beta->id); +} + + @@ -431,6 +435,26 @@ r1: initial revision + return S_ISREG(st->st_mode) && st->st_size > 20; +} + ++/* To allow timezone names to be used case-insensitively, find the ++ * canonical name for this timezone, if possible. */ ++static const char *canonical_tzname(const char *timezone) ++{ ++ if (timezonedb_system) { ++ timelib_tzdb_index_entry *ent, lookup; ++ ++ lookup.id = (char *)timezone; ++ ++ ent = bsearch(&lookup, timezonedb_system->index, ++ timezonedb_system->index_size, sizeof lookup, ++ sysdbcmp); ++ if (ent) { ++ return ent->id; ++ } ++ } ++ ++ return timezone; ++} ++ +/* Return the mmap()ed tzfile if found, else NULL. On success, the + * length of the mapped data is placed in *length. */ +static char *map_tzfile(const char *timezone, size_t *length) @@ -444,14 +468,7 @@ r1: initial revision + return NULL; + } + -+ if (system_location_table) { -+ const struct location_info *li; -+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { -+ /* Use the stored name to avoid case issue */ -+ timezone = li->name; -+ } -+ } -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone); ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); + + fd = open(fname, O_RDONLY); + if (fd == -1) { @@ -474,7 +491,7 @@ r1: initial revision { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -295,36 +713,135 @@ +@@ -295,36 +726,135 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const return 0; } @@ -556,7 +573,7 @@ r1: initial revision + } + } + -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone); ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); + + return stat(fname, &st) == 0 && is_valid_tzfile(&st); + } @@ -613,6 +630,8 @@ r1: initial revision } 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 @@ -78,3 +78,17 @@ stdlib.h @@ -633,3 +652,4 @@ r1: initial revision + fi +fi + + @@ -120,12 +120,11 @@ %global db_devel libdb-devel %endif -#global snapdate 201308300430 -#global rcver RC1 +%global rcver RC1 Summary: PHP scripting language for creating dynamic web sites Name: php -Version: 5.5.18 +Version: 5.5.19 %if 0%{?snapdate:1}%{?rcver:1} Release: 0.1.%{?snapdate}%{?rcver}%{?dist} %else @@ -174,7 +173,7 @@ Patch21: php-5.4.7-odbctimer.patch # Functional changes Patch40: php-5.4.0-dlopen.patch -Patch42: php-5.3.1-systzdata-v10.patch +Patch42: php-5.5.19-systzdata-v11.patch # See http://bugs.php.net/53436 Patch43: php-5.4.0-phpize.patch # Use system libzip instead of bundled one @@ -1944,6 +1943,11 @@ fi %changelog +* Sun Nov 2 2014 Remi Collet <remi@fedoraproject.org> 5.5.19-0.1.RC1 +- update to 5.5.19RC1 +- new version of systzdata patch, fix case sensitivity +- disable opcache.fast_shutdown in default config + * Thu Oct 16 2014 Remi Collet <remi@fedoraproject.org> 5.5.18-1 - Update to 5.5.18 http://www.php.net/releases/5_5_18.php |