From 0f14f536782fe415b6e62b58be9cf352ea9f0b00 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 9 Sep 2012 13:17:29 +0200 Subject: php-eaccelerator: try to improve cache management --- php-eaccelerator-dev.spec | 130 ++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 97 deletions(-) (limited to 'php-eaccelerator-dev.spec') diff --git a/php-eaccelerator-dev.spec b/php-eaccelerator-dev.spec index 3e54802..ab626bc 100644 --- a/php-eaccelerator-dev.spec +++ b/php-eaccelerator-dev.spec @@ -8,7 +8,7 @@ Summary: PHP accelerator, optimizer, encoder and dynamic content cacher Name: php-eaccelerator Version: 1.0 -Release: 0.1.git%{gitver}%{?dist} +Release: 0.2.git%{gitver}%{?dist} Epoch: 1 # The eaccelerator module itself is GPLv2+ # The PHP control panel is under the Zend license (control.php and dasm.php) @@ -22,6 +22,8 @@ Source1: %{name}.cron # Fix packaging directory path Patch0: %{name}-config.patch +# Try to improves cache management +Patch1: %{name}-cache.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel >= 5.1.0 @@ -70,23 +72,29 @@ is still based on his work. cp %{SOURCE1} . +cat >httpd.conf </dev/null || : -else # Create the ghost'ed directory with default ownership and mode - mkdir -p %{cache} - chown %{apache}:%{apache} %{cache} + mkdir -p %{cache}/%{apache} + chown %{apache}:%{apache} %{cache}/%{apache} chmod 0750 %{cache} fi +# Please remember to empty your eAccelerator disk cache +# when upgrading, otherwise things will break! +rm -rf %{cache}/*/* &>/dev/null || : + %check # Check if the built extensions can be loaded @@ -177,16 +188,21 @@ fi %defattr(-,root,root,-) %doc nts/{AUTHORS,ChangeLog,COPYING,NEWS,README} %doc nts/*.php -%{_sysconfdir}/cron.daily/php-eaccelerator +%{_sysconfdir}/cron.daily/%{name} +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %config(noreplace) %{php_inidir}/eaccelerator.ini %config(noreplace) %{php_ztsinidir}/eaccelerator.ini %{php_extdir}/eaccelerator.so %{php_ztsextdir}/eaccelerator.so # We need this hack, as otherwise rpm resets ownership upon package upgrade -%ghost %{cache} +%dir %{cache} +%ghost %{cache}/%{apache} %changelog +* Sun Sep 9 2012 Remi Collet - 1:1.0-0.2.git42067ac +- try to improve cache management + * Sat Sep 8 2012 Remi Collet - 1:1.0-0.1.git42067ac - update to 1.0-dev for php 5.4 @@ -308,83 +324,3 @@ fi - Use sed instead of perl for the config file changes. - No longer use dist because we want to use the same package on F-n and n+1. -* Wed May 16 2007 Matthias Saou 5.2.2_0.9.5-2 -- Include ppc64 %%ifarch, since it's now a Fedora target. -- Include patch to fix trac bug #187. - -* Wed May 16 2007 Matthias Saou 5.2.2_0.9.5-1 -- Rebuild against PHP 5.2.2. - -* Mon Feb 19 2007 Matthias Saou 5.2.1_0.9.5-1 -- Rebuild against PHP 5.2.1. - -* Mon Dec 4 2006 Matthias Saou 5.2.0_0.9.5-2 -- Include patch to fix use of PHP 5.2 (ea #204, rh #218166). - -* Wed Nov 29 2006 Matthias Saou 5.2.0_0.9.5-1 -- Rebuild against PHP 5.2.0. - -* Wed Nov 8 2006 Matthias Saou 5.1.6_0.9.5-2 -- Change to require php-common instead of php, for fastcgi without apache. - -* Mon Oct 16 2006 Matthias Saou 5.1.6_0.9.5-1 -- Update to 0.9.5 final. -- Add cleanup of the cache directory upon package removal. - -* Thu Sep 7 2006 Matthias Saou 5.1.6_0.9.5-0.4.rc1 -- Rebuild for PHP 5.1.6, eA still checks the exact PHP version it seems :-( -- Put "Requires: php = %%{php_version}" back to avoid broken setups if/when - PHP gets updated. - -* Mon Aug 28 2006 Matthias Saou 5.1.4_0.9.5-0.4.rc1 -- FC6 rebuild. - -* Tue Aug 22 2006 Matthias Saou 5.1.4_0.9.5-0.3.rc1 -- Update to 0.9.5-rc1. -- Enable shared-memory, sessions and content-caching (#201319). -- Remove both patches of fixes, merged upstream. -- Change from creating a full eaccelerator.ini to using the included one with - path substitutions and a patch to change default values. - -* Tue May 23 2006 Matthias Saou 5.1.x_0.9.5-0.2.beta2 -- Rebuild against PHP 5.1.4. - -* Fri May 5 2006 Matthias Saou 5.1.x_0.9.5-0.2.beta2 -- Rework heavily the API version requirement detection, should work with - chroots builds where PHP isn't installed outside. -- Replace the CC way of getting the API version with php -i output. - -* Tue Apr 11 2006 Matthias Saou 5.1.x_0.9.5-0.1.beta2 -- Update to 0.9.5-beta2. - -* Tue Mar 14 2006 Matthias Saou 5.1.x_0.9.3-0.3 -- Pass userid 48 to configure script on PPC for sysvipc semaphores. - -* Tue Mar 14 2006 Matthias Saou 5.1.x_0.9.3-0.2 -- Update to latest eaccelerator-svn200603090012 snapshot. - -* Thu Feb 9 2006 Matthias Saou 5.1.x_0.9.3-0.1 -- Update to 5.1.x compatible snapshot. -- Will try to make re2c available in Extras in order to build require it. - -* Mon Oct 17 2005 Matthias Saou 4.x.x_0.9.3-4 -- Re-add %%{?_smp_mflags}, as this was a false alarm. -- Force SEM to FCNTL as the IPC version is buggy on x86_64 SMP at least. - -* Mon Jun 27 2005 Matthias Saou 4.x.x_0.9.3-3 -- Include buffer overflow patch from zoeloelip, this should fix the real - problem that wasn't in fact solved with the removal of _smp_mflags. -- Add explicit shm_and_disk defaults to the ini file. - -* Mon Jun 27 2005 Matthias Saou 4.x.x_0.9.3-2 -- Remove %%{?_smp_mflags}, since the module crashes otherwise (#161189). - -* Tue Jun 21 2005 Matthias Saou 4.x.x_0.9.3-1 -- Update to 0.9.3, bugfix release. - -* Fri Apr 7 2005 Michael Schwendt -- rebuilt - -* Tue Jan 11 2005 Matthias Saou 4.x.x_0.9.2a-0 -- Initial RPM release based on the php-mmcache spec file. - -- cgit