commit:     17396129fb1b0d449d623f8519efc511ba0b97bf
Author:     William Hubbs <william.hubbs <AT> sony <DOT> com>
AuthorDate: Thu Feb 14 00:42:03 2019 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 00:43:52 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17396129

sys-apps/openrc: Add bash use flag

This experimentally allows service scripts to be written so that their
internal code is in bash. However, the OpenRC base code will stay in
posix sh, so it must be interfaced with using posix conventions.

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 sys-apps/openrc/metadata.xml       | 3 +++
 sys-apps/openrc/openrc-9999.ebuild | 8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sys-apps/openrc/metadata.xml b/sys-apps/openrc/metadata.xml
index def83720556..74ac5c680da 100644
--- a/sys-apps/openrc/metadata.xml
+++ b/sys-apps/openrc/metadata.xml
@@ -6,6 +6,9 @@
                <name>Gentoo OpenRC Project</name>
        </maintainer>
        <use>
+               <flag name="bash">
+                       enable the use of bash in service scripts (experimental)
+               </flag>
                <flag name="netifrc">enable Gentoo's network stack (net.* 
scripts)</flag>
                <flag name="newnet">enable the new network stack 
(experimental)</flag>
        </use>

diff --git a/sys-apps/openrc/openrc-9999.ebuild 
b/sys-apps/openrc/openrc-9999.ebuild
index 60351506941..1ad60296587 100644
--- a/sys-apps/openrc/openrc-9999.ebuild
+++ b/sys-apps/openrc/openrc-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -18,7 +18,7 @@ fi
 
 LICENSE="BSD-2"
 SLOT="0"
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+IUSE="audit bash debug ncurses pam newnet prefix +netifrc selinux static-libs
        unicode kernel_linux kernel_FreeBSD"
 
 COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc 
sys-process/fuser-bsd ) )
@@ -40,6 +40,7 @@ COMMON_DEPEND="kernel_FreeBSD? ( || ( 
>=sys-freebsd/freebsd-ubin-9.0_rc sys-proc
        !<sys-fs/udev-init-scripts-27"
 DEPEND="${COMMON_DEPEND}
        virtual/os-headers
+       bash? ( app-shells/bash )
        ncurses? ( virtual/pkgconfig )"
 RDEPEND="${COMMON_DEPEND}
        !prefix? (
@@ -79,7 +80,8 @@ src_compile() {
                MKAUDIT=$(usex audit)
                MKPAM=$(usev pam)
                MKSTATICLIBS=$(usex static-libs)
-               MKZSHCOMP=yes"
+               MKZSHCOMP=yes
+               SH=$(usex bash /bin/bash /bin/sh)"
 
        local brand="Unknown"
        if use kernel_linux ; then

Reply via email to