public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2015-11-19 23:33 Michael Orlitzky
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Orlitzky @ 2015-11-19 23:33 UTC (permalink / raw
  To: gentoo-commits

commit:     79b8064e2ee191fc3d63e716e6ab4245332fe5c9
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 19 23:02:16 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Nov 19 23:32:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b8064e

app-eselect/eselect-php: new revision removing php-fpm init dependencies.

This new revision exists mainly to pull in a new version of the
php-fpm init script. Some minor ebuild cleanup was also done.

The first fix to the init script is to remove "need net" (bug
514872). The php-fpm daemon runs on 127.0.0.1 by default and should
not bring up any other interfaces. Users are encouraged to use
rc_need="net.eth0" or similar if they move the daemon to another
interface.

The second init script change removes the webserver dependencies (bug
471018). The web servers require php-fpm, not the other way around.

Finally, some other cosmetic changes were made to the init script.

Gentoo-Bug: 471018
Gentoo-Bug: 514872

Package-Manager: portage-2.2.20.1

 .../eselect-php/eselect-php-0.7.1-r5.ebuild        | 40 +++++++++++++++++
 app-eselect/eselect-php/files/php-fpm.init-r2      | 50 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
new file mode 100644
index 0000000..dc2fadc
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
@@ -0,0 +1,40 @@
+# 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"
+
+RDEPEND="app-admin/eselect"
+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-r1" \
+			"70_mod_php5.conf"
+	fi
+
+	if use fpm ; then
+		newinitd "${FILESDIR}/php-fpm.init-r2" "php-fpm"
+		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+		exeinto /usr/libexec
+		doexe "${FILESDIR}/php-fpm-launcher"
+	fi
+}

diff --git a/app-eselect/eselect-php/files/php-fpm.init-r2 b/app-eselect/eselect-php/files/php-fpm.init-r2
new file mode 100644
index 0000000..8ce81b9
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm.init-r2
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+
+extra_started_commands="reload"
+
+set_phpvars() {
+	PHPSLOT="${SVCNAME#php-fpm-}"
+	PHP_FPM_PID="/run/php-fpm-${PHPSLOT}.pid"
+	if [ ${PHPSLOT} = 'php-fpm' ] ; then
+		PHPSLOT="$(eselect php show fpm)"
+		PHP_FPM_PID="/run/php-fpm.pid"
+	fi
+
+	PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+}
+
+start() {
+        ebegin "Starting PHP FastCGI Process Manager"
+	set_phpvars
+        start-stop-daemon --start --pidfile "${PHP_FPM_PID}" \
+			  --exec "/usr/lib/${PHPSLOT}/bin/php-fpm" \
+			  -- \
+			  --fpm-config "${PHP_FPM_CONF}" \
+			  --pid "${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] 8+ messages in thread

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

commit:     983c8fcbdf2b0cea1236c87ac84bf4874a916271
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 11 01:07:02 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Dec 11 01:07:20 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=983c8fcb

app-eselect/eselect-php: version bump adding v0.8.1.

This is another attempt at php-7.x support in apache2. This new
version is already masked for testing, which is good because it
requires some configuration changes to apache. Upgraders should
read the elogs.

Gentoo-Bug: 552156

Package-Manager: portage-2.2.20.1

 app-eselect/eselect-php/Manifest                 |  1 +
 app-eselect/eselect-php/eselect-php-0.8.1.ebuild | 54 ++++++++++++++++++++++++
 app-eselect/eselect-php/files/70_mod_php.conf    | 26 ++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
index 9c9280e..249fc20 100644
--- a/app-eselect/eselect-php/Manifest
+++ b/app-eselect/eselect-php/Manifest
@@ -1,2 +1,3 @@
 DIST eselect-php-0.7.1.bz2 2251 SHA256 10aa400e2d08bc71989366993f12ddb546a0ea29f191c40e37beba1d11d7abd7 SHA512 a6b4c1475dda9f368d799db7658c50cef7d6f71482a53a186fb1394e7ea1fff3c0ef123c82b7ca4d1e45aadb0a034d36f213fc9450766878a60d28639761cb3d WHIRLPOOL a4e45492068616ff30fd888b0cc64441a6eb6e6656e0107d00bd2cf15360dce15052d4d62089ab89d43e6bb36e126529aa101c70e8bd94a9fc916a5369463e3b
 DIST eselect-php-0.8.0.tar.xz 43932 SHA256 1ddc6aafe269ebbf3006737701403bd2c7b324b9eea0fcbdc91e85a856f8a10d SHA512 53c735275264742542d3909ae2994d0720bc961533a3df5373dbc7a7a1f04e91591f4e8356c268954420487d3ead4006cc5d6f361ef0ac2836f7f126556e960d WHIRLPOOL 94deba4a5bd4d0d85c8f3afc96ac30a69cca5db95014b2fd8701495cc83488389302f640065e923cabd40c95f97f792dd173337cc33c7d38441956049fb90cda
+DIST eselect-php-0.8.1.tar.xz 44412 SHA256 aa118e936bff176fe64911d68bb72e6e9e03d33c106674169396826a3063a962 SHA512 3679c8ac4d980424a108d93c8e2e575b93196d7140f31f900e7f925ab26cf821233d12b9083fd7bdd7bd596c3b59544e972660be8ffce7c24d4a7980fbe5f770 WHIRLPOOL 19c6f05a02aa1a40586f352822679f7e655200374a100834d4370678b35856d5e255b0d83f07eafd69481ee3ee72cb976665e6c2b2df990be00b54bfa53a5a92

diff --git a/app-eselect/eselect-php/eselect-php-0.8.1.ebuild b/app-eselect/eselect-php/eselect-php-0.8.1.ebuild
new file mode 100644
index 0000000..d7a5283
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.8.1.ebuild
@@ -0,0 +1,54 @@
+# 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://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 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-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] )"
+
+want_apache
+
+src_install() {
+	default
+
+	if use apache2 ; then
+		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
+		doins "${FILESDIR}/70_mod_php.conf"
+	fi
+
+	if use fpm ; then
+		newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
+		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+		exeinto /usr/libexec
+		doexe "${FILESDIR}/php-fpm-launcher"
+	fi
+}
+
+pkg_postinst() {
+	if use apache2 ; then
+		elog
+		elog "If you are upgrading, be warned that our mod_php configuration"
+		elog "file has changed! You should now define -DPHP for the apache2"
+		elog "daemon, and inspect the new 70_mod_php.conf which has been"
+		elog "installed. Module loading involves eselect as of this version."
+		elog
+		elog "You must run eselect at least once to choose your apache2 target"
+		elog "before the new configuration will work. Afterwards, and after you"
+		elog "have reviewed your new configuration, you are advised to remove"
+		elog "the obsolete 70_mod_php5.conf file."
+		elog
+	fi
+}

diff --git a/app-eselect/eselect-php/files/70_mod_php.conf b/app-eselect/eselect-php/files/70_mod_php.conf
new file mode 100644
index 0000000..cf996fa
--- /dev/null
+++ b/app-eselect/eselect-php/files/70_mod_php.conf
@@ -0,0 +1,26 @@
+<IfDefine PHP>
+	# The mod_php.so symlink is controlled by
+	# eselect-php. However, the module name changed from
+	# php5_module to php7_module so we can't blindly load whatever
+	# is there. Instead we let eselect-php manage a small
+	# configuration file that loads the appropriate module.
+	#
+	# This is relative to ServerRoot (see httpd.conf).
+	Include ../../../var/lib/eselect-php/mod_php.conf
+
+	# Tell apache that mod_php should handle PHP files.
+	#
+	# NOTE: Avoiding AddHandler/AddType for security (bug
+	# #538822). Please read the related news item!
+	<FilesMatch "\.(php|php[57]|phtml)$">
+		SetHandler application/x-httpd-php
+	</FilesMatch>
+
+	# PHP source files which are meant to be displayed as
+	# syntax-highlighted source code.
+	<FilesMatch "\.phps$">
+		SetHandler application/x-httpd-php-source
+	</FilesMatch>
+
+	DirectoryIndex index.php index.phtml
+</IfDefine>


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2016-01-05 19:16 Michael Orlitzky
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Orlitzky @ 2016-01-05 19:16 UTC (permalink / raw
  To: gentoo-commits

commit:     1ae81f5e49a93e7380cb2a7c9931beb11149874d
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 19:10:55 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 19:10:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae81f5e

app-eselect/eselect-php: new revision with backwards-compatible apache config.

If the user has an unmodified 70_mod_php5.conf, the previous revision
will allow that file to be removed. This can break PHP support in
Apache before the user notices that he needs to run eselect-php and
update his Apache -DPHP5 line.

In this revision we supply the latest copy of 70_mod_php5.conf for
backwards compatibility. There is now a notice at the top of that file
informing users to upgrade their configuration.

Package-Manager: portage-2.2.24

 ...hp-0.8.2.ebuild => eselect-php-0.8.2-r1.ebuild} |  3 ++-
 .../eselect-php/files/70_mod_php5.backcompat.conf  | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/app-eselect/eselect-php/eselect-php-0.8.2.ebuild b/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
similarity index 93%
rename from app-eselect/eselect-php/eselect-php-0.8.2.ebuild
rename to app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
index e52f004..012e476 100644
--- a/app-eselect/eselect-php/eselect-php-0.8.2.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -30,6 +30,7 @@ src_install() {
 	if use apache2 ; then
 		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
 		doins "${FILESDIR}/70_mod_php.conf"
+		newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
 	fi
 
 	if use fpm ; then

diff --git a/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
new file mode 100644
index 0000000..bd79f78
--- /dev/null
+++ b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
@@ -0,0 +1,28 @@
+###########
+# WARNING #
+###########
+#
+# This file is provided for backwards compatibility only. The Apache
+# PHP configuration is now located in 70_mod_php.conf and requires you
+# to set -DPHP in your Apache conf.d file. Please examine
+# 70_mod_php.conf and update your Apache configuration to use -DPHP
+# instead of -DPHP5. Afterwards you may delete this file.
+#
+<IfDefine PHP5>
+	# Load the module first
+	<IfModule !mod_php5.c>
+		LoadModule php5_module    modules/libphp5.so
+	</IfModule>
+
+	# Set it to handle the files
+	# NOTE: Avoiding AddHandler/AddType for security (bug #538822)
+	# NOTE: Please read the related news item!
+	<FilesMatch "\.(php|php5|phtml)$">
+		SetHandler application/x-httpd-php
+	</FilesMatch>
+	<FilesMatch "\.phps$">
+		SetHandler application/x-httpd-php-source
+	</FilesMatch>
+
+	DirectoryIndex index.php index.phtml
+</IfDefine>


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2016-10-11 13:37 Brian Evans
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Evans @ 2016-10-11 13:37 UTC (permalink / raw
  To: gentoo-commits

commit:     db258b5062a86633f4746f4b8d7e2d0470334501
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 13:35:51 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 13:37:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db258b50

app-eselect/eselect-php: Drop old

Package-Manager: portage-2.3.1

 app-eselect/eselect-php/Manifest                   |  4 --
 .../eselect-php/eselect-php-0.7.1-r4.ebuild        | 48 ---------------
 .../eselect-php/eselect-php-0.7.1-r7.ebuild        | 41 -------------
 .../eselect-php/eselect-php-0.8.2-r1.ebuild        | 58 ------------------
 app-eselect/eselect-php/eselect-php-0.8.5.ebuild   | 58 ------------------
 app-eselect/eselect-php/eselect-php-0.9.1.ebuild   | 66 --------------------
 app-eselect/eselect-php/files/70_mod_php.conf      | 26 --------
 .../eselect-php/files/70_mod_php5.conf-apache2-r1  | 18 ------
 app-eselect/eselect-php/files/php-fpm-r1.init      | 50 ----------------
 app-eselect/eselect-php/files/php-fpm.init-r4      | 70 ----------------------
 app-eselect/eselect-php/files/php-fpm_at.service   | 14 -----
 11 files changed, 453 deletions(-)

diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
index be9c960..ca18cbf 100644
--- a/app-eselect/eselect-php/Manifest
+++ b/app-eselect/eselect-php/Manifest
@@ -1,5 +1 @@
-DIST eselect-php-0.7.1.bz2 2251 SHA256 10aa400e2d08bc71989366993f12ddb546a0ea29f191c40e37beba1d11d7abd7 SHA512 a6b4c1475dda9f368d799db7658c50cef7d6f71482a53a186fb1394e7ea1fff3c0ef123c82b7ca4d1e45aadb0a034d36f213fc9450766878a60d28639761cb3d WHIRLPOOL a4e45492068616ff30fd888b0cc64441a6eb6e6656e0107d00bd2cf15360dce15052d4d62089ab89d43e6bb36e126529aa101c70e8bd94a9fc916a5369463e3b
-DIST eselect-php-0.8.2.tar.xz 51832 SHA256 3601d0612a19ccc1c5146be2c8cd7df955a37c517817ae4f59bb3ead446f5355 SHA512 da1d71affe275d07db7a76fd98fd89ffdea6f671262a615bf4dda5a1bba8d19e5d1a3c8afe3f1eb1e70fd71298476a6f0d4e73eba7aafe7555f018f89005bc3d WHIRLPOOL dcc75d93eeaaa85f63f5329491d010debd83ed2a82af0051d59ab4aff639703a6f4c1baa5388ed2a8867d6ab610740d5a1ac86d28cddb0de5be47872ada040b4
-DIST eselect-php-0.8.5.tar.xz 45800 SHA256 73b1dfab538dad971644ae9542e311cd9160e5dff3947086fc7691f0fedb835d SHA512 dbb97ddca2cd031e57e1efccc2a92dcb7aa3c4a4813c72dc5ad688b8e32e4e2ec8083781c450e9c439a9e70f04c26249e335a4eb814ac944dfc6e2d06ca724f6 WHIRLPOOL 00d8a1b6e065962105b704e8a6ab806c6f8181a4ec4c266902854ce61cb4532063412449c623ea7288e49dd64c4a8b762b9771abb89664071ff81b7b9728a8e5
-DIST eselect-php-0.9.1.tar.xz 47548 SHA256 0c9768c9dd361dd3910f26e11956fc2121467ab56c52ba80d7620b1d757bc143 SHA512 bea84b4ae386d60cea2703d1b1c2a91bdc19188dfe151619750a1979dcfbdf2a2ada05d87faa7e0f371ab003e05be6fc7dd15f96459ae6e998c62e6d5caeb64a WHIRLPOOL 3d74edfa6962942836aa3823e9901b461433ce57f2fcb624eb1652b36245599a1bc076db5cb902b675747f2255f00ac887a5e35859dbcf62279944595ea02d6c
 DIST eselect-php-0.9.2.tar.xz 48356 SHA256 8b2acfccb3d2e3d7cad137fc4306711371ebd544cbcdad8e9d46c5dacf8ed889 SHA512 ebf4c9039aaa3ffad79dee181b5cd77f144a4b1b49d80291b290377b7ca5a9618d8b18922f0624e646c4d80266c58199bb936a7b8dd5d2e2bdc296099f583edf WHIRLPOOL 5ca0673a80b5e88522ff1ca82c4b4f842a63439cd47562c72048a4d66dc88d2dcc7070c28c0b8ff50a75bdb1a9056ee5391b37f4dc34cc9eda3652c6791a276c

diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild
deleted file mode 100644
index bb6b500..00000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r4.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-r1" \
-			"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-r7.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r7.ebuild
deleted file mode 100644
index 6937b4a..00000000
--- a/app-eselect/eselect-php/eselect-php-0.7.1-r7.ebuild
+++ /dev/null
@@ -1,41 +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"
-
-# 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() {
-	insinto /usr/share/eselect/modules/
-	newins "eselect-php-${PV}" php.eselect
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.conf-apache2-r1" \
-			"70_mod_php5.conf"
-	fi
-
-	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r4" "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.8.2-r1.ebuild b/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
deleted file mode 100644
index 012e476..00000000
--- a/app-eselect/eselect-php/eselect-php-0.8.2-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2016 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://gitweb.gentoo.org/proj/eselect-php.git/"
-SRC_URI="
-	https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz
-	https://dev.gentoo.org/~grknight/distfiles/${P}.tar.xz
-"
-
-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"
-
-# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
-RDEPEND="app-admin/eselect
-	apache2? ( www-servers/apache[apache2_modules_dir] )"
-
-want_apache
-
-src_install() {
-	default
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		doins "${FILESDIR}/70_mod_php.conf"
-		newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
-	fi
-
-	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}
-
-pkg_postinst() {
-	if use apache2 ; then
-		elog
-		elog "If you are upgrading, be warned that our mod_php configuration"
-		elog "file has changed! You should now define -DPHP for the apache2"
-		elog "daemon, and inspect the new 70_mod_php.conf which has been"
-		elog "installed. Module loading involves eselect as of this version."
-		elog
-		elog "You must run eselect at least once to choose your apache2 target"
-		elog "before the new configuration will work. Afterwards, and after you"
-		elog "have reviewed your new configuration, you are advised to remove"
-		elog "the obsolete 70_mod_php5.conf file."
-		elog
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.8.5.ebuild b/app-eselect/eselect-php/eselect-php-0.8.5.ebuild
deleted file mode 100644
index 012e476..00000000
--- a/app-eselect/eselect-php/eselect-php-0.8.5.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2016 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://gitweb.gentoo.org/proj/eselect-php.git/"
-SRC_URI="
-	https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz
-	https://dev.gentoo.org/~grknight/distfiles/${P}.tar.xz
-"
-
-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"
-
-# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
-RDEPEND="app-admin/eselect
-	apache2? ( www-servers/apache[apache2_modules_dir] )"
-
-want_apache
-
-src_install() {
-	default
-
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		doins "${FILESDIR}/70_mod_php.conf"
-		newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
-	fi
-
-	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}
-
-pkg_postinst() {
-	if use apache2 ; then
-		elog
-		elog "If you are upgrading, be warned that our mod_php configuration"
-		elog "file has changed! You should now define -DPHP for the apache2"
-		elog "daemon, and inspect the new 70_mod_php.conf which has been"
-		elog "installed. Module loading involves eselect as of this version."
-		elog
-		elog "You must run eselect at least once to choose your apache2 target"
-		elog "before the new configuration will work. Afterwards, and after you"
-		elog "have reviewed your new configuration, you are advised to remove"
-		elog "the obsolete 70_mod_php5.conf file."
-		elog
-	fi
-}

diff --git a/app-eselect/eselect-php/eselect-php-0.9.1.ebuild b/app-eselect/eselect-php/eselect-php-0.9.1.ebuild
deleted file mode 100644
index 9d0ddde..00000000
--- a/app-eselect/eselect-php/eselect-php-0.9.1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit depend.apache 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
-	https://dev.gentoo.org/~grknight/distfiles/${P}.tar.xz
-"
-
-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"
-
-# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
-RDEPEND="app-admin/eselect
-	apache2? ( www-servers/apache[apache2_modules_dir] )"
-
-want_apache
-
-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.
-	econf --localstatedir="${EPREFIX}"/var $(use_enable apache2)
-}
-
-src_install() {
-	default
-
-	# After a while, this can go, along with the want_apache call and
-	# depend.apache eclass.
-	if use apache2 ; then
-		insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
-		newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
-	fi
-
-	if use fpm ; then
-		newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
-		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
-		exeinto /usr/libexec
-		doexe "${FILESDIR}/php-fpm-launcher"
-	fi
-}
-
-pkg_postinst() {
-	if use apache2 ; then
-		elog
-		elog "If you are upgrading, be warned that our mod_php configuration"
-		elog "file has changed! You should now define -DPHP for the apache2"
-		elog "daemon, and inspect the new 70_mod_php.conf which has been"
-		elog "installed. Module loading involves eselect as of this version."
-		elog
-		elog "You must run eselect at least once to choose your apache2 target"
-		elog "before the new configuration will work. Afterwards, and after you"
-		elog "have reviewed your new configuration, you are advised to remove"
-		elog "the obsolete 70_mod_php5.conf file."
-		elog
-	fi
-}

diff --git a/app-eselect/eselect-php/files/70_mod_php.conf b/app-eselect/eselect-php/files/70_mod_php.conf
deleted file mode 100644
index cf996fa..00000000
--- a/app-eselect/eselect-php/files/70_mod_php.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-<IfDefine PHP>
-	# The mod_php.so symlink is controlled by
-	# eselect-php. However, the module name changed from
-	# php5_module to php7_module so we can't blindly load whatever
-	# is there. Instead we let eselect-php manage a small
-	# configuration file that loads the appropriate module.
-	#
-	# This is relative to ServerRoot (see httpd.conf).
-	Include ../../../var/lib/eselect-php/mod_php.conf
-
-	# Tell apache that mod_php should handle PHP files.
-	#
-	# NOTE: Avoiding AddHandler/AddType for security (bug
-	# #538822). Please read the related news item!
-	<FilesMatch "\.(php|php[57]|phtml)$">
-		SetHandler application/x-httpd-php
-	</FilesMatch>
-
-	# PHP source files which are meant to be displayed as
-	# syntax-highlighted source code.
-	<FilesMatch "\.phps$">
-		SetHandler application/x-httpd-php-source
-	</FilesMatch>
-
-	DirectoryIndex index.php index.phtml
-</IfDefine>

diff --git a/app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1 b/app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1
deleted file mode 100644
index 05deeb6..00000000
--- a/app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1
+++ /dev/null
@@ -1,18 +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
-	# NOTE: Avoiding AddHandler/AddType for security (bug #538822)
-	# NOTE: Please read the related news item!
-	<FilesMatch "\.(php|php5|phtml)$">
-		SetHandler application/x-httpd-php
-	</FilesMatch>
-	<FilesMatch "\.phps$">
-		SetHandler application/x-httpd-php-source
-	</FilesMatch>
-
-	DirectoryIndex index.php index.phtml
-</IfDefine>

diff --git a/app-eselect/eselect-php/files/php-fpm-r1.init b/app-eselect/eselect-php/files/php-fpm-r1.init
deleted file mode 100644
index 54c8e98..00000000
--- a/app-eselect/eselect-php/files/php-fpm-r1.init
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/sbin/openrc-run
-
-set_phpvars() {
-	PHPSLOT=${SVCNAME#php-fpm-}
-	PHP_FPM_PID="/run/php-fpm-${PHPSLOT}.pid"
-	if [ ${PHPSLOT} = 'php-fpm' ] ; then
-		PHPSLOT="$(eselect php show fpm)"
-		PHP_FPM_PID="/run/php-fpm.pid"
-	fi
-
-	PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
-}
-
-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 $?
-}

diff --git a/app-eselect/eselect-php/files/php-fpm.init-r4 b/app-eselect/eselect-php/files/php-fpm.init-r4
deleted file mode 100644
index 6502ab9..00000000
--- a/app-eselect/eselect-php/files/php-fpm.init-r4
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/sbin/openrc-run
-
-extra_started_commands="reload"
-extra_commands="configtest"
-
-set_phpvars() {
-	PHPSLOT="${SVCNAME#php-fpm-}"
-	PHP_FPM_PID="/run/php-fpm-${PHPSLOT}.pid"
-	if [ "${PHPSLOT}" = "php-fpm" ] ; then
-		PHPSLOT="$(eselect php show fpm)"
-		PHP_FPM_PID="/run/php-fpm.pid"
-	fi
-
-	PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
-	PHP_FPM_BIN="/usr/lib/${PHPSLOT}/bin/php-fpm"
-}
-
-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}" \
-			  --exec "${PHP_FPM_BIN}" \
-			  -- \
-			  --fpm-config "${PHP_FPM_CONF}" \
-			  --pid "${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 "${PHP_FPM_BIN}" \
-			  --pidfile "${PHP_FPM_PID}"
-        eend $?
-}
-
-reload() {
-    configtest || return $?
-    ebegin "Reloading PHP FastCGI Process Manager"
-    set_phpvars
-    [ -f "${PHP_FPM_PID}" ] && kill -USR2 $(cat "${PHP_FPM_PID}")
-    eend $?
-}
-
-configtest() {
-    ebegin "Testing PHP FastCGI Process Manager configuration"
-    set_phpvars
-    # 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
-}

diff --git a/app-eselect/eselect-php/files/php-fpm_at.service b/app-eselect/eselect-php/files/php-fpm_at.service
deleted file mode 100644
index 152c1ab..00000000
--- a/app-eselect/eselect-php/files/php-fpm_at.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=The PHP FastCGI Process Manager
-After=network.target
-
-[Service]
-Type=notify
-PIDFile=/run/php-fpm/php-fpm-%I.pid
-ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
-ExecReload=/bin/kill -USR2 $MAINPID
-PrivateTmp=true
-
-[Install]
-WantedBy=multi-user.target
-


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2017-07-11 14:43 Brian Evans
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Evans @ 2017-07-11 14:43 UTC (permalink / raw
  To: gentoo-commits

commit:     21edd6ec86951ac1b5b6e43d9710d21498d300ce
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 11 14:43:12 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 14:43:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21edd6ec

app-eselect/eselect-php: Add live version for testing

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 app-eselect/eselect-php/eselect-php-9999.ebuild   | 66 +++++++++++++++++++++++
 app-eselect/eselect-php/files/php-fpm-launcher-r1 |  9 ++++
 2 files changed, 75 insertions(+)

diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild
new file mode 100644
index 00000000000..bbb40ca5261
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-9999.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd git-r3 autotools
+
+DESCRIPTION="PHP eselect module"
+HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
+EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect-php.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="fpm apache2"
+
+# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
+RDEPEND="app-admin/eselect
+	sys-apps/gentoo-functions
+	apache2? ( www-servers/apache[apache2_modules_dir] )"
+
+src_prepare() {
+	eapply_user
+	eautoreconf
+}
+
+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.
+	econf --localstatedir="${EPREFIX}"/var $(use_enable apache2)
+}
+
+src_install() {
+	default
+	[[ -f "${D}/etc/init.d/php-fpm.example.init" ]] && rm "${D}/etc/init.d/php-fpm.example.init" || die
+	# This can be removed after a while...
+	if use apache2 ; then
+		insinto /etc/apache2/modules.d
+		newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
+	fi
+
+	if use fpm ; then
+		newinitd "doc/php-fpm.example.init" "php-fpm"
+		newconfd "doc/php-fpm.example.conf" "php-fpm"
+		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+		exeinto /usr/libexec
+		newexe "${FILESDIR}/php-fpm-launcher-r1" php-fpm-launcher
+	fi
+}
+
+pkg_postinst() {
+	if use apache2 ; then
+		elog
+		elog "If you are upgrading, be warned that our mod_php configuration"
+		elog "file has changed! You should now define -DPHP for the apache2"
+		elog "daemon, and inspect the new 70_mod_php.conf which has been"
+		elog "installed. Module loading involves eselect as of this version."
+		elog
+		elog "You must run eselect at least once to choose your apache2 target"
+		elog "before the new configuration will work. Afterwards, and after you"
+		elog "have reviewed your new configuration, you are advised to remove"
+		elog "the obsolete 70_mod_php5.conf file."
+		elog
+	fi
+}

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


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2017-07-29 12:29 Michael Orlitzky
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Orlitzky @ 2017-07-29 12:29 UTC (permalink / raw
  To: gentoo-commits

commit:     79f7e50ba7490e41619feb1bed61f47c8552c8fa
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 29 12:25:37 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jul 29 12:25:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79f7e50b

app-eselect/eselect-php: new revision to fix bashisms.

Thomas Arnett pointed out two bashisms in our php-fpm launcher, and
provided a new script that works with app-shells/dash. This commit
updates the launcher, and revisions the v0.9.4 ebuild to use it. I
fixed the live ebuild while I was at it.

Gentoo-Bug: 626496

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 ...elect-php-0.9.4.ebuild => eselect-php-0.9.4-r1.ebuild} |  2 +-
 app-eselect/eselect-php/eselect-php-9999.ebuild           |  2 +-
 app-eselect/eselect-php/files/php-fpm-launcher-r1         |  9 ---------
 app-eselect/eselect-php/files/php-fpm-launcher-r2         | 15 +++++++++++++++
 4 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/app-eselect/eselect-php/eselect-php-0.9.4.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
similarity index 97%
rename from app-eselect/eselect-php/eselect-php-0.9.4.ebuild
rename to app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
index a05df2fe1bb..4dec17a5418 100644
--- a/app-eselect/eselect-php/eselect-php-0.9.4.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
@@ -45,7 +45,7 @@ src_install() {
 	if use fpm ; then
 		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
 		exeinto /usr/libexec
-		newexe "${FILESDIR}/php-fpm-launcher-r1" php-fpm-launcher
+		newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
 	fi
 }
 

diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild
index 7a707fb1480..f695558d423 100644
--- a/app-eselect/eselect-php/eselect-php-9999.ebuild
+++ b/app-eselect/eselect-php/eselect-php-9999.ebuild
@@ -50,7 +50,7 @@ src_install() {
 	if use fpm ; then
 		systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
 		exeinto /usr/libexec
-		newexe "${FILESDIR}/php-fpm-launcher-r1" php-fpm-launcher
+		newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
 	fi
 }
 

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

diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r2 b/app-eselect/eselect-php/files/php-fpm-launcher-r2
new file mode 100644
index 00000000000..db07a1352d8
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r2
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -o errexit
+
+. /lib/gentoo/functions.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/$(get_libdir)/${PHP_SLOT}/bin/php-fpm" "${@}"


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2017-08-01 18:27 Brian Evans
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Evans @ 2017-08-01 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     1de18f760e199383f55d8ef3e80017c50f40fe95
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  1 18:27:14 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Aug  1 18:27:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1de18f76

app-eselect/eselect-php: Revbump to remove set call in files/php-fpm-launcher-r2

The "set -o errexit" and "set -e" cause $(get_libdir) to fail.
Apparently, gentoo-functions does not work properly if this is set.

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../{eselect-php-0.9.4-r1.ebuild => eselect-php-0.9.4-r2.ebuild}        | 0
 app-eselect/eselect-php/files/php-fpm-launcher-r2                       | 2 --
 2 files changed, 2 deletions(-)

diff --git a/app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild
similarity index 100%
rename from app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
rename to app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild

diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r2 b/app-eselect/eselect-php/files/php-fpm-launcher-r2
index db07a1352d8..3a6b2720fa6 100644
--- a/app-eselect/eselect-php/files/php-fpm-launcher-r2
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r2
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-set -o errexit
-
 . /lib/gentoo/functions.sh
 
 # If there are no arguments, then "shift" will fail (bug 626496).


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

* [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
@ 2017-12-10 22:02 Craig Andrews
  0 siblings, 0 replies; 8+ messages in thread
From: Craig Andrews @ 2017-12-10 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     bbd39788128eeb5fe16a41f55c7da8ce5c0808e2
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 21:05:33 2017 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 22:02:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd39788

app-eselect/eselect-php: do not use get_libdir in php-fpm-launcher

Closes: https://bugs.gentoo.org/640460
Package-Manager: Portage-2.3.17, Repoman-2.3.6

 ...eselect-php-9999.ebuild => eselect-php-0.9.4-r3.ebuild} | 14 +++++---------
 app-eselect/eselect-php/eselect-php-9999.ebuild            |  3 ++-
 app-eselect/eselect-php/files/php-fpm-launcher-r3          | 11 +++++++++++
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild
similarity index 82%
copy from app-eselect/eselect-php/eselect-php-9999.ebuild
copy to app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild
index f695558d423..9d383514ec4 100644
--- a/app-eselect/eselect-php/eselect-php-9999.ebuild
+++ b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild
@@ -3,15 +3,15 @@
 
 EAPI=6
 
-inherit systemd git-r3 autotools
+inherit systemd
 
 DESCRIPTION="PHP eselect module"
 HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
-EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect-php.git"
+SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 IUSE="fpm apache2"
 
 # The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
@@ -19,11 +19,6 @@ RDEPEND="app-admin/eselect
 	apache2? ( www-servers/apache[apache2_modules_dir] )
 	fpm? ( sys-apps/gentoo-functions )"
 
-src_prepare() {
-	eapply_user
-	eautoreconf
-}
-
 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
@@ -49,8 +44,9 @@ src_install() {
 
 	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
-		newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
+		doexe "${T}"/php-fpm-launcher
 	fi
 }
 

diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild
index f695558d423..a8aa5bb8f4a 100644
--- a/app-eselect/eselect-php/eselect-php-9999.ebuild
+++ b/app-eselect/eselect-php/eselect-php-9999.ebuild
@@ -49,8 +49,9 @@ src_install() {
 
 	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
-		newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
+		doexe "${T}"/php-fpm-launcher
 	fi
 }
 

diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r3 b/app-eselect/eselect-php/files/php-fpm-launcher-r3
new file mode 100644
index 00000000000..a2b6eabc4da
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r3
@@ -0,0 +1,11 @@
+#!/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" "${@}"


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

end of thread, other threads:[~2017-12-10 22:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 13:37 [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/ Brian Evans
  -- strict thread matches above, loose matches on Subject: below --
2017-12-10 22:02 Craig Andrews
2017-08-01 18:27 Brian Evans
2017-07-29 12:29 Michael Orlitzky
2017-07-11 14:43 Brian Evans
2016-01-05 19:16 Michael Orlitzky
2015-12-11  1:08 Michael Orlitzky
2015-11-19 23:33 Michael Orlitzky

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