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/files/, app-eselect/eselect-php/
Date: Sat, 29 Jul 2017 12:29:29
Message-Id: 1501331137.79f7e50ba7490e41619feb1bed61f47c8552c8fa.mjo@gentoo
1 commit: 79f7e50ba7490e41619feb1bed61f47c8552c8fa
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 29 12:25:37 2017 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 29 12:25:37 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79f7e50b
7
8 app-eselect/eselect-php: new revision to fix bashisms.
9
10 Thomas Arnett pointed out two bashisms in our php-fpm launcher, and
11 provided a new script that works with app-shells/dash. This commit
12 updates the launcher, and revisions the v0.9.4 ebuild to use it. I
13 fixed the live ebuild while I was at it.
14
15 Gentoo-Bug: 626496
16
17 Package-Manager: Portage-2.3.6, Repoman-2.3.1
18
19 ...elect-php-0.9.4.ebuild => eselect-php-0.9.4-r1.ebuild} | 2 +-
20 app-eselect/eselect-php/eselect-php-9999.ebuild | 2 +-
21 app-eselect/eselect-php/files/php-fpm-launcher-r1 | 9 ---------
22 app-eselect/eselect-php/files/php-fpm-launcher-r2 | 15 +++++++++++++++
23 4 files changed, 17 insertions(+), 11 deletions(-)
24
25 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
26 similarity index 97%
27 rename from app-eselect/eselect-php/eselect-php-0.9.4.ebuild
28 rename to app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
29 index a05df2fe1bb..4dec17a5418 100644
30 --- a/app-eselect/eselect-php/eselect-php-0.9.4.ebuild
31 +++ b/app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild
32 @@ -45,7 +45,7 @@ src_install() {
33 if use fpm ; then
34 systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
35 exeinto /usr/libexec
36 - newexe "${FILESDIR}/php-fpm-launcher-r1" php-fpm-launcher
37 + newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
38 fi
39 }
40
41
42 diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild
43 index 7a707fb1480..f695558d423 100644
44 --- a/app-eselect/eselect-php/eselect-php-9999.ebuild
45 +++ b/app-eselect/eselect-php/eselect-php-9999.ebuild
46 @@ -50,7 +50,7 @@ src_install() {
47 if use fpm ; then
48 systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
49 exeinto /usr/libexec
50 - newexe "${FILESDIR}/php-fpm-launcher-r1" php-fpm-launcher
51 + newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
52 fi
53 }
54
55
56 diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r1 b/app-eselect/eselect-php/files/php-fpm-launcher-r1
57 deleted file mode 100644
58 index c7cc2e983a0..00000000000
59 --- a/app-eselect/eselect-php/files/php-fpm-launcher-r1
60 +++ /dev/null
61 @@ -1,9 +0,0 @@
62 -#!/bin/sh
63 -
64 -source /lib/gentoo/functions.sh
65 -
66 -PHPSLOT="${1}"
67 -[ -z "${PHPSLOT}" ] && PHPSLOT="$(eselect php show fpm)"
68 -shift
69 -
70 -exec /usr/$(get_libdir)/${PHPSLOT}/bin/php-fpm "${@}"
71
72 diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r2 b/app-eselect/eselect-php/files/php-fpm-launcher-r2
73 new file mode 100644
74 index 00000000000..db07a1352d8
75 --- /dev/null
76 +++ b/app-eselect/eselect-php/files/php-fpm-launcher-r2
77 @@ -0,0 +1,15 @@
78 +#!/bin/sh
79 +
80 +set -o errexit
81 +
82 +. /lib/gentoo/functions.sh
83 +
84 +# If there are no arguments, then "shift" will fail (bug 626496).
85 +if [ $# -eq 0 ]; then
86 + PHP_SLOT=$(eselect php show fpm)
87 +else
88 + PHP_SLOT=$1
89 + shift
90 +fi
91 +
92 +exec "/usr/$(get_libdir)/${PHP_SLOT}/bin/php-fpm" "${@}"