diff options
author | Matti Bickel <mabi@gentoo.org> | 2010-07-26 13:42:13 +0000 |
---|---|---|
committer | Matti Bickel <mabi@gentoo.org> | 2010-07-26 13:42:13 +0000 |
commit | 837e4876205ad0c76f4068a45c7702a5d7382af5 (patch) | |
tree | 4dd780cc3fd3a1a6c92c548176aedad49343cee0 /dev-lang | |
parent | stable x86, bug 323745 (diff) | |
download | historical-837e4876205ad0c76f4068a45c7702a5d7382af5.tar.gz historical-837e4876205ad0c76f4068a45c7702a5d7382af5.tar.bz2 historical-837e4876205ad0c76f4068a45c7702a5d7382af5.zip |
add fpm support
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/php/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/php/Manifest | 12 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_compile-v1.eblit | 7 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_configure-v1.eblit | 7 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_install-v1.eblit | 14 | ||||
-rw-r--r-- | dev-lang/php/files/php-fpm-gentooified.patch | 55 | ||||
-rwxr-xr-x | dev-lang/php/files/php-fpm.init | 22 | ||||
-rw-r--r-- | dev-lang/php/metadata.xml | 2 |
8 files changed, 116 insertions, 11 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index 4c2e9ef3fbe1..34c38c8ac513 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.394 2010/07/26 12:26:41 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.395 2010/07/26 13:42:13 mabi Exp $ + + 26 Jul 2010; Matti Bickel <mabi@gentoo.org> + files/eblits/src_compile-v1.eblit, files/eblits/src_configure-v1.eblit, + files/eblits/src_install-v1.eblit, +files/php-fpm.init, + +files/php-fpm-gentooified.patch, metadata.xml: + update fpm description, actually support fpm in the eblits *php-5.3.3 (26 Jul 2010) diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 61e174ffbdd1..1c0ec055c430 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -6,13 +6,15 @@ AUX 70_mod_php5_concurr.conf-apache2-r1 376 RMD160 4f7de5c0784b6191450b5c1a7de7a AUX eblits/common-v1.eblit 376 RMD160 524d38035ef01b215c6dc06699c41550c246de9d SHA1 b85091f9e56b20217e5c2d3e25cef055642cd088 SHA256 d395752919fe05fa64a0e09deaf690e008a04f2c580f42233b5a854a1012045e AUX eblits/pkg_postinst-v1.eblit 2184 RMD160 ce65ba811eab10862d067c7e2b4bdc8d2b0aee56 SHA1 11c14f2235041cfb08e33cf2550bebef2037e92b SHA256 9e1cd81be4f051f3156de0ce5398a338b2ab6f8e73047c5983beda47f2f762b0 AUX eblits/pkg_setup-v1.eblit 777 RMD160 aa63e7ab1bae34feffbbfaae902f11c6e797ba9d SHA1 f7334a4750b1a1bb2f24021dff884733a88ac347 SHA256 2613f51ee9e3a258dbab38ff2df724f2971a50a5ad8c097cb5a4e3744df5fc8a -AUX eblits/src_compile-v1.eblit 1851 RMD160 64e65a7647907da821a277da9a4df970ae3bda0b SHA1 c22b8c4526ce081fb7de8234d93cc8cfa2616414 SHA256 da47bc9f75ba4de64c1848b07ea1324b707301421431f469296f32a8f2369648 -AUX eblits/src_configure-v1.eblit 9920 RMD160 3c0525eeeb3a1b9ad57f4d72b90640f065daff2d SHA1 71eecebfb96b202dc3ffae6ffda4b67902217e6e SHA256 52ecae46f02d7e1e8db983335ef4bad1e73ec9249e34d61391359a8c690f6fd3 -AUX eblits/src_install-v1.eblit 4025 RMD160 150514ec274f0892ee271466015116493eb4a74e SHA1 91b7bffec8fccf4b3230e2072e0ccf555b4c671e SHA256 2b1da468a1ecfa1507b9ab51e626203d421e5c4a3b694d77b01c065e3ae4fcff +AUX eblits/src_compile-v1.eblit 1897 RMD160 45aa94bdf920a567ab9002309f6afbed8ba13abb SHA1 83c7fce59355d4bc7684bcfad975a147426f7911 SHA256 0fe6bfd4734f0dfe0bf420b09a5e19698490a8441c1ee20d7446bcceee480336 +AUX eblits/src_configure-v1.eblit 10019 RMD160 32f9cf226742689ed0ddf8c2fe87fa3233f83071 SHA1 2e027b84a318452068dcee0a1d1934d1b4b14e03 SHA256 540e9e770a8039aa4b40f9f915cb839e7f2ed8c05a06b9cf87f41253f0ccb5bc +AUX eblits/src_install-v1.eblit 4415 RMD160 dc02d3abc3aa3dae2208675c4f00b3d616d1262b SHA1 f41b3430e0054866dbfbdbac5ce11127d4963112 SHA256 0dba349226de4559cd62c73572cb5c1d8213d7ce9f7d5338887d71158f2da64e AUX eblits/src_prepare-v1.eblit 2616 RMD160 ccff64d09cc90ada1ea5d1311457cf9a05f12f8e SHA1 7db40d0ca7ef01e5b61962f261511803f768f1bc SHA256 915b9755a37f7670f6e436fe5072dae8f5e6b437ccdfbff835e26bb2f9d22b1e AUX eblits/src_test-v1.eblit 1480 RMD160 68ef731042ef236efee923649b318239c0219d52 SHA1 81c047f180e43eb1e6b0309ee8d6751950ce1b97 SHA256 ddc836ca2e7b2abac20450fc6eb8c7d30277c567d23051016b903ece1d07a6b2 AUX php-5.2.10-pdo_dblib.patch 559 RMD160 062604e291113b2bb86044b5eeffb72fad210fbc SHA1 d59d26e6557dac86e582e1a6ed7bb4795cf150c6 SHA256 0548d63d7379cd19f7ade6ca1222b1b577f684b142ff6b0e8e23742b1f7f9794 AUX php-5.2.12-libpng14.patch 222 RMD160 d63bd712d077d9606a02d6620c7084bca7197c01 SHA1 a25a47386d625a47698094fc4825208c6ec8f2a4 SHA256 af94a9c2a104dcb037aa059dd46b6f534adb939ea44ad4cb9e3a0a7c49b64fab +AUX php-fpm-gentooified.patch 1846 RMD160 60b07cfcf41d41f453aba9a2747dc3d0a26fa016 SHA1 997e4e15057e497a8513a51225cdb9bd29fedd0a SHA256 262c02ad320408314e7635d403bd89b711374fcee09ecb37375e3406a0cc944a +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.13.tar.bz2 9084518 RMD160 9e21d32a7b757d25ed827834b26235ea1eebfcc8 SHA1 7127a21f1b493e3cd43f45cadecdb46b623eb1fb SHA256 2b50a2535e3bb9a98cd4d1633f9452d877276c40b385915261f040d535c7eadb DIST php-5.3.2.tar.bz2 10477662 RMD160 60a8aac0d51511ecaf8dcad9d31bdf072c0c99cf SHA1 79ea4ee3da3a7542d1e348ac963a5b38bcbb4b6b SHA256 9a380a574adcb3a9abe3226e7c3a9bae619e8a1b90842ec2a7edf0ad92afdeda @@ -26,5 +28,5 @@ DIST suhosin-patch-5.3.3-0.9.10.patch.gz 41298 RMD160 8dcd8b51ea0357b6cc51e70e49 EBUILD php-5.2.13.ebuild 16859 RMD160 e899ea551626ec77614931e052189a51b52cac5f SHA1 9092d7dd5eb208954096f67df1a36eef8be37ffa SHA256 95e359d899c9e42e358789029e535a4b54d8ab428a3c83503e0964831ed1775d EBUILD php-5.3.2.ebuild 9228 RMD160 a809dae438ea243e519b4b46d00ebe1cd3eb09ee SHA1 ea00f7476447459337e3c967948293d67ff32818 SHA256 868a4e6dc6a158bcdba7dc4178e2f317273775675caf061e0796ea8ec9f406f0 EBUILD php-5.3.3.ebuild 9462 RMD160 115a020c9add0e527cf07b36337875e50d3d68be SHA1 3432126e712aa08e946a99c4b0e38ab6ce9f62a8 SHA256 251baf09c687eec87a475b67710d54140f902c3dcd00c6617bb4588d5f0e31a5 -MISC ChangeLog 453 RMD160 0e514805505ece053a112255866245a5a683fd1a SHA1 f76d23e9302be926cbc6311048603e07425a937b SHA256 01a257c2a9e1490ee87485b22c99fd0241c32cacd1a9b1616191d7080e9bfbe2 -MISC metadata.xml 2227 RMD160 80352427a171d22e979fe65f0d6ca6dbe59e7b2b SHA1 6f708b8cdf4961d2ece22251d1794abead756806 SHA256 6dec55d4c847ce022e7d6c39633891242d345ede65165917443859c499058ffd +MISC ChangeLog 743 RMD160 a227231a1d1d2481b9db728bf1af6d7a478a63a0 SHA1 e92308e32cb15df50feafd9a635f0d6cfac43d4e SHA256 4591c14ab2fe0cb26f815242618e4eb0d25a67720ca2599f37ba2f751976500e +MISC metadata.xml 2251 RMD160 4167b367fe5472e090fec27c09a465e558b8caf9 SHA1 059e3863cc1e500cf438f12ca98fe7f4ebd24722 SHA256 f402e3753e18c32922a694ab1bbde615754f26bbebc401b90b18f57bf5e49342 diff --git a/dev-lang/php/files/eblits/src_compile-v1.eblit b/dev-lang/php/files/eblits/src_compile-v1.eblit index 290123c9036d..24a86e24b6eb 100644 --- a/dev-lang/php/files/eblits/src_compile-v1.eblit +++ b/dev-lang/php/files/eblits/src_compile-v1.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_compile-v1.eblit,v 1.3 2010/06/11 17:15:29 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_compile-v1.eblit,v 1.4 2010/07/26 13:42:12 mabi Exp $ eblit-php-src_compile() { SAPI_DIR="${WORKDIR}/sapis" @@ -30,7 +30,7 @@ php_sapi_build() { for one_sapi in $SAPIS ; do case "$one_sapi" in - cli|cgi|embed) + cli|cgi|embed|fpm) if [[ "${one_sapi}" == "${sapi}" ]] ; then sapi_conf="${sapi_conf} --enable-${one_sapi}" else @@ -64,6 +64,9 @@ php_sapi_copy() { cgi) source="sapi/cgi/php-cgi" ;; + fpm) + source="sapi/fpm/php-fpm" + ;; embed) source="libs/libphp${PHP_MV}.so" ;; diff --git a/dev-lang/php/files/eblits/src_configure-v1.eblit b/dev-lang/php/files/eblits/src_configure-v1.eblit index f3984c4b6521..0a581ca14cf3 100644 --- a/dev-lang/php/files/eblits/src_configure-v1.eblit +++ b/dev-lang/php/files/eblits/src_configure-v1.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-v1.eblit,v 1.3 2010/07/05 23:22:43 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v1.eblit,v 1.4 2010/07/26 13:42:12 mabi Exp $ eblit-php-src_configure() { PHP_DESTDIR="/usr/$(get_libdir)/php${PHP_MV}" @@ -217,6 +217,11 @@ 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/lib" + 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/eblits/src_install-v1.eblit b/dev-lang/php/files/eblits/src_install-v1.eblit index d3312579f171..c30d5444764a 100644 --- a/dev-lang/php/files/eblits/src_install-v1.eblit +++ b/dev-lang/php/files/eblits/src_install-v1.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_install-v1.eblit,v 1.3 2010/06/14 17:03:22 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v1.eblit,v 1.4 2010/07/26 13:42:12 mabi Exp $ eblit-php-src_install() { # Makefile forgets to create this before trying to write to it... @@ -125,4 +125,16 @@ php_install_ini() { "70_mod_php${PHP_MV}.conf" fi fi + + if [[ "${sapi}" == "fpm" ]] ; then + einfo "Installing FPM CGI config file php-fpm.conf" + epatch "${FILESDIR}/php-fpm-gentooified.patch" + insinto ${PHP_INI_DIR} + doins "${S}/sapi/fpm/php-fpm.conf" + dodir "/etc/init.d" + insinto "/etc/init.d" + newins "${FILESDIR}/php-fpm.init" "php-fpm" + fperms 755 "/etc/init.d/php-fpm" + dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm" + fi } diff --git a/dev-lang/php/files/php-fpm-gentooified.patch b/dev-lang/php/files/php-fpm-gentooified.patch new file mode 100644 index 000000000000..3d7b9fe48c7d --- /dev/null +++ b/dev-lang/php/files/php-fpm-gentooified.patch @@ -0,0 +1,55 @@ +--- sapi/fpm/php-fpm.conf.orig 2010-06-03 21:04:30.000000000 +0200 ++++ sapi/fpm/php-fpm.conf 2010-06-03 22:40:41.000000000 +0200 +@@ -8,7 +8,7 @@ + ; 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. +-;include=/etc/fpm.d/*.conf ++;include=/etc/php/fpm-php5/fpm.d/*.conf + + ;;;;;;;;;;;;;;;;;; + ; Global Options ; +@@ -17,11 +17,11 @@ + [global] + ; Pid file + ; Default Value: none +-;pid = /var/lib/run/php-fpm.pid ++;pid = /var/run/php-fpm.pid + + ; Error log file + ; Default Value: /var/lib/log/php-fpm.log +-;error_log = /var/lib/log/php-fpm.log ++error_log = /var/log/php-fpm.log + + ; Log level + ; Possible Values: alert, error, warning, notice, debug +@@ -133,17 +133,17 @@ + ; 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 ++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 ++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 ++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 +@@ -213,7 +213,7 @@ + + ; The log file for slow requests + ; Default Value: /var/lib/log/php-fpm.log.slow +-;slowlog = /var/lib/log/php-fpm.log.slow ++;slowlog = /var/log/php-fpm.log.slow + + ; Set open file descriptor rlimit. + ; Default Value: system defined value diff --git a/dev-lang/php/files/php-fpm.init b/dev-lang/php/files/php-fpm.init new file mode 100755 index 000000000000..adcfd3275bbb --- /dev/null +++ b/dev-lang/php/files/php-fpm.init @@ -0,0 +1,22 @@ +#!/sbin/runscript + +PHP_FPM_CONF="/etc/php/fpm-php5/php-fpm.conf" + +opts="depend start stop reload" + +depend() { + need net + use apache2 lighttpd nginx +} + +start() { + ebegin "Starting PHP FastCGI server" + start-stop-daemon --start --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" + eend $? +} + +stop() { + ebegin "Stopping PHP FastCGI server" + start-stop-daemon --stop --name php-fpm + eend $? +} diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml index 414c670367eb..f5fd193e069d 100644 --- a/dev-lang/php/metadata.xml +++ b/dev-lang/php/metadata.xml @@ -13,7 +13,7 @@ <flag name='fileinfo'>Add fileinfo extension support</flag> <flag name='filter'>Add filter extension support</flag> <flag name='force-cgi-redirect'>Switch on common security setting for CGI SAPI</flag> - <flag name='fpm'>Enable fpm SAPI</flag> + <flag name='fpm'>Enable the FastCGI Process Manager SAPI</flag> <flag name='hash'>Enable the hash extension</flag> <flag name='intl'>Enables the intl extension for extended internalization support</flag> <flag name='java-external'>Use the external java extension rather than the bundled one</flag> |