Hello community, here is the log from the commit of package php5 for openSUSE:Factory checked in at 2015-05-18 23:05:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/php5 (Old) and /work/SRC/openSUSE:Factory/.php5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php5" Changes: -------- --- /work/SRC/openSUSE:Factory/php5/php5.changes 2015-05-07 09:20:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.php5.new/php5.changes 2015-05-18 23:05:04.000000000 +0200 @@ -1,0 +2,8 @@ +Mon May 18 08:11:14 UTC 2015 - [email protected] + +- update to 5.6.9: Several bugs have been fixed. +- systzdata patch updated to r12 + - php5-systzdata-r10.patch + + php5-systzdata-r12.patch + +------------------------------------------------------------------- Old: ---- php-5.6.8.tar.xz php-5.6.8.tar.xz.asc php5-systzdata-r10.patch New: ---- php-5.6.9.tar.xz php-5.6.9.tar.xz.asc php5-systzdata-r12.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ php5.spec ++++++ --- /var/tmp/diff_new_pack.VvdWuw/_old 2015-05-18 23:05:06.000000000 +0200 +++ /var/tmp/diff_new_pack.VvdWuw/_new 2015-05-18 23:05:06.000000000 +0200 @@ -115,7 +115,7 @@ %define apache2_includedir %(%{apxs2} -q INCLUDEDIR) %define apache2_serverroot %(%{apxs2} -q PREFIX) %define need_libxml2_hack %(if [ -e %{_includedir}/libxml/parser.h ]; then if grep -q XML_PARSE_OLDSAX %{_includedir}/libxml/parser.h;then echo 1; else echo 0; fi; else echo 0; fi) -Version: 5.6.8 +Version: 5.6.9 Release: 0 Provides: php Provides: php-api = %{apiver} @@ -166,7 +166,7 @@ Patch4: php5-no-build-date.patch Patch5: php5-pts.patch Patch6: php5-openssl.patch -Patch7: php5-systzdata-r10.patch +Patch7: php5-systzdata-r12.patch Patch8: php5-systemd-unit.patch #bugs # this is from https://raw.github.com/NewEraCracker/suhosin-patches/, check for official ++++++ php-5.6.8.tar.xz -> php-5.6.9.tar.xz ++++++ /work/SRC/openSUSE:Factory/php5/php-5.6.8.tar.xz /work/SRC/openSUSE:Factory/.php5.new/php-5.6.9.tar.xz differ: char 26, line 1 ++++++ php5-systzdata-r10.patch -> php5-systzdata-r12.patch ++++++ --- /work/SRC/openSUSE:Factory/php5/php5-systzdata-r10.patch 2015-04-12 00:08:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.php5.new/php5-systzdata-r12.patch 2015-05-18 23:05:04.000000000 +0200 @@ -1,13 +1,16 @@ -https://raw.githubusercontent.com/steveathon/Debian-PHP5/5dab5a4aed4380767c92fc1a2abb8e9a0d47f944/debian/patches/use_embedded_timezonedb.patch +http://pkgs.fedoraproject.org/cgit/php.git/tree/php-5.6.9-systzdata-v12.patch 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 +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. @@ -18,9 +21,10 @@ r2: add filesystem trawl to set up name alias index r1: initial revision ---- php5.orig/ext/date/lib/parse_tz.c -+++ php5/ext/date/lib/parse_tz.c -@@ -24,6 +24,16 @@ +diff -up php-5.6.9RC1/ext/date/lib/parse_tz.c.systzdata php-5.6.9RC1/ext/date/lib/parse_tz.c +--- php-5.6.9RC1/ext/date/lib/parse_tz.c.systzdata 2015-04-30 00:00:18.000000000 +0200 ++++ php-5.6.9RC1/ext/date/lib/parse_tz.c 2015-04-30 06:36:47.019617321 +0200 +@@ -20,6 +20,16 @@ #include "timelib.h" @@ -37,7 +41,7 @@ #include <stdio.h> #ifdef HAVE_LOCALE_H -@@ -35,7 +45,12 @@ +@@ -31,7 +41,12 @@ #else #include <strings.h> #endif @@ -50,25 +54,18 @@ #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) -@@ -55,9 +70,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; -@@ -260,7 +280,405 @@ void timelib_dump_tzinfo(timelib_tzinfo + 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 } } @@ -166,7 +163,7 @@ + /* 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; +} @@ -294,7 +291,7 @@ +{ + const timelib_tzdb_index_entry *alpha = first, *beta = second; + -+ return strcmp(alpha->id, beta->id); ++ return strcasecmp(alpha->id, beta->id); +} + + @@ -432,6 +429,26 @@ + 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) @@ -445,14 +462,7 @@ + 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) { @@ -475,11 +485,11 @@ { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -299,36 +717,135 @@ static int seek_to_tz_position(const uns +@@ -335,21 +765,87 @@ 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) +{ @@ -491,15 +501,14 @@ + 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); + } +} @@ -514,11 +523,10 @@ + 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; @@ -542,45 +550,54 @@ - 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", timezone); -+ -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); -+ } -+#endif ++ 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 +870,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 @@ -608,14 +625,22 @@ + } 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; } ---- php5.orig/ext/date/lib/timelib.m4 -+++ php5/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 +--- php-5.6.9RC1/ext/date/lib/timelib.m4.systzdata 2015-04-30 00:00:18.000000000 +0200 ++++ php-5.6.9RC1/ext/date/lib/timelib.m4 2015-04-30 06:32:08.549500385 +0200 @@ -78,3 +78,17 @@ stdlib.h dnl Check for strtoll, atoll
