Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208155 - Add php-fpm patch to dev-lang/php
Summary: Add php-fpm patch to dev-lang/php
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement with 2 votes (vote)
Assignee: PHP Bugs
URL: http://php-fpm.anight.org
Whiteboard:
Keywords:
: 245059 (view as bug list)
Depends on: 301279
Blocks:
  Show dependency tree
 
Reported: 2008-01-30 09:25 UTC by Konstantin Shabanov
Modified: 2011-02-21 15:17 UTC (History)
24 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
latest ebuild (php-5.2.5-r2.ebuild,14.77 KB, text/plain)
2008-01-30 09:27 UTC, Konstantin Shabanov
Details
latest ebuild (php-5.2.10-r1.ebuild,18.01 KB, text/plain)
2009-07-24 14:46 UTC, LeonBernieniv
Details
patch (php-5.2.10-fpm-0.5.13.diff-ext.patch,616 bytes, patch)
2009-07-24 14:51 UTC, LeonBernieniv
Details | Diff
init file (php-fpm.init,554 bytes, text/plain)
2009-07-24 15:02 UTC, LeonBernieniv
Details
latest ebuild (php-5.2.11-r1.ebuild,18.45 KB, text/plain)
2009-12-08 05:33 UTC, Gordon Pettey
Details
latest ebuild (php-5.3.1.ebuild,18.54 KB, text/plain)
2009-12-10 17:25 UTC, Gordon Pettey
Details
eclass (php5_3-sapi.eclass,26.84 KB, text/plain)
2009-12-10 17:26 UTC, Gordon Pettey
Details
init.d for FPM SAPI (php-fpm,545 bytes, text/plain)
2009-12-10 17:27 UTC, Gordon Pettey
Details
latest ebuild (php-5.3.1.ebuild,18.55 KB, text/plain)
2010-01-18 11:28 UTC, Denis Seleznyov
Details
latest ebuild (php-5.3.1.ebuild,18.54 KB, text/plain)
2010-01-18 22:35 UTC, Denis Seleznyov
Details
latest ebuild (php-5.3.1.ebuild,18.59 KB, text/plain)
2010-01-18 22:38 UTC, Denis Seleznyov
Details
latest 5.2 ebuild (php-5.2.12.ebuild,19.36 KB, text/plain)
2010-01-18 22:45 UTC, Denis Seleznyov
Details
latest 5.2 ebuild (php-5.2.12.ebuild,19.36 KB, text/plain)
2010-01-19 08:59 UTC, Denis Seleznyov
Details
latest 5.2 ebuild (php-5.2.13.ebuild,19.42 KB, text/plain)
2010-04-01 16:29 UTC, Denis Seleznyov
Details
src_prepare-v1.eblit (src_prepare-v1.eblit,2.63 KB, text/plain)
2010-09-10 12:03 UTC, Denis Seleznyov
Details
src_configure-v52.eblit (src_configure-v52.eblit,10.99 KB, text/plain)
2010-09-10 12:03 UTC, Denis Seleznyov
Details
src_install-v52.eblit (src_install-v52.eblit,4.87 KB, text/plain)
2010-09-10 12:04 UTC, Denis Seleznyov
Details
old-style init.d (php-cgi-fpm.init,388 bytes, text/plain)
2010-09-10 12:05 UTC, Denis Seleznyov
Details
latest 5.2 ebuild (php-5.2.14.ebuild,9.19 KB, text/plain)
2010-09-10 12:06 UTC, Denis Seleznyov
Details
latest 5.2 ebuild (php-5.2.17.ebuild,9.18 KB, text/plain)
2011-02-21 13:55 UTC, Vlad Kucherenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Shabanov 2008-01-30 09:25:20 UTC
http://bombing.ru/php-5.2.5-r1.ebuild
I got working (a bit outdated) ebuild here.

Reproducible: Always
Comment 1 Konstantin Shabanov 2008-01-30 09:27:20 UTC
Created attachment 142185 [details]
latest ebuild
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-01-30 13:36:14 UTC
Nope; please get this accepted upstream. 

http://bugs.php.net/
Comment 3 Laitr Keiows 2008-04-09 02:41:26 UTC
It cannot be accepted by upstream due to licensing difficulties:
http://marc.info/?l=php-internals&m=119320642131465&w=2

Changing the license is not an option, as far as I understand.

