Re: Official position on POSIX compliance?
On Wed, Jul 07, 2004 at 07:46:38AM +0200, Andreas Metzler wrote:
> Clint Adams <schizo@debian.org> wrote:
> >> * 'tail -1' and 'head -1' instead of POSIX-compliant 'tail -n 1' and
> >> 'head -n 1'.
>
> >> * user/group specification as 'user.group' as an argument for chown, for
> >> example. The correct POSIX form is 'user:group'.
>
> Which is probably the single thing where the POSIX way is obviously
> better. (as it does not break on usernames containing "."). ;-)
I don't really agree here. There are a lot of corner-cases
where && and || are obviously superior to -a and -o for instance.
> [...]
> > * 'command -v' and 'type' instead of '/usr/bin/which' or similar mechanism.
>
> No. i.e. although it is a UP extension we are probably going to
> embrace it, simply because which is not up to the job. (no support for
> shell functions/aliases). See http://bugs.debian.org/218530 for
> details.
True. So far I've help back any changes involving command -v, since
this is undecided. For the trivial cases I've changed type to command
-v instead, though.
> >> * Does the majority of Debian developers agree, that this compliance
> >> should be enforced and bugs should be filed against the non-compliant
> >> packages?
>
> No way to tell without a GR.
I don't think there's a need for a GR to file wishlist bugs for this
kind of issues, and concerning non-compliance for builtins, we already
have that as part of policy, though it needs to be clarified a bit.
We shouldn't cater to POSIX where it is just obviously insane, but I
think we should do our best, especially in base/required/important and
standard packages.
> > Seems that way.
>
> >> * What severity should be assigned to non-POSIX-compliance bugs (if any)?
>
> > serious; it's a violation of a 'must' directive of Policy 10.4.
In theory, yes. But 10.4 is a bit vague, hence I've been filing them as
minor. Also, filing RC-bugs this close to a release is probably not a
good idea =) Also, 10.4 only states that the shell-features must be
POSIX compatible, nothing is said about other things, like tail, head,
egrep etc.
> No.
> 1) policy says nothing about e.g. chmod, as it is no shell builtin.
You mean chown, I presume? chown is serious in a different manner
though; it will break with user- and groupnames that contains a `.'.
> 2) We have yet not even decided which superset of POSIX-sh we will
> require (probably just UP and echo -n)
Or just command -v + echo -n.
> 3) "echo -n" is definitely not POSIX (even forbidden for XSI) but we
> encourage it in policy anyway.
Yes, and I think we can continue to do so without worries. There are
replacements (printf), but I don't think we should bother.
> 4) There is usually[1] no point submitting bugs about usage of non-POSIX
> options for our userland. In the first place our userland is not POSIX
> compatible (check e.g findutils) and in the second place we call it
> Debian/GNU Linux *because* our userland offers more than barebone
> posix.
Filing bugs against usage of non-POSIX things in our scripts is useful
imho, since it allows for use of smaller script-engines and hopefully in
the end also use of busybox with the base-system instead of a large
quantity of other tools; a big boon for embedded projects.
However, cases where extra functionality is provided or bugs in POSIX
aren't reimplemented (GNU has the very sane policy not to reimplement
others' bugs...)
> David Weinehall <tao@debian.org> has started auditing packages for
> selected XSI extensions, and has submitted the respective bugreports
> (with patches) as minor, which seems to be correct to me.
Indeed. Things that do not break with a non-POSIX shell (such as
tail -1, head -1, egrep, and fgrep) I file as wishlist, and I when I
remember to, I file chown as normal, since it's not only a POSIX-issue,
but can break in other cases too (normally I forget though). And even
where used as chown 0.0 for instance, it still sets a bad example.
[snip]
Regards: David Weinehall
--
/) David Weinehall <tao@acc.umu.se> /) Northern lights wander (\
// Maintainer of the v2.0 kernel // Dance across the winter sky //
\) http://www.acc.umu.se/~tao/ (/ Full colour fire (/
Reply to: