[php-xcache] - drop conflicts with other opcode cache - disable opcode cache in provided configuration
Remi Collet
remi at fedoraproject.org
Thu Jan 9 11:09:58 UTC 2014
commit f6ee022fbbe55a8addb896bde244f3adfcd3973b
Author: Remi Collet <remi at fedoraproject.org>
Date: Thu Jan 9 12:10:02 2014 +0100
- drop conflicts with other opcode cache
- disable opcode cache in provided configuration
.gitignore | 2 +-
php-xcache.spec | 35 ++++++++++++++++++++---------------
xcache-cacher.patch | 14 ++++++++++++++
3 files changed, 35 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index eef9ff6..a4ad98e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-*spec~
+clog
/xcache-3.0.*.tar.gz
/xcache-svn1234.tgz
/xcache-svn1264.tgz
diff --git a/php-xcache.spec b/php-xcache.spec
index 5bf2da2..2c0efe3 100644
--- a/php-xcache.spec
+++ b/php-xcache.spec
@@ -1,6 +1,6 @@
# spec file for php-xcache
#
-# Copyright (c) 2012-2013 Remi Collet
+# Copyright (c) 2012-2014 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/3.0/
#
@@ -13,7 +13,7 @@
Summary: Fast, stable PHP opcode cacher
Name: php-xcache
Version: 3.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD
Group: Development/Languages
URL: http://xcache.lighttpd.net/
@@ -23,31 +23,30 @@ Source1: xcache-httpd.conf
# Relocation of configuration files to /etc/xcache
Patch0: xcache-config.patch
+# Disable cache to allow work with php-opcache
+Patch1: xcache-cacher.patch
BuildRequires: php-devel
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
-# Only one opcode cache can be installed
-Conflicts: php-pecl-apc < 3.1.15
-Conflicts: php-eaccelerator
-Conflicts: php-opcache
-
+%if 0%{?fedora} < 20
# Filter private shared object
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}
+%endif
%description
-XCache is a fast, stable PHP opcode cacher that has been tested and is now
-running on production servers under high load.
+XCache is a fast, stable PHP opcode and data cacher that has been tested
+and is now running on production servers under high load.
It is tested (on linux) and supported on all of the latest PHP release.
ThreadSafe is also perfectly supported.
-It overcomes a lot of problems that has been with other competing opcachers
-such as being able to be used with new PHP versions.
+NOTICE: opcode cacher is disable to allow use with php-opcache only for user
+data cache. You need to edit configuration file (xcache.ini) to enable it.
%package -n xcache-admin
@@ -73,8 +72,10 @@ This requires to configure, in XCache configuration file (xcache.ini):
# rename source folder
mv %{ext_name}-%{version} nts
+cp %{SOURCE1} xcache-httpd.conf
cd nts
%patch0 -p1
+%patch1 -p1
# Sanity check, really often broken
extver=$(sed -n '/define XCACHE_VERSION/{s/.* "//;s/".*$//;p}' xcache.h)
@@ -140,7 +141,7 @@ mv %{buildroot}%{_datadir}/xcache/cacher/config.example.php \
mv %{buildroot}%{_datadir}/xcache/coverager/config.example.php \
%{buildroot}%{_sysconfdir}/xcache/coverager
-install -D -m 644 -p %{SOURCE1} \
+install -D -m 644 -p xcache-httpd.conf \
%{buildroot}%{_sysconfdir}/httpd/conf.d/xcache.conf
@@ -148,16 +149,16 @@ install -D -m 644 -p %{SOURCE1} \
cd nts
# simple module load test
-php --no-php-ini \
+%{__php} --no-php-ini \
--define extension_dir=%{buildroot}%{php_extdir}/\
--define extension=%{ext_name}.so \
--modules | grep XCache
# upstream unit tests
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
+TEST_PHP_EXECUTABLE=%{__php} \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-php run-tests.php -n -c xcache-test.ini tests
+%{__php} run-tests.php -n -c xcache-test.ini tests
%if %{with_zts}
cd ../zts
@@ -191,6 +192,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Jan 9 2014 Remi Collet <remi at fedoraproject.org> - 3.1.0-2
+- drop conflicts with other opcode cache
+- disable opcode cache in provided configuration
+
* Sat Oct 12 2013 Remi Collet <remi at fedoraproject.org> - 3.1.0-1
- version 3.1.0
diff --git a/xcache-cacher.patch b/xcache-cacher.patch
new file mode 100644
index 0000000..a415114
--- /dev/null
+++ b/xcache-cacher.patch
@@ -0,0 +1,14 @@
+diff -up xcache-3.1.0/xcache.ini.old xcache-3.1.0/xcache.ini
+--- xcache-3.1.0/xcache.ini.old 2014-01-09 10:45:55.139937807 +0100
++++ xcache-3.1.0/xcache.ini 2014-01-09 10:47:44.972289458 +0100
+@@ -66,7 +66,9 @@ xcache.disable_on_crash = Off
+ xcache.experimental = Off
+
+ ; per request settings. can ini_set, .htaccess etc
+-xcache.cacher = On
++; WARNING set xcache.cacher=On only when no other cache installed
++; Will create conflicts with php-opcache or php-pecl-zendopcache
++xcache.cacher = Off
+ xcache.stat = On
+ xcache.optimizer = Off
+
More information about the scm-commits
mailing list