diff options
-rw-r--r-- | dev-lang/php/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/php/Manifest | 7 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_configure-v2.eblit | 7 | ||||
-rwxr-xr-x | dev-lang/php/files/php-fpm-r3.init | 4 | ||||
-rw-r--r-- | dev-lang/php/files/php-fpm.conf | 310 |
5 files changed, 324 insertions, 12 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index b4eb7008400e..7d67ec2916c2 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-lang/php # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.445 2010/12/20 17:47:59 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.446 2010/12/21 09:09:17 mabi Exp $ + + 21 Dec 2010; Matti Bickel <mabi@gentoo.org> +files/php-fpm.conf, + files/eblits/src_configure-v2.eblit, files/php-fpm-r3.init: + fixed missing php-fpm.conf (bug #349179), removed unused configure option, + simplified php-fpm path (you need to use eselect php set php-fpm php5.3 + before starting!) 20 Dec 2010; Brent Baude <ranger@gentoo.org> php-5.2.14-r2.ebuild, php-5.3.3-r3.ebuild: diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index f1ca661a9620..de28407c06b3 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -11,7 +11,7 @@ AUX eblits/pkg_setup-v1.eblit 777 RMD160 aa63e7ab1bae34feffbbfaae902f11c6e797ba9 AUX eblits/pkg_setup-v2.eblit 527 RMD160 c8700795e0c3a38538622a02d2dd7d5a34438783 SHA1 affda60b6e4501fb2bc0d50f6d63b6bc78cd6205 SHA256 f7dca5b41844d87cbbcf06d3f46952d892ff0edf58a8b0fc7ba79459180596b5 AUX eblits/src_compile-v1.eblit 1283 RMD160 83fbb374e2dfaa9d164e6b32b57c268ed06bf519 SHA1 09124cbc9008bfb72eb24cd24b2319d22df52c2c SHA256 5ec76ae24304c5f803a615a98394c219018da1b1ce2018f92f6ac8c5becf6c99 AUX eblits/src_configure-v1.eblit 10979 RMD160 c20ce6476380cf1b355f1c957f8e0bfdf166e220 SHA1 bd2f51283e01bf838bbb1946a9879ac337c6e90c SHA256 dc769b7c5846248fdd5d1a930a3e9b614d550bfcc78f09ecd1c08607796f0206 -AUX eblits/src_configure-v2.eblit 10805 RMD160 6081b23d5b00533163a7a4a3c1823a3d4efb6cc7 SHA1 a8642a5003d6c3ea4e0367abd0cf402ae9801463 SHA256 0471b7e645a10f13f29c7b0d4a1770355cbe4d08a19658937e6d5832e2c6f82f +AUX eblits/src_configure-v2.eblit 10697 RMD160 0140baa81d913d2e2c280b5e4d961fea16ce164f SHA1 8f8a3aac4b030765b6a7346d72699229a1d602a7 SHA256 ede45f7c7a9849baebdc662cc159184c0a2c59150c14292e3814bcdd7889884c AUX eblits/src_configure-v52.eblit 11017 RMD160 4a804e4b021d2454c81c33644a744b72eec1e65d SHA1 f30392f1727592ad5de79934042d9d0b09c4ba41 SHA256 784ec5482362cc8f0725ca30a186e08958d7e8e752a238af043cfa8c7a68ed85 AUX eblits/src_configure-v521.eblit 10844 RMD160 90513f59b5f17d680004d3e74581d9eedc8af490 SHA1 a369e2cf7816799f7e2bead8b6eccc2115d0ecdc SHA256 ad875ca45e9ad975c0d7a3cbedc27c5035aa048d7aa935221a15e47cbca63c3d AUX eblits/src_install-v1.eblit 5146 RMD160 24127823735939101dcb00585a5ed69adedffed2 SHA1 36ab2648abaae12d1a86c97db82cd2ea86497b2d SHA256 3bddd375764b0ed00cb30e65036c67f96c56ea0ebfd70bcdc61b7465d1500d36 @@ -23,7 +23,8 @@ AUX php-5.2.10-pdo_dblib.patch 559 RMD160 062604e291113b2bb86044b5eeffb72fad210f AUX php-5.2.12-libpng14.patch 222 RMD160 d63bd712d077d9606a02d6620c7084bca7197c01 SHA1 a25a47386d625a47698094fc4825208c6ec8f2a4 SHA256 af94a9c2a104dcb037aa059dd46b6f534adb939ea44ad4cb9e3a0a7c49b64fab AUX php-fpm-gentooified-5.3.4.patch 1374 RMD160 ca156267f45b4d554052671afaffefc5911003a6 SHA1 b5a2eda1df3b4501d24d2313cd165d4bdff91904 SHA256 6b2a69daa161a46e7f6ec7ca3e3bf1e5af2b682cdf3ef25e61aaf8560634a391 AUX php-fpm-gentooified.patch 1846 RMD160 60b07cfcf41d41f453aba9a2747dc3d0a26fa016 SHA1 997e4e15057e497a8513a51225cdb9bd29fedd0a SHA256 262c02ad320408314e7635d403bd89b711374fcee09ecb37375e3406a0cc944a -AUX php-fpm-r3.init 1072 RMD160 f2a22e96e27cf65c0f72ca5253d4f1641ad1e034 SHA1 c7b95fcb7f57f93aff8c5331440513a8d7053880 SHA256 ffc38399a6f877db201c4fbc79fc9bba31074e31680e2683906e6f6dc553c79a +AUX php-fpm-r3.init 1042 RMD160 25d3e176b63974505fb53e74ebbd0053c7378428 SHA1 fc4af1751f695e94deb3d5890af7c38d57f7ded5 SHA256 70b33744c68509204fec65eb9a1e1accbf8f11e412fd26685673cb4e8d8b80ea +AUX php-fpm.conf 12898 RMD160 392a60348e233e725232749091f8e93f91ee88e6 SHA1 dff03446838753fcff75f625ccdd9b4cffde8d93 SHA256 8ebd676e058e5b64fbb8b5ed0be693e4da8f6fcedd5e427757afccc13504c48d AUX php-fpm.init 385 RMD160 0e266738ceb3853ce335db6375b5438bdea597db SHA1 bce556ebbd17e5192250f70ead99e8c70d9529c1 SHA256 baba8dab2cadc8bdf107e6fe5cede2f5faaabff1281781a0a30b3be79964c94e AUX php5-ldvs 22 RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 SHA1 592398c92575adb14ec972847ce2aca28a7b9c2c SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79 DIST php-5.2.14.tar.bz2 9055945 RMD160 f699488f5b266a1c5e36df570c4d5896dc4e0aea SHA1 311b44b2c0f2eea8ab8dab876d2a6b6e7a55632e SHA256 515b5fd41258798d59b93d86b0d752ab0b03e5738c32af444fba1907763c2bd1 @@ -44,5 +45,5 @@ EBUILD php-5.2.16.ebuild 9724 RMD160 021fd17eaad1eed0453a643b2c1670d60b4a45f0 SH EBUILD php-5.3.3-r1.ebuild 9488 RMD160 c5bd926dcd856115535169df97eb8d66259c5922 SHA1 09a053a1c289aaeafddd85d97a57e2c8dcc728c6 SHA256 1204b3f0899e4bf721afd4aa4f2993d04281b62b433249692e8866b22d0cc9cf EBUILD php-5.3.3-r3.ebuild 9690 RMD160 b8c77c2605af32ea7abae9a632d4f9e0f3c55198 SHA1 dafff6d8434af4344195c631dca5c50f31c1cc70 SHA256 8921e6efa0763f9c7a0aa708cf77f748b0466affa9c09ca9c10bf988f6e82cac EBUILD php-5.3.4.ebuild 9841 RMD160 54db1dd0b33e1952574a16dcc693edc47e7156b4 SHA1 89f2a66d90f69c30c8ba8604047593ccd14eb368 SHA256 57d347f14e685e4827a9f4ea7d8e8352b693f13acf965a9f98993def69b4c79c -MISC ChangeLog 76271 RMD160 dd982479cf6e28df8d2900e1ffaf45eeb6c77cec SHA1 b30e6bd615c97b174939a8e4ec3ba175248e6bff SHA256 6b803cec0a6368769e21656b989d14f80efb6e2924280a5b7567982d34e6e2c1 +MISC ChangeLog 76570 RMD160 bbddcaf150164bad20a32aa44a393dd747db0453 SHA1 e5b6cfea77b811de187456af195ad35e20582551 SHA256 8e33d17d2efcc064875554a837cb47375c7440cb63fd230c6a3a31236488ced2 MISC metadata.xml 2090 RMD160 5e8fc242c6035f8f3f12bd2ce2f77a5621398ac5 SHA1 3726febbe532141d65abccd6d6573ece6a3682c7 SHA256 0ba00cbf8509c6d9d21bf5d92759b32d5259051b4ed044fed71a4164460c65d8 diff --git a/dev-lang/php/files/eblits/src_configure-v2.eblit b/dev-lang/php/files/eblits/src_configure-v2.eblit index 55412c12689f..843c0479b194 100644 --- a/dev-lang/php/files/eblits/src_configure-v2.eblit +++ b/dev-lang/php/files/eblits/src_configure-v2.eblit @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.3 2010/10/31 17:24:34 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.4 2010/12/21 09:09:17 mabi Exp $ eblit-php-src_configure() { PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}" @@ -219,11 +219,6 @@ eblit-php-src_configure() { my_conf="${my_conf} --with-pic" fi - if has fpm ${IUSE//+} && use fpm ; then - my_conf="${my_conf} --with-libevent-dir=/usr/`get_libdir`" - fi - - # we use the system copy of pcre # --with-pcre-regex affects ext/pcre # --with-pcre-dir affects ext/filter and ext/zip diff --git a/dev-lang/php/files/php-fpm-r3.init b/dev-lang/php/files/php-fpm-r3.init index a417d500ea6e..e103f7171fbc 100755 --- a/dev-lang/php/files/php-fpm-r3.init +++ b/dev-lang/php/files/php-fpm-r3.init @@ -22,7 +22,7 @@ depend() { start() { ebegin "Starting PHP FastCGI Process Manager" - start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" + start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" local i=0 local timeout=5 while [[ ! -f ${PHP_FPM_PID} ]] && [[ $i -le $timeout ]]; do @@ -36,7 +36,7 @@ start() { stop() { ebegin "Stopping PHP FastCGI Process Manager" - start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID} + start-stop-daemon --signal QUIT --stop --exec /usr/bin/php-fpm --pidfile ${PHP_FPM_PID} eend $? } diff --git a/dev-lang/php/files/php-fpm.conf b/dev-lang/php/files/php-fpm.conf new file mode 100644 index 000000000000..ddef717a606d --- /dev/null +++ b/dev-lang/php/files/php-fpm.conf @@ -0,0 +1,310 @@ +;;;;;;;;;;;;;;;;;;;;; +; FPM Configuration ; +;;;;;;;;;;;;;;;;;;;;; + +; All relative paths in this configuration file are relative to PHP's install +; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the +; '-p' argument from the command line. + +; Include one or more files. If glob(3) exists, it is used to include a bunch of +; files from a glob(3) pattern. This directive can be used everywhere in the +; file. +; Relative path can also be used. They will be prefixed by: +; - the global prefix if it's been set (-p arguement) +; - /usr/lib/php5.3 otherwise +;include=/etc/php/fpm-php5.3/fpm.d/*.conf + +;;;;;;;;;;;;;;;;;; +; Global Options ; +;;;;;;;;;;;;;;;;;; + +[global] +; Pid file +; Note: the default prefix is /var/lib +; Default Value: none +; Note: The Gentoo init script expects the pid path +; to be set to /var/run/php-fpm.pid +pid = /var/run/php-fpm.pid + +; Error log file +; Note: the default prefix is /var/lib +; Default Value: log/php-fpm.log +error_log = /var/log/php-fpm.log + +; Log level +; Possible Values: alert, error, warning, notice, debug +; Default Value: notice +;log_level = notice + +; If this number of child processes exit with SIGSEGV or SIGBUS within the time +; interval set by emergency_restart_interval then FPM will restart. A value +; of '0' means 'Off'. +; Default Value: 0 +;emergency_restart_threshold = 0 + +; Interval of time used by emergency_restart_interval to determine when +; a graceful restart will be initiated. This can be useful to work around +; accidental corruptions in an accelerator's shared memory. +; Available Units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;emergency_restart_interval = 0 + +; Time limit for child processes to wait for a reaction on signals from master. +; Available units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;process_control_timeout = 0 + +; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. +; Default Value: yes +;daemonize = yes + +;;;;;;;;;;;;;;;;;;;; +; Pool Definitions ; +;;;;;;;;;;;;;;;;;;;; + +; Multiple pools of child processes may be started with different listening +; ports and different management options. The name of the pool will be +; used in logs and stats. There is no limitation on the number of pools which +; FPM can handle. Your system will tell you anyway :) + +; Start a new pool named 'www'. +; the variable $pool can we used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr/lib/php5.3) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses on a +; specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = 127.0.0.1:9000 + +; Set listen(2) backlog. A value of '-1' means unlimited. +; Default Value: 128 (-1 on FreeBSD and OpenBSD) +;listen.backlog = -1 + +; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0666 +;listen.owner = nobody +;listen.group = nobody +;listen.mode = 0666 + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = nobody +group = nobody + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives: +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes to be created when pm is set to 'dynamic'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. +; Note: Used when pm is set to either 'static' or 'dynamic' +; Note: This value is mandatory. +pm.max_children = 50 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +;pm.start_servers = 20 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 35 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. By default, the status page shows the following +; information: +; accepted conn - the number of request accepted by the pool; +; pool - the name of the pool; +; process manager - static or dynamic; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes. +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic') +; The values of 'idle processes', 'active processes' and 'total processes' are +; updated each second. The value of 'accepted conn' is updated in real time. +; Example output: +; accepted conn: 12073 +; pool: www +; process manager: static +; idle processes: 35 +; active processes: 65 +; total processes: 100 +; max children reached: 1 +; By default the status page output is formatted as text/plain. Passing either +; 'html' or 'json' as a query string will return the corresponding output +; syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = /var/log/php-fpm-$pool.log.slow + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +;chdir = /var/www + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr/lib/php5.3) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M |