What can be done?
Comment 4 Christian Hoffmann (RETIRED) gentoo-dev 2008-04-09 15:00:58 UTC
I had actually considered adding it, but if upstream rejects it because of licensing issues, I don't think we can do it either as it would probably put us (or at least all users) into (possible) legal problems. :/
Comment 5 Laitr Keiows 2008-04-10 02:00:16 UTC
Here's a word from upstream: http://marc.info/?l=php-internals&m=119321052303500&w=2
Comment 6 Oleg Gawriloff 2009-04-17 09:20:46 UTC
From upstream it seems that they don't understand why php patching is needed. Therefore this request is not resolved.
From php-fpm faq (I tried to translate from russian to english):
Q: Why patching php is needed for using php-fpm ? spawn-fcgi does not need this!
A: For additional possibilities in php process control. Whithout patching technically impossible:
    * graceful restarting php without request loosing, for expample when updating php binary and or extensions
    * starting php workers with different uid/gid/chroot/environment
    * all configuration on single conf -file
    * dynamic requests count, (depend from system load) (TODO)
# real-time statistics executing php requests (TODO) 
Comment 7 Christian Hoffmann (RETIRED) gentoo-dev 2009-06-19 08:22:54 UTC
*** Bug 245059 has been marked as a duplicate of this bug. ***
Comment 8 Christian Hoffmann (RETIRED) gentoo-dev 2009-06-19 08:23:28 UTC
Reassigning.
Comment 9 Christian Hoffmann (RETIRED) gentoo-dev 2009-06-19 08:24:32 UTC
The license has apparently changed and php-fpm is going to be made ready for inclusion in php. We'll follow that.

http://news.php.net/php.internals/44369
Comment 10 Blokkie 2009-07-19 10:10:15 UTC
When is this expected to be added  ? 

nginx sure could use it. 
Comment 11 LeonBernieniv 2009-07-24 14:46:35 UTC
Created attachment 198984 [details]
latest ebuild

current
Comment 12 LeonBernieniv 2009-07-24 14:51:18 UTC
Created attachment 198987 [details, diff]
patch

Put is into ${FILESDIR}
Comment 13 LeonBernieniv 2009-07-24 15:02:07 UTC
Created attachment 198989 [details]
init file

