From: Roy Marples <uberlord@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] POSIX shell and "portable"
Date: Mon, 05 Nov 2007 20:32:09 +0000 [thread overview]
Message-ID: <1194294729.2906.17.camel@uberpc.marples.name> (raw)
In-Reply-To: <1194268910.6977.86.camel@sapc154>
On Mon, 2007-11-05 at 14:21 +0100, Michael Haubenwallner wrote:
> > Actually you missed the mark completely.
> > Nothing in the tree itself specifies what shell to use - instead it's
> > the package manager. So the PM on Gentoo/Linux/FreeBSD *could*
> > be /bin/sh and on the systems where /bin/sh is not possible to change to
> > a POSIX compliant shell then it can still use /bin/bash or wherever it's
> > installed.
>
> So "have the installed scripts to not require bash" is another topic ?
No, it's a valid topic.
Either the profile could hook src_unpack or the ebuild could call a
function to do this
sed -e '1 s,^#!/bin/sh,#!/path/to/bash,'
Either for all files in CONTENTS or all arguments passed.
>
> Ok then:
> Given that we want to have the tree "more generic unix-able":
> What is the benefit from having the tree being POSIX- but not
> bourne-shell compatible, so one still needs bash on Solaris/AIX/HP-UX ?
> Because I'd say those three are the biggest substitutes for "unix",
> while I'd call *BSD and Linux just "unix derivates" (although with
> enhancements)...
The benefit is that we're not locked into any one toolset. This makes
development of the tree more attractive to non Linux developers I would
say.
> > This also applies to the userland tools. If the ebuild or eclass *has*
> > to use the GNU variants then it should either adjust $PATH so that it
> > finds them first, or it prefixes them all with g, like it does on
> > Gentoo/FreeBSD.
> >
> > None of this is technically challenging in itself, it's just that the
> > key people who would have to do the work to make this possible have
> > already given a flat out no.
>
> In the early prefix days I had some portage enhancement, providing a
> wrapper-function around all coreutils/findutils/diffutils/grep/others,
> trying to find a GNU implementation for them. And if not found, try to
> map some args to the native ones ("xargs -r" fex - although didn't work
> as shell-function).
> But then we decided to always provide USERLAND=GNU in prefix and this
> portage patch was thrown away.
I dislike wrappers. The maintainers of revdep-rebuild say the same thing
and I'm sure others would as well.
An alternative would be to say have a list of ebuilds that don't require
the GNU toolset (via an eclass or the ebuild itself) in a profile and
slowly update the ebuilds and the lists when we can make them work with
the desired userlands.
If it requires gratuitous use of extensions then maybe the package
itself should be patched upstream instead of us having to write overly
complex ebuilds.
Probably not the best idea for this, but workable.
> > > More (generic) unix-able.
> >
> > Exactly so :)
>
> Not really as long as not being bourne shell compatible like autoconf's
> configure. I won't trust to have a POSIX shell like /bin/ksh everywhere,
> but /bin/sh only, which usually is just a bourne shell on "unix".
As I said above, portage could change this.
Think of it as an #ifdef :)
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2007-11-05 20:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 13:44 [gentoo-dev] More general interface to use flags Marijn Schouten (hkBst)
2007-11-02 14:04 ` Roy Marples
2007-11-02 14:27 ` Marijn Schouten (hkBst)
2007-11-02 14:52 ` Roy Marples
2007-11-02 14:59 ` Mike Frysinger
2007-11-02 15:30 ` Roy Marples
2007-11-02 15:38 ` Mike Frysinger
2007-11-02 15:48 ` Roy Marples
2007-11-02 15:58 ` Mike Frysinger
2007-11-02 16:10 ` Roy Marples
2007-11-02 16:30 ` Bo Ørsted Andresen
2007-11-02 16:52 ` Roy Marples
2007-11-02 17:17 ` Bo Ørsted Andresen
2007-11-02 17:35 ` Roy Marples
2007-11-03 0:19 ` [gentoo-dev] POSIX shell and "portable" Fabian Groffen
2007-11-03 0:47 ` Roy Marples
2007-11-05 9:22 ` Michael Haubenwallner
2007-11-05 10:13 ` Roy Marples
2007-11-05 13:21 ` Michael Haubenwallner
2007-11-05 20:21 ` Mike Frysinger
2007-11-05 23:18 ` Roy Marples
2007-11-06 7:12 ` Ciaran McCreesh
2007-11-06 7:40 ` Roy Marples
2007-11-06 8:03 ` Ciaran McCreesh
2007-11-06 8:25 ` Roy Marples
2007-11-06 9:04 ` Michael Haubenwallner
2007-11-05 20:32 ` Roy Marples [this message]
2007-11-05 20:55 ` Fabian Groffen
2007-11-05 22:27 ` Mike Frysinger
2007-11-03 0:57 ` Natanael copa
2007-11-03 1:06 ` Roy Marples
2007-11-03 16:19 ` [gentoo-dev] " Steve Long
2007-11-03 1:10 ` [gentoo-dev] " Roy Marples
[not found] ` <b41005390711022225i4f30bb01jbf5a040c60c4b088@mail.gmail.com>
2007-11-03 5:26 ` Fwd: [gentoo-dev] More general interface to use flags Alec Warner
2007-11-03 21:57 ` Mike Frysinger
2007-11-04 10:54 ` [gentoo-dev] " Steve Long
2007-11-04 21:54 ` Alec Warner
2007-11-06 11:50 ` Steve Long
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=1194294729.2906.17.camel@uberpc.marples.name \
--to=uberlord@gentoo.org \
--cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox