Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206944 - sys-apps/fakeroot-1.8.1 fails when /bin/sh is a symlink to /bin/dash
Summary: sys-apps/fakeroot-1.8.1 fails when /bin/sh is a symlink to /bin/dash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-21 21:56 UTC by Martin Väth
Modified: 2008-01-23 07:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2008-01-21 21:56:28 UTC
sys-apps/fakeroot-1.8.1 and also -1.9 (earlier versions not tested) fail when /bin/sh is a symlink to /bin/dash.

According to the messages, the reason is that the configure script tests whether the shell understands += (the test succeeds because it is run by bash) and only afterwards decides which shell to use (which is the shell to which /bin/sh points).

The easiest solution would be if upstream would remove the superfluous += treatment completely: It is only used in one function and obviously is incompatible and has no advantage. As a temporary hack, one could just let the test fail:

sed -e 's/\(shell_append.*\)yes/\1no/' configure
Comment 1 SpanKY gentoo-dev 2008-01-21 23:12:26 UTC
try exporting CONFIG_SHELL=/bin/sh before emerging fakeroot
Comment 2 Martin Väth 2008-01-22 17:36:44 UTC
(In reply to comment #1)
> try exporting CONFIG_SHELL=/bin/sh

Works like a charm. That's a much cleaner solution than my hack, of course.
Now I am not sure whether to close this bug:

Is this recommended for all autotools stuff (i.e. should I actually put this in my /etc/make.conf) or is this a particular "feature" of fakeroot's autotools usage? In the latter case, I suppose the export command should happen in the ebuild.
Comment 3 SpanKY gentoo-dev 2008-01-23 07:14:52 UTC
it's a nested mess ... configure will re-exec itself with a "better" shell so that even if /bin/sh is broken, it'll get a less broken shell while executing

unfortunately, that means embedded shell tests (while logically they should be ok), actually arent representative of the the real /bin/sh shell ... it'll have to create a new shell script like:
cat <<EOF > moo
#!/bin/sh
<test for the += crap>
EOF

and then execute moo

looking at the m4 macros makes it look like this test comes from libtool, but i cant find any corresponding code in libtool itself

at any rate, i'll push this to the debian peeps and use CONFIG_SHELL in our ebuild