$ ls /usr/local/portage/dev-lang/php/files
20php5-envd                          php-5.2.10-fpm-0.5.13.diff-ext.patch
70_mod_php5_concurr.conf-apache2-r1  php5-ldvs
70_mod_php5.conf-apache2-r1          php-fpm.init
Comment 14 Gordon Pettey 2009-07-24 15:14:11 UTC
URL should be changed to http://php-fpm.org
Comment 15 Tim O'Kelly 2009-09-26 11:42:31 UTC
Available in my overlay:
http://gitorious.org/okelly_overlay/mainline/trees/master/dev-lang/php
Comment 16 Fernando (likewhoa) 2009-09-28 11:26:34 UTC
(In reply to comment #15)
> Available in my overlay:
> http://gitorious.org/okelly_overlay/mainline/trees/master/dev-lang/php
> 

Thanks this works. 
Comment 17 macindy 2009-12-05 20:19:40 UTC
Whats the status of this bug? Please add the php-fpm option!!!
Comment 18 Gordon Pettey 2009-12-08 05:33:20 UTC
Created attachment 212437 [details]
latest ebuild

New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi -- --fpm" to "/usr/sbin/php-fpm")
Comment 19 gendangerko 2009-12-08 14:29:30 UTC
(In reply to comment #18)
> Created an attachment (id=212437) [details]
> latest ebuild
> New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi --
> --fpm" to "/usr/sbin/php-fpm")

Build complete.
Don't forget to run 'make test'.

cp: cannot stat `sapi/cgi/php-cgi': No such file or directory
 * ERROR: dev-lang/php-5.2.11-r1 failed:
 *   Unable to copy CGI SAPI
 *
 * Call stack:
 *     ebuild.sh, line   55:  Called src_compile
 *   environment, line 4894:  Called src_compile_normal
 *   environment, line 5027:  Called die
 * The specific snippet of code:
 *                   cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
 *
 * If you need support, post the output of 'emerge --info =dev-lang/php-5.2.11-r1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.2.11-r1'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/environment'.
 * S: '/var/tmp/portage/dev-lang/php-5.2.11-r1/work/php-5.2.11'

What happen? can't emerge
Comment 20 Gordon Pettey 2009-12-08 15:14:39 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > Created an attachment (id=212437) [details] [details]
> > latest ebuild
> > New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi --
> > --fpm" to "/usr/sbin/php-fpm")
> 
> Build complete.
> Don't forget to run 'make test'.
> 
> cp: cannot stat `sapi/cgi/php-cgi': No such file or directory
>  * ERROR: dev-lang/php-5.2.11-r1 failed:
>  *   Unable to copy CGI SAPI
>  *
>  * Call stack:
>  *     ebuild.sh, line   55:  Called src_compile
>  *   environment, line 4894:  Called src_compile_normal
>  *   environment, line 5027:  Called die
>  * The specific snippet of code:
>  *                   cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI
> SAPI"
>  *
>  * If you need support, post the output of 'emerge --info
> =dev-lang/php-5.2.11-r1',
>  * the complete build log and the output of 'emerge -pqv
> =dev-lang/php-5.2.11-r1'.
>  * This ebuild is from an overlay: '/usr/local/portage/'
>  * The complete build log is located at
> '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/build.log'.
>  * The ebuild environment file is located at
> '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/environment'.
>  * S: '/var/tmp/portage/dev-lang/php-5.2.11-r1/work/php-5.2.11'
> 
> What happen? can't emerge
> 

I'm not sure what the difference is, but it only worked with USE="fastbuild" for me.
Comment 21 Gordon Pettey 2009-12-10 17:25:41 UTC
Created attachment 212632 [details]
latest ebuild

Ebuild for PHP 5.3.1 with FPM SAPI support
Comment 22 Gordon Pettey 2009-12-10 17:26:28 UTC
Created attachment 212633 [details]
eclass

Eclass for PHP 5.3 with FPM SAPI support
Comment 23 Gordon Pettey 2009-12-10 17:27:49 UTC
Created attachment 212634 [details]
init.d for FPM SAPI

New init.d for FPM SAPI with 5.3.1 ebuild
Comment 24 Gordon Pettey 2009-12-10 17:31:38 UTC
FPM is on php.net SVN recently, so may be included in official release in near future.

See bug 274512 for details on 5.3 patchset, future maintenance, etc.
Comment 25 Gordon Pettey 2009-12-10 21:23:53 UTC
Forgot one. The php-5.3.1 ebuild with fpm requires /usr/share/php-select/php-fpm.sh.

cp /usr/share/php-select/php-cgi.sh /usr/shar/ephp-select/php-fpm.sh
sed -e 's|cgi|fpm|g;' /usr/share/php-select/php-fpm.sh
Comment 26 Fernando (likewhoa) 2010-01-08 19:18:27 UTC
Issue with eclass.
ebuild /usr/local/portage/dev-lang/php/php-5.3.1.ebuild manifest      
/usr/portage/eclass/php5_3-sapi.eclass: line 685: syntax error: unexpected end of file
 * ERROR: dev-lang/php-5.3.1 failed:
 *   died sourcing /usr/portage/eclass/php5_3-sapi.eclass in inherit()
 * 
 * Call stack:
 *          ebuild.sh, line 1826:  Called source '/usr/local/portage/dev-lang/php/php-5.3.1.ebuild'
 *   php-5.3.1.ebuild, line   34:  Called inherit 'versionator' 'php5_3-sapi' 'apache-module'
 *          ebuild.sh, line 1297:  Called die
 * The specific snippet of code:
 *              qa_source "$location" || die "died sourcing $location in inherit()"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/php-5.3.1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.3.1'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * S: '/var/tmp/portage/dev-lang/php-5.3.1/work/php-5.3.1'

Comment 27 Gordon Pettey 2010-01-09 00:42:27 UTC
(In reply to comment #26)
> Issue with eclass.
> ebuild /usr/local/portage/dev-lang/php/php-5.3.1.ebuild manifest      
> /usr/portage/eclass/php5_3-sapi.eclass: line 685: syntax error: unexpected end
> of file

The file is 716 lines. Re-download.
Comment 28 Sb0y 2010-01-11 19:59:12 UTC
>>>> Downloading 'http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2'
--2010-01-11 22:51:19--  http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2
Распознаётся gentoo.longitekk.com... 80.86.81.198
Устанавливается соединение с gentoo.longitekk.com|80.86.81.198|:80... соединение установлено.
Запрос HTTP послан, ожидается ответ... 404 Not Found
2010-01-11 22:51:20 ОШИБКА 404: Not Found.

!!! Couldn't download 'php-patchset-5.3.0-r0.tar.bz2'. Aborting.
!!! Fetch failed for php-patchset-5.3.0-r0.tar.bz2, can't update Manifest

Where i can find php-patchset-5.3.0-r0.tar.bz2 ?
Comment 29 Gordon Pettey 2010-01-11 20:23:56 UTC
(In reply to comment #28)
> >>>> Downloading 'http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2'
> --2010-01-11 22:51:19-- 
> http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2
> 
> Where i can find php-patchset-5.3.0-r0.tar.bz2 ?
> 

Ebuild/eclass attached to this bug for 5.3.1 don't include longitekk.com, and there is no 5.3.0 ebuild in this bug.
Comment 30 Ivan Kurnosov 2010-01-17 15:22:45 UTC
guys, and what about php-5.2.12? php 5.2.x branch is still alive ;-)
Comment 31 Denis Seleznyov 2010-01-18 11:28:42 UTC
Created attachment 216793 [details]
latest ebuild

Modified ebuild compatible with current fpm patch (binary name changed from php-cgi to php-fpm).

Use with patched php-toolkit from bug #301279
Comment 32 Denis Seleznyov 2010-01-18 22:35:45 UTC
Created attachment 216848 [details]
latest ebuild

Fixed location of php-fpm.conf (now in /etc/php/fpm-php5/)
Comment 33 Denis Seleznyov 2010-01-18 22:38:55 UTC
Created attachment 216850 [details]
latest ebuild

(In reply to comment #32)
> Created an attachment (id=216848) [details]
> latest ebuild
> 
> Fixed location of php-fpm.conf (now in /etc/php/fpm-php5/)
> 

Sorry, attached wrong (old) file.
Comment 34 Denis Seleznyov 2010-01-18 22:45:42 UTC
Created attachment 216851 [details]
latest 5.2 ebuild

(In reply to comment #30)
> guys, and what about php-5.2.12? php 5.2.x branch is still alive ;-)
> 
php-5.2.12.ebuild

For use with php-fpm.init of 2009-12-10 (attachment #212634 [details]) and modified php-toolkit from bug #301279

Do not forget php-fpm.conf location changed.
Comment 35 Denis Seleznyov 2010-01-19 08:59:18 UTC
Created attachment 216883 [details]
latest 5.2 ebuild

Fixed typo.
Comment 36 lalebarde 2010-02-03 23:05:38 UTC
I emerged with php-5.2.12.ebuild. I am a noob. Please, how can I test that this php-fpm build works ? I am seting up nginx. I have the message : "No input file specified." when trying my browser with : http://localhost/ or http://localhost/index.php. With http://localhost/index.html, it is ok. So I want to test each piece of the cake separatly first.
Comment 37 Gordon Pettey 2010-02-03 23:32:26 UTC
(In reply to comment #36)
> I emerged with php-5.2.12.ebuild. I am a noob. Please, how can I test that this
> php-fpm build works ? I am seting up nginx. I have the message : "No input file
> specified." when trying my browser with : http://localhost/ or
> http://localhost/index.php. With http://localhost/index.html, it is ok. So I
> want to test each piece of the cake separatly first.
> 

Bugzilla is not a support forum. Nginx issues especially don't belong in a php bug report.
Comment 38 lalebarde 2010-02-04 09:00:37 UTC
(In reply to comment #37)
> (In reply to comment #36)
> Bugzilla is not a support forum. Nginx issues especially don't belong in a php
> bug report.

I was too much verbose. Sorry for that. My request is not support. You deal in this bug repport of a Gentoo ebuild for php-fpm. So 1) it is the only place to deal with it, 2) obviously, you have a test case or validation procedure to check it works, independently of anything else (nginx or what so ever). 

My request is only that you post this procedure if it exists.
Comment 39 Denis Seleznyov 2010-02-04 20:19:52 UTC
eclass/php-ext-base-r1.eclass could be modified to make php extensions ini files install into /etc/php/fpm-php5/ automatically.

Adding string:
PHPSAPILIST="apache2 cli cgi fpm"
to /etc/paludis/bashrc works for me (no need to modify rsynced eclass).

Most probably, this trick will work with /etc/make.conf as well, I don't have portage-powered system to test.
Comment 40 Martin 2010-02-17 19:25:06 UTC
i'm sorry, i'm noob in bugzilla, but i have found bug and solution (i hope, it helps somebody)

error: Error in argument 1, char 1: no argument for option -

64bit system
php version 5.2.12
used http://bugs.gentoo.org/attachment.cgi?id=216883
and http://bugs.gentoo.org/attachment.cgi?id=198989

1. symlink was not created so /usr/lib64/php5/bin/php-fpm was not pointing to /usr/bin/php-fpm
2. init script uses php-cgi, in latest ebuild is php-fpm, so change in init script php-cgi to php-fpm

configuration scripts & php.ini is located in /etc/php/php-fpm/ as mension above

ps: i was unable to compile php with fastbuild, i had to disable this option and everything passed
Comment 41 Vladimir Tsisaruk 2010-03-16 11:28:48 UTC
I've create new repo for php 5.3 with FPM support, see bug #274512 
http://bugs.gentoo.org/show_bug.cgi?id=274512#c100
Comment 42 BigBug 2010-04-01 13:18:47 UTC
As the developers says the php-fpm will be upstream with php 5.4 release. Imho this patch not needed till then, maybe only as USE flag as suhosin.
Comment 43 Denis Seleznyov 2010-04-01 16:29:24 UTC
Created attachment 226149 [details]
latest 5.2 ebuild

Plain version bump for 5.2.x
Comment 44 Vlad Kucherenko 2010-04-04 09:22:03 UTC
5.2.13 met successfully, but when you start
      /etc/init.d/php-fpm start
Gives the following:

server ~ # /etc/init.d/php-fpm start
 * Starting PHP FastCGI server ...
Error in argument 1, char 1: no argument for option -
Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>]
       php-cgi <file> [args...]
  -a               Run interactively
  -b <address:port>|<port> Bind Path for external FASTCGI Server mode
  -C               Do not chdir to the script's directory
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse <file>.  Implies `-q'
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -q               Quiet-mode.  Suppress HTTP Header output.
  -s               Display colour syntax highlighted source.
  -v               Version number
  -w               Display source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.
  -T <count>       Measure execution time of script repeated <count> tim  [ !! ]
server ~ #


How to solve this problem?
Comment 45 Denis Seleznyov 2010-04-04 09:42:18 UTC
(In reply to comment #44)
> 5.2.13 met successfully, but when you start
>       /etc/init.d/php-fpm start
> Gives the following:
> 
> server ~ # /etc/init.d/php-fpm start
>  * Starting PHP FastCGI server ...
> Error in argument 1, char 1: no argument for option -
> Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>]

Please use attachment #212634 [details] as init script, it should be used for both 5.2 and 5.3 since comment #31
Unfortunately, I don't have permissions to mark as obsolete attachments that I don't own.

Don't forget that you need php-toolkit from bug #301279


5.2.13 ebuild was tested with this version:
e16c3a55396fb440b0746b19a2ea4592  php-fpm-0.6~5.2.patch
Comment 46 Gordon Pettey 2010-04-04 19:33:40 UTC
If you're using 5.3, please use this overlay: http://github.com/GiDiS/gentoo-php-rewrite (see bug #274512#c134)

Comment 47 Gordon Pettey 2010-04-13 15:55:56 UTC
FPM SAPI is now in PHP SVN trunk.
Comment 48 Ole Markus With (RETIRED) gentoo-dev 2010-04-13 18:16:14 UTC
Gentoo will not ship with FPM support for PHP 5.3, but the github overlay mentioned in bug #274512 will maintain an SVN snapshot with FPM support.
Comment 49 Ole Markus With (RETIRED) gentoo-dev 2010-06-04 16:31:58 UTC
FYI: An SVN snapshot of php-5.3.3 with fpm support has been added to the php overlay (layman -a php)
Comment 50 Benedikt Böhm (RETIRED) gentoo-dev 2010-06-19 08:25:51 UTC
the fpm enabled ebuild for php-5.2.13 can also be found in the betagarden overlay
Comment 51 Gef 2010-06-30 20:48:12 UTC
(In reply to comment #45)
> 5.2.13 ebuild was tested with this version:
> e16c3a55396fb440b0746b19a2ea4592  php-fpm-0.6~5.2.patch
> 

(Hi)
Unfortunately, this is not the recommended way of patching a 5.2.x php source - even deprecated upstream. One should rather use the old-style 0.5-patch:

php-5.2.13-fpm-0.5.13.diff.gz                      01-Mar-2010 11:19              201323
php-5.2.13-fpm-0.5.14.diff.gz                      13-May-2010 10:57              201339

I use the first patch in production, with an updated ebuild. I am going to test the second one in dev now.

(anyway, thanks to everyone who contribute to integrating php-fpm while waiting for php-5.4).
Comment 52 Ole Markus With (RETIRED) gentoo-dev 2010-06-30 20:52:15 UTC
Those of you who want FPM, please test the 5.3.3 RC1 ebuild from the php overlay. This one will enter portage as soon as 5.3.2 leaves package.mask. It includes FPM without the use of any patching.
Comment 53 Konstantin Shabanov 2010-07-23 05:01:56 UTC
PHP 5.3.3 with php-fpm support is out. Bug may be closed.
Comment 54 Vlad Kucherenko 2010-08-16 13:01:12 UTC
please tell me when will ebuild for php version 5.2.14?
Comment 55 Denis Seleznyov 2010-09-10 12:03:26 UTC
Created attachment 246692 [details]
src_prepare-v1.eblit
Comment 56 Denis Seleznyov 2010-09-10 12:03:56 UTC
Created attachment 246694 [details]
src_configure-v52.eblit
Comment 57 Denis Seleznyov 2010-09-10 12:04:32 UTC
Created attachment 246696 [details]
src_install-v52.eblit
Comment 58 Denis Seleznyov 2010-09-10 12:05:13 UTC
Created attachment 246698 [details]
old-style init.d
Comment 59 Denis Seleznyov 2010-09-10 12:06:03 UTC
Created attachment 246700 [details]
latest 5.2 ebuild

php-5.2.14 ebuild with fpm support
tested with this patch:
5339a2a9c6a0b015b7ce5fcb8d90de84  /usr/distfiles/php-5.2.14-fpm-0.5.14.diff.gz


Important changes:
1. Binary name changed back from php-fpm to php-cgi, so init script have to be replaced.
2. Patched php-toolkit not needed anymore.
2. Configuration directory changed to /etc/php/cgi-php5/, be careful while updating. Moving files from /etc/php/fpm-php5/ to /etc/php/cgi-php5/ is up to you. Please take additional care on php-fpm.conf, as far as some parameters are not supported in current version of 5.2 patch. Most probably, you have to change at least user/group and slow log location.


Files:
files/eblits/src_prepare-v1.eblit
files/eblits/src_configure-v52.eblit
files/eblits/src_install-v52.eblit
files/php-cgi-fpm.init
php-5.2.14.ebuild
Comment 60 Erick 2010-09-11 02:59:18 UTC
I have this error in the last ebuild

 * ERROR: dev-lang/php-5.2.14 failed:
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 1881:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of 'emerge --info =dev-lang/php-5.2.14',
 * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.2.14'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * S: '/var/tmp/portage/dev-lang/php-5.2.14/work/php-5.2.14'

php # pwd
/usr/local/portage/dev-lang/php
php # ls
files  php-5.2.14.ebuild
php # ls files/
eblits  php-cgi-fpm.init
php # ls files/eblits/
src_configure-v52.eblit  src_install-v1.eblit  src_prepare-v1.eblit
Comment 61 Denis Seleznyov 2010-09-11 10:25:54 UTC
ok, small instructions:

copy ALL files from original portage dev-lang/php directory to your local repository, then replace (add) 5 files from attachments.

I attached only files that differ from main tree.
Comment 62 Vlad Kucherenko 2010-09-15 14:57:37 UTC
ns1 ~ # /etc/init.d/php-fpm start
 * Starting PHP FastCGI server ...
Sep 12 03:31:15.165262 [ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool 'default'                                [ !! ]
ns1 ~ #
Comment 63 Vlad Kucherenko 2011-02-21 13:55:23 UTC
Created attachment 263281 [details]
latest 5.2 ebuild

latest 5.2 ebuild for PHP version 5.2.17 
With FPM patch (php-5.2.17-fpm-0.5.14)
Comment 64 Ole Markus With (RETIRED) gentoo-dev 2011-02-21 15:17:48 UTC
Just to be clear, we will not support fpm on the 5.2 branch.