]> git.pld-linux.org Git - packages/php-xcache.git/commitdiff
do not load xcache extension twice auto/ac/php-xcache-2.0.1-3 auto/th/php-xcache-2.0.1-3
authorElan Ruusamäe <glen@delfi.ee>
Wed, 22 Aug 2012 09:00:05 +0000 (12:00 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 22 Aug 2012 09:00:05 +0000 (12:00 +0300)
in fact, it was even declared three times in ini file to be loaded
and as result PHP engine crashed (Memory Fault errors)

Probably bug in PHP core allowing to load same extension more than once.

ini.patch [new file with mode: 0644]
php-xcache.spec

diff --git a/ini.patch b/ini.patch
new file mode 100644 (file)
index 0000000..6120653
--- /dev/null
+++ b/ini.patch
@@ -0,0 +1,17 @@
+--- xcache-2.0.1/xcache.ini.bak        2012-06-26 13:11:30.000000000 +0300
++++ xcache-2.0.1/xcache.ini    2012-08-22 11:47:44.403556474 +0300
+@@ -5,11 +5,11 @@
+ ;; non-windows example
+ ;; update xxx accordingly
+-zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
++;zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
+ ;; windows example:
+-zend_extension_ts = c:/php/extensions/php_xcache.dll
++;zend_extension_ts = c:/php/extensions/php_xcache.dll
+ ;; for newer PHP, _ts is removed, use the following line instead
+-zend_extension = c:/php/extensions/php_xcache.dll
++zend_extension = @extensiondir@/xcache.so
+ [xcache.admin]
+ xcache.admin.enable_auth = On
index 6b13ebb9573d0eb88e5a9c6e8e10a7056dad087b..bc73aa58ecf4f233fbc9f324f1380c2bb29c429c 100644 (file)
@@ -3,7 +3,7 @@ Summary:        %{modname} - PHP opcode cacher
 Summary(pl.UTF-8):     %{modname} - buforowanie opcodów PHP
 Name:          php-%{modname}
 Version:       2.0.1
-Release:       2
+Release:       3
 License:       BSD
 Group:         Development/Languages/PHP
 URL:           http://xcache.lighttpd.net/
@@ -11,7 +11,8 @@ Source0:      http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.ta
 # Source0-md5: d3bc9645dc1b084c1eb45cfc4d8e9ccc
 Source1:       %{modname}-apache.conf
 Source2:       %{modname}-lighttpd.conf
-BuildRequires: php-devel >= 3:5.1
+Patch0:                ini.patch
+BuildRequires: php-devel >= 4:5.2.17-8
 BuildRequires: rpmbuild(macros) >= 1.344
 BuildRequires: sed >= 4.0
 %{?requires_zend_extension}
@@ -46,9 +47,9 @@ More information you can find at %{url}.
 
 %prep
 %setup -q -n %{modname}-%{version}
-%{__sed} -i -e '
-       s,zend_extension =.*,zend_extension = %{php_extensiondir}/xcache.so,
-       s,zend_extension_ts = .*,zend_extension_ts = %{php_extensiondir}/xcache.so,
+%patch0 -p1
+%{__sed} -i.bak -e '
+       s,@extensiondir@,%{php_extensiondir},
 ' xcache.ini
 
 %build
This page took 0.068422 seconds and 4 git commands to generate.