Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] system: make sh symlink match original busybox symlink path
Date: Tue, 16 Jun 2015 18:31:46 +0200	[thread overview]
Message-ID: <20150616163146.GA5730@free.fr> (raw)
In-Reply-To: <64CA5C49A43E314D9F7DAE05370E2F7B05F54E6F@hed-dc01.hed.local>

Matthew, All,

On 2015-06-16 10:41 -0500, Matthew Starr spake thusly:
> The symlink created by buildroot for /bin/sh when busybox is used
> is the full path to /bin/busybox and does not match the symlink
> created by busybox for /bin/sh, which is just busybox.  When handling
> files on the host system this will point to the host system's busybox
> if present and not the target busybox.

I fail to see the problem that would cause. We have quite a few other
absolute symlinks. Do we want to fix all of them?

Note: yes, I thinf I know what your problenm is, that is checksuming-or-such
the content of each file. I believe this is wrong, because that would
miss the information that this is actually a *symlink*, and would not
detect the fact that is is replacec with an actual file (and hence takes
more place on the device than is expected).

I would find it much smarter that:
  - files get their content checksumed
  - symlinks get their target path checksumed, not the content of the
    target file (or dir). I.e. symlinks should not be dereferenced.

> This is fixed by changing the /bin/sh symlink to just be busybox since
> both files are in the same directory.
> 
> Signed-off-by: Matthew Starr <mstarr@hedonline.com>
> ---
>  system/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/system/Config.in b/system/Config.in
> index 84cde94..5c4ba90 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -236,7 +236,7 @@ endchoice # /bin/sh
>  
>  config BR2_SYSTEM_BIN_SH
>  	string
> -	default "/bin/busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
> +	default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX

Please, keep the alignment of the if-clause.

>  	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

If you contend that /bin/sh being an absolute symlink is an issue, then
surely the other shells should be treated the same, i.e. they should be
madde relative symlinks.

All that matters in the end is that the symlink is correct *on the
target".  I'm not sure this change is interesting without a good reason;
and I don't think you 10.192.168.1gave a good-enough reason; saying "the
symlink is different than what busybox installs" is not a valid reason
IMHO.

Regards,
Yann E. MORIN.

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

  reply	other threads:[~2015-06-16 16:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 15:41 [Buildroot] [PATCH 1/1] system: make sh symlink match original busybox symlink path Matthew Starr
2015-06-16 16:31 ` Yann E. MORIN [this message]
2015-06-16 17:31   ` Matthew Starr
2015-06-16 20:21     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150616163146.GA5730@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox