- update to 5.6.9RC1

- adapt systzdata patch for upstream changes for new zic
This commit is contained in:
Remi Collet 2015-04-30 07:30:27 +02:00
parent 7fd2a3c3c5
commit 09a6d8eba1
4 changed files with 71 additions and 61 deletions

1
.gitignore vendored
View File

@ -45,3 +45,4 @@ php-5.5.*.xz
/php-5.6.7-strip.tar.xz /php-5.6.7-strip.tar.xz
/php-5.6.8RC1-strip.tar.xz /php-5.6.8RC1-strip.tar.xz
/php-5.6.8-strip.tar.xz /php-5.6.8-strip.tar.xz
/php-5.6.9RC1-strip.tar.xz

View File

@ -2,6 +2,7 @@ Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired. than embedding a copy. Discussed upstream but was not desired.
History: History:
r12: adapt for upstream changes for new zic
r11: use canonical names to avoid more case sensitivity issues r11: use canonical names to avoid more case sensitivity issues
round lat/long from zone.tab towards zero per builtin db round lat/long from zone.tab towards zero per builtin db
r10: make timezone case insensitive r10: make timezone case insensitive
@ -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 r2: add filesystem trawl to set up name alias index
r1: initial revision r1: initial revision
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c diff -up php-5.6.9RC1/ext/date/lib/parse_tz.c.systzdata php-5.6.9RC1/ext/date/lib/parse_tz.c
index 5d2aec9..671b398 100644 --- php-5.6.9RC1/ext/date/lib/parse_tz.c.systzdata 2015-04-30 00:00:18.000000000 +0200
--- a/ext/date/lib/parse_tz.c +++ php-5.6.9RC1/ext/date/lib/parse_tz.c 2015-04-30 06:36:47.019617321 +0200
+++ b/ext/date/lib/parse_tz.c
@@ -20,6 +20,16 @@ @@ -20,6 +20,16 @@
#include "timelib.h" #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(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__) # if defined(__LITTLE_ENDIAN__)
@@ -51,9 +66,14 @@ @@ -53,6 +68,10 @@ static int read_preamble(const unsigned
static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
{ {
- /* skip ID */ uint32_t version;
- *tzf += 4;
- + if (memcmp(*tzf, "TZif", 4) == 0) {
+ if (memcmp(tzf, "TZif", 4) == 0) {
+ *tzf += 20; + *tzf += 20;
+ return; + return 0;
+ } + }
+ /* read ID */
+ /* skip ID */ version = (*tzf)[3] - '0';
+ *tzf += 4; *tzf += 4;
+ @@ -296,7 +315,418 @@ void timelib_dump_tzinfo(timelib_tzinfo
/* read BC flag */
tz->bc = (**tzf == '\1');
*tzf += 1;
@@ -256,7 +276,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
} }
} }
@ -491,7 +484,7 @@ index 5d2aec9..671b398 100644
{ {
int left = 0, right = tzdb->index_size - 1; int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE #ifdef HAVE_SETLOCALE
@@ -295,36 +726,135 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const @@ -335,21 +765,87 @@ static int seek_to_tz_position(const uns
return 0; return 0;
} }
@ -510,7 +503,6 @@ index 5d2aec9..671b398 100644
+ +
+ (*tzf) = (unsigned char *)orig ; + (*tzf) = (unsigned char *)orig ;
+ *map = orig; + *map = orig;
+
+ return 1; + return 1;
+ } + }
+ else + else
@ -534,7 +526,6 @@ index 5d2aec9..671b398 100644
+ timezonedb_system = tmp; + timezonedb_system = tmp;
+ } + }
+ +
+
+ return timezonedb_system; + return timezonedb_system;
+#else +#else
return &timezonedb_builtin; return &timezonedb_builtin;
@ -578,25 +569,34 @@ index 5d2aec9..671b398 100644
+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); + return stat(fname, &st) == 0 && is_valid_tzfile(&st);
+ } + }
+#endif +#endif
+
+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); + return (inmem_seek_to_tz_position(&tzf, timezone, tzdb));
} }
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
@@ -374,24 +870,54 @@ static void read_64bit_header(const unsi
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
{ {
const unsigned char *tzf; const unsigned char *tzf;
+ char *memmap = NULL; + char *memmap = NULL;
+ size_t maplen; + size_t maplen;
timelib_tzinfo *tmp; timelib_tzinfo *tmp;
int version;
- if (seek_to_tz_position(&tzf, timezone, tzdb)) { - if (seek_to_tz_position(&tzf, timezone, tzdb)) {
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { + if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
tmp = timelib_tzinfo_ctor(timezone); tmp = timelib_tzinfo_ctor(timezone);
read_preamble(&tzf, tmp); version = read_preamble(&tzf, tmp);
read_header(&tzf, tmp); read_header(&tzf, tmp);
read_transistions(&tzf, tmp); read_transistions(&tzf, tmp);
read_types(&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); - read_location(&tzf, tmp);
+ +
+#ifdef HAVE_SYSTEM_TZDATA +#ifdef HAVE_SYSTEM_TZDATA
@ -624,16 +624,22 @@ index 5d2aec9..671b398 100644
+ } else + } else
+#endif +#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. */ + /* PHP-style - use the embedded info. */
+ read_location(&tzf, tmp); + read_location(&tzf, tmp);
+ } + }
} else { } else {
tmp = NULL; tmp = NULL;
} }
diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 diff -up php-5.6.9RC1/ext/date/lib/timelib.m4.systzdata php-5.6.9RC1/ext/date/lib/timelib.m4
index c725572..4c837c7 100644 --- php-5.6.9RC1/ext/date/lib/timelib.m4.systzdata 2015-04-30 00:00:18.000000000 +0200
--- a/ext/date/lib/timelib.m4 +++ php-5.6.9RC1/ext/date/lib/timelib.m4 2015-04-30 06:32:08.549500385 +0200
+++ b/ext/date/lib/timelib.m4
@@ -78,3 +78,17 @@ stdlib.h @@ -78,3 +78,17 @@ stdlib.h
dnl Check for strtoll, atoll dnl Check for strtoll, atoll
@ -652,4 +658,3 @@ index c725572..4c837c7 100644
+ fi + fi
+fi +fi
+ +

