From owner-freebsd-standards Sat Oct 26 11:45:42 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1981037B401 for ; Sat, 26 Oct 2002 11:45:40 -0700 (PDT) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AB6A43E6A for ; Sat, 26 Oct 2002 11:45:39 -0700 (PDT) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id 9E9B79C0E; Sat, 26 Oct 2002 14:37:24 -0400 (EDT) Date: Sat, 26 Oct 2002 14:37:24 -0400 From: Mike Barcroft To: Mark Valentine Cc: freebsd-standards@freebsd.org Subject: Re: /usr/posix: a first cut Message-ID: <20021026143724.D47672@espresso.q9media.com> References: <200210261639.g9QGdZ8F008950@dotar.thuvia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210261639.g9QGdZ8F008950@dotar.thuvia.org>; from mark@thuvia.demon.co.uk on Sat, Oct 26, 2002 at 05:39:35PM +0100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Valentine writes: > The following patch implements a /usr/posix directory where POSIX.1 versions > of utilities which conflict with traditional BSD behaviour can be installed. > > It installs versions of expr(1) and sort(1) there, reverts /bin/expr to > being BSD-compatible, and enables the new /usr/posix/sort behaviour by > bumping _POSIX2_VERSION in back to 200112. > > In actual fact the /usr/posix binaries are exactly what were /bin/expr > and /usr/bin/sort, which are replaced by one-line scripts which call the > /usr/posix versions with the appropriate existing compatibility environment > variable set. > > The patch updates heir(7) and adds an initial stab at a posix(7) page. > > NOTES: > > 1. I chose /usr/posix instead of /usr/posix/bin which has been > mentioned to align with historical BSD practice: /usr/ucb, > /usr/games, /usr/contrib and so on; also, I'd expect any > POSIX-specific libraries to go under /usr/lib/posix or > similar, rather than /usr/posix/lib. It's not like this > is a separate subsystem. > > This is a point for discussion. I would prefer to have /usr/posix/bin and /usr/posix/man. I think manuals will get too cluttered if we try to document two differing utilities in one manual. We would need some sort of manual preprocessor so that the manuals could share the same mdoc source. at(1) does something like this for pathnames. We would need something more complicated than this, but certainly it wouldn't be difficult to create a sed preprocessor script to handle the conditional segments. > 2. /usr/posix/expr still obeys the EXPR_COMPAT environment > variable, which makes the manual page a little messy. > > The alternative is to compile separate binaries with and > without -DEXPR_COMPAT (once I implement that) instead - > it's probably tidier, but let's see what people think. > > 3. The GNU sort manual page is somewhat lacking - it seems a > shame to take it off the vendor branch to add the pathetic > attempt I've made at documenting the two versions. > > All ideas welcome. We are probably going to have to if we want to do a good job with documentation. > 4. Were any other things affected unduly by the previous bump > of _POSIX2_VERSION to 200112? If so, I'll need to look at > what to do with those. > > 5. /usr/posix/sort still obeys the _POSIX2_VERSION environment > variable. I think that's fine. > > This is just a first cut to get a feel for whether people think something like > this is useful. Any and all comments are welcome. Documentation improvements > from those more familiar with the standards are especially welcome. I think we should suggest in posix(7) that users seeking conformant utilities change their PATH and MANPATH. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message