- update to 5.6.9RC1
- adapt systzdata patch for upstream changes for new zic
This commit is contained in:
parent
7fd2a3c3c5
commit
09a6d8eba1
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||||
|
@ -2,13 +2,14 @@ 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
|
||||||
r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold)
|
r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold)
|
||||||
r8: fix compile error without --with-system-tzdata configured
|
r8: fix compile error without --with-system-tzdata configured
|
||||||
r7: improve check for valid timezone id to exclude directories
|
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,
|
timezone_identifiers_list() using system db,
|
||||||
fix use of PECL timezonedb to override system db,
|
fix use of PECL timezonedb to override system db,
|
||||||
r5: reverts addition of "System/Localtime" fake tzname.
|
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
|
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 0;
|
||||||
+ return;
|
+ }
|
||||||
+ }
|
/* read ID */
|
||||||
+
|
version = (*tzf)[3] - '0';
|
||||||
+ /* skip ID */
|
*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,11 +484,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
+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,
|
+ char **map, size_t *maplen,
|
||||||
+ const timelib_tzdb *tzdb)
|
+ const timelib_tzdb *tzdb)
|
||||||
+{
|
+{
|
||||||
@ -507,15 +500,14 @@ index 5d2aec9..671b398 100644
|
|||||||
+ if (orig == NULL) {
|
+ if (orig == NULL) {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ (*tzf) = (unsigned char *)orig ;
|
+ (*tzf) = (unsigned char *)orig ;
|
||||||
+ *map = orig;
|
+ *map = orig;
|
||||||
+
|
+ return 1;
|
||||||
+ return 1;
|
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+#endif
|
+#endif
|
||||||
+ {
|
+ {
|
||||||
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
@ -530,11 +522,10 @@ index 5d2aec9..671b398 100644
|
|||||||
+ tmp->data = NULL;
|
+ tmp->data = NULL;
|
||||||
+ create_zone_index(tmp);
|
+ create_zone_index(tmp);
|
||||||
+ system_location_table = create_location_table();
|
+ system_location_table = create_location_table();
|
||||||
+ fake_data_segment(tmp, system_location_table);
|
+ fake_data_segment(tmp, system_location_table);
|
||||||
+ timezonedb_system = tmp;
|
+ timezonedb_system = tmp;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+
|
|
||||||
+ return timezonedb_system;
|
+ return timezonedb_system;
|
||||||
+#else
|
+#else
|
||||||
return &timezonedb_builtin;
|
return &timezonedb_builtin;
|
||||||
@ -558,45 +549,54 @@ index 5d2aec9..671b398 100644
|
|||||||
- return (seek_to_tz_position(&tzf, timezone, tzdb));
|
- return (seek_to_tz_position(&tzf, timezone, tzdb));
|
||||||
+
|
+
|
||||||
+#ifdef HAVE_SYSTEM_TZDATA
|
+#ifdef HAVE_SYSTEM_TZDATA
|
||||||
+ if (tzdb == timezonedb_system) {
|
+ if (tzdb == timezonedb_system) {
|
||||||
+ char fname[PATH_MAX];
|
+ char fname[PATH_MAX];
|
||||||
+ struct stat st;
|
+ struct stat st;
|
||||||
+
|
+
|
||||||
+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
|
+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (system_location_table) {
|
+ if (system_location_table) {
|
||||||
+ if (find_zone_info(system_location_table, timezone) != NULL) {
|
+ if (find_zone_info(system_location_table, timezone) != NULL) {
|
||||||
+ /* found in cache */
|
+ /* found in cache */
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
|
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
|
||||||
+
|
+
|
||||||
+ 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
|
||||||
+
|
+
|
||||||
|
|
10
php.spec
10
php.spec
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user