Re: [OE-core] [PATCH 1/2] bash: use update-alternatives for the bash binary

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 19:50:26 +0100
Andreas Oberritter  wrote:

> Busybox may offer a bash applet. If enabled, the alternatives mechanism
> avoids breaking logins if bash gets deinstalled while /bin/bash is configured
> as a login shell.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-extended/bash/bash.inc | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc 
> b/meta/recipes-extended/bash/bash.inc
> index 1d08526..a05b987 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -14,9 +14,11 @@ EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
>  # This is what other major distros do. And this is what we wanted. See 
> bug#5359 and bug#7137.
>  CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
>  
> -ALTERNATIVE_${PN} = "sh"
> +ALTERNATIVE_${PN} = "bash sh"
> +ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
> +ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
>  ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
> -ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
> +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
>  ALTERNATIVE_PRIORITY = "100"
>  
>  RDEPENDS_${PN} += "base-files"

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] bash: use update-alternatives for the bash binary

2016-12-01 Thread Andreas Oberritter
On 01.12.2016 18:41, Burton, Ross wrote:
> 
> On 30 November 2016 at 18:50, Andreas Oberritter  > wrote:
> 
> Busybox may offer a bash applet. If enabled, the alternatives mechanism
> 
> 
> Wait, what?  busybox can ship a /bin/bash that isn't bash?  That's
> *hideous*!

That's what busybox is all about, isn't it? Shipping things that aren't
the real thing with varying levels of compatibility (think sed, awk,
grep for other tools in busybox that use some kind of interpreted
language). Busybox' ash even supports some bash extensions.

FWIW, using /bin/bash as a login shell with busybox was the easiest way
to get bash-completions working with bash installed in a normal rootfs
(it doesn't work fully in POSIX mode) and get working logins in an
initramfs image at the same time, where bash isn't installed.
/etc/passwd is shared between both images.

Regards,
Andreas

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] bash: use update-alternatives for the bash binary

2016-12-01 Thread Burton, Ross
On 30 November 2016 at 18:50, Andreas Oberritter 
wrote:

> Busybox may offer a bash applet. If enabled, the alternatives mechanism
>

Wait, what?  busybox can ship a /bin/bash that isn't bash?  That's
*hideous*!

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core