* [Buildroot] shell issues when /bin/sh is 'dash' instead of 'bash'
2009-01-01 2:36 ` Hamish Moffatt
@ 2009-01-01 14:40 ` Wade Berrier
2009-01-01 20:43 ` Peter Korsgaard
2009-01-04 21:53 ` Nicolas Pitre
2 siblings, 0 replies; 6+ messages in thread
From: Wade Berrier @ 2009-01-01 14:40 UTC (permalink / raw)
To: buildroot
On Wed, Dec 31, 2008 at 7:36 PM, Hamish Moffatt <hamish@cloud.net.au> wrote:
> On Wed, Dec 31, 2008 at 04:04:37PM -0700, Wade Berrier wrote:
>> The result is that some files don't get installed into the target
>> system when /bin/sh points to dash (like on recent ubuntu and debian?
>> distros)
>>
>> Attached is a patch to use CONFIG_SHELL.
>
> Why aren't we setting SHELL=$(CONFIG_SHELL) somewhere, rather than using
> $(CONFIG_SHELL) explicitly in each place? (And why do I have the feeling
> we've had this discussion before?)
Yes, I think this has been discussed before...
>
>> Question: is this the best way to fix this? Or maybe these packages
>> should be fixed more in the style of how Jacmet fixed grep? (see
>> http://sources.uclibc.org/index.py/trunk/buildroot/package/grep/grep.mk?r1=22930&r2=22931
>> )
>
> dash(1) on my system says -ot is supported anyway. If not perhaps it can
> be expressed in a better way; I think that would be better than this
> fix.
dash supports '-ot', but it doesn't have the same behavior as bash
when one of the files is missing. I tend to agree... it could
probably be expressed in a better way.
>
> Besides is CONFIG_SHELL guaranteed to be bash anyway?
It will prefer bash, but will fall back on /bin/sh, which could be dash.
>
>
>
> Happy new year.
You too!
Wade
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] shell issues when /bin/sh is 'dash' instead of 'bash'
2009-01-01 2:36 ` Hamish Moffatt
2009-01-01 14:40 ` Wade Berrier
@ 2009-01-01 20:43 ` Peter Korsgaard
2009-01-04 21:53 ` Nicolas Pitre
2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2009-01-01 20:43 UTC (permalink / raw)
To: buildroot
>>>>> "Hamish" == Hamish Moffatt <hamish@cloud.net.au> writes:
Hamish> On Wed, Dec 31, 2008 at 04:04:37PM -0700, Wade Berrier wrote:
>> The result is that some files don't get installed into the target
>> system when /bin/sh points to dash (like on recent ubuntu and debian?
>> distros)
>>
>> Attached is a patch to use CONFIG_SHELL.
Hamish> Why aren't we setting SHELL=$(CONFIG_SHELL) somewhere, rather
Hamish> than using $(CONFIG_SHELL) explicitly in each place? (And why
Hamish> do I have the feeling we've had this discussion before?)
Because we already discussed it earlier ;) - Without any
conclusion. The CONFIG_SHELL afaik comes from the kconfig legacy, but
other projects like U-Boot have recently skipped it and simply set
SHELL.
I have done it as well for buildroot, and a test build seems to work
fine, so I'll commit it in a moment. We still need to set CONFIG_SHELL
though for the kconfig stuff (or fix their makefiles, but I would
prefer to keep the difference between us and upstream minimal).
Hamish> Besides is CONFIG_SHELL guaranteed to be bash anyway?
No, it currently falls back to /bin/sh if bash isn't there. We should
probably add a check in dependencies.sh
Hamish> Happy new year.
You too.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] shell issues when /bin/sh is 'dash' instead of 'bash'
2009-01-01 2:36 ` Hamish Moffatt
2009-01-01 14:40 ` Wade Berrier
2009-01-01 20:43 ` Peter Korsgaard
@ 2009-01-04 21:53 ` Nicolas Pitre
2009-01-05 8:53 ` Peter Korsgaard
2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2009-01-04 21:53 UTC (permalink / raw)
To: buildroot
On Thu, 1 Jan 2009, Hamish Moffatt wrote:
> On Wed, Dec 31, 2008 at 04:04:37PM -0700, Wade Berrier wrote:
> > The result is that some files don't get installed into the target
> > system when /bin/sh points to dash (like on recent ubuntu and debian?
> > distros)
> >
> > Attached is a patch to use CONFIG_SHELL.
>
> Why aren't we setting SHELL=$(CONFIG_SHELL) somewhere, rather than using
> $(CONFIG_SHELL) explicitly in each place? (And why do I have the feeling
> we've had this discussion before?)
>
> > Question: is this the best way to fix this? Or maybe these packages
> > should be fixed more in the style of how Jacmet fixed grep? (see
> > http://sources.uclibc.org/index.py/trunk/buildroot/package/grep/grep.mk?r1=22930&r2=22931
> > )
>
> dash(1) on my system says -ot is supported anyway. If not perhaps it can
> be expressed in a better way; I think that would be better than this
> fix.
There are other places where brace expansion is used for arguments to
patch-kernel.sh, and dash doesn't supports that. You end up with a
kernel missing appropriate patches, etc.
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] shell issues when /bin/sh is 'dash' instead of 'bash'
2009-01-04 21:53 ` Nicolas Pitre
@ 2009-01-05 8:53 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2009-01-05 8:53 UTC (permalink / raw)
To: buildroot
>>>>> "Nicolas" == Nicolas Pitre <nico@cam.org> writes:
Hi,
>> dash(1) on my system says -ot is supported anyway. If not perhaps it can
>> be expressed in a better way; I think that would be better than this
>> fix.
Nicolas> There are other places where brace expansion is used for arguments to
Nicolas> patch-kernel.sh, and dash doesn't supports that. You end up with a
Nicolas> kernel missing appropriate patches, etc.
Exactly. The best way forward is imho to always use bash like what
current svn is doing.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread