- update to 5.5.0beta3
- allow wildcard in opcache.blacklist_filename and provide default /etc/php.d/opcache-default.blacklist - clean spec, use only spaces (no tab)
This commit is contained in:
parent
931edd2dde
commit
26f57a8682
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,3 +18,4 @@ php-5.3*.bz2
|
|||||||
/php-5.4.13.tar.bz2
|
/php-5.4.13.tar.bz2
|
||||||
/php-5.5.0beta1.tar.xz
|
/php-5.5.0beta1.tar.xz
|
||||||
/php-5.5.0beta2.tar.xz
|
/php-5.5.0beta2.tar.xz
|
||||||
|
/php-5.5.0beta3.tar.xz
|
||||||
|
11
opcache-default.blacklist
Normal file
11
opcache-default.blacklist
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
; The blacklist file is a text file that holds the names of files
|
||||||
|
; that should not be accelerated. The file format is to add each filename
|
||||||
|
; to a new line. The filename may be a full path or just a file prefix
|
||||||
|
; (i.e., /var/www/x blacklists all the files and directories in /var/www
|
||||||
|
; that start with 'x'). Line starting with a ; are ignored (comments).
|
||||||
|
; Files are usually triggered by one of the following three reasons:
|
||||||
|
; 1) Directories that contain auto generated code, like Smarty or ZFW cache.
|
||||||
|
; 2) Code that does not work well when accelerated, due to some delayed
|
||||||
|
; compile time evaluation.
|
||||||
|
; 3) Code that triggers an OPcache bug.
|
||||||
|
|
11
opcache.ini
11
opcache.ini
@ -60,13 +60,10 @@ opcache.fast_shutdown=1
|
|||||||
;opcache.inherited_hack=1
|
;opcache.inherited_hack=1
|
||||||
;opcache.dups_fix=0
|
;opcache.dups_fix=0
|
||||||
|
|
||||||
; The location of the OPcache blacklist file.
|
; The location of the OPcache blacklist file (wildcards allowed).
|
||||||
; The OPcache blacklist file is a text file that holds the names of files
|
; Each OPcache blacklist file is a text file that holds the names of files
|
||||||
; that should not be accelerated. The file format is to add each filename
|
; that should not be accelerated.
|
||||||
; to a new line. The filename may be a full path or just a file prefix
|
opcache.blacklist_filename=/etc/php.d/opcache*.blacklist
|
||||||
; (i.e., /var/www/x blacklists all the files and directories in /var/www
|
|
||||||
; that start with 'x').
|
|
||||||
;opcache.blacklist_filename=
|
|
||||||
|
|
||||||
; Allows exclusion of large files from being cached. By default all files
|
; Allows exclusion of large files from being cached. By default all files
|
||||||
; are cached.
|
; are cached.
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
--- php-5.5.0beta2/acinclude.m4.old 2013-03-28 10:00:02.755797575 +0100
|
|
||||||
+++ php-5.5.0beta2/acinclude.m4 2013-03-28 10:00:57.000941535 +0100
|
|
||||||
@@ -2342,8 +2342,10 @@
|
|
||||||
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
|
|
||||||
+ if test -n "$OPENSSL_LIBS"; then
|
|
||||||
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
|
|
||||||
+ fi
|
|
||||||
+ if test -n "$OPENSSL_INCS"; then
|
|
||||||
PHP_EVAL_INCLINE($OPENSSL_INCS)
|
|
||||||
fi
|
|
||||||
fi
|
|
149
php-5.5.0-opcache.patch
Normal file
149
php-5.5.0-opcache.patch
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
From af967de2afc584c602c0b6d4d6731e411323d94e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dmitry Stogov <dmitry@zend.com>
|
||||||
|
Date: Wed, 10 Apr 2013 21:41:30 +0400
|
||||||
|
Subject: [PATCH] Allow wilcards in opcache.blacklist_filename
|
||||||
|
|
||||||
|
---
|
||||||
|
ext/opcache/README | 8 +++----
|
||||||
|
ext/opcache/tests/blacklist.phpt | 20 ++++++++++++++++++
|
||||||
|
ext/opcache/tests/opcache-1.blacklist | 5 +++++
|
||||||
|
ext/opcache/tests/opcache-2.blacklist | 1 +
|
||||||
|
ext/opcache/zend_accelerator_blacklist.c | 36 ++++++++++++++++++++++++++++++++
|
||||||
|
5 files changed, 66 insertions(+), 4 deletions(-)
|
||||||
|
create mode 100644 ext/opcache/tests/blacklist.phpt
|
||||||
|
create mode 100644 ext/opcache/tests/opcache-1.blacklist
|
||||||
|
create mode 100644 ext/opcache/tests/opcache-2.blacklist
|
||||||
|
|
||||||
|
diff --git a/ext/opcache/README b/ext/opcache/README
|
||||||
|
index 03386a0..3110012 100644
|
||||||
|
--- a/ext/opcache/README
|
||||||
|
+++ b/ext/opcache/README
|
||||||
|
@@ -151,13 +151,13 @@ opcache.dups_fix (default "0")
|
||||||
|
Enable this hack as a workaround for "Cannot redeclare class" errors.
|
||||||
|
|
||||||
|
opcache.blacklist_filename
|
||||||
|
- The location of the OPcache blacklist file.
|
||||||
|
- The OPcache blacklist file is a text file that holds the names of files
|
||||||
|
+ The location of the OPcache blacklist file (wildcards allowed).
|
||||||
|
+ Each OPcache blacklist file is a text file that holds the names of files
|
||||||
|
that should not be accelerated. The file format is to add each filename
|
||||||
|
to a new line. The filename may be a full path or just a file prefix
|
||||||
|
(i.e., /var/www/x blacklists all the files and directories in /var/www
|
||||||
|
- that start with 'x'). Files are usually triggered by one of the following
|
||||||
|
- three reasons:
|
||||||
|
+ that start with 'x'). Line starting with a ; are ignored (comments).
|
||||||
|
+ Files are usually triggered by one of the following three reasons:
|
||||||
|
1) Directories that contain auto generated code, like Smarty or ZFW cache.
|
||||||
|
2) Code that does not work well when accelerated, due to some delayed
|
||||||
|
compile time evaluation.
|
||||||
|
diff --git a/ext/opcache/tests/blacklist.phpt b/ext/opcache/tests/blacklist.phpt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..f4a3472
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ext/opcache/tests/blacklist.phpt
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+--TEST--
|
||||||
|
+Blacklist (with glob, quote and comments)
|
||||||
|
+--INI--
|
||||||
|
+opcache.enable=1
|
||||||
|
+opcache.enable_cli=1
|
||||||
|
+opcache.blacklist_filename={PWD}/opcache-*.blacklist
|
||||||
|
+--SKIPIF--
|
||||||
|
+<?php require_once('skipif.inc'); ?>
|
||||||
|
+--FILE--
|
||||||
|
+<?php
|
||||||
|
+$conf = opcache_get_configuration();
|
||||||
|
+print_r($conf['blacklist']);
|
||||||
|
+?>
|
||||||
|
+--EXPECT--
|
||||||
|
+Array
|
||||||
|
+(
|
||||||
|
+ [0] => /path/to/foo
|
||||||
|
+ [1] => /path/to/foo2
|
||||||
|
+ [2] => /path/to/bar
|
||||||
|
+)
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/ext/opcache/tests/opcache-1.blacklist b/ext/opcache/tests/opcache-1.blacklist
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..5f498d6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ext/opcache/tests/opcache-1.blacklist
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+; comments are allowed in blacklist file
|
||||||
|
+; and empty line are ignored
|
||||||
|
+
|
||||||
|
+/path/to/foo
|
||||||
|
+"/path/to/foo2"
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/ext/opcache/tests/opcache-2.blacklist b/ext/opcache/tests/opcache-2.blacklist
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..4f6580a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ext/opcache/tests/opcache-2.blacklist
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+/path/to/bar
|
||||||
|
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c
|
||||||
|
index 764c950..b09d0e5 100644
|
||||||
|
--- a/ext/opcache/zend_accelerator_blacklist.c
|
||||||
|
+++ b/ext/opcache/zend_accelerator_blacklist.c
|
||||||
|
@@ -36,6 +36,14 @@
|
||||||
|
# define REGEX_MODE (REG_EXTENDED|REG_NOSUB)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef HAVE_GLOB
|
||||||
|
+#ifdef PHP_WIN32
|
||||||
|
+#include "win32/glob.h"
|
||||||
|
+#else
|
||||||
|
+#include <glob.h>
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#define ZEND_BLACKLIST_BLOCK_SIZE 32
|
||||||
|
|
||||||
|
struct _zend_regexp_list {
|
||||||
|
@@ -168,7 +176,11 @@ static inline void zend_accel_blacklist_allocate(zend_blacklist *blacklist)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef HAVE_GLOB
|
||||||
|
+static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filename)
|
||||||
|
+#else
|
||||||
|
void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
char buf[MAXPATHLEN + 1], real_path[MAXPATHLEN + 1];
|
||||||
|
FILE *fp;
|
||||||
|
@@ -238,6 +250,30 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
|
||||||
|
zend_accel_blacklist_update_regexp(blacklist);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef HAVE_GLOB
|
||||||
|
+void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
|
||||||
|
+{
|
||||||
|
+ glob_t globbuf;
|
||||||
|
+ int ret, i;
|
||||||
|
+
|
||||||
|
+ memset(&globbuf, 0, sizeof(glob_t));
|
||||||
|
+
|
||||||
|
+ ret = glob(filename, 0, NULL, &globbuf);
|
||||||
|
+#ifdef GLOB_NOMATCH
|
||||||
|
+ if (ret == GLOB_NOMATCH || !globbuf.gl_pathc) {
|
||||||
|
+#else
|
||||||
|
+ if (!globbuf.gl_pathc) {
|
||||||
|
+#endif
|
||||||
|
+ zend_accel_error(ACCEL_LOG_WARNING, "No blacklist file found matching: %s\n", filename);
|
||||||
|
+ } else {
|
||||||
|
+ for(i=0 ; i<globbuf.gl_pathc; i++) {
|
||||||
|
+ zend_accel_blacklist_loadone(blacklist, globbuf.gl_pathv[i]);
|
||||||
|
+ }
|
||||||
|
+ globfree(&globbuf);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
--
|
||||||
|
1.7.11.5
|
||||||
|
|
88
php.spec
88
php.spec
@ -61,12 +61,12 @@
|
|||||||
%global db_devel libdb-devel
|
%global db_devel libdb-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global rcver beta2
|
%global rcver beta3
|
||||||
|
|
||||||
Summary: PHP scripting language for creating dynamic web sites
|
Summary: PHP scripting language for creating dynamic web sites
|
||||||
Name: php
|
Name: php
|
||||||
Version: 5.5.0
|
Version: 5.5.0
|
||||||
Release: 0.3.%{rcver}%{?dist}
|
Release: 0.4.%{rcver}%{?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
|
||||||
@ -87,13 +87,13 @@ Source9: php.modconf
|
|||||||
Source10: php.ztsmodconf
|
Source10: php.ztsmodconf
|
||||||
# Configuration files for some extensions
|
# Configuration files for some extensions
|
||||||
Source50: opcache.ini
|
Source50: opcache.ini
|
||||||
|
Source51: opcache-default.blacklist
|
||||||
|
|
||||||
# Build fixes
|
# Build fixes
|
||||||
Patch5: php-5.2.0-includedir.patch
|
Patch5: php-5.2.0-includedir.patch
|
||||||
Patch6: php-5.2.4-embed.patch
|
Patch6: php-5.2.4-embed.patch
|
||||||
Patch7: php-5.3.0-recode.patch
|
Patch7: php-5.3.0-recode.patch
|
||||||
Patch8: php-5.4.7-libdb.patch
|
Patch8: php-5.4.7-libdb.patch
|
||||||
Patch9: php-5.5.0-build.patch
|
|
||||||
|
|
||||||
# Fixes for extension modules
|
# Fixes for extension modules
|
||||||
# https://bugs.php.net/63171 no odbc call during timeout
|
# https://bugs.php.net/63171 no odbc call during timeout
|
||||||
@ -112,6 +112,8 @@ Patch45: php-5.4.8-ldap_r.patch
|
|||||||
Patch46: php-5.4.9-fixheader.patch
|
Patch46: php-5.4.9-fixheader.patch
|
||||||
# drop "Configure command" from phpinfo output
|
# drop "Configure command" from phpinfo output
|
||||||
Patch47: php-5.4.9-phpinfo.patch
|
Patch47: php-5.4.9-phpinfo.patch
|
||||||
|
# Allow wildcard il opcache.backlist_filename
|
||||||
|
Patch48: php-5.5.0-opcache.patch
|
||||||
|
|
||||||
|
|
||||||
# Fixes for tests
|
# Fixes for tests
|
||||||
@ -287,7 +289,7 @@ Conflicts: php-xcache
|
|||||||
Conflicts: php-pecl-apc < 3.1.15
|
Conflicts: php-pecl-apc < 3.1.15
|
||||||
|
|
||||||
%description opcache
|
%description opcache
|
||||||
The Zend Optimizer+ provides faster PHP execution through opcode caching and
|
The Zend OPcache provides faster PHP execution through opcode caching and
|
||||||
optimization. It improves PHP performance by storing precompiled script
|
optimization. It improves PHP performance by storing precompiled script
|
||||||
bytecode in the shared memory. This eliminates the stages of reading code from
|
bytecode in the shared memory. This eliminates the stages of reading code from
|
||||||
the disk and compiling it on future access. In addition, it applies a few
|
the disk and compiling it on future access. In addition, it applies a few
|
||||||
@ -465,15 +467,15 @@ The php-soap package contains a dynamic shared object that will add
|
|||||||
support to PHP for using the SOAP web services protocol.
|
support to PHP for using the SOAP web services protocol.
|
||||||
|
|
||||||
%package interbase
|
%package interbase
|
||||||
Summary: A module for PHP applications that use Interbase/Firebird databases
|
Summary: A module for PHP applications that use Interbase/Firebird databases
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
# All files licensed under PHP version 3.01
|
# All files licensed under PHP version 3.01
|
||||||
License: PHP
|
License: PHP
|
||||||
BuildRequires: firebird-devel
|
BuildRequires: firebird-devel
|
||||||
Requires: php-pdo%{?_isa} = %{version}-%{release}
|
Requires: php-pdo%{?_isa} = %{version}-%{release}
|
||||||
Provides: php_database
|
Provides: php_database
|
||||||
Provides: php-firebird, php-firebird%{?_isa}
|
Provides: php-firebird, php-firebird%{?_isa}
|
||||||
Provides: php-pdo_firebird, php-pdo_firebird%{?_isa}
|
Provides: php-pdo_firebird, php-pdo_firebird%{?_isa}
|
||||||
|
|
||||||
%description interbase
|
%description interbase
|
||||||
The php-interbase package contains a dynamic shared object that will add
|
The php-interbase package contains a dynamic shared object that will add
|
||||||
@ -707,7 +709,6 @@ support for using the enchant library to PHP.
|
|||||||
%patch6 -p1 -b .embed
|
%patch6 -p1 -b .embed
|
||||||
%patch7 -p1 -b .recode
|
%patch7 -p1 -b .recode
|
||||||
%patch8 -p1 -b .libdb
|
%patch8 -p1 -b .libdb
|
||||||
%patch9 -p1 -b .build
|
|
||||||
|
|
||||||
%patch21 -p1 -b .odbctimer
|
%patch21 -p1 -b .odbctimer
|
||||||
|
|
||||||
@ -722,6 +723,7 @@ support for using the enchant library to PHP.
|
|||||||
%endif
|
%endif
|
||||||
%patch46 -p1 -b .fixheader
|
%patch46 -p1 -b .fixheader
|
||||||
%patch47 -p1 -b .phpinfo
|
%patch47 -p1 -b .phpinfo
|
||||||
|
%patch48 -p1 -b .opcache
|
||||||
|
|
||||||
# Prevent %%doc confusion over LICENSE files
|
# Prevent %%doc confusion over LICENSE files
|
||||||
cp Zend/LICENSE Zend/ZEND_LICENSE
|
cp Zend/LICENSE Zend/ZEND_LICENSE
|
||||||
@ -853,34 +855,34 @@ mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend
|
|||||||
|
|
||||||
ln -sf ../configure
|
ln -sf ../configure
|
||||||
%configure \
|
%configure \
|
||||||
--cache-file=../config.cache \
|
--cache-file=../config.cache \
|
||||||
--with-libdir=%{_lib} \
|
--with-libdir=%{_lib} \
|
||||||
--with-config-file-path=%{_sysconfdir} \
|
--with-config-file-path=%{_sysconfdir} \
|
||||||
--with-config-file-scan-dir=%{_sysconfdir}/php.d \
|
--with-config-file-scan-dir=%{_sysconfdir}/php.d \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
--with-pic \
|
--with-pic \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
--without-pear \
|
--without-pear \
|
||||||
--with-exec-dir=%{_bindir} \
|
--with-exec-dir=%{_bindir} \
|
||||||
--with-freetype-dir=%{_prefix} \
|
--with-freetype-dir=%{_prefix} \
|
||||||
--with-png-dir=%{_prefix} \
|
--with-png-dir=%{_prefix} \
|
||||||
--with-xpm-dir=%{_prefix} \
|
--with-xpm-dir=%{_prefix} \
|
||||||
--enable-gd-native-ttf \
|
--enable-gd-native-ttf \
|
||||||
--with-t1lib=%{_prefix} \
|
--with-t1lib=%{_prefix} \
|
||||||
--without-gdbm \
|
--without-gdbm \
|
||||||
--with-jpeg-dir=%{_prefix} \
|
--with-jpeg-dir=%{_prefix} \
|
||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pcre-regex=%{_prefix} \
|
--with-pcre-regex=%{_prefix} \
|
||||||
--with-zlib \
|
--with-zlib \
|
||||||
--with-layout=GNU \
|
--with-layout=GNU \
|
||||||
--with-kerberos \
|
--with-kerberos \
|
||||||
--with-libxml-dir=%{_prefix} \
|
--with-libxml-dir=%{_prefix} \
|
||||||
--with-system-tzdata \
|
--with-system-tzdata \
|
||||||
--with-mhash \
|
--with-mhash \
|
||||||
%if %{with_dtrace}
|
%if %{with_dtrace}
|
||||||
--enable-dtrace \
|
--enable-dtrace \
|
||||||
%endif
|
%endif
|
||||||
$*
|
$*
|
||||||
if test $? != 0; then
|
if test $? != 0; then
|
||||||
tail -500 config.log
|
tail -500 config.log
|
||||||
: configure failed
|
: configure failed
|
||||||
@ -890,7 +892,7 @@ fi
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build /usr/bin/php-cgi with the CGI SAPI, and all the shared extensions
|
# Build /usr/bin/php-cgi with the CGI SAPI, and most shared extensions
|
||||||
pushd build-cgi
|
pushd build-cgi
|
||||||
|
|
||||||
build --libdir=%{_libdir}/php \
|
build --libdir=%{_libdir}/php \
|
||||||
@ -1352,6 +1354,9 @@ cat files.json files.curl files.phar files.fileinfo \
|
|||||||
cat files.zip >> files.common
|
cat files.zip >> files.common
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# The default Zend OPcache blacklist file
|
||||||
|
install -m 644 %{SOURCE51} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/opcache-default.blacklist
|
||||||
|
|
||||||
# Install the macros file:
|
# Install the macros file:
|
||||||
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
|
||||||
sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" \
|
sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" \
|
||||||
@ -1550,9 +1555,16 @@ fi
|
|||||||
%files enchant -f files.enchant
|
%files enchant -f files.enchant
|
||||||
%files mysqlnd -f files.mysqlnd
|
%files mysqlnd -f files.mysqlnd
|
||||||
%files opcache -f files.opcache
|
%files opcache -f files.opcache
|
||||||
|
%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 11 2013 Remi Collet <rcollet@redhat.com> 5.5.0-0.4.beta3
|
||||||
|
- update to 5.5.0beta3
|
||||||
|
- allow wildcard in opcache.blacklist_filename and provide
|
||||||
|
default /etc/php.d/opcache-default.blacklist
|
||||||
|
- clean spec, use only spaces (no tab)
|
||||||
|
|
||||||
* Thu Apr 4 2013 Remi Collet <rcollet@redhat.com> 5.5.0-0.3.beta2
|
* Thu Apr 4 2013 Remi Collet <rcollet@redhat.com> 5.5.0-0.3.beta2
|
||||||
- clean old deprecated options
|
- clean old deprecated options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user