Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
@ 2014-10-11 17:49 Yann E. MORIN
  2014-10-12  9:57 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2014-10-11 17:49 UTC (permalink / raw)
  To: buildroot

Not all our shells do install a pointer to /bin/sh. Besides, between
those that do and multiple ones are enabled, the last one to install
wins the the symlink.

Add a new config choice in the system sub-menu that allows the user to
explicitly select the shell to provide /bin/sh.

Remove the symlink creation from bash.mk at the same time.

Note: for every shell, we select them, except busybox, on which we
depend, on the assumption that we do not want to force busybox in case
the user decided not to enable it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/bash/bash.mk |  1 -
 system/Config.in     | 43 +++++++++++++++++++++++++++++++++++++++++++
 system/system.mk     | 12 ++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 6510af5..34a3a73 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -35,7 +35,6 @@ define BASH_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
 		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
 	rm -f $(TARGET_DIR)/bin/bashbug
-	ln -sf bash $(TARGET_DIR)/bin/sh
 endef
 
 $(eval $(autotools-package))
diff --git a/system/Config.in b/system/Config.in
index e7e146a..22f37ea 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -211,6 +211,49 @@ config BR2_TARGET_GENERIC_ROOT_PASSWD
 	  in the build log! Avoid using a valuable password if either the
 	  .config file or the build log may be distributed!
 
+choice
+	bool "/bin/sh"
+	help
+	  Select which shell will provide /bin/sh.
+
+# busybox has shells that work on noMMU
+config BR2_SYSTEM_BIN_SH_BUSYBOX
+	bool "busybox' default shell"
+	depends on BR2_PACKAGE_BUSYBOX
+
+config BR2_SYSTEM_BIN_SH_BASH
+	bool "bash"
+	depends on BR2_USE_MMU # bash
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_BASH
+
+config BR2_SYSTEM_BIN_SH_DASH
+	bool "dash"
+	depends on BR2_USE_MMU # dash
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_DASH
+
+config BR2_SYSTEM_BIN_SH_ZSH
+	bool "zsh"
+	depends on BR2_USE_MMU # zsh
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_ZSH
+
+comment "bash, dash, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
+	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS && BR2_PACKAGE_BUSYBOX
+
+config BR2_SYSTEM_BIN_SH_NONE
+	bool "none"
+
+endchoice # /bin/sh
+
+config BR2_SYSTEM_BIN_SH
+	string
+	default "/bin/busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
+	default "/bin/bash"    if BR2_SYSTEM_BIN_SH_BASH
+	default "/bin/dash"    if BR2_SYSTEM_BIN_SH_DASH
+	default "/bin/zsh"     if BR2_SYSTEM_BIN_SH_ZSH
+
 config BR2_TARGET_GENERIC_GETTY
 	bool "Run a getty (login prompt) after boot"
 	default y
diff --git a/system/system.mk b/system/system.mk
index b614615..5802e2d 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -2,6 +2,7 @@ TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
 TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE))
 TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD))
 TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD))
+TARGET_GENERIC_BIN_SH = $(call qstrip,$(BR2_SYSTEM_BIN_SH))
 TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
 TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
 TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
@@ -46,6 +47,17 @@ define SYSTEM_ROOT_PASSWD
 endef
 TARGET_FINALIZE_HOOKS += SYSTEM_ROOT_PASSWD
 
+ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y)
+define SYSTEM_BIN_SH
+	rm -f $(TARGET_DIR)/bin/sh
+endef
+else
+define SYSTEM_BIN_SH
+	ln -sf $(TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh
+endef
+endif
+TARGET_FINALIZE_HOOKS += SYSTEM_BIN_SH
+
 ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
 ifeq ($(BR2_PACKAGE_SYSVINIT),y)
 # In sysvinit inittab, the "id" must not be longer than 4 bytes, so we
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
  2014-10-11 17:49 [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to Yann E. MORIN
@ 2014-10-12  9:57 ` Peter Korsgaard
  2014-10-12 13:15   ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2014-10-12  9:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Not all our shells do install a pointer to /bin/sh. Besides, between
 > those that do and multiple ones are enabled, the last one to install
 > wins the the symlink.

 > Add a new config choice in the system sub-menu that allows the user to
 > explicitly select the shell to provide /bin/sh.

 > Remove the symlink creation from bash.mk at the same time.

 > Note: for every shell, we select them, except busybox, on which we
 > depend, on the assumption that we do not want to force busybox in case
 > the user decided not to enable it.

But we default to BR2_INIT_BUSYBOX, so you still need to go into the
system menu and disable that before you can deselect busybox.

Another issue with the 'depends on' is that if you disable busybox the
choice then jumps to the next option which pulls in bash (which might
not really be what you want when you try to save space by disabling
busybox).

So I think it is better to use selects everywhere.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
 > ---
 >  package/bash/bash.mk |  1 -
 >  system/Config.in     | 43 +++++++++++++++++++++++++++++++++++++++++++
 >  system/system.mk     | 12 ++++++++++++
 >  3 files changed, 55 insertions(+), 1 deletion(-)

 > diff --git a/package/bash/bash.mk b/package/bash/bash.mk
 > index 6510af5..34a3a73 100644
 > --- a/package/bash/bash.mk
 > +++ b/package/bash/bash.mk
 > @@ -35,7 +35,6 @@ define BASH_INSTALL_TARGET_CMDS
 >  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
 >  		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
 >  	rm -f $(TARGET_DIR)/bin/bashbug
 > -	ln -sf bash $(TARGET_DIR)/bin/sh
 >  endef
 
 >  $(eval $(autotools-package))
 > diff --git a/system/Config.in b/system/Config.in
 > index e7e146a..22f37ea 100644
 > --- a/system/Config.in
 > +++ b/system/Config.in
 > @@ -211,6 +211,49 @@ config BR2_TARGET_GENERIC_ROOT_PASSWD
 >  	  in the build log! Avoid using a valuable password if either the
 >  	  .config file or the build log may be distributed!
 
 > +choice
 > +	bool "/bin/sh"
 > +	help
 > +	  Select which shell will provide /bin/sh.
 > +
 > +# busybox has shells that work on noMMU
 > +config BR2_SYSTEM_BIN_SH_BUSYBOX
 > +	bool "busybox' default shell"
 > +	depends on BR2_PACKAGE_BUSYBOX
 > +
 > +config BR2_SYSTEM_BIN_SH_BASH
 > +	bool "bash"
 > +	depends on BR2_USE_MMU # bash
 > +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX

You arguably don't need the || !BR2_PACKAGE_BUSYBOX as we do a trick and
make BR2_PACKAGE_BUSYBOX_SHOW_OTHERS a hidden symbol (=y) when busybox
isn't enabled.

With that said, it doesn't actually work when I change the busybox
option to use select:

system/Config.in:214:error: recursive dependency detected!
system/Config.in:214:   choice <choice> contains symbol BR2_SYSTEM_BIN_SH_BASH
system/Config.in:224:   symbol BR2_SYSTEM_BIN_SH_BASH depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/busybox/Config.in:23:   symbol BR2_PACKAGE_BUSYBOX_SHOW_OTHERS depends on BR2_PACKAGE_BUSYBOX
package/busybox/Config.in:1:    symbol BR2_PACKAGE_BUSYBOX is selected by BR2_SYSTEM_BIN_SH_BUSYBOX
system/Config.in:220:   symbol BR2_SYSTEM_BIN_SH_BUSYBOX is part of choice <choice>

Any idea what we can do?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
  2014-10-12  9:57 ` Peter Korsgaard
@ 2014-10-12 13:15   ` Arnout Vandecappelle
  2014-10-12 13:46     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2014-10-12 13:15 UTC (permalink / raw)
  To: buildroot

On 12/10/14 11:57, Peter Korsgaard wrote:
>>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > Not all our shells do install a pointer to /bin/sh. Besides, between
>  > those that do and multiple ones are enabled, the last one to install
>  > wins the the symlink.
> 
>  > Add a new config choice in the system sub-menu that allows the user to
>  > explicitly select the shell to provide /bin/sh.
> 
>  > Remove the symlink creation from bash.mk at the same time.
> 
>  > Note: for every shell, we select them, except busybox, on which we
>  > depend, on the assumption that we do not want to force busybox in case
>  > the user decided not to enable it.
> 
> But we default to BR2_INIT_BUSYBOX, so you still need to go into the
> system menu and disable that before you can deselect busybox.
> 
> Another issue with the 'depends on' is that if you disable busybox the
> choice then jumps to the next option which pulls in bash (which might
> not really be what you want when you try to save space by disabling
> busybox).
> 
> So I think it is better to use selects everywhere.

 I disagree.

 For people who want to avoid busybox, it is already annoying that they have to
change their init system first. Adding more implicit selects of busybox is not
going to make their life easier.

 For the jumping, it's better to fix it by adding a 'default dash if !busybox' line.

 And since busybox is on by default, there is no strong need for a select - if
the user deselects busybox I guess they know what they're doing.

 And also using a depends solves the issue you mention below :-)


 Regards,
 Arnout

> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
>  > ---
>  >  package/bash/bash.mk |  1 -
>  >  system/Config.in     | 43 +++++++++++++++++++++++++++++++++++++++++++
>  >  system/system.mk     | 12 ++++++++++++
>  >  3 files changed, 55 insertions(+), 1 deletion(-)
> 
>  > diff --git a/package/bash/bash.mk b/package/bash/bash.mk
>  > index 6510af5..34a3a73 100644
>  > --- a/package/bash/bash.mk
>  > +++ b/package/bash/bash.mk
>  > @@ -35,7 +35,6 @@ define BASH_INSTALL_TARGET_CMDS
>  >  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
>  >  		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
>  >  	rm -f $(TARGET_DIR)/bin/bashbug
>  > -	ln -sf bash $(TARGET_DIR)/bin/sh
>  >  endef
>  
>  >  $(eval $(autotools-package))
>  > diff --git a/system/Config.in b/system/Config.in
>  > index e7e146a..22f37ea 100644
>  > --- a/system/Config.in
>  > +++ b/system/Config.in
>  > @@ -211,6 +211,49 @@ config BR2_TARGET_GENERIC_ROOT_PASSWD
>  >  	  in the build log! Avoid using a valuable password if either the
>  >  	  .config file or the build log may be distributed!
>  
>  > +choice
>  > +	bool "/bin/sh"
>  > +	help
>  > +	  Select which shell will provide /bin/sh.
>  > +
>  > +# busybox has shells that work on noMMU
>  > +config BR2_SYSTEM_BIN_SH_BUSYBOX
>  > +	bool "busybox' default shell"
>  > +	depends on BR2_PACKAGE_BUSYBOX
>  > +
>  > +config BR2_SYSTEM_BIN_SH_BASH
>  > +	bool "bash"
>  > +	depends on BR2_USE_MMU # bash
>  > +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
> 
> You arguably don't need the || !BR2_PACKAGE_BUSYBOX as we do a trick and
> make BR2_PACKAGE_BUSYBOX_SHOW_OTHERS a hidden symbol (=y) when busybox
> isn't enabled.
> 
> With that said, it doesn't actually work when I change the busybox
> option to use select:
> 
> system/Config.in:214:error: recursive dependency detected!
> system/Config.in:214:   choice <choice> contains symbol BR2_SYSTEM_BIN_SH_BASH
> system/Config.in:224:   symbol BR2_SYSTEM_BIN_SH_BASH depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
> package/busybox/Config.in:23:   symbol BR2_PACKAGE_BUSYBOX_SHOW_OTHERS depends on BR2_PACKAGE_BUSYBOX
> package/busybox/Config.in:1:    symbol BR2_PACKAGE_BUSYBOX is selected by BR2_SYSTEM_BIN_SH_BUSYBOX
> system/Config.in:220:   symbol BR2_SYSTEM_BIN_SH_BUSYBOX is part of choice <choice>
> 
> Any idea what we can do?
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
@ 2014-10-12 13:36 Yann E. MORIN
  2014-10-12 13:51 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2014-10-12 13:36 UTC (permalink / raw)
  To: buildroot

Not all our shells do install a pointer to /bin/sh. Besides, between
those that do and multiple ones are enabled, the last one to install
wins the the symlink.

Add a new config choice in the system sub-menu that allows the user to
explicitly select the shell to provide /bin/sh. If busybox is not
enabled, default to using dash, a POSIX shell.

Remove the symlink creation from bash.mk at the same time.

Note: for every shell, we select them, except busybox, on which we
depend, on the assumption that we do not want to force busybox in case
the user decided not to enable it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Arnout Vandecappelle <arnout@mind.be>

---
Changes v1 -> v2:
  - default to dash if busybox is disabled
---
 package/bash/bash.mk |  1 -
 system/Config.in     | 44 ++++++++++++++++++++++++++++++++++++++++++++
 system/system.mk     | 12 ++++++++++++
 3 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 6510af5..34a3a73 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -35,7 +35,6 @@ define BASH_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
 		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
 	rm -f $(TARGET_DIR)/bin/bashbug
-	ln -sf bash $(TARGET_DIR)/bin/sh
 endef
 
 $(eval $(autotools-package))
diff --git a/system/Config.in b/system/Config.in
index e7e146a..0ca1d03 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -211,6 +211,50 @@ config BR2_TARGET_GENERIC_ROOT_PASSWD
 	  in the build log! Avoid using a valuable password if either the
 	  .config file or the build log may be distributed!
 
+choice
+	bool "/bin/sh"
+	default BR2_SYSTEM_BIN_SH_DASH if !BR2_PACKAGE_BUSYBOX
+	help
+	  Select which shell will provide /bin/sh.
+
+# busybox has shells that work on noMMU
+config BR2_SYSTEM_BIN_SH_BUSYBOX
+	bool "busybox' default shell"
+	depends on BR2_PACKAGE_BUSYBOX
+
+config BR2_SYSTEM_BIN_SH_BASH
+	bool "bash"
+	depends on BR2_USE_MMU # bash
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_BASH
+
+config BR2_SYSTEM_BIN_SH_DASH
+	bool "dash"
+	depends on BR2_USE_MMU # dash
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_DASH
+
+config BR2_SYSTEM_BIN_SH_ZSH
+	bool "zsh"
+	depends on BR2_USE_MMU # zsh
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
+	select BR2_PACKAGE_ZSH
+
+comment "bash, dash, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
+	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS && BR2_PACKAGE_BUSYBOX
+
+config BR2_SYSTEM_BIN_SH_NONE
+	bool "none"
+
+endchoice # /bin/sh
+
+config BR2_SYSTEM_BIN_SH
+	string
+	default "/bin/busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
+	default "/bin/bash"    if BR2_SYSTEM_BIN_SH_BASH
+	default "/bin/dash"    if BR2_SYSTEM_BIN_SH_DASH
+	default "/bin/zsh"     if BR2_SYSTEM_BIN_SH_ZSH
+
 config BR2_TARGET_GENERIC_GETTY
 	bool "Run a getty (login prompt) after boot"
 	default y
diff --git a/system/system.mk b/system/system.mk
index b614615..5802e2d 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -2,6 +2,7 @@ TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
 TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE))
 TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD))
 TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD))
+TARGET_GENERIC_BIN_SH = $(call qstrip,$(BR2_SYSTEM_BIN_SH))
 TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
 TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
 TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
@@ -46,6 +47,17 @@ define SYSTEM_ROOT_PASSWD
 endef
 TARGET_FINALIZE_HOOKS += SYSTEM_ROOT_PASSWD
 
+ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y)
+define SYSTEM_BIN_SH
+	rm -f $(TARGET_DIR)/bin/sh
+endef
+else
+define SYSTEM_BIN_SH
+	ln -sf $(TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh
+endef
+endif
+TARGET_FINALIZE_HOOKS += SYSTEM_BIN_SH
+
 ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
 ifeq ($(BR2_PACKAGE_SYSVINIT),y)
 # In sysvinit inittab, the "id" must not be longer than 4 bytes, so we
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
  2014-10-12 13:15   ` Arnout Vandecappelle
@ 2014-10-12 13:46     ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2014-10-12 13:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> But we default to BR2_INIT_BUSYBOX, so you still need to go into the
 >> system menu and disable that before you can deselect busybox.
 >> 
 >> Another issue with the 'depends on' is that if you disable busybox the
 >> choice then jumps to the next option which pulls in bash (which might
 >> not really be what you want when you try to save space by disabling
 >> busybox).
 >> 
 >> So I think it is better to use selects everywhere.

 >  I disagree.

 >  For people who want to avoid busybox, it is already annoying that they have to
 > change their init system first. Adding more implicit selects of busybox is not
 > going to make their life easier.

 >  For the jumping, it's better to fix it by adding a 'default dash if !busybox' line.

 >  And since busybox is on by default, there is no strong need for a select - if
 > the user deselects busybox I guess they know what they're doing.

 >  And also using a depends solves the issue you mention below :-)

Ok, that's also fine by me.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to
  2014-10-12 13:36 Yann E. MORIN
@ 2014-10-12 13:51 ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2014-10-12 13:51 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Not all our shells do install a pointer to /bin/sh. Besides, between
 > those that do and multiple ones are enabled, the last one to install
 > wins the the symlink.

 > Add a new config choice in the system sub-menu that allows the user to
 > explicitly select the shell to provide /bin/sh. If busybox is not
 > enabled, default to using dash, a POSIX shell.

 > Remove the symlink creation from bash.mk at the same time.

 > Note: for every shell, we select them, except busybox, on which we
 > depend, on the assumption that we do not want to force busybox in case
 > the user decided not to enable it.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
 > Cc: Arnout Vandecappelle <arnout@mind.be>

 > ---
 > Changes v1 -> v2:
 >   - default to dash if busybox is disabled

 > +config BR2_SYSTEM_BIN_SH_BASH
 > +	bool "bash"
 > +	depends on BR2_USE_MMU # bash
 > +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
 > +	select BR2_PACKAGE_BASH
 > +
 > +config BR2_SYSTEM_BIN_SH_DASH
 > +	bool "dash"
 > +	depends on BR2_USE_MMU # dash
 > +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || !BR2_PACKAGE_BUSYBOX
 > +	select BR2_PACKAGE_DASH

You forgot to remove the redundant || !BR2_PACKAGE_BUSYBOX.

Committed with that fixed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-12 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-11 17:49 [Buildroot] [PATCH] [RFC] system: add option to choose what /bin/sh points to Yann E. MORIN
2014-10-12  9:57 ` Peter Korsgaard
2014-10-12 13:15   ` Arnout Vandecappelle
2014-10-12 13:46     ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2014-10-12 13:36 Yann E. MORIN
2014-10-12 13:51 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox