Skip to contentSkip to conversation

system: make /bin/sh symlink use relative path

PATCH New Matthew Starr 3 participants 5 messages Jun 16, 2015 – Jun 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 system: make /bin/sh symlink use relative path

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

---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
system/Config.in +4 -4
index 84cde94..15f0515 100644
@@ -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"
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 system: make /bin/sh symlink use relative path

Matthew, All,

On 2015-06-16 15:42 -0500, Matthew Starr spake thusly:

Quoted 7 lines

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.

Quoted 1 line

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').

Quoted 1 line

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).

Quoted 1 line

Otherwise:

Regards,
Yann E. MORIN.

Quoted 25 lines
---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
system/Config.in +4 -4
index 84cde94..15f0515 100644
@@ -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"
Signature · 1 line
2.1.4
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 system: make /bin/sh symlink use relative path

Yann, All

Quoted 23 lines

-----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:

Quoted 7 lines

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.

Quoted 1 line

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').

Quoted 8 lines
Quoted 1 line

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?

Quoted 31 lines
Quoted 2 lines

Otherwise:

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
system/Config.in index renamed from system/Config.in +0 -0

84cde94..15f0515 100644

system/Config.in +4 -4
@@ -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
 
Quoted 4 lines
Quoted 4 lines
system/Config.in +0 -1
 config BR2_TARGET_GENERIC_GETTY
 	bool "Run a getty (login prompt) after boot"
--

2.1.4

Best regards,
Matthew Starr

#3 lore raw

PATCH 1/1 system: make /bin/sh symlink use relative path

Matthew, All,

On 2015-06-16 17:02 -0500, Matthew Starr spake thusly:

Quoted 27 lines
Quoted 27 lines

-----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:

Quoted 7 lines

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.

Quoted 1 line

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').

Quoted 1 line

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

We usually state that with something like;

Quoted 7 lines
Quoted 4 lines
    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.

Quoted 37 lines
Quoted 30 lines
Quoted 1 line

Otherwise:

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
system/Config.in index renamed from system/Config.in +0 -0

84cde94..15f0515 100644

system/Config.in +4 -4
@@ -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
 
Quoted 4 lines
Quoted 4 lines
system/Config.in +0 -1
 config BR2_TARGET_GENERIC_GETTY
 	bool "Run a getty (login prompt) after boot"
--

2.1.4

Best regards,
Matthew Starr

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 system: make /bin/sh symlink use relative path

In reply to Matthew Starr

Dear Matthew Starr,

Quoted 9 lines · Matthew Starr

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.

Quoted 6 lines

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

---
 system/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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

Thomas

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