php 5.6.3RC1 (refreshed, phpdbg changes reverted)

- new version of systzdata patch, fix case sensitivity
- ignore Factory in date tests
This commit is contained in:
Remi Collet 2014-10-31 07:25:04 +01:00
parent 9a3a87d0ac
commit ea6a1fa163
10 changed files with 79 additions and 43 deletions

23
php-5.6.3-datetests.patch Normal file
View File

@ -0,0 +1,23 @@
--- a/ext/date/tests/bug66985.phpt 2014-10-30 07:32:03.297693403 +0100
+++ b/ext/date/tests/bug66985.phpt 2014-10-30 07:32:45.138877977 +0100
@@ -3,7 +3,7 @@
--FILE--
<?php
$zones = array(
- "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "Factory", "GB-Eire",
+ "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "GB-Eire",
"GMT0", "Greenwich", "Hongkong", "Iceland", "Iran", "Israel", "Jamaica",
"Japan", "Kwajalein", "Libya", "MST7MDT", "Navajo", "NZ-CHAT", "Poland",
"Portugal", "PST8PDT", "Singapore", "Turkey", "Universal", "W-SU",
@@ -45,11 +45,6 @@
)
DateTimeZone Object
(
- [timezone_type] => 3
- [timezone] => Factory
-)
-DateTimeZone Object
-(
[timezone_type] => 3
[timezone] => GB-Eire
)

View File

@ -3,7 +3,7 @@ Make generated php_config.h constant across rebuilds.
--- php-5.4.9/configure.in.fixheader
+++ php-5.4.9/configure.in
@@ -1258,7 +1258,7 @@ fi
@@ -1275,7 +1275,7 @@ fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
@ -12,7 +12,7 @@ Make generated php_config.h constant across rebuilds.
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
case $host_alias in
@@ -1269,7 +1269,7 @@ case $host_alias in
@@ -1286,7 +1286,7 @@ case $host_alias in
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
;;
*)

View File

