* [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink
@ 2017-03-29 21:28 Thomas Petazzoni
2017-03-31 7:12 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-03-29 21:28 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=fc91501e6b32ef1b015ac9b0fbf6d64aa1ce0162
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh
symlinks should point to. If busybox is chosen, then /bin/sh is created
to point to /bin/busybox.
This works fine with the default installation mode of Busybox, but it
fails with the upcoming "individual binaries" mode, in which each applet
is installed as its own binary, and /bin/busybox doesn't exist: we get
/bin/sh as a broken symlink to /bin/busybox.
Since Busybox already installs its own /bin/sh symlink, properly
pointing to /bin/ash or /bin/hush depending on the selected shell, it
doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override
this. Just let Busybox install its own /bin/sh by making
BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/skeleton/skeleton.mk | 2 ++
system/Config.in | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index 1000161..9940944 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -203,10 +203,12 @@ define SKELETON_BIN_SH
rm -f $(TARGET_DIR)/bin/sh
endef
else
+ifneq ($(SKELETON_TARGET_GENERIC_BIN_SH),)
define SKELETON_BIN_SH
ln -sf $(SKELETON_TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh
endef
endif
+endif
TARGET_FINALIZE_HOOKS += SKELETON_BIN_SH
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
diff --git a/system/Config.in b/system/Config.in
index 3ddf843..b47ae43 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -298,7 +298,6 @@ endchoice # /bin/sh
config BR2_SYSTEM_BIN_SH
string
- 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 "mksh" if BR2_SYSTEM_BIN_SH_MKSH
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink
2017-03-29 21:28 [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink Thomas Petazzoni
@ 2017-03-31 7:12 ` Peter Korsgaard
2017-03-31 7:25 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2017-03-31 7:12 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> commit: https://git.buildroot.net/buildroot/commit/?id=fc91501e6b32ef1b015ac9b0fbf6d64aa1ce0162
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh
> symlinks should point to. If busybox is chosen, then /bin/sh is created
> to point to /bin/busybox.
> This works fine with the default installation mode of Busybox, but it
> fails with the upcoming "individual binaries" mode, in which each applet
> is installed as its own binary, and /bin/busybox doesn't exist: we get
> /bin/sh as a broken symlink to /bin/busybox.
> Since Busybox already installs its own /bin/sh symlink, properly
> pointing to /bin/ash or /bin/hush depending on the selected shell, it
> doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override
> this. Just let Busybox install its own /bin/sh by making
> BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to 2017.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink
2017-03-31 7:12 ` Peter Korsgaard
@ 2017-03-31 7:25 ` Thomas Petazzoni
2017-03-31 8:22 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-03-31 7:25 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 31 Mar 2017 09:12:34 +0200, Peter Korsgaard wrote:
> > commit: https://git.buildroot.net/buildroot/commit/?id=fc91501e6b32ef1b015ac9b0fbf6d64aa1ce0162
> > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>
> > The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh
> > symlinks should point to. If busybox is chosen, then /bin/sh is created
> > to point to /bin/busybox.
>
> > This works fine with the default installation mode of Busybox, but it
> > fails with the upcoming "individual binaries" mode, in which each applet
> > is installed as its own binary, and /bin/busybox doesn't exist: we get
> > /bin/sh as a broken symlink to /bin/busybox.
>
> > Since Busybox already installs its own /bin/sh symlink, properly
> > pointing to /bin/ash or /bin/hush depending on the selected shell, it
> > doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override
> > this. Just let Busybox install its own /bin/sh by making
> > BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh.
>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
> > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> Committed to 2017.02.x, thanks.
I don't think this one was needed for the LTS branch. Really it's not a
fix. This patch is only useful for the support of installing Busybox as
individual binaries, which will anyway not go into the LTS branch.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink
2017-03-31 7:25 ` Thomas Petazzoni
@ 2017-03-31 8:22 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-03-31 8:22 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
>> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> > Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
>> > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>
>> Committed to 2017.02.x, thanks.
> I don't think this one was needed for the LTS branch. Really it's not a
> fix. This patch is only useful for the support of installing Busybox as
> individual binaries, which will anyway not go into the LTS branch.
Ahh yes, you're right. Sorry about that. It shouldn't really hurt
though.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-31 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 21:28 [Buildroot] [git commit] system: do not overwrite /bin/sh Busybox symlink Thomas Petazzoni
2017-03-31 7:12 ` Peter Korsgaard
2017-03-31 7:25 ` Thomas Petazzoni
2017-03-31 8:22 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.