[Buildroot] [PATCH 1/2] Add dependency on bash to gzip for runtime

Jonathan Ben Avraham yba at tkos.co.il
Thu Sep 17 16:33:24 UTC 2015


Hi Baruch,
See inlines...

On Thu, 17 Sep 2015, Baruch Siach wrote:

> Date: Thu, 17 Sep 2015 19:20:03 +0300
> From: Baruch Siach <baruch at tkos.co.il>
> To: Jonathan Ben Avraham <yba at tkos.co.il>
> Cc: buildroot at buildroot.org
> Subject: Re: [Buildroot] [PATCH 1/2] Add dependency on bash to gzip for
>     runtime
> 
> Hi Yonatan,
>
> On Thu, Sep 17, 2015 at 06:16:42PM +0300, Jonathan Ben Avraham wrote:
>> On Thu, 17 Sep 2015, Baruch Siach wrote:
>>
>>> Date: Thu, 17 Sep 2015 18:01:12 +0300
>>> From: Baruch Siach <baruch at tkos.co.il>
>>> To: Jonathan Ben-Avraham <yba at tkos.co.il>
>>> Cc: buildroot at buildroot.org
>>> Subject: Re: [Buildroot] [PATCH 1/2] Add dependency on bash to gzip for
>>>    runtime
>>>
>>> On Thu, Sep 17, 2015 at 05:46:32PM +0300, Jonathan Ben-Avraham wrote:
>>>> From: Jonathan Ben Avraham <yba at tkos.co.il>
>>>>
>>>> The GNU gzip package provides eleven executable files, all but one of
>>>> which are bash shell scripts. If we allow inclusion of gzip without
>>>> bash, then on executing commands such as lxc-checkconfig that actually
>>>> use these shell scripts, you will get errors like 'zgrep: not found',
>>>> even though the zgrep executable is in PATH.
>>>
>>> Which /bin/sh shell show this problem?
>>>
>>> On my host the command
>>>
>>>  busybox sh /bin/zgrep pattern file.gz
>>>
>>> and also
>>>
>>>  dash /bin/zgrep pattern file.gz
>>>
>>> work as expected.
>>
>> You tested *all* of the scripts or just this one?
>
> I didn't test all of them. I'm just trying to reproduce the 'zgrep: not found'
> problem that you report in the commit log, to see what went wrong.
>
>> What if ash breaks even *one*?
>
> Then we should probably patch the problem and send upstream. gzip bundled
> scripts are pretty trivial, and AFAICS, should work under any POSIX-like
> shell.

But we would at least need to ln -s /bin/<ash|dash> /bin/bash in 
Buildroot, no? so maybe the upstream fix is to change the hashbangs from 
/bin/bash to /bin/sh. Do you really think that the gzip upstream would 
accept this?

  - yba


> baruch
>
>

-- 
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm


More information about the buildroot mailing list