update to 7.2.3RC1

adapt systzdata, fixheader and ldap_r patches
apply upstream patch for date ext
This commit is contained in:
Remi Collet 2018-02-14 10:34:40 +01:00
parent 91c5b8660d
commit e6a28de55e
8 changed files with 84 additions and 43 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ php-7.1.*.xz
/php-7.2.1.tar.xz /php-7.2.1.tar.xz
/php-7.2.2RC1.tar.xz /php-7.2.2RC1.tar.xz
/php-7.2.2.tar.xz /php-7.2.2.tar.xz
/php-7.2.3RC1.tar.xz

View File

@ -1,17 +0,0 @@
Use -lldap_r by default.
--- php-5.4.8/ext/ldap/config.m4.ldap_r
+++ php-5.4.8/ext/ldap/config.m4
@@ -117,7 +117,10 @@ if test "$PHP_LDAP" != "no"; then
LDAP_PTHREAD=
fi
- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
+ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then
+ PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
+ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)

View File

@ -1,8 +1,8 @@
diff -up php-7.2.2RC1/configure.ac.fixheader php-7.2.2RC1/configure.ac diff -up php-7.2.3RC1/configure.ac.fixheader php-7.2.3RC1/configure.ac
--- php-7.2.2RC1/configure.ac.fixheader 2018-01-16 09:14:15.231218443 +0100 --- php-7.2.3RC1/configure.ac.fixheader 2018-02-14 06:09:37.792429866 +0100
+++ php-7.2.2RC1/configure.ac 2018-01-16 09:17:21.740382942 +0100 +++ php-7.2.3RC1/configure.ac 2018-02-14 06:10:33.755701362 +0100
@@ -1272,7 +1272,7 @@ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PR @@ -1272,7 +1272,7 @@ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PR
PHP_BUILD_DATE=`date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d` PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date]) AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
-PHP_UNAME=`uname -a | xargs` -PHP_UNAME=`uname -a | xargs`

19
php-7.2.3-ldap_r.patch Normal file
View File

@ -0,0 +1,19 @@
Use -lldap_r by default.
diff -up php-7.2.3RC1/ext/ldap/config.m4.ldap_r php-7.2.3RC1/ext/ldap/config.m4
--- php-7.2.3RC1/ext/ldap/config.m4.ldap_r 2018-02-14 06:05:11.553142812 +0100
+++ php-7.2.3RC1/ext/ldap/config.m4 2018-02-14 06:07:31.179816122 +0100
@@ -119,7 +119,11 @@ if test "$PHP_LDAP" != "no"; then
MACHINE_INCLUDES=$($CC -dumpmachine)
- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then
+ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then
+ PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
+
+ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)

View File

