Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 376995 - sys-devel/autoconf-wrapper: bashism in ac-wrapper.sh
Summary: sys-devel/autoconf-wrapper: bashism in ac-wrapper.sh
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Solaris
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 21:40 UTC by Florian Ermisch
Modified: 2011-08-06 16:21 UTC (History)
1 user (show)

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


Attachments
diffs for autoconf-wrapper-11-r00.1.ebuild and files/ac-wrapper-11.sh (ac-wrapper-r00.1.diff,1.50 KB, patch)
2011-07-29 21:40 UTC, Florian Ermisch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Ermisch 2011-07-29 21:40:05 UTC
Created attachment 281513 [details, diff]
diffs for autoconf-wrapper-11-r00.1.ebuild and files/ac-wrapper-11.sh

Everything needing autoconf in my Solaris 10 prefix failed with a line "$PREFIX/usr/bin/autom4te: Falscher Austausch" (LC_ALL=C -> bad substitute) in $PORTAGE_TMPDIR/portage/$CAT/$PKG/temp/aclocal.out.
Here on bgo a found a FreeBSD-related bug which pointed out some package's assumption about /bin/sh being bash, making a skript fail with a similar "bad substitute"-error.
So I tracked down the script which happens to be $EPREFIX/usr/lib/misc/ac-wrapper.sh and added my $EPREFIX to the shebang. Now the sheband points to a link to $EPREFIX/bin/bash and so ac-wrapper.sh works again.

I would suggest to either change the shebang to bash or remove the bashisms from the script.

Either way the $EPREFIX should be added to fix this bug. I'll attach some diffs using eprefixify I came up with (those: https://bitbucket.org/etalas/etalas_prefix/changeset/74abf0d09012).
Comment 1 SpanKY gentoo-dev 2011-08-06 10:38:18 UTC
vaguely saying "it has bashisms" is not useful.  we need actual details.  file runs just fine under dash.
Comment 2 Fabian Groffen gentoo-dev 2011-08-06 11:44:24 UTC
I think this bug falsely suggests the script contains bashisms or something.  It probably contains POSIX sh-isms, which is not the same as /bin/sh on most UNIX systems.

replacement operations aren't supported, e.g.:


% /bin/sh
$ echo ${0##*/}
bad substitution
$ 

I don't really see why this bug comes up, though, as the ac-wrapper-11.sh script already gets a fixed shebang with Prefix Portage, e.g. it uses $EPREFIX/bin/sh, which most likely is GNU bash.  Leaving this bug closed for this reason.
Comment 3 Florian Ermisch 2011-08-06 16:21:54 UTC
Well the version my Solaris 10 prefix was using a week ago didn't had a prefixed shebang this is why this problem came up.

Good to know that it's already fixed.