diff options
author | 2015-11-23 13:13:21 -0500 | |
---|---|---|
committer | 2015-11-23 13:13:39 -0500 | |
commit | 334ee76ee647bfeec1b0e81986eb94ea016358d8 (patch) | |
tree | d97b1085687653c8ae14a4046bea551f8a67a68e /app-eselect/eselect-php | |
parent | sys-libs/binutils-libs: clarify USE=64-bit-bfd behavior on 64-bit hosts #566636 (diff) | |
download | gentoo-334ee76ee647bfeec1b0e81986eb94ea016358d8.tar.gz gentoo-334ee76ee647bfeec1b0e81986eb94ea016358d8.tar.bz2 gentoo-334ee76ee647bfeec1b0e81986eb94ea016358d8.zip |
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
Diffstat (limited to 'app-eselect/eselect-php')
-rw-r--r-- | app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild (renamed from app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild) | 9 | ||||
-rw-r--r-- | app-eselect/eselect-php/files/php-fpm.init-r3 (renamed from app-eselect/eselect-php/files/php-fpm.init-r2) | 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 index dc2fadc72ba8..cd210279e6b8 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 index 8ce81b984bc4..a1b956ea78e4 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 $? +} |