Re: [dev] wmii; make with /bin/bash not with /bin/sh

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Thu, 20 May 2010 09:16:21 -0400

On Thu, 20 May 2010 14:51:37 +0200
David Schmid <info_AT_david-schmid.de> wrote:
> when compiling the wmii+ixp-3.9b1 on a solaris box, make
> calls /bin/sh to evaluate several scripts. Since /bin/sh is really
> old around here, make dies instantly because /bin/sh can't interpret
> the scripts ("/bin sh: bad substitution").
> Since relinking /bin/sh to /bin/bash is neiter a decent nor any
> option here, how do I get make to use /bin/bash and not /bin/sh?

Solaris' /bin/sh isn't a POSIX shell, as I recall. wmiirc should work
with any POSIX shell. We don't use bash by default because it's rather
slower than most of the alternatives, and tends to get worse for long
running scripts. Setting BINSH should work, but it looks like the
inclusion of config.mk got pushed up a few lines in the make scripts,
so it's too late. Just run:

  make BINSH=/bin/bash

and you should be fine.
 
> Measures tried:
> - resetting PATH, since make calls /bin/sh and not sh it is never
> looked up there
> - setting BINSH or SHELL to /bin/bash won't work either.
> - Asking for help at #suckless did not come up with immediate
> solution.
>
> The only thing that came up on #suckless was LD_PRELOAD to overwrite
> the system calls... but that might take some time to do and is not a
> clean option either. But it looks interesting enough to try out some
> time.

Well, using LD_PRELOAD would be rather silly indeed. Perhaps it would
be fun as an exercise, but it would definitely not be a good choice.
It'd be easier to just do something like:

    wmii -r 'bash /etc/wmii/wmiirc'

-- 
Kris Maglione
Mostly, when you see programmers, they aren't doing anything.  One of
the attractive things about programmers is that you cannot tell
whether or not they are working simply by looking at them.  Very often
they're sitting there seemingly drinking coffee and gossiping, or just
staring into space.  What the programmer is trying to do is get a
handle on all the individual and unrelated ideas that are scampering
around in his head.
	--Charles M. Strauss
Received on Thu May 20 2010 - 13:16:21 UTC

This archive was generated by hypermail 2.2.0 : Thu May 20 2010 - 13:24:02 UTC