]> TLD Linux GIT Repositories - packages/php.git/commitdiff
- updated to 7.3.2
authorMarcin Krol <hawk@tld-linux.org>
Tue, 12 Feb 2019 08:06:22 +0000 (09:06 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 12 Feb 2019 08:06:22 +0000 (09:06 +0100)
php-systzdata.patch
php.spec

index 63ba1d8f4e71f348982e6fdb99e03e6a9d578ee6..2ae754f6fb3cf929331f0dd0d5988916deea7266 100644 (file)
@@ -4,11 +4,9 @@
 Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
-(Few) upstream reports:
-https://bugs.php.net/bug.php?id=53320
-https://bugs.php.net/bug.php?id=54250
-
 History:
+r17: adapt for timelib 2018.01 (in 7.3.2RC1)
+r16: adapt for timelib 2017.06 (in 7.2.3RC1)
 r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
 r14: improve check for valid tz file
 r13: adapt for upstream changes to use PHP allocator
@@ -30,9 +28,9 @@ 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 -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
---- ./ext/date/lib/parse_tz.c.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/parse_tz.c  2017-08-22 12:16:00.370298079 +0200
+diff -up php-7.3.2RC1/ext/date/lib/parse_tz.c.systzdata php-7.3.2RC1/ext/date/lib/parse_tz.c
+--- php-7.3.2RC1/ext/date/lib/parse_tz.c.systzdata     2019-01-22 13:20:08.000000000 +0100
++++ php-7.3.2RC1/ext/date/lib/parse_tz.c       2019-01-22 14:30:46.655691222 +0100
 @@ -25,8 +25,21 @@
  #include "timelib.h"
  #include "timelib_private.h"
@@ -55,7 +53,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig
+@@ -87,6 +100,11 @@ static int read_php_preamble(const unsig
  {
        uint32_t version;
  
@@ -67,7 +65,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        /* read ID */
        version = (*tzf)[3] - '0';
        *tzf += 4;
-@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -411,7 +429,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
        }
  }
  
@@ -270,7 +268,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +    }
 +
 +    for (l = li[hash]; l; l = l->next) {
-+        if (strcasecmp(l->name, name) == 0)
++        if (timelib_strcasecmp(l->name, name) == 0)
 +            return l;
 +    }
 +
@@ -294,7 +292,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +{
 +        const timelib_tzdb_index_entry *alpha = first, *beta = second;
 +
-+        return strcasecmp(alpha->id, beta->id);
++        return timelib_strcasecmp(alpha->id, beta->id);
 +}
 +
 +
@@ -497,8 +495,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
  {
        int left = 0, right = tzdb->index_size - 1;
- #ifdef HAVE_SETLOCALE
-@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns
+@@ -437,9 +877,48 @@ static int seek_to_tz_position(const uns
        return 0;
  }
  
@@ -546,8 +544,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +#endif
  }
  
- const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count)
-@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_
+ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
+@@ -451,7 +930,30 @@ const timelib_tzdb_index_entry *timelib_
  int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
  {
        const unsigned char *tzf;
@@ -579,7 +577,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -493,12 +995,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
  timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
  {
        const unsigned char *tzf;
@@ -595,11 +593,10 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
                tmp = timelib_tzinfo_ctor(timezone);
  
                version = read_preamble(&tzf, tmp, &type);
-@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
-                       timelib_tzinfo_dtor(tmp);
-                       return NULL;
+@@ -537,11 +1041,36 @@ timelib_tzinfo *timelib_parse_tzfile(cha
                }
-+
+               skip_posix_string(&tzf, tmp);
 +#ifdef HAVE_SYSTEM_TZDATA
 +              if (memmap) {
 +                      const struct location_info *li;
@@ -622,10 +619,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +                      munmap(memmap, maplen);
 +              } else {
 +#endif
-               if (version == 2 || version == 3) {
-                       if (!skip_64bit_preamble(&tzf, tmp)) {
-                               /* 64 bit preamble is not in place */
-@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+               if (type == TIMELIB_TZINFO_PHP) {
+                       read_location(&tzf, tmp);
                } else {
                        set_default_location_and_comments(&tzf, tmp);
                }
@@ -635,10 +630,10 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        } else {
                *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
                tmp = NULL;
-diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4
---- ./ext/date/lib/timelib.m4.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/timelib.m4  2017-08-22 11:32:29.357799927 +0200
-@@ -81,3 +81,16 @@ io.h
+diff -up php-7.3.2RC1/ext/date/lib/timelib.m4.systzdata php-7.3.2RC1/ext/date/lib/timelib.m4
+--- php-7.3.2RC1/ext/date/lib/timelib.m4.systzdata     2019-01-22 13:20:08.000000000 +0100
++++ php-7.3.2RC1/ext/date/lib/timelib.m4       2019-01-22 13:47:07.807374084 +0100
+@@ -78,3 +78,16 @@ io.h
  
  dnl Check for strtoll, atoll
  AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
index fa8cbde3f54b113f635bf820b74395f86cfeeb06..7c8f7c4b43b5b6f947e5bc9359babebb5024b6d3 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -146,8 +146,8 @@ Summary(pt_BR.UTF-8):       A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       7.3.1
-Release:       2
+Version:       7.3.2
+Release:       1
 Epoch:         4
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
@@ -155,7 +155,7 @@ Epoch:              4
 License:       PHP 3.01 and Zend and BSD
 Group:         Libraries
 Source0:       http://php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 9c4df46b64582d3c3e8fb6f01a08158e
+# Source0-md5: 92a237d2f4075eb00dd2b1f36e71ae4c
 Source1:       opcache.ini
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini