public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/
@ 2015-09-11 14:49 Manuel Rüger
  0 siblings, 0 replies; 4+ messages in thread
From: Manuel Rüger @ 2015-09-11 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     bf38f33960bd0341da5e0cb26ff56121da29c785
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 11 14:49:17 2015 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Fri Sep 11 14:49:35 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf38f339

app-eselect/eselect-php: Remove old

Package-Manager: portage-2.2.20.1

 app-eselect/eselect-php/Manifest                   |  1 -
 app-eselect/eselect-php/eselect-php-0.6.2.ebuild   | 24 -----------
 .../eselect-php/eselect-php-0.7.1-r1.ebuild        | 49 ----------------------
 .../eselect-php/eselect-php-0.7.1-r2.ebuild        | 49 ----------------------
 .../eselect-php/eselect-php-0.7.1-r3.ebuild        | 48 ---------------------
 app-eselect/eselect-php/eselect-php-0.7.1.ebuild   | 45 --------------------
 .../eselect-php/files/70_mod_php5.conf-apache2     | 14 -------
 app-eselect/eselect-php/files/php-fpm.init         | 47 ---------------------
 8 files changed, 277 deletions(-)

diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
index c6bba4c..27a9d1f 100644
--- a/app-eselect/eselect-php/Manifest
+++ b/app-eselect/eselect-php/Manifest
@@ -1,2 +1 @@
-DIST eselect-php-0.6.2.bz2 1454 SHA256 c4eecb73aaf50538a8eaf8afb0d52b3666b45ef19e5f26f7998682bac56566c4 SHA512 cb2639ddf97c77336195db57a9a5021200693ee4f1382d7ed6cda22a27f5b0f76be88abf376e13245a72223c12065d019e0537494f934f9cbe40e0fdcbfe2b22 WHIRLPOOL 523f3a0c30705599ee91c5ce0a691c140226a18c0a1ba73df4a0f9835a92644748a0f0ed73f1ea101de65cf270947f054a8feeb3c36609f644f8682d611aaa11
 DIST eselect-php-0.7.1.bz2 2251 SHA256 10aa400e2d08bc71989366993f12ddb546a0ea29f191c40e37beba1d11d7abd7 SHA512 a6b4c1475dda9f368d799db7658c50cef7d6f71482a53a186fb1394e7ea1fff3c0ef123c82b7ca4d1e45aadb0a034d36f213fc9450766878a60d28639761cb3d WHIRLPOOL a4e45492068616ff30fd888b0cc64441a6eb6e6656e0107d00bd2cf15360dce15052d4d62089ab89d43e6bb36e126529aa101c70e8bd94a9fc916a5369463e3b

diff --git a/app-eselect/eselect-php/eselect-php-0.6.2.ebuild b/app-eselect/eselect-php/eselect-php-0.6.2.ebuild
deleted file mode 100644
index 3502548..0000000
--- a/app-eselect/eselect-php/eselect-php-0.6.2.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=3
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://www.gentoo.org"
-SRC_URI="http://olemarkus.org/~olemarkus/gentoo/eselect-php-${PV}.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86"
-IUSE=""
-
-DEPEND=">=app-admin/eselect-1.2.4
-		!app-admin/php-toolkit"
-RDEPEND="${DEPEND}"
-
-src_install() {
-	mv eselect-php-${PV} php.eselect
-	insinto /usr/share/eselect/modules/
-	doins php.eselect
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r1.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r1.ebuild
deleted file mode 100644
index 30a8496..0000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r1.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit depend.apache systemd
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://www.gentoo.org"
-SRC_URI="https://dev.gentoo.org/~olemarkus/eselect-php/eselect-php-${PV}.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-DEPEND=">=app-admin/eselect-1.2.4
-		!<dev-lang/php-5.3.23-r1:5.3
-		!<dev-lang/php-5.4.13-r1:5.4
-		!<dev-lang/php-5.5.0_beta1-r2:5.5
-		"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"
-
-want_apache
-
-src_install() {
-	mv eselect-php-${PV} php.eselect
-	insinto /usr/share/eselect/modules/
-	doins php.eselect
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.conf-apache2" \
-			"70_mod_php5.conf"
-	fi
-
-	if use fpm ; then
-		dodir "/etc/init.d"
-		insinto "/etc/init.d"
-		newinitd "${FILESDIR}/php-fpm.init" "php-fpm"
-		systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@.service"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild
deleted file mode 100644
index bfe8be8..0000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit depend.apache systemd
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://www.gentoo.org"
-SRC_URI="https://dev.gentoo.org/~olemarkus/eselect-php/eselect-php-${PV}.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-DEPEND=">=app-admin/eselect-1.2.4
-		!<dev-lang/php-5.3.23-r1:5.3
-		!<dev-lang/php-5.4.13-r1:5.4
-		!<dev-lang/php-5.5.0_beta1-r2:5.5
-		"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"
-
-want_apache
-
-src_install() {
-	mv eselect-php-${PV} php.eselect
-	insinto /usr/share/eselect/modules/
-	doins php.eselect
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.conf-apache2" \
-			"70_mod_php5.conf"
-	fi
-
-	if use fpm ; then
-		dodir "/etc/init.d"
-		insinto "/etc/init.d"
-		newinitd "${FILESDIR}/php-fpm-r1.init" "php-fpm"
-		systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@.service"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild
deleted file mode 100644
index a57b3c5..0000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit depend.apache systemd
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://www.gentoo.org"
-SRC_URI="https://dev.gentoo.org/~olemarkus/eselect-php/eselect-php-${PV}.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-DEPEND=">=app-admin/eselect-1.2.4
-		!<dev-lang/php-5.3.23-r1:5.3
-		!<dev-lang/php-5.4.13-r1:5.4
-		!<dev-lang/php-5.5.0_beta1-r2:5.5
-		"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"
-
-want_apache
-
-src_install() {
-	mv eselect-php-${PV} php.eselect
-	insinto /usr/share/eselect/modules/
-	doins php.eselect
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.conf-apache2" \
-			"70_mod_php5.conf"
-	fi
-
-	if use fpm ; then
-		dodir "/etc/init.d"
-		insinto "/etc/init.d"
-		newinitd "${FILESDIR}/php-fpm-r1.init" "php-fpm"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1.ebuild
deleted file mode 100644
index eba6a7c..0000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit depend.apache
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://www.gentoo.org"
-SRC_URI="https://dev.gentoo.org/~olemarkus/eselect-php/eselect-php-${PV}.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-DEPEND=">=app-admin/eselect-1.2.4
-		!<dev-lang/php-5.3.23-r1:5.3
-		!<dev-lang/php-5.4.13-r1:5.4
-		!<dev-lang/php-5.5.0_beta1-r2:5.5
-		"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"
-
-want_apache
-
-src_install() {
-	mv eselect-php-${PV} php.eselect
-	insinto /usr/share/eselect/modules/
-	doins php.eselect
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.conf-apache2" \
-			"70_mod_php5.conf"
-	fi
-
-	if use fpm ; then
-		dodir "/etc/init.d"
-		insinto "/etc/init.d"
-		newinitd "${FILESDIR}/php-fpm.init" "php-fpm"
-	fi
-}

diff --git a/app-eselect/eselect-php/files/70_mod_php5.conf-apache2 b/app-eselect/eselect-php/files/70_mod_php5.conf-apache2
deleted file mode 100644
index 7ec8739..0000000
--- a/app-eselect/eselect-php/files/70_mod_php5.conf-apache2
+++ /dev/null
@@ -1,14 +0,0 @@
-<IfDefine PHP5>
-	# Load the module first
-	<IfModule !mod_php5.c>
-		LoadModule php5_module    modules/libphp5.so
-	</IfModule>
-
-	# Set it to handle the files
-	<IfModule mod_mime.c>
-		AddHandler application/x-httpd-php .php .php5 .phtml
-		AddHandler application/x-httpd-php-source .phps
-	</IfModule>
-
-	DirectoryIndex index.php index.phtml
-</IfDefine>

diff --git a/app-eselect/eselect-php/files/php-fpm.init b/app-eselect/eselect-php/files/php-fpm.init
deleted file mode 100644
index a186d83..0000000
--- a/app-eselect/eselect-php/files/php-fpm.init
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/sbin/runscript
-
-set_phpvars() {
-	PHPSLOT=${SVCNAME#php-fpm-}
-	[ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)"
-
-	PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
-	PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid"
-}
-
-extra_commands="depend"
-extra_started_commands="reload"
-
-depend() {
-	need net
-	use apache2 lighttpd nginx
-}
-
-start() {
-        ebegin "Starting PHP FastCGI Process Manager"
-	set_phpvars
-        start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \
-            /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}"
-        local i=0
-        local timeout=5
-        while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
-            sleep 1
-            i=$(($i + 1))
-        done
-        
-        [ $timeout -gt $i ]
-        eend $?
-}
-
-stop() {
-        ebegin "Stopping PHP FastCGI Process Manager"
-	set_phpvars
-        start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID}
-        eend $?
-}
-
-reload() {
-    ebegin "Reloading PHP FastCGI Process Manager"
-    set_phpvars
-    [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
-    eend $?
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/
@ 2015-11-23 18:15 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2015-11-23 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     334ee76ee647bfeec1b0e81986eb94ea016358d8
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 23 18:13:21 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Nov 23 18:13:39 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=334ee76e

app-eselect/eselect-php: new revision fixing bugs 508712 and 545652.

Both the ebuild and the init script have been revisioned. The ebuild
was modified to depend on the apache2 mod_dir module (bug 545652), and
a configtest() command was added to the init script (bug 508712).

Thanks to Sebastian Pipping and Igor Filakhtov for the reports and fixes.

Gentoo-Bug: 508712
Gentoo-bug: 545652

Package-Manager: portage-2.2.20.1

 ...lect-php-0.7.1-r5.ebuild => eselect-php-0.7.1-r6.ebuild} |  9 +++++----
 .../eselect-php/files/{php-fpm.init-r2 => php-fpm.init-r3}  | 13 +++++++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
similarity index 79%
rename from app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
rename to app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
index dc2fadc..cd21027 100644
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
@@ -15,15 +15,16 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 IUSE="fpm apache2"
 
-RDEPEND="app-admin/eselect"
+# The "DirectoryIndex" line in 70_mod_php5.conf requires mod_dir.
+RDEPEND="app-admin/eselect
+	apache2? ( www-servers/apache[apache2_modules_dir] )"
 S="${WORKDIR}"
 
 want_apache
 
 src_install() {
-	mv eselect-php-${PV} php.eselect
 	insinto /usr/share/eselect/modules/
-	doins php.eselect
+	newins "eselect-php-${PV}" php.eselect
 
 	if use apache2 ; then
 		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
@@ -32,7 +33,7 @@ src_install() {
 	fi
 
 	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r2" "php-fpm"
+		newinitd "${FILESDIR}/php-fpm.init-r3" "php-fpm"
 		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
 		exeinto /usr/libexec
 		doexe "${FILESDIR}/php-fpm-launcher"

diff --git a/app-eselect/eselect-php/files/php-fpm.init-r2 b/app-eselect/eselect-php/files/php-fpm.init-r3
similarity index 78%
rename from app-eselect/eselect-php/files/php-fpm.init-r2
rename to app-eselect/eselect-php/files/php-fpm.init-r3
index 8ce81b9..a1b956e 100644
--- a/app-eselect/eselect-php/files/php-fpm.init-r2
+++ b/app-eselect/eselect-php/files/php-fpm.init-r3
@@ -1,6 +1,7 @@
 #!/sbin/openrc-run
 
 extra_started_commands="reload"
+extra_commands="configtest"
 
 set_phpvars() {
 	PHPSLOT="${SVCNAME#php-fpm-}"
@@ -11,13 +12,14 @@ set_phpvars() {
 	fi
 
 	PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+	PHP_FPM_BIN="/usr/lib/${PHPSLOT}/bin/php-fpm"
 }
 
 start() {
         ebegin "Starting PHP FastCGI Process Manager"
 	set_phpvars
         start-stop-daemon --start --pidfile "${PHP_FPM_PID}" \
-			  --exec "/usr/lib/${PHPSLOT}/bin/php-fpm" \
+			  --exec "${PHP_FPM_BIN}" \
 			  -- \
 			  --fpm-config "${PHP_FPM_CONF}" \
 			  --pid "${PHP_FPM_PID}"
@@ -37,7 +39,7 @@ stop() {
 	set_phpvars
         start-stop-daemon --signal QUIT \
 			  --stop \
-			  --exec "/usr/lib/${PHPSLOT}/bin/php-fpm" \
+			  --exec "${PHP_FPM_BIN}" \
 			  --pidfile "${PHP_FPM_PID}"
         eend $?
 }
@@ -48,3 +50,10 @@ reload() {
     [ -f "${PHP_FPM_PID}" ] && kill -USR2 $(cat "${PHP_FPM_PID}")
     eend $?
 }
+
+configtest() {
+    ebegin "Testing PHP FastCGI Process Manager configuration"
+    set_phpvars
+    "${PHP_FPM_BIN}" --fpm-config "${PHP_FPM_CONF}" --test
+    eend $?
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/
@ 2015-11-24 20:16 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2015-11-24 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     a0709457d61898989510adfa26c4cb615f18165b
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 24 20:11:36 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Nov 24 20:12:00 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0709457

app-eselect/eselect-php: new revision to test config before FPM start/reload.

Now that we have a configtest() command for the php-fpm daemon, we
should run it before attempting to reload the daemon. This prevents
the (working) daemon from crashing if the new config has a typo in it.

Performing the same check before start() avoids a five-second wait if
there is an error in the config.

Gentoo-Bug: 487642

Package-Manager: portage-2.2.20.1

 ...-php-0.7.1-r6.ebuild => eselect-php-0.7.1-r7.ebuild} |  2 +-
 .../files/{php-fpm.init-r3 => php-fpm.init-r4}          | 17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r7.ebuild
similarity index 95%
rename from app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
rename to app-eselect/eselect-php/eselect-php-0.7.1-r7.ebuild
index cd21027..6937b4a 100644
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r7.ebuild
@@ -33,7 +33,7 @@ src_install() {
 	fi
 
 	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r3" "php-fpm"
+		newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
 		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
 		exeinto /usr/libexec
 		doexe "${FILESDIR}/php-fpm-launcher"

diff --git a/app-eselect/eselect-php/files/php-fpm.init-r3 b/app-eselect/eselect-php/files/php-fpm.init-r4
similarity index 67%
rename from app-eselect/eselect-php/files/php-fpm.init-r3
rename to app-eselect/eselect-php/files/php-fpm.init-r4
index a1b956e..6502ab9 100644
--- a/app-eselect/eselect-php/files/php-fpm.init-r3
+++ b/app-eselect/eselect-php/files/php-fpm.init-r4
@@ -6,7 +6,7 @@ extra_commands="configtest"
 set_phpvars() {
 	PHPSLOT="${SVCNAME#php-fpm-}"
 	PHP_FPM_PID="/run/php-fpm-${PHPSLOT}.pid"
-	if [ ${PHPSLOT} = 'php-fpm' ] ; then
+	if [ "${PHPSLOT}" = "php-fpm" ] ; then
 		PHPSLOT="$(eselect php show fpm)"
 		PHP_FPM_PID="/run/php-fpm.pid"
 	fi
@@ -16,6 +16,9 @@ set_phpvars() {
 }
 
 start() {
+        # If configtest fails, we don't have to sit around for five
+        # seconds waiting for a pid to show up.
+        configtest || return $?
         ebegin "Starting PHP FastCGI Process Manager"
 	set_phpvars
         start-stop-daemon --start --pidfile "${PHP_FPM_PID}" \
@@ -45,6 +48,7 @@ stop() {
 }
 
 reload() {
+    configtest || return $?
     ebegin "Reloading PHP FastCGI Process Manager"
     set_phpvars
     [ -f "${PHP_FPM_PID}" ] && kill -USR2 $(cat "${PHP_FPM_PID}")
@@ -54,6 +58,13 @@ reload() {
 configtest() {
     ebegin "Testing PHP FastCGI Process Manager configuration"
     set_phpvars
-    "${PHP_FPM_BIN}" --fpm-config "${PHP_FPM_CONF}" --test
-    eend $?
+    # Hide the "test is successful" message (which goes to stderr) if
+    # the test passed, but show the entire output if the test failed
+    # because it may contain hints about the problem.
+    OUTPUT=$( "${PHP_FPM_BIN}" --fpm-config "${PHP_FPM_CONF}" --test 2>&1 )
+
+    # Save this so `echo` doesn't clobber it.
+    local exit_code=$?
+    [ $exit_code -ne 0 ] && echo "${OUTPUT}" >&2
+    eend $exit_code
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/
@ 2020-10-16 14:44 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2020-10-16 14:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c4165bd92e2045bd41ee0dfeecbc8a5f7505192e
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 16 14:40:08 2020 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Oct 16 14:42:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4165bd9

app-eselect/eselect-php: remove obsolete versions.

Bug: https://bugs.gentoo.org/740620
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 app-eselect/eselect-php/Manifest                   |  2 -
 .../eselect-php/eselect-php-0.9.4-r5.ebuild        | 44 ----------------------
 app-eselect/eselect-php/eselect-php-0.9.5.ebuild   | 44 ----------------------
 app-eselect/eselect-php/files/php-fpm-launcher     |  7 ----
 app-eselect/eselect-php/files/php-fpm-launcher-r3  | 11 ------
 app-eselect/eselect-php/files/php-fpm.conf         |  1 -
 6 files changed, 109 deletions(-)

diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
index 9ede973795a..313fb404135 100644
--- a/app-eselect/eselect-php/Manifest
+++ b/app-eselect/eselect-php/Manifest
@@ -1,3 +1 @@
-DIST eselect-php-0.9.4.tar.xz 49576 BLAKE2B 417956b355ffec7d7cda03dffa94e4d749a2b33a64a216c2ed8492181a5385f5219078efe6cc4d0d2d81b0fac40901c0cf07914a826484b83833542a12b47359 SHA512 2ba1dd75d4bb9611c6687ed4449f715728263538f772652aa1ac013103cf9ddf328c854326cf6da4f9b3ff2279bf99d973325520fe8b4e3ba7a76a9c3264e78e
-DIST eselect-php-0.9.5.tar.xz 49732 BLAKE2B 78c2010abcb1c9efd4d5f2f3f934365b338901a98bc8528131f2b9f564c1c3f740ab2dc2a28a0a58912e750062e61f75a7c6611c2f37019ca6525d729ffb5fd2 SHA512 55e401cb0c3ed19fed90485d62ba3deed3355503542898ff0d1b5404bd5fafb2f887df433609d4d4b28f32c0034100ea32c9e58547ef6417ea0b0f60d061d119
 DIST eselect-php-0.9.6.tar.xz 53236 BLAKE2B 38478d4792f8a527e5f519abd7765211aff8c1d132ceeba5eec70ea3b8d1f254be52564334fed3840950c2461ff4a30784b92fbb8b21cc448083617797eab1d4 SHA512 d3f14288b3493cb48717c1f27430ae8b60881e9f6f48e4b7644a4596d9fc1b9823a6af8b7101a62b28a92e3bff164b1717617a2642a5bb02e8dd46de56d4f410

diff --git a/app-eselect/eselect-php/eselect-php-0.9.4-r5.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r5.ebuild
deleted file mode 100644
index 29450039264..00000000000
--- a/app-eselect/eselect-php/eselect-php-0.9.4-r5.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
-SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
-RDEPEND="app-admin/eselect
-	apache2? ( www-servers/apache[apache2_modules_dir] )"
-
-src_configure() {
-	# We expect localstatedir to be "var"ish, not "var/lib"ish, because
-	# that's what PHP upstream expects. See for example the FPM
-	# configuration where they put logs in @localstatedir@/log.
-	#
-	# The libdir is passed explicitly in case the /usr/lib symlink
-	# is not present (bug 624528).
-	econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
-		  --localstatedir="${EPREFIX}/var" \
-		  --with-piddir="${EPREFIX}/run" \
-		  $(use_enable apache2) \
-		  $(use_enable fpm)
-}
-
-src_install() {
-	default
-
-	if use fpm ; then
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die
-		exeinto /usr/libexec
-		doexe "${T}"/php-fpm-launcher
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.9.5.ebuild b/app-eselect/eselect-php/eselect-php-0.9.5.ebuild
deleted file mode 100644
index a38c7b0c3c1..00000000000
--- a/app-eselect/eselect-php/eselect-php-0.9.5.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd
-
-DESCRIPTION="PHP eselect module"
-HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
-SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="fpm apache2"
-
-# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
-RDEPEND="app-admin/eselect
-	apache2? ( www-servers/apache[apache2_modules_dir] )"
-
-src_configure() {
-	# We expect localstatedir to be "var"ish, not "var/lib"ish, because
-	# that's what PHP upstream expects. See for example the FPM
-	# configuration where they put logs in @localstatedir@/log.
-	#
-	# The libdir is passed explicitly in case the /usr/lib symlink
-	# is not present (bug 624528).
-	econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
-		  --localstatedir="${EPREFIX}/var" \
-		  --with-piddir="${EPREFIX}/run" \
-		  $(use_enable apache2) \
-		  $(use_enable fpm)
-}
-
-src_install() {
-	default
-
-	if use fpm ; then
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die
-		exeinto /usr/libexec
-		doexe "${T}"/php-fpm-launcher
-	fi
-}

diff --git a/app-eselect/eselect-php/files/php-fpm-launcher b/app-eselect/eselect-php/files/php-fpm-launcher
deleted file mode 100644
index 7a1c1c9f918..00000000000
--- a/app-eselect/eselect-php/files/php-fpm-launcher
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-PHPSLOT="${1}"
-[ -z "${PHPSLOT}" ] && PHPSLOT="$(eselect php show fpm)"
-shift
-
-exec /usr/lib/${PHPSLOT}/bin/php-fpm "${@}"

diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r3 b/app-eselect/eselect-php/files/php-fpm-launcher-r3
deleted file mode 100644
index a2b6eabc4da..00000000000
--- a/app-eselect/eselect-php/files/php-fpm-launcher-r3
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# If there are no arguments, then "shift" will fail (bug 626496).
-if [ $# -eq 0 ]; then
-    PHP_SLOT=$(eselect php show fpm)
-else
-    PHP_SLOT=$1
-    shift
-fi
-
-exec "/usr/@libdir@/${PHP_SLOT}/bin/php-fpm" "${@}"

diff --git a/app-eselect/eselect-php/files/php-fpm.conf b/app-eselect/eselect-php/files/php-fpm.conf
deleted file mode 100644
index 801e74f1e62..00000000000
--- a/app-eselect/eselect-php/files/php-fpm.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/php-fpm 755 root root


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-16 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 18:15 [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2020-10-16 14:44 Michael Orlitzky
2015-11-24 20:16 Michael Orlitzky
2015-09-11 14:49 Manuel Rüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox