[packages/php] fix fpm logs. no longer conflict with 5.4 and use existing paths

glen glen at pld-linux.org
Fri Oct 12 11:38:48 CEST 2012


commit 476c517250174ba1740c232eabf990017d34860c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Oct 8 11:07:26 2012 +0300

    fix fpm logs. no longer conflict with 5.4 and use existing paths
    
    Conflicts:
    	php-fpm-config.patch
    	php.spec

 php-fpm-config.patch | 16 ++++++++++++----
 php-fpm.logrotate    |  5 ++---
 php.spec             |  7 ++++---
 3 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/php.spec b/php.spec
index af2e047..0300087 100644
--- a/php.spec
+++ b/php.spec
@@ -2425,13 +2425,14 @@ cp -p sapi/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir}
 cp -p sapi/fpm/status.html $RPM_BUILD_ROOT%{_datadir}/fpm
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm
+install -d $RPM_BUILD_ROOT/etc/logrotate.d
+cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
+
 %{__sed} -i -e '
 	s#/usr/lib/php#%{php_extensiondir}#
 	s#/etc/php#%{_sysconfdir}#
 	s#@processname@#%{name}-fpm#g
-' $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
-install -d $RPM_BUILD_ROOT/etc/logrotate.d
-cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
+' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf}
 %endif
 
 # install Embedded API
diff --git a/php-fpm-config.patch b/php-fpm-config.patch
index 34948a1..fdd3280 100644
--- a/php-fpm-config.patch
+++ b/php-fpm-config.patch
@@ -1,6 +1,6 @@
---- php-5.3.14/sapi/fpm/php-fpm.conf.in~	2012-06-13 11:18:44.000000000 +0300
-+++ php-5.3.14/sapi/fpm/php-fpm.conf.in	2012-07-12 15:38:49.056368781 +0300
-@@ -22,7 +22,7 @@
+--- php-5.3.17/sapi/fpm/php-fpm.conf.in~	2012-09-13 00:27:16.000000000 +0300
++++ php-5.3.17/sapi/fpm/php-fpm.conf.in	2012-10-09 20:00:31.645362454 +0300
+@@ -22,14 +22,14 @@
  ; Pid file
  ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
  ; Default Value: none
@@ -9,7 +9,15 @@
  
  ; Error log file
  ; If it's set to "syslog", log is sent to syslogd instead of being written
-@@ -140,7 +140,7 @@
+ ; in a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = log/@processname at .log
+ 
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
+@@ -148,7 +148,7 @@
  ;                            specific port;
  ;   '/path/to/unix/socket' - to listen on a unix socket.
  ; Note: This value is mandatory.
diff --git a/php-fpm.logrotate b/php-fpm.logrotate
index 3bec7c1..694b231 100644
--- a/php-fpm.logrotate
+++ b/php-fpm.logrotate
@@ -1,11 +1,10 @@
-/var/log/fpm.log
-/var/log/fpm-slow.log
+/var/log/@processname at .log
 {
 	notifempty
 	missingok
 	create 600 root root
 	sharedscripts
 	postrotate
-		/sbin/service php-fpm flush-logs > /dev/null
+		/sbin/service @processname@ flush-logs > /dev/null
 	endscript
 }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/54aea0ee69bb119337001741504177e03f9224d1



More information about the pld-cvs-commit mailing list