From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ip1xN-00064P-M9 for garchives@archives.gentoo.org; Mon, 05 Nov 2007 13:25:34 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.2/8.14.0) with SMTP id lA5DOgRI006499; Mon, 5 Nov 2007 13:24:42 GMT Received: from smtp.salomon.at (smtp.salomon.at [193.186.16.13]) by robin.gentoo.org (8.14.2/8.14.0) with ESMTP id lA5DMA8N002679 for ; Mon, 5 Nov 2007 13:22:10 GMT Received: from servex01.wamas.com (servex01.salomon.at [172.28.2.2]) by smtp.salomon.at (8.12.10/8.12.10) with ESMTP id lA5DLo0i020440 for ; Mon, 5 Nov 2007 14:21:50 +0100 (MET) Received: from [172.28.8.78] ([172.28.8.78]) by servex01.wamas.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 5 Nov 2007 14:21:50 +0100 Subject: Re: [gentoo-dev] POSIX shell and "portable" From: Michael Haubenwallner To: gentoo-dev@lists.gentoo.org In-Reply-To: <1194257626.4196.9.camel@uberlaptop.marples.name> References: <472B29B9.50002@gentoo.org> <200711021730.21089.bo.andresen@zlin.dk> <1194022333.3029.3.camel@uberpc.marples.name> <200711021817.32146.bo.andresen@zlin.dk> <1194024908.3029.6.camel@uberpc.marples.name> <20071103001922.GD1907@gentoo.org> <1194050878.16405.10.camel@uberpc.marples.name> <1194254556.6977.46.camel@sapc154> <1194257626.4196.9.camel@uberlaptop.marples.name> Content-Type: text/plain Date: Mon, 05 Nov 2007 14:21:50 +0100 Message-Id: <1194268910.6977.86.camel@sapc154> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Nov 2007 13:21:50.0586 (UTC) FILETIME=[D30FD5A0:01C81FAE] X-Spam-Info: -0.73 () ALL_TRUSTED,BAYES_50,SPF_NEUTRAL X-Scanned-By: MIMEDefang 2.54 on 172.28.2.13 X-Archives-Salt: 3503c7de-04b1-4eb0-9273-bad9919d2e17 X-Archives-Hash: a7b54c00358e5f9895f3df172c6fdeb5 On Mon, 2007-11-05 at 10:13 +0000, Roy Marples wrote: > While I still have access to the u@g.o email, I'll respond here. > > > On Mon, 2007-11-05 at 10:22 +0100, Michael Haubenwallner wrote: > > On Sat, 2007-11-03 at 00:47 +0000, Roy Marples wrote: > > > > As it seems too few people really accept your suggestion, I feel it's > > time for me to chime in too, although I don't know what exactly POSIX-sh > > standard defines. > > > Agreed, but (speaking for alt/prefix): > > > > Alt/prefix is designed to (mainly) work without superuser access on the > > target machine, which may also be Solaris, AIX, HP-UX and the like. > > /bin/sh on such a machine is not POSIX-shell, but old bourne-shell > > (unfortunately with bugs often). > > And it is _impossible_ to have sysadmins to get /bin/sh a POSIX-Shell > > nor to have that bugs fixed. > > > > But yes, on most machines there is /bin/ksh, which IMHO is POSIX > > compliant (maybe also with non-fixable bugs). > > > > Although I do not know yet for which _installed_ scripts it'd be really > > useful to have them non-bash in alt/prefix, I appreciate the discussion. > > > > To see benefits for alt/prefix too, it _might_ require that discussion > > going from requiring /bin/sh being POSIX-sh towards being > > bourne-shell... > > 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 ? 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)... > > 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. > > > > > It seems to me that you actually mean "more FreeBSD-able" or something, > > > > which is a high price to pay for a relatively small part of Gentoo as a > > > > whole. > > > > > > More embeddable. > > > More BSDable. > > > More Linuxable - bash isn't the only linux shell, there are plently of > > > others. > > > > 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". /haubi/ -- Michael Haubenwallner Gentoo on a different level -- gentoo-dev@gentoo.org mailing list