summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-07-29 08:25:37 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-07-29 08:25:37 -0400
commit79f7e50ba7490e41619feb1bed61f47c8552c8fa (patch)
treed9c207e305003861f6f854b74c4f51a907c285e3
parentdev-libs/pkcs11-helper: disable mbetls explicitly (diff)
downloadgentoo-79f7e50ba7490e41619feb1bed61f47c8552c8fa.tar.gz
gentoo-79f7e50ba7490e41619feb1bed61f47c8552c8fa.tar.bz2
gentoo-79f7e50ba7490e41619feb1bed61f47c8552c8fa.zip
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
-rw-r--r--app-eselect/eselect-php/eselect-php-0.9.4-r1.ebuild (renamed from app-eselect/eselect-php/eselect-php-0.9.4.ebuild)2
-rw-r--r--app-eselect/eselect-php/eselect-php-9999.ebuild2
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher-r19
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher-r215
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
index a05df2fe1bb9..4dec17a54184 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 7a707fb14809..f695558d423a 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 c7cc2e983a01..000000000000
--- 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 000000000000..db07a1352d8c
--- /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" "${@}"