From f8190992d5b31366e5dcd05f2949e2cc16dc6abb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 May 2013 09:34:46 +0200 Subject: PHP 5.5.0RC2 --- php-fpm.conf | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ php-fpm.service | 4 ++++ php-fpm.sysconfig | 15 +++++++++++++++ php-wip.patch | 35 ----------------------------------- php55.spec | 37 +++++++++++++++++++++++++------------ 5 files changed, 98 insertions(+), 47 deletions(-) delete mode 100644 php-wip.patch diff --git a/php-fpm.conf b/php-fpm.conf index 5ec98ea..a919add 100644 --- a/php-fpm.conf +++ b/php-fpm.conf @@ -20,9 +20,24 @@ include=/etc/php-fpm.d/*.conf pid = /run/php-fpm/php-fpm.pid ; Error log file +; If it's set to "syslog", log is sent to syslogd instead of being written +; in a local file. ; Default Value: /var/log/php-fpm.log error_log = /var/log/php-fpm/error.log +; syslog_facility is used to specify what type of program is logging the +; message. This lets syslogd specify that messages from different facilities +; will be handled differently. +; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) +; Default Value: daemon +;syslog.facility = daemon + +; syslog_ident is prepended to every message. If you have multiple FPM +; instances running on the same server, you can change the default value +; which must suit common needs. +; Default Value: php-fpm +;syslog.ident = php-fpm + ; Log level ; Possible Values: alert, error, warning, notice, debug ; Default Value: notice @@ -48,10 +63,49 @@ error_log = /var/log/php-fpm/error.log ; Default Value: 0 ;process_control_timeout = 0 +; The maximum number of processes FPM will fork. This has been design to control +; the global number of processes when using dynamic PM within a lot of pools. +; Use it with caution. +; Note: A value of 0 indicates no limit +; Default Value: 0 +;process.max = 128 + +; Specify the nice(2) priority to apply to the master process (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool process will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +;process.priority = -19 + ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes daemonize = yes +; Set open file descriptor rlimit for the master process. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit for the master process. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Specify the event mechanism FPM will use. The following is available: +; - select (any POSIX os) +; - poll (any POSIX os) +; - epoll (linux >= 2.5.44) +; Default Value: not set (auto detection) +;events.mechanism = epoll + +; When FPM is build with systemd integration, specify the interval, +; in second, between health report notification to systemd. +; Set to 0 to disable. +; Available Units: s(econds), m(inutes), h(ours) +; Default Unit: seconds +; Default value: 10 +;systemd_interval = 10 + ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;; diff --git a/php-fpm.service b/php-fpm.service index ea09910..41f6bfe 100644 --- a/php-fpm.service +++ b/php-fpm.service @@ -1,3 +1,7 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to create a file "/etc/systemd/system/php-fpm.service". + [Unit] Description=The PHP FastCGI Process Manager After=syslog.target network.target diff --git a/php-fpm.sysconfig b/php-fpm.sysconfig index 72096da..adc3d62 100644 --- a/php-fpm.sysconfig +++ b/php-fpm.sysconfig @@ -1,2 +1,17 @@ # Additional environment file for php-fpm +# This file is deprecated when systemd is used and +# will be removed in the future + +# To alter FPM environment, copy the unit file +# from /usr/lib/systemd/system/php-fpm.service +# to /etc/systemd/system/php-fpm.service +# and add an Environment line + +# With systemd >= 204 you can simply drop a file +# in /etc/systemd/system/php-fpm.service.d, with +# [Service] +# Environment=FOO=bar + +# See systemd documentation. + diff --git a/php-wip.patch b/php-wip.patch deleted file mode 100644 index 1c2cee7..0000000 --- a/php-wip.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up ext/calendar/jewish.c.old ext/calendar/jewish.c ---- ext/calendar/jewish.c.old 2013-05-22 08:11:57.663604019 +0200 -+++ ext/calendar/jewish.c 2013-05-22 08:13:16.560934578 +0200 -@@ -272,7 +272,7 @@ - #define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7)) - - #define JEWISH_SDN_OFFSET 347997 --#define JEWISH_SDN_MAX 38245310 /* year 103759, 100000 A.D. */ -+#define JEWISH_SDN_MAX 324542846 /* 12/13/887605, greater value raises interger overflow */ - #define NEW_MOON_OF_CREATION 31524 - - #define SUNDAY 0 -diff -up ext/calendar/tests/jdtojewish64.phpt.old ext/calendar/tests/jdtojewish64.phpt ---- ext/calendar/tests/jdtojewish64.phpt.old 2013-05-21 18:37:45.000000000 +0200 -+++ ext/calendar/tests/jdtojewish64.phpt 2013-05-22 08:15:08.113424723 +0200 -@@ -1,5 +1,5 @@ - --TEST-- --Integer overflow in SndToJewish leads to php hang -+Bug #64895: Integer overflow in SndToJewish - --SKIPIF-- - - --FILE-- - = 15 || 0%{?rhel} >= 7 +%global with_systemd 1 +%else +%global with_systemd 0 +%endif %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 %global with_dtrace 1 %else @@ -79,14 +84,14 @@ %global db_devel libdb-devel %endif -%global snapdate 201305220430 -#global rcver RC1 +#global snapdate 201305220430 +%global rcver RC2 Summary: PHP scripting language for creating dynamic web sites Name: php Version: 5.5.0 %if 0%{?snapdate:1}%{?rcver:1} -Release: 0.32.%{?snapdate}%{?rcver}%{?dist} +Release: 0.33.%{?snapdate}%{?rcver}%{?dist}.1 %else Release: 2%{?dist} %endif @@ -147,7 +152,7 @@ Patch47: php-5.4.9-phpinfo.patch Patch91: php-5.3.7-oci8conf.patch # WIP -Patch99: php-wip.patch +#Patch99: php-wip.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -234,7 +239,7 @@ Summary: PHP FastCGI Process Manager License: PHP and Zend and BSD Requires: php-common%{?_isa} = %{version}-%{release} Requires(pre): /usr/sbin/useradd -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +%if %{with_systemd} BuildRequires: systemd-units Requires: systemd-units Requires(post): systemd-units @@ -841,7 +846,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1 %patch91 -p1 -b .remi-oci8 # wip patches -%patch99 -p0 -b .wip +#patch99 -p0 -b .wip # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1159,7 +1164,9 @@ popd # Build php-fpm pushd build-fpm build --enable-fpm \ +%if %{with_systemd} --with-fpm-systemd \ +%endif --libdir=%{_libdir}/php \ --without-mysql \ --disable-pdo \ @@ -1433,7 +1440,10 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default . # LogRotate install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +# Environment file +install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm +%if %{with_systemd} install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm # tmpfiles.d install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d @@ -1446,6 +1456,7 @@ install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/ sed -i -e '/PrivateTmp/s/true/false/' ${RPM_BUILD_ROOT}%{_unitdir}/php-fpm.service %endif %else +sed -ne '1,2p' -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm sed -i -e 's:/run:/var/run:' $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf sed -i -e 's:/run:/var/run:' $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm @@ -1453,10 +1464,6 @@ sed -i -e 's:/run:/var/run:' $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm install -m 755 -d $RPM_BUILD_ROOT%{_initrddir} install -m 755 %{SOURCE99} $RPM_BUILD_ROOT%{_initrddir}/php-fpm %endif -# Environment file -install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig -install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm -# php-fpm should not fork on recent version %endif # Fix the link @@ -1728,7 +1735,7 @@ fi %config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf %config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm %config(noreplace) %{_sysconfdir}/sysconfig/php-fpm -%if 0%{?fedora} >= 15 +%if %{with_systemd} %{_prefix}/lib/tmpfiles.d/php-fpm.conf %{_unitdir}/php-fpm.service %dir /run/php-fpm @@ -1808,6 +1815,12 @@ fi %changelog +* Thu May 23 2013 Remi Collet 5.5.0-0.33.RC2 +- update to 5.5.0RC2 +- add missing options in php-fpm.conf +- improved systemd configuration, documentation about + /etc/sysconfig/php-fpm being deprecated + * Sat May 22 2013 Remi Collet 5.5.0-0.32.201305220430 - test build for https://bugs.php.net/64895 -- cgit