@ -1,6 +1,6 @@
--- php-5.2.0/configure.in.includedir
+++ php-5.2.0/configure.in
@@ -1101,7 +1101,7 @@
@@ -1242,7 +1242,7 @@
EXPANDED_DATADIR=$datadir
EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`

View File

@ -3,7 +3,7 @@ Use -lldap_r by default.
--- php-5.4.8/ext/ldap/config.m4.ldap_r
+++ php-5.4.8/ext/ldap/config.m4
@@ -95,7 +95,10 @@ if test "$PHP_LDAP" != "no"; then
@@ -117,7 +117,10 @@ if test "$PHP_LDAP" != "no"; then
LDAP_PTHREAD=
fi

View File

@ -73,7 +73,7 @@
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
ZEND_ARG_INFO(0, path)
@@ -522,6 +526,10 @@
@@ -535,6 +539,10 @@
php_info_print_table_start();
php_info_print_table_row(2, "DBA support", "enabled");

View File

@ -5,7 +5,7 @@ The available extensions are not related to this command.
--- php-5.4.9/ext/standard/info.c.orig 2012-12-11 10:43:02.450578276 +0100
+++ php-5.4.9/ext/standard/info.c 2012-12-11 10:44:12.530820821 +0100
@@ -704,9 +704,6 @@
@@ -743,9 +743,6 @@
#ifdef ARCHITECTURE
php_info_print_table_row(2, "Architecture", ARCHITECTURE);
#endif

View File

@ -2,7 +2,9 @@ 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
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
@ -17,6 +19,8 @@ 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 --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index 5d2aec9..671b398 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -20,6 +20,16 @@
@ -67,7 +71,7 @@ r1: initial revision
/* read BC flag */
tz->bc = (**tzf == '\1');
*tzf += 1;
@@ -256,7 +276,405 @@
@@ -256,7 +276,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
@ -165,7 +169,7 @@ r1: initial revision
+ /* 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;
+}
@ -293,7 +297,7 @@ r1: initial revision
+{
+ const timelib_tzdb_index_entry *alpha = first, *beta = second;
+
+ return strcmp(alpha->id, beta->id);
+ return strcasecmp(alpha->id, beta->id);
+}
+
+
@ -431,6 +435,26 @@ r1: initial revision
+ 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)
@ -444,14 +468,7 @@ r1: initial revision
+ 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) {
@ -474,7 +491,7 @@ r1: initial revision
{
int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
@@ -295,36 +713,135 @@
@@ -295,36 +726,135 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
return 0;
}
@ -556,7 +573,7 @@ r1: initial revision
+ }
+ }
+
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
+
+ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
+ }
@ -613,6 +630,8 @@ r1: initial revision
} else {
tmp = NULL;
}
diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4
index c725572..4c837c7 100644
--- a/ext/date/lib/timelib.m4
+++ b/ext/date/lib/timelib.m4
@@ -78,3 +78,17 @@ stdlib.h
@ -633,3 +652,4 @@ r1: initial revision
+ fi
+fi
+

View File

@ -62,7 +62,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.6.3
Release: 0.1.RC1%{?dist}
Release: 0.2.RC1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@ -90,13 +90,12 @@ Source14: nginx-php.conf
# Configuration files for some extensions
Source50: opcache.ini
Source51: opcache-default.blacklist
Source52: phpdbg_webhelper.ini
# Build fixes
Patch5: php-5.2.0-includedir.patch
Patch5: php-5.6.3-includedir.patch
Patch6: php-5.2.4-embed.patch
Patch7: php-5.3.0-recode.patch
Patch8: php-5.4.7-libdb.patch
Patch8: php-5.6.3-libdb.patch
# Fixes for extension modules
# https://bugs.php.net/63171 no odbc call during timeout
@ -104,21 +103,23 @@ Patch21: php-5.4.7-odbctimer.patch
# Functional changes
Patch40: php-5.4.0-dlopen.patch
Patch42: php-5.3.1-systzdata-v10.patch
Patch42: php-5.6.3-systzdata-v10.patch
# See http://bugs.php.net/53436
Patch43: php-5.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
Patch45: php-5.4.8-ldap_r.patch
Patch45: php-5.6.3-ldap_r.patch
# Make php_config.h constant across builds
Patch46: php-5.4.9-fixheader.patch
Patch46: php-5.6.3-fixheader.patch
# drop "Configure command" from phpinfo output
Patch47: php-5.4.9-phpinfo.patch
Patch47: php-5.6.3-phpinfo.patch
# Upstream fixes (100+)
# Security fixes (200+)
# Fixes for tests (300+)
# Factory is droped from system tzdata
Patch300: php-5.6.3-datetests.patch
BuildRequires: bzip2-devel, curl-devel >= 7.9
@ -185,7 +186,6 @@ executing PHP scripts, /usr/bin/php, and the CGI interface.
Group: Development/Languages
Summary: The interactive PHP debugger
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-phpdbg_webhelper, php-phpdbg_webhelper%{?_isa}
%description dbg
The php-dbg package contains the interactive PHP debugger.
@ -720,6 +720,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1
# security patches
# Fixes for tests
%patch300 -p1 -b .datetests
# Prevent %%doc confusion over LICENSE files
@ -811,7 +812,6 @@ echo "d /run/php-fpm 755 root root" >php-fpm.tmpfiles
# Some extensions have their own configuration file
cp %{SOURCE50} 10-opcache.ini
cp %{SOURCE52} 20-phpdbg_webhelper.ini
%build
@ -900,7 +900,6 @@ build --libdir=%{_libdir}/php \
--enable-pcntl \
--enable-opcache \
--enable-phpdbg \
--enable-phpdbg-webhelper=shared \
--with-imap=shared --with-imap-ssl \
--enable-mbstring=shared \
--enable-mbregex \
@ -1270,9 +1269,6 @@ EOF
EOF
done
# This extension is NTS only, for use with phpdbg
cp -p 20-phpdbg_webhelper.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d/20-phpdbg_webhelper.ini
# The dom, xsl and xml* modules are all packaged in php-xml
cat files.dom files.xsl files.xml{reader,writer} files.wddx \
files.simplexml >> files.xml
@ -1398,8 +1394,6 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%{_bindir}/phpdbg
%doc sapi/phpdbg/{README.md,CREDITS}
%{_mandir}/man1/phpdbg.1*
%attr(755,root,root) %{_libdir}/php/modules/phpdbg_webhelper.so
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/php.d/20-phpdbg_webhelper.ini
%files fpm
%doc php-fpm.conf.default
@ -1482,6 +1476,11 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%changelog
* Fri Oct 31 2014 Remi Collet <rcollet@redhat.com> 5.6.3-0.2.RC1
- php 5.6.3RC1 (refreshed, phpdbg changes reverted)
- new version of systzdata patch, fix case sensitivity
- ignore Factory in date tests
* Wed Oct 29 2014 Remi Collet <rcollet@redhat.com> 5.6.3-0.1.RC1
- php 5.6.3RC1
- disable opcache.fast_shutdown in default config

View File

@ -1,6 +0,0 @@
; Enable 'phpdbg_webhelper' extension module
extension=phpdbg_webhelper.so
; Configuration
;phpdbg.auth = ''
;phpdbg.path = ''

View File

@ -1 +1 @@
64cffda87b807b842735dd84be992f25 php-5.6.3RC1-strip.tar.xz
2b68f969d6de8bd1d5c6992a9ddefe52 php-5.6.3RC1-strip.tar.xz