diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-11-02 08:16:24 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-11-02 08:16:24 +0100 |
commit | 0545d319809fbd7251e59b1040e7f5b07cf6f6e1 (patch) | |
tree | 1ac801a8c569f62b8b6d089f7d1bd9a554309764 | |
parent | d1652183b923a5012dc86048cbf94bf53d48d614 (diff) |
php55-php:
- update to 5.5.19RC1
- new version of systzdata patch, fix case sensitivity
- disable opcache.fast_shutdown in default config
- add php56-cgi command in base system
-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-- | php.spec | 16 |
3 files changed, 48 insertions, 18 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 + + @@ -124,10 +124,12 @@ %global db_devel libdb-devel %endif +%global rcver RC1 + Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php -Version: 5.5.18 -Release: 1%{?dist} +Version: 5.5.19 +Release: 0.1.RC1%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -163,7 +165,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 -lldap_r for OpenLDAP @@ -1326,6 +1328,7 @@ install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm %if 0%{?scl:1} install -m 755 -d $RPM_BUILD_ROOT%{_root_bindir} ln -s %{_bindir}/php $RPM_BUILD_ROOT%{_root_bindir}/%{scl} +ln -s %{_bindir}/php-cgi $RPM_BUILD_ROOT%{_root_bindir}/%{scl}-cgi ln -s %{_bindir}/phar.phar $RPM_BUILD_ROOT%{_root_bindir}/%{scl_prefix}phar %if %{with_lsws} ln -s %{_bindir}/lsphp $RPM_BUILD_ROOT%{_root_bindir}/ls%{scl} @@ -1579,6 +1582,7 @@ fi %doc sapi/cgi/README* sapi/cli/README %if 0%{?scl:1} %{_root_bindir}/%{scl} +%{_root_bindir}/%{scl}-cgi %{_root_bindir}/%{scl_prefix}phar %endif @@ -1685,6 +1689,12 @@ 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 +- add php56-cgi command in base system + * 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 |