Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 14:37:24 -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:  <20021026143724.D47672@espresso.q9media.com>
In-Reply-To: <200210261639.g9QGdZ8F008950@dotar.thuvia.org>; from mark@thuvia.demon.co.uk on Sat, Oct 26, 2002 at 05:39:35PM %2B0100
References:  <200210261639.g9QGdZ8F008950@dotar.thuvia.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Valentine <mark@thuvia.demon.co.uk> 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 <unistd.h> 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




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