View File

@ -57,12 +57,12 @@
%global db_devel libdb-devel %global db_devel libdb-devel
%endif %endif
#global rcver RC1 %global rcver RC1
%global rpmrel 1 %global rpmrel 1
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: 5.6.8 Version: 5.6.9
%if 0%{?rcver:1} %if 0%{?rcver:1}
Release: 0.%{rpmrel}.%{rcver}%{?dist} Release: 0.%{rpmrel}.%{rcver}%{?dist}
%else %else
@ -107,7 +107,7 @@ Patch21: php-5.4.7-odbctimer.patch
# Functional changes # Functional changes
Patch40: php-5.4.0-dlopen.patch Patch40: php-5.4.0-dlopen.patch
Patch42: php-5.6.3-systzdata-v11.patch Patch42: php-5.6.9-systzdata-v12.patch
# See http://bugs.php.net/53436 # See http://bugs.php.net/53436
Patch43: php-5.4.0-phpize.patch Patch43: php-5.4.0-phpize.patch
# Use -lldap_r for OpenLDAP # Use -lldap_r for OpenLDAP
@ -1481,6 +1481,10 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%changelog %changelog
* Thu Apr 30 2015 Remi Collet <remi@fedoraproject.org> 5.6.9-0.1.RC1
- update to 5.6.9RC1
- adapt systzdata patch for upstream changes for new zic
* Thu Apr 16 2015 Remi Collet <remi@fedoraproject.org> 5.6.8-1 * Thu Apr 16 2015 Remi Collet <remi@fedoraproject.org> 5.6.8-1
- Update to 5.6.8 - Update to 5.6.8
http://www.php.net/releases/5_6_8.php http://www.php.net/releases/5_6_8.php

View File

@ -1 +1 @@
da3376b10e7492f1ba131556292a061d php-5.6.8-strip.tar.xz dc3ceced8dfede3d7801f1813c7874fa php-5.6.9RC1-strip.tar.xz