All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Lee Essen <lee.essen@nowonline.co.uk>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] configure to set shell type
Date: Fri, 16 Mar 2012 13:24:52 +0100	[thread overview]
Message-ID: <4F633114.50601@web.de> (raw)
In-Reply-To: <CAFEAcA9+rfpUU0JR81WPtBRmFFtSApS96p0bs3Kmn1igtDcrNw@mail.gmail.com>

Am 16.03.2012 13:15, schrieb Peter Maydell:
> On 16 March 2012 12:02, Lee Essen <lee.essen@nowonline.co.uk> wrote:
>> Adds support to configure for controlling which shell to use, defaults to "sh" as before
>> but adds "bash" for Solaris/Illumos builds. Plus ensures that tracetool is called with a
>> shell.
> 
> Ugh. If we have bashisms in our shell scripts/configure/makefiles etc we should
> fix them, not paper over them.
> 
> If Solaris' /bin/sh isn't a POSIX sh that's a bug in Solaris :-)

Nah, Sun had really long support cycles and used to provide a POSIX sh
alongside their old sh for compatibility with themselves. ;-) We found
that actually documented in their man pages while investigating that in
response to my bug report. (Lee, don't forget to search the archives!)

> 
>> -echo "                           Available backends:" $("$source_path"/scripts/tracetool --list-backends)
>> +echo "                           Available backends:" $($shell "$source_path"/scripts/tracetool --list-backends)
> 
> This shouldn't be necessary -- tracetool has a #!/bin/sh at the top.
> If it needs bash then that should be fixed.

No, please. I'd be okay with setting shell="bash" in a reasonably
limited environment (say, Solaris 11) but not with requiring bash for
all platforms.

The issue here is really just getting a fully POSIX-conformant shell.
And the way I expect this to work is by executing configure and make in
such a shell and by not having hardcoded /bin/sh creep in through some
shebang line.

Andreas

>> -sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
>> +$shell "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
> 
> ...and we shouldn't need to use either 'sh' or '$shell' here...
> 
> -- PMM

  reply	other threads:[~2012-03-16 12:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 12:02 [Qemu-devel] [PATCH 1/5] configure to set shell type Lee Essen
2012-03-16 12:14 ` Andreas Färber
2012-03-16 12:20   ` Lee Essen
2012-03-16 12:22     ` Lee Essen
2012-03-16 12:36     ` Andreas Färber
2012-03-16 12:15 ` Peter Maydell
2012-03-16 12:24   ` Andreas Färber [this message]
2012-03-16 12:35     ` Peter Maydell
2012-03-16 15:58       ` Eric Blake
2012-03-16 16:19         ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F633114.50601@web.de \
    --to=andreas.faerber@web.de \
    --cc=lee.essen@nowonline.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.