From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 31 May 2024 08:09:07 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sCvRr-000EpA-1c for lore@lore.pengutronix.de; Fri, 31 May 2024 08:09:07 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sCvRq-00069W-80; Fri, 31 May 2024 08:09:06 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sCvRG-0005SW-Fd; Fri, 31 May 2024 08:08:30 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCvRG-003h47-37; Fri, 31 May 2024 08:08:30 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sCvRG-00F6H1-0A; Fri, 31 May 2024 08:08:30 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 31 May 2024 08:08:30 +0200 Message-Id: <20240531060830.3599028-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240513132247.25521-3-abbotti@mev.co.uk> References: <20240513132247.25521-3-abbotti@mev.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] bash: allow installation of /usr/bin/sh symlink to be chosen manually X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Ian Abbott Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 2b2bc8abf7ef1d4000c02a18b0a573948f6f5138. Michael [sent from post-receive hook] On Fri, 31 May 2024 08:08:29 +0200, Ian Abbott wrote: > It is possible for any of BusyBox, Dash, or Bash to install the > /usr/bin/sh symbolic link. Only allow BASH_SH to be enabled if the > symbolic link is not being installed by either BusyBox or Dash (unless > overridden by ALLYES). Default to enabled if the link is not being > installed by BusyBox or Dash. Also allow it to be manually disabled. > > Rationale: It is common for Bash to be installed as an interactive login > shell, but to use something lighter and faster for non-interactive use. > Shell scripts typically use /bin/sh as the interpreter selected by the > "shebang" line. > > Signed-off-by: Ian Abbott > Message-Id: <20240513132247.25521-3-abbotti@mev.co.uk> > [mol: simplify 'default'] > Signed-off-by: Michael Olbrich > > diff --git a/rules/bash.in b/rules/bash.in > index 3b3dd845d4e2..0f8f33f82499 100644 > --- a/rules/bash.in > +++ b/rules/bash.in > @@ -262,8 +262,20 @@ config BASH_CURSES > bool > prompt "Use libcurses instead of libtermcap" > > +comment "BusyBox sh is selected" > + depends on BUSYBOX && !BUSYBOX_SH_IS_NONE > + > +comment "Dash sh is selected" > + depends on DASH_LINK_SH > + > config BASH_SH > bool > - default BUSYBOX = n || BUSYBOX_SH_IS_NONE > + depends on (!BUSYBOX || BUSYBOX_SH_IS_NONE) && !DASH_LINK_SH || ALLYES > + default y > + prompt "link to /bin/sh" > + help > + Create a link symbolic link "/usr/bin/sh" ("/bin/sh") to > + "bash". Select this to use bash as the interpreter for Bourne > + shell scripts using the canonical "#!/bin/sh" shebang line. > > endif