[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#267142: debian-policy: Sections 10.4 and 6.1 are inconsistent (Posix doesn't say what you think it says)



On Thu, 2004-09-09 at 10:59, Chris Waters wrote:
> I'm not sure that's true (although I'm not sure it's not).  But the
> immediate problem (the one we're trying to solve right now) has to do
> with shell builtins that override our more featureful non-builtin
> utilities. I don't think posh has any issues in this area, so adding
> posh to the required list is not necessary to fix the current bug.
> So, the question is, do we want to add it anyway?


The current policy is roughly equivalent to: "Make scripts work with
posh because this will guarantee that they work with all shells that
implement POSIX features + echo -n".

The problem is that the rationale is incorrect.  A script can work with
posh and still not work with all shells that implement POSIX features
+ echo -n.  (Again: because the script may run programs that some shells
implements differently as builtins.)

Assuming that the goal of 10.4 is portability of scripts across shells
(and thus, freedom for the administrator to point /bin/sh at targets
other than bash) and that we want to retain this goal, we need to
tighten up the language.  The most expedient way to do that, in my
opinion, is to say that the script must work not only on posh but also
on bash and dash.  Posh is effectively already on the list so there is
no question here of "adding" it.  The question that arises from your
comment is whether or not we should remove it.


> Posh is new, and not very extensively tested.  If
> we're going to require compatibility, I want it to be compatibility
> with known, widely used, field-tested shells.
>
> Furthermore, posh is supposed to exist as a test of policy.  If it
> becomes part of policy, then we have a sort of chicken-and-egg
> problem.  The notion makes my head hurt slightly.


If you like we can also say that posh should support all and only
POSIX specified features plus "echo -n".  However, that is already
the idea behind posh.


> As a compromise, I suggest that we say that scripts *must* be
> compatible with our real, working shells, bash and dash, and that
> further, they *should* be compatible with any reasonable
> POSIX-compliant shell.


The problem is that the "should" part is ill-defined.  What is a
"reasonable" POSIX-compliant shell?  That is exactly the question
that needs to be answered by giving an explicit list.

I think it would be simplest to require compatibility with bash,
dash and posh but for the RMs to ignore posh-compatibility bugs until
the next release.

--
Thomas Hood





Reply to: