From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: [PATCH] tools: python portability fixes
Date: Tue, 4 Aug 2009 14:33:13 +0200 [thread overview]
Message-ID: <200908041433.13561.Christoph.Egger@amd.com> (raw)
In-Reply-To: <19064.3657.53607.963406@mariner.uk.xensource.com>
On Tuesday 04 August 2009 12:32:41 Ian Jackson wrote:
> Christoph Egger writes ("Re: [PATCH] tools: python portability fixes"):
> > On Tuesday 28 July 2009 11:55:59 Ian Jackson wrote:
> > > While I'm here, though: you keep mentioning this as if there was
> > > something wrong with this. I think having the Xen build system depend
> > > on bash being installed is absolutely fine.
> >
> > On NetBSD, bash is a third-party package.
> > scripts having #!/bin/bash fail with "/bin/bash: No such file or
> > directory" The bourne shell (#!/bin/sh) is mighty enough to not require
> > bashism.
>
> I agree that it is sensible not to make scripts bash-specific for no
> reason. However, there are quite a few things that are much easier to
> do in bash and require enormous amounts of pratting about to do in
> POSIX sh.
>
> Also, if we write #!/bin/sh at the top of the script, we get
> complaints from Solaris people if our script is not portable to the
> astonishingly ancient and crusty Solaris /bin/sh.
The build system should call shell scripts via $(SHELL).
On Solaris, $(SHELL) points to /bin/bash .
> I don't want to get into NetBSD's decision to make bash be `a third
> party package' (whatever that means),
that means, it's not part of the base system.
> but surely there are plenty of things in the Xen build system
> that are `third party packages'. You can't build Xen without
> hg and git and texinfo and GNU make and so on.
> It seems to me that bash is much less of an imposition.
Actually the opposite is the case.
bash as a shell is special in how it is used.
You don't type /bin/hg or /bin/git but you type #!/bin/bash in scripts
and that is where it fails.
The portable way is to make it work with POSIX sh and call it with $(SHELL)
(see above).
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2009-08-04 12:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 13:58 [PATCH] tools: python portability fixes Christoph Egger
2009-07-23 14:06 ` Keir Fraser
2009-07-27 18:57 ` Ian Jackson
2009-07-28 7:34 ` Christoph Egger
2009-07-28 9:55 ` Ian Jackson
2009-07-28 12:27 ` Christoph Egger
2009-08-04 10:32 ` Ian Jackson
2009-08-04 12:33 ` Christoph Egger [this message]
2009-08-04 13:03 ` Ian Jackson
2009-08-04 13:40 ` Christoph Egger
2009-08-04 14:20 ` John Levon
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=200908041433.13561.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Keir.Fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.