@ -5,6 +5,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:
r16: adapt for timelib 2017.06 (in 7.2.3RC1)
r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1) r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
r14: improve check for valid tz file r14: improve check for valid tz file
r13: adapt for upstream changes to use PHP allocator r13: adapt for upstream changes to use PHP allocator
@ -26,9 +27,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 -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c diff -up php-7.2.3RC1/ext/date/lib/parse_tz.c.systzdata php-7.2.3RC1/ext/date/lib/parse_tz.c
--- ./ext/date/lib/parse_tz.c.systzdata 2017-08-22 09:40:38.000000000 +0200 --- php-7.2.3RC1/ext/date/lib/parse_tz.c.systzdata 2018-02-13 20:18:34.000000000 +0100
+++ ./ext/date/lib/parse_tz.c 2017-08-22 12:16:00.370298079 +0200 +++ php-7.2.3RC1/ext/date/lib/parse_tz.c 2018-02-14 06:14:23.484804852 +0100
@@ -25,8 +25,21 @@ @@ -25,8 +25,21 @@
#include "timelib.h" #include "timelib.h"
#include "timelib_private.h" #include "timelib_private.h"
@ -266,7 +267,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
+ } + }
+ +
+ for (l = li[hash]; l; l = l->next) { + for (l = li[hash]; l; l = l->next) {
+ if (strcasecmp(l->name, name) == 0) + if (timelib_strcasecmp(l->name, name) == 0)
+ return l; + return l;
+ } + }
+ +
@ -290,7 +291,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; + const timelib_tzdb_index_entry *alpha = first, *beta = second;
+ +
+ return strcasecmp(alpha->id, beta->id); + return timelib_strcasecmp(alpha->id, beta->id);
+} +}
+ +
+ +
@ -493,8 +494,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) +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; int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns @@ -400,9 +840,48 @@ static int seek_to_tz_position(const uns
return 0; return 0;
} }
@ -542,8 +543,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
+#endif +#endif
} }
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count) const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_ @@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_
int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
{ {
const unsigned char *tzf; const unsigned char *tzf;
@ -575,7 +576,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) static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct @@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code) timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
{ {
const unsigned char *tzf; const unsigned char *tzf;
@ -591,7 +592,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
tmp = timelib_tzinfo_ctor(timezone); tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type); version = read_preamble(&tzf, tmp, &type);
@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha @@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
timelib_tzinfo_dtor(tmp); timelib_tzinfo_dtor(tmp);
return NULL; return NULL;
} }
@ -621,7 +622,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
if (version == 2 || version == 3) { if (version == 2 || version == 3) {
if (!skip_64bit_preamble(&tzf, tmp)) { if (!skip_64bit_preamble(&tzf, tmp)) {
/* 64 bit preamble is not in place */ /* 64 bit preamble is not in place */
@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha @@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
} else { } else {
set_default_location_and_comments(&tzf, tmp); set_default_location_and_comments(&tzf, tmp);
} }
@ -631,9 +632,9 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
} else { } else {
*error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
tmp = NULL; tmp = NULL;
diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4 diff -up php-7.2.3RC1/ext/date/lib/timelib.m4.systzdata php-7.2.3RC1/ext/date/lib/timelib.m4
--- ./ext/date/lib/timelib.m4.systzdata 2017-08-22 09:40:38.000000000 +0200 --- php-7.2.3RC1/ext/date/lib/timelib.m4.systzdata 2018-02-13 20:18:34.000000000 +0100
+++ ./ext/date/lib/timelib.m4 2017-08-22 11:32:29.357799927 +0200 +++ php-7.2.3RC1/ext/date/lib/timelib.m4 2018-02-14 06:11:54.273089963 +0100
@@ -81,3 +81,16 @@ io.h @@ -81,3 +81,16 @@ io.h
dnl Check for strtoll, atoll dnl Check for strtoll, atoll

30
php-upstream.patch Normal file
View File

@ -0,0 +1,30 @@
From 528bc00d84cce18d74528677c156d6aec1b7fcd9 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Wed, 14 Feb 2018 08:59:24 +0100
Subject: [PATCH] Fix timezone var_dump from
51f2a5803fa4f09e212fed4b14ab8b4a003d4ef5
---
ext/date/php_date.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 82ac9a6..2df19f7 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2422,9 +2422,9 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
- tzobj->tzi.utc_offset > 0 ? '-' : '+',
- abs(tzobj->tzi.utc_offset / 60),
- abs((tzobj->tzi.utc_offset % 60)));
+ tzobj->tzi.utc_offset < 0 ? '-' : '+',
+ abs((int)(tzobj->tzi.utc_offset / 3600)),
+ abs(((int)(tzobj->tzi.utc_offset % 3600) / 60)));
ZVAL_NEW_STR(&zv, tmpstr);
}
--
2.1.4

View File

@ -60,13 +60,13 @@
%global with_sodium 0 %global with_sodium 0
%endif %endif
%global upver 7.2.2 %global upver 7.2.3
#global rcver RC1 %global rcver RC1
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: %{upver}%{?rcver:~%{rcver}} Version: %{upver}%{?rcver:~%{rcver}}
Release: 2%{?dist} Release: 1%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -102,17 +102,18 @@ Patch8: php-7.2.0-libdb.patch
# Functional changes # Functional changes
Patch40: php-7.1.3-dlopen.patch Patch40: php-7.1.3-dlopen.patch
Patch42: php-7.2.0-systzdata-v15.patch Patch42: php-7.2.3-systzdata-v16.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
Patch45: php-5.6.3-ldap_r.patch Patch45: php-7.2.3-ldap_r.patch
# Make php_config.h constant across builds # Make php_config.h constant across builds
Patch46: php-7.2.2-fixheader.patch Patch46: php-7.2.3-fixheader.patch
# drop "Configure command" from phpinfo output # drop "Configure command" from phpinfo output
Patch47: php-5.6.3-phpinfo.patch Patch47: php-5.6.3-phpinfo.patch
# Upstream fixes (100+) # Upstream fixes (100+)
Patch100: php-upstream.patch
# Security fixes (200+) # Security fixes (200+)
@ -728,6 +729,7 @@ low-level PHP extension for the libsodium cryptographic library.
%patch47 -p1 -b .phpinfo %patch47 -p1 -b .phpinfo
# upstream patches # upstream patches
%patch100 -p1 -b .upstream
# security patches # security patches
@ -1556,6 +1558,11 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%changelog %changelog
* Wed Feb 14 2018 Remi Collet <remi@remirepo.net> - 7.2.3~RC1-1
- update to 7.2.3RC1
- adapt systzdata, fixheader and ldap_r patches
- apply upstream patch for date ext
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.2-2 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (php-7.2.2.tar.xz) = 36a3565161fc481307ac3e76c8d2ccc457c265bf510f085be1907835c7da7c747a0876502192d77bd664f94a584a1b149deee2600c650481fbedbf02d72d5fd0 SHA512 (php-7.2.3RC1.tar.xz) = bd38716b0f194c1b3d7ae688c97a1da5732f01ec74551184effb295a292b7f8a9d6314210c7f6b0e646b85c017a20240968bd27fb31808ae380f6704ddaf1cb2