Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path
@ 2015-06-16 20:42 Matthew Starr
  2015-06-16 21:28 ` Yann E. MORIN
  2015-06-21  7:37 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Matthew Starr @ 2015-06-16 20:42 UTC (permalink / raw)
  To: buildroot

The symlink created by buildroot for /bin/sh is the full path to
a shell.  This does not match what busybox and other Linux
distributions do with using relative path symlinks. When handling
files on the host system this will point to the host system's shell
if present and not the target shell.

This is fixed by changing the /bin/sh symlink to use relative a path
since both files are in the same directory.

This was reported as Bug #8161 at bugs.busybox.net

Signed-off-by: Matthew Starr <mstarr@hedonline.com>
---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 84cde94..15f0515 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -236,10 +236,10 @@ 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
+	default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
+	default "bash"    if BR2_SYSTEM_BIN_SH_BASH
+	default "dash"    if BR2_SYSTEM_BIN_SH_DASH
+	default "zsh"     if BR2_SYSTEM_BIN_SH_ZSH
 
 config BR2_TARGET_GENERIC_GETTY
 	bool "Run a getty (login prompt) after boot"
-- 
2.1.4

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

* [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path
  2015-06-16 20:42 [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path Matthew Starr
@ 2015-06-16 21:28 ` Yann E. MORIN
  2015-06-16 22:02   ` Matthew Starr
  2015-06-21  7:37 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2015-06-16 21:28 UTC (permalink / raw)
  To: buildroot

Matthew, All,

On 2015-06-16 15:42 -0500, Matthew Starr spake thusly:
> The symlink created by buildroot for /bin/sh is the full path to
> a shell.  This does not match what busybox and other Linux
> distributions do with using relative path symlinks. When handling
> files on the host system this will point to the host system's shell
> if present and not the target shell.
> 
> This is fixed by changing the /bin/sh symlink to use relative a path

...a relative path.

> since both files are in the same directory.

Relative paths can be made even for t=files not in the same directory,
so I don;t think there's much need for that end of the sentence
(starting with 'since').

> This was reported as Bug #8161 at bugs.busybox.net

We usually state that with something like;

    Fixes #8161

since the maintainer greps for that pattern when doing the announcement
mail (to credit bug fixers).

> Signed-off-by: Matthew Starr <mstarr@hedonline.com>

Otherwise:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  system/Config.in | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/system/Config.in b/system/Config.in
> index 84cde94..15f0515 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -236,10 +236,10 @@ 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
> +	default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
> +	default "bash"    if BR2_SYSTEM_BIN_SH_BASH
> +	default "dash"    if BR2_SYSTEM_BIN_SH_DASH
> +	default "zsh"     if BR2_SYSTEM_BIN_SH_ZSH
>  
>  config BR2_TARGET_GENERIC_GETTY
>  	bool "Run a getty (login prompt) after boot"
> -- 
> 2.1.4

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path
  2015-06-16 21:28 ` Yann E. MORIN
@ 2015-06-16 22:02   ` Matthew Starr
  2015-06-17 20:58     ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Starr @ 2015-06-16 22:02 UTC (permalink / raw)
  To: buildroot

Yann, All

> -----Original Message-----
> From: Yann E. MORIN [mailto:yann.morin.1998 at gmail.com] On Behalf Of
> Yann E. MORIN
> 
> Matthew, All,
> 
> On 2015-06-16 15:42 -0500, Matthew Starr spake thusly:
> > The symlink created by buildroot for /bin/sh is the full path to a
> > shell.  This does not match what busybox and other Linux distributions
> > do with using relative path symlinks. When handling files on the host
> > system this will point to the host system's shell if present and not
> > the target shell.
> >
> > This is fixed by changing the /bin/sh symlink to use relative a path
> 
> ...a relative path.
> 
> > since both files are in the same directory.
> 
> Relative paths can be made even for t=files not in the same directory, so I
> don;t think there's much need for that end of the sentence (starting with
> 'since').
> 
> > This was reported as Bug #8161 at bugs.busybox.net
> 
> We usually state that with something like;
> 
>     Fixes #8161
> 
> since the maintainer greps for that pattern when doing the announcement
> mail (to credit bug fixers).

Would you like me to submit a new version of the patch with the changes
to the commit message listed above?

> 
> > Signed-off-by: Matthew Starr <mstarr@hedonline.com>
> 
> Otherwise:
> 
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Regards,
> Yann E. MORIN.
> 
> > ---
> >  system/Config.in | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/system/Config.in b/system/Config.in index
> > 84cde94..15f0515 100644
> > --- a/system/Config.in
> > +++ b/system/Config.in
> > @@ -236,10 +236,10 @@ 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
> > +	default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
> > +	default "bash"    if BR2_SYSTEM_BIN_SH_BASH
> > +	default "dash"    if BR2_SYSTEM_BIN_SH_DASH
> > +	default "zsh"     if BR2_SYSTEM_BIN_SH_ZSH
> >
> >  config BR2_TARGET_GENERIC_GETTY
> >  	bool "Run a getty (login prompt) after boot"
> > --
> > 2.1.4

Best regards,
Matthew Starr

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

* [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path
  2015-06-16 22:02   ` Matthew Starr
