Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 18:49:28 -0400
From:      Mike Barcroft <mike@FreeBSD.org>
To:        Mark Valentine <mark@thuvia.demon.co.uk>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: /usr/posix: a first cut
Message-ID:  <20021026184928.E47672@espresso.q9media.com>
In-Reply-To: <200210261944.g9QJiErS012646@dotar.thuvia.org>; from mark@thuvia.demon.co.uk on Sat, Oct 26, 2002 at 08:44:14PM %2B0100
References:  <20021026143724.D47672@espresso.q9media.com> <200210261944.g9QJiErS012646@dotar.thuvia.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Valentine <mark@thuvia.demon.co.uk> writes:
> > From: Mike Barcroft <mike@freebsd.org>
> > Date: Sat 26 Oct, 2002
> > Subject: Re: /usr/posix: a first cut
> 
> > 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.
> 
> I was hoping this wouldn't get that much out of hand; I see the
> differences being very small.

I don't.  Take for instance /usr/posix/bin/ps which will be completely
different, with many conflicting options.

> Most users will never see the POSIX-related manual pages if they
> are separate.

Users that don't need POSIX-conformant applications won't need to read
about conformant versions and vice versa.

> Do you know of any other systems which take this approach?  I've
> sort of been following Solaris' style, which I've found to be effective.

Take a look at the sccs(1) manual on Solaris to see why I think
manuals get cluttered when you go that route.

> > I think we should suggest in posix(7) that users seeking conformant
> > utilities change their PATH and MANPATH.
> 
> I explicitly didn't do that, because I think /usr/posix is there for
> script writers, not users.

I think both will be using it.

> In fact, putting /usr/posix at the start of your path is more likely
> to _break_ the scripts you run.

I use a different shell for scripting (/bin/sh) vs. my regular shell
(/bin/tcsh).  A run of w(1) on freefall shows I'm not alone, 0/27
users are running sh(1).  I believe most advanced Bourne shells define
something to distinguish themselves from regular /bin/sh, so it
shouldn't be a problem to change the path only for interactive
sessions.

> Portable scripts don't hardwire paths for standard executables, they
> rely on a reasonable default environment for the platform which behaves
> as that platform normally does (there are exceptions to this rule, of
> course).
> 
> An example would be a script which knows that all its target platforms
> support a POSIX.1 expr(1) command, even if it's not the default behaviour:
> 
>     #!/bin/sh
> 
>     case `uname` in
>     FreeBSD)	expr=/usr/posix/expr;;
>     SunOS)	expr=/usr/xpg4/bin/expr;;
>     *)		expr=expr;;
>     esac
> 
>     ... use $expr ...
> 
> Note that the default in absence of any better knowledge is "hope and pray".

[Garrett covered this.]

Best regards,
Mike Barcroft

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021026184928.E47672>