PHP 5.3.3 and new fpm sapi | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
> I'm working for some time on php dev version.
>
> PHP 5.3.3 enter RC stage and should be available soon.
>
> This version introduce FPM (an quite old project merged upstream)
> Of course, this is still tagged as experimental
>
> So I have work on enabling it (a new sub-package)
>
> Here is my first work :
> http://github.com/remicollet/remirepo/commit/3521950ff9d5b689d52a348dd1a8a139959885f5#diff-1
php-fpm requires libevent >=1.4.11
Requires: libevent >= 1.4.11
BuildRequires: libevent-devel >= 1.4.11
also missed /var/run/php-fpm dir
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm
full dif from rpm php-5.3.3-1.fc13 in attachment
> Please comment this, mainly for
> - build (a new build phase)
> - the new service
> - file layout
> /etc/php-fpm.conf
> /etc/php-fpm.d
> /var/run/php-fpm
> /var/log/php-fpm
>
> We probably also need some SElinux stuff...
>
> Should we enable it in fedora ? (probably in rawhide only, and notice it
> in F-14 release notes)
why not to enable it for f12/f13? this is only additional package.
>
> I will also push it to my repo to get some feedbacks.
>
> Regards.
--
All bugs reserved
--- php.spec.orig 2010-07-22 21:52:31.000000000 +0600
+++ php.spec 2010-07-28 18:09:23.069080237 +0600
@@ -17,7 +17,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.3.3
-Release: 1%{?dist}
+Release: 3%{?dist}
License: PHP
Group: Development/Languages
URL: http://www.php.net/
@@ -26,6 +26,9 @@
Source1: php.conf
Source2: php.ini
Source3: macros.php
+Source4: php-fpm.conf
+Source5: php-fpm-www.conf
+Source6: php-fpm.init
# Build fixes
Patch1: php-5.3.3-gnusrc.patch
@@ -98,6 +101,18 @@
The php-zts package contains a module for use with the Apache HTTP
Server which can operate under a threaded server processing model.
+%package fpm
+Group: Development/Languages
+Summary: PHP FastCGI Process Manager
+Requires: php-common = %{version}-%{release}
+Requires: libevent >= 1.4.11
+BuildRequires: libevent-devel >= 1.4.11
+
+%description fpm
+PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
+implementation with some additional features useful for sites of
+any size, especially busier sites.
+
%package common
Group: Development/Languages
Summary: Common files for PHP
@@ -450,7 +465,7 @@
cp ext/gd/libgd/README gd_README
# Multiple builds for multiple SAPIs
-mkdir build-cgi build-apache build-embedded build-zts
+mkdir build-cgi build-apache build-embedded build-zts build-fpm
# Remove bogus test; position of read position after fopen(, "a+")
# is not defined by C standard, so don't presume anything.
@@ -652,6 +667,11 @@
build --with-apxs2=%{_sbindir}/apxs ${without_shared}
popd
+# Build php-fpm
+pushd build-fpm
+build --enable-fpm ${without_shared}
+popd
+
# Build for inclusion as embedded script language into applications,
# /usr/lib[64]/libphp5.so
pushd build-embedded
@@ -694,6 +714,9 @@
# Install the version for embedded script language in applications + php_embed.h
make -C build-embedded install-sapi install-headers INSTALL_ROOT=$RPM_BUILD_ROOT
+# Install the php-fpm binary
+make -C build-fpm install-fpm INSTALL_ROOT=$RPM_BUILD_ROOT
+
# Install everything from the CGI SAPI build
make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -723,6 +746,21 @@
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php
install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session
+# PHP-FPM stuff
+# PID
+install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm
+# Log
+install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/php-fpm
+# Config
+install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d
+install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
+install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf
+mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default .
+# Service
+install -m 755 -d $RPM_BUILD_ROOT%{_initrddir}
+install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_initrddir}/php-fpm
+
+
# Fix the link
(cd $RPM_BUILD_ROOT%{_bindir}; ln -sfn phar.phar phar)
@@ -787,6 +825,16 @@
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
rm files.* macros.php
+%post fpm
+/sbin/chkconfig --add php-fpm
+
+%preun fpm
+if [ "$1" = 0 ] ; then
+ /sbin/service php-fpm stop >/dev/null 2>&1
+ /sbin/chkconfig --del php-fpm
+fi
+
+
%post embedded -p /sbin/ldconfig
%postun embedded -p /sbin/ldconfig
@@ -825,6 +873,18 @@
%defattr(-,root,root)
%{_libdir}/httpd/modules/libphp5-zts.so
+%files fpm
+%defattr(-,root,root)
+%doc php-fpm.conf.default
+%config(noreplace) %{_sysconfdir}/php-fpm.conf
+%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf
+%{_sbindir}/php-fpm
+%{_initrddir}/php-fpm
+%dir %{_sysconfdir}/php-fpm.d
+%dir %{_localstatedir}/run/php-fpm
+%dir %{_localstatedir}/log/php-fpm
+%{_mandir}/man1/php-fpm.1*
+
%files devel
%defattr(-,root,root)
%{_bindir}/php-config
@@ -867,6 +927,9 @@
%files enchant -f files.enchant
%changelog
+* Wed Jul 28 2010 Timon <timosha@xxxxxxxxx> - 5.3.3-3
+- add php-fpm
+
* Thu Jul 22 2010 Remi Collet <Fedora@xxxxxxxxxxxxxxxxx> 5.3.3-1
- PHP 5.3.3 released
_______________________________________________ php-devel mailing list php-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/php-devel
[Home] [Fedora Users] [Fedora Legacy List] [Fedora Maintainers] [Fedora Desktop] [Red Hat 9 Bible] [Fedora Bible] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]