@ 2015-06-17 20:58     ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2015-06-17 20:58 UTC (permalink / raw)
  To: buildroot

Matthew, All,

On 2015-06-16 17:02 -0500, Matthew Starr spake thusly:
> > -----Original Message-----
> > From: Yann E. MORIN [mailto:yann.morin.1998 at gmail.com] On Behalf Of
> > Yann E. MORIN
> > 
> > Matthew, All,
> > 
> > On 2015-06-16 15:42 -0500, Matthew Starr spake thusly:
> > > The symlink created by buildroot for /bin/sh is the full path to a
> > > shell.  This does not match what busybox and other Linux distributions
> > > do with using relative path symlinks. When handling files on the host
> > > system this will point to the host system's shell if present and not
> > > the target shell.
> > >
> > > This is fixed by changing the /bin/sh symlink to use relative a path
> > 
> > ...a relative path.
> > 
> > > since both files are in the same directory.
> > 
> > Relative paths can be made even for t=files not in the same directory, so I
> > don;t think there's much need for that end of the sentence (starting with
> > 'since').
> > 
> > > This was reported as Bug #8161 at bugs.busybox.net
> > 
> > We usually state that with something like;
> > 
> >     Fixes #8161
> > 
> > since the maintainer greps for that pattern when doing the announcement
> > mail (to credit bug fixers).
> 
> Would you like me to submit a new version of the patch with the changes
> to the commit message listed above?

No, I don't think there's a need to respin. The maintainer can tweak the
commit log if he ses fit.

Thanks! :-)

Regards,
Yann E. MORIN.

> > > Signed-off-by: Matthew Starr <mstarr@hedonline.com>
> > 
> > Otherwise:
> > 
> > Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > 
> > Regards,
> > Yann E. MORIN.
> > 
> > > ---
> > >  system/Config.in | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/system/Config.in b/system/Config.in index
> > > 84cde94..15f0515 100644
> > > --- a/system/Config.in
> > > +++ b/system/Config.in
> > > @@ -236,10 +236,10 @@ 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
> > > +	default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
> > > +	default "bash"    if BR2_SYSTEM_BIN_SH_BASH
> > > +	default "dash"    if BR2_SYSTEM_BIN_SH_DASH
> > > +	default "zsh"     if BR2_SYSTEM_BIN_SH_ZSH
> > >
> > >  config BR2_TARGET_GENERIC_GETTY
> > >  	bool "Run a getty (login prompt) after boot"
> > > --
> > > 2.1.4
> 
> Best regards,
> Matthew Starr

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path
  2015-06-16 20:42 [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path Matthew Starr
  2015-06-16 21:28 ` Yann E. MORIN
@ 2015-06-21  7:37 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2015-06-21  7:37 UTC (permalink / raw)
  To: buildroot

Dear Matthew Starr,

On Tue, 16 Jun 2015 15:42:28 -0500, Matthew Starr wrote:
> The symlink created by buildroot for /bin/sh is the full path to
> a shell.  This does not match what busybox and other Linux
> distributions do with using relative path symlinks. When handling
> files on the host system this will point to the host system's shell
> if present and not the target shell.
> 
> This is fixed by changing the /bin/sh symlink to use relative a path
> since both files are in the same directory.
> 
> This was reported as Bug #8161 at bugs.busybox.net
> 
> Signed-off-by: Matthew Starr <mstarr@hedonline.com>
> ---
>  system/Config.in | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied after fixing the minor nits suggested by Yann, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2015-06-21  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16 20:42 [Buildroot] [PATCH 1/1] system: make /bin/sh symlink use relative path Matthew Starr
2015-06-16 21:28 ` Yann E. MORIN
2015-06-16 22:02   ` Matthew Starr
2015-06-17 20:58     ` Yann E. MORIN
2015-06-21  7:37 ` Thomas Petazzoni

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