Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/, app-eselect/eselect-php/files/
Date: Mon, 23 Nov 2015 18:16:02
Message-Id: 1448302419.334ee76ee647bfeec1b0e81986eb94ea016358d8.mjo@gentoo
1 commit: 334ee76ee647bfeec1b0e81986eb94ea016358d8
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 23 18:13:21 2015 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 23 18:13:39 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=334ee76e
7
8 app-eselect/eselect-php: new revision fixing bugs 508712 and 545652.
9
10 Both the ebuild and the init script have been revisioned. The ebuild
11 was modified to depend on the apache2 mod_dir module (bug 545652), and
12 a configtest() command was added to the init script (bug 508712).
13
14 Thanks to Sebastian Pipping and Igor Filakhtov for the reports and fixes.
15
16 Gentoo-Bug: 508712
17 Gentoo-bug: 545652
18
19 Package-Manager: portage-2.2.20.1
20
21 ...lect-php-0.7.1-r5.ebuild => eselect-php-0.7.1-r6.ebuild} | 9 +++++----
22 .../eselect-php/files/{php-fpm.init-r2 => php-fpm.init-r3} | 13 +++++++++++--
23 2 files changed, 16 insertions(+), 6 deletions(-)
24
25 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
26 similarity index 79%
27 rename from app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
28 rename to app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
29 index dc2fadc..cd21027 100644
30 --- a/app-eselect/eselect-php/eselect-php-0.7.1-r5.ebuild
31 +++ b/app-eselect/eselect-php/eselect-php-0.7.1-r6.ebuild
32 @@ -15,15 +15,16 @@ SLOT="0"
33 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"
34 IUSE="fpm apache2"
35
36 -RDEPEND="app-admin/eselect"
37 +# The "DirectoryIndex" line in 70_mod_php5.conf requires mod_dir.
38 +RDEPEND="app-admin/eselect
39 + apache2? ( www-servers/apache[apache2_modules_dir] )"
40 S="${WORKDIR}"
41
42 want_apache
43
44 src_install() {
45 - mv eselect-php-${PV} php.eselect
46 insinto /usr/share/eselect/modules/
47 - doins php.eselect
48 + newins "eselect-php-${PV}" php.eselect
49
50 if use apache2 ; then
51 insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
52 @@ -32,7 +33,7 @@ src_install() {
53 fi
54
55 if use fpm ; then
56 - newinitd "${FILESDIR}/php-fpm.init-r2" "php-fpm"
57 + newinitd "${FILESDIR}/php-fpm.init-r3" "php-fpm"
58 systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
59 exeinto /usr/libexec
60 doexe "${FILESDIR}/php-fpm-launcher"
61
62 diff --git a/app-eselect/eselect-php/files/php-fpm.init-r2 b/app-eselect/eselect-php/files/php-fpm.init-r3
63 similarity index 78%
64 rename from app-eselect/eselect-php/files/php-fpm.init-r2
65 rename to app-eselect/eselect-php/files/php-fpm.init-r3
66 index 8ce81b9..a1b956e 100644
67 --- a/app-eselect/eselect-php/files/php-fpm.init-r2
68 +++ b/app-eselect/eselect-php/files/php-fpm.init-r3
69 @@ -1,6 +1,7 @@
70 #!/sbin/openrc-run
71
72 extra_started_commands="reload"
73 +extra_commands="configtest"
74
75 set_phpvars() {
76 PHPSLOT="${SVCNAME#php-fpm-}"
77 @@ -11,13 +12,14 @@ set_phpvars() {
78 fi
79
80 PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
81 + PHP_FPM_BIN="/usr/lib/${PHPSLOT}/bin/php-fpm"
82 }
83
84 start() {
85 ebegin "Starting PHP FastCGI Process Manager"
86 set_phpvars
87 start-stop-daemon --start --pidfile "${PHP_FPM_PID}" \
88 - --exec "/usr/lib/${PHPSLOT}/bin/php-fpm" \
89 + --exec "${PHP_FPM_BIN}" \
90 -- \
91 --fpm-config "${PHP_FPM_CONF}" \
92 --pid "${PHP_FPM_PID}"
93 @@ -37,7 +39,7 @@ stop() {
94 set_phpvars
95 start-stop-daemon --signal QUIT \
96 --stop \
97 - --exec "/usr/lib/${PHPSLOT}/bin/php-fpm" \
98 + --exec "${PHP_FPM_BIN}" \
99 --pidfile "${PHP_FPM_PID}"
100 eend $?
101 }
102 @@ -48,3 +50,10 @@ reload() {
103 [ -f "${PHP_FPM_PID}" ] && kill -USR2 $(cat "${PHP_FPM_PID}")
104 eend $?
105 }
106 +
107 +configtest() {
108 + ebegin "Testing PHP FastCGI Process Manager configuration"
109 + set_phpvars
110 + "${PHP_FPM_BIN}" --fpm-config "${PHP_FPM_CONF}" --test
111 + eend $?
112 +}