From 46c63d16259860d1087563f128c59a9a45afcf54 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Aug 2021 10:30:00 +0200 Subject: test build --- php-8.1.0-timelib.patch | 106 ------------------------------------------------ php.spec | 13 +++--- 2 files changed, 7 insertions(+), 112 deletions(-) delete mode 100644 php-8.1.0-timelib.patch diff --git a/php-8.1.0-timelib.patch b/php-8.1.0-timelib.patch deleted file mode 100644 index 269f1d0..0000000 --- a/php-8.1.0-timelib.patch +++ /dev/null @@ -1,106 +0,0 @@ -From f2903432bf8779f32237cc2e620e2fb0ca161ffa Mon Sep 17 00:00:00 2001 -From: Derick Rethans -Date: Mon, 26 Apr 2021 09:59:01 +0100 -Subject: [PATCH] Fixed issue #112: Support empty POSIX string in older TZif2 - files - ---- - parse_tz.c | 19 ++++++++++++--- - tests/c/files/Casablanca_AmazonLinux1 | Bin 0 -> 2428 bytes - tests/c/files/Nuuk_AmazonLinux1 | Bin 0 -> 8294 bytes - tests/c/parse_posix.cpp | 32 ++++++++++++++++++++++++++ - timelib.c | 4 +++- - timelib.h | 8 ++++--- - 6 files changed, 56 insertions(+), 7 deletions(-) - create mode 100644 tests/c/files/Casablanca_AmazonLinux1 - create mode 100644 tests/c/files/Nuuk_AmazonLinux1 - -diff --git a/ext/date/lib/parse_tz.c b/parse_tz.c -index ffeae2e..4e31b9e 100644 ---- a/ext/date/lib/parse_tz.c -+++ b/ext/date/lib/parse_tz.c -@@ -553,11 +553,22 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) - timelib_free(date_str); - } - -+ if (!tz->posix_string) { -+ printf("\n%43sNo POSIX string\n", ""); -+ return; -+ } -+ -+ if (strcmp("", tz->posix_string) == 0) { -+ printf("\n%43sEmpty POSIX string\n", ""); -+ return; -+ } -+ - printf("\n%43sPOSIX string: %s\n", "", tz->posix_string); -- if (tz->posix_info->std) { -+ if (tz->posix_info && tz->posix_info->std) { - trans_str = format_offset_type(tz, tz->posix_info->type_index_std_type); - printf("%43sstd: %s\n", "", trans_str); - timelib_free(trans_str); -+ - if (tz->posix_info->dst) { - trans_str = format_offset_type(tz, tz->posix_info->type_index_dst_type); - printf("%43sdst: %s\n", "", trans_str); -@@ -693,8 +704,10 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t - } - - read_posix_string(&tzf, tmp); -- if (!integrate_posix_string(tmp)) { -- *error_code = TIMELIB_ERROR_POSIX_MISSING_TTINFO; -+ if (strcmp("", tmp->posix_string) == 0) { -+ *error_code = TIMELIB_ERROR_EMPTY_POSIX_STRING; -+ } else if (!integrate_posix_string(tmp)) { -+ *error_code = TIMELIB_ERROR_CORRUPT_POSIX_STRING; - timelib_tzinfo_dtor(tmp); - return NULL; - } -diff --git a/ext/date/lib/timelib.c b/timelib.c -index 8db4df1..92366be 100644 ---- a/ext/date/lib/timelib.c -+++ b/ext/date/lib/timelib.c -@@ -35,7 +35,7 @@ - - #define TIMELIB_LLABS(y) (y < 0 ? (y * -1) : y) - --const char *timelib_error_messages[9] = { -+const char *timelib_error_messages[10] = { - "No error", - "Can not allocate buffer for parsing", - "Corrupt tzfile: The transitions in the file don't always increase", -@@ -44,6 +44,8 @@ const char *timelib_error_messages[9] = { - "The version used in this timezone identifier is unsupported", - "No timezone with this name could be found", - "A 'slim' timezone file has been detected", -+ "The embedded POSIX string is not valid", -+ "The embedded POSIX string is empty" - }; - - const char *timelib_get_error_message(int error_code) -diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h -index 7073c6c..8e82e58 100644 ---- a/ext/date/lib/timelib.h -+++ b/ext/date/lib/timelib.h -@@ -370,7 +370,8 @@ typedef struct _timelib_tzdb { - #define TIMELIB_UNSET -99999 - - /* An entry for each of these error codes is also in the -- * timelib_error_messages array in timelib.c */ -+ * timelib_error_messages array in timelib.c. -+ * Codes 0x00, 0x07, and 0x09 are warnings only. */ - #define TIMELIB_ERROR_NO_ERROR 0x00 - #define TIMELIB_ERROR_CANNOT_ALLOCATE 0x01 - #define TIMELIB_ERROR_CORRUPT_TRANSITIONS_DONT_INCREASE 0x02 -@@ -378,8 +379,9 @@ typedef struct _timelib_tzdb { - #define TIMELIB_ERROR_CORRUPT_NO_ABBREVIATION 0x04 - #define TIMELIB_ERROR_UNSUPPORTED_VERSION 0x05 - #define TIMELIB_ERROR_NO_SUCH_TIMEZONE 0x06 --#define TIMELIB_ERROR_SLIM_FILE 0x07 --#define TIMELIB_ERROR_POSIX_MISSING_TTINFO 0x08 -+#define TIMELIB_ERROR_SLIM_FILE 0x07 /* Warns if the file is SLIM, but we can't read it */ -+#define TIMELIB_ERROR_CORRUPT_POSIX_STRING 0x08 -+#define TIMELIB_ERROR_EMPTY_POSIX_STRING 0x09 /* Warns if the POSIX string is empty, but still produces results */ - - #ifdef __cplusplus - extern "C" { diff --git a/php.spec b/php.spec index caa2644..dc88d91 100644 --- a/php.spec +++ b/php.spec @@ -101,14 +101,14 @@ %global with_httpd2410 0 %endif -%global gh_commit 27ce269c1b5a12cb28e4047b5b6b6fc83adf6e15 +%global gh_commit c90c9c7545427d9d35cbac45c4ec896f54619744 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -#global gh_date 20210608 +%global gh_date 20210809 %global gh_owner php %global gh_project php-src %global upver 8.1.0 -%global rcver beta2 -%global lower beta2 +%global rcver -dev +%global lower DEV Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php @@ -161,7 +161,6 @@ Patch10: php-7.0.7-curl.patch # Use system nikic/php-parser Patch41: php-8.0.0-parser.patch # use system tzdata -Patch42: php-8.1.0-timelib.patch Patch43: php-8.1.0-systzdata-v20.patch # See http://bugs.php.net/53436 Patch44: php-7.4.0-phpize.patch @@ -934,7 +933,6 @@ in pure PHP. %endif %patch41 -p1 -b .syslib -%patch42 -p1 -b .up %if %{with tzdata} %patch43 -p1 -b .systzdata %endif @@ -1819,6 +1817,9 @@ fi %changelog +* Mon Aug 9 2021 Remi Collet - 8.1.0~DEV.20210809-1 +- test build + * Tue Aug 3 2021 Remi Collet - 8.1.0~beta2-1 - update to 8.1.0beta2 - oci8 version is now 3.1.0 -- cgit