Bug 2641

Summary: gen_build_files.sh need bash
Product: Busybox Reporter: Andrej Gelenberg <andrej.gelenberg>
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.17.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: build log

Description Andrej Gelenberg 2010-09-26 13:48:13 UTC
build fail if /bin/sh is not bash (dash for me).
Please replace "#!/bin/sh" with "#!/bin/bash"
Comment 1 Denys Vlasenko 2010-09-30 17:30:22 UTC
Can't reproduce:

I downloaded 1.17.2, replaced #!/bin/sh with #!/bin/dash in gen_build_files.sh, then ran

make defconfig
make

and build succeeded.

Can you describe your problems in more details?
Comment 2 Andrej Gelenberg 2010-10-03 13:25:00 UTC
Created attachment 2551 [details]
build log

Here the make output of vanilla sources.
Comment 3 Denys Vlasenko 2010-10-03 13:39:21 UTC
This log does not help me in isolating the problem.

Can you unpack 1.17.2 is two different directories, run "make defconfig" in one tree, then replace "#!/bin/sh" with "#!/bin/bash" in gen_build_files.sh in the other tree, run "make defconfig" in this second tree, then post the output of diff -urN tree1 tree2?
Comment 4 Andrej Gelenberg 2010-10-03 16:50:18 UTC
here is diff: http://people.oh14.de/andrej/diff.gz
Comment 5 Denys Vlasenko 2010-10-03 21:50:18 UTC
Looks like a bug in your /bin/sh.

Please run /bin/sh and type exactly the following at the shell prompt:

echo "   test" | { IFS='' read -r REPLY; echo "|$REPLY|"; }

What do you see?
Comment 6 Andrej Gelenberg 2010-10-04 19:40:54 UTC
Seems to be a bug in dash. It is fixed in git repository (not released yet). Arch use vanilla version of dash, so there is the problem. Ubuntu patched it bit earlier. For archlinux users there is now dash-git package in aur.
Comment 7 Andrej Gelenberg 2010-10-04 21:23:12 UTC
dash vanilla sources seems to be crap. git version of dash brake other things too. Ubuntu version (dash-ubuntu in aur for archlinux) seems to be a better choices, or keep bash as /bin/sh. Sorry for bothering you with bugs in dash.