FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 02-10-2008, 05:16 PM
Thomas Bushnell BSG
 
Default dash bug which is affecting release goal

Dash has a serious bug which is causing grief.

The problem is that it overrides the system's "test" command (in
Debian, /usr/bin/test and /usr/bin/[) and does so in a way which is
inconsistent with the Debian versions.

Nothing in Posix permits this behavior, but it is tolerated by the
standard *provided* the shell does not change the syntax of the command.
Alas, dash does change the syntax of the command.

Now bug reports are being filed claiming that failure to conform to
dash's non-Posixism is a bug. Programs which expect the behavior of
Debian's "test" command are not buggy. What is buggy is a shell which
overrides the test command in an inconsistent way.

There is nothing bash-specific about expecting the "test" command to be
implemented in the normal way that Debian's "test" program is
implemented. There is no reliance on a non-Posix *shell* feature when
one expects *other programs* to work normally.

Shells can override commands, but only if they don't play games with the
syntax.

Thomas



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 05:57 PM
Russ Allbery
 
Default dash bug which is affecting release goal

Thomas Bushnell BSG <tb@becket.net> writes:

> Dash has a serious bug which is causing grief.
>
> The problem is that it overrides the system's "test" command (in
> Debian, /usr/bin/test and /usr/bin/[) and does so in a way which is
> inconsistent with the Debian versions.

Onlookers should see http://bugs.debian.org/267142 for the long history of
the previous discussions of this.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 05:58 PM
Pierre Habouzit
 
Default dash bug which is affecting release goal

On Sun, Feb 10, 2008 at 06:16:44PM +0000, Thomas Bushnell BSG wrote:
> Dash has a serious bug which is causing grief.
>
> [ strip whining ]

> Alas, dash does change the syntax of the command.
>
> [ whine whine whine ]

What is that change please ? Last time I checked dash supported the
proper POSIX required options, so I'm surprised. Instead of whining,
actually giving a bug's reference and an example of package that is
hindert by this issue would've helped.

--
O Pierre Habouzit
O madcoder@debian.org
OOO http://www.madism.org
 
Old 02-10-2008, 06:17 PM
Thomas Bushnell BSG
 
Default dash bug which is affecting release goal

On Sun, 2008-02-10 at 19:58 +0100, Pierre Habouzit wrote:
> On Sun, Feb 10, 2008 at 06:16:44PM +0000, Thomas Bushnell BSG wrote:
> > Dash has a serious bug which is causing grief.
> >
> > [ strip whining ]
>
> > Alas, dash does change the syntax of the command.
> >
> > [ whine whine whine ]
>
> What is that change please ? Last time I checked dash supported the
> proper POSIX required options, so I'm surprised. Instead of whining,
> actually giving a bug's reference and an example of package that is
> hindert by this issue would've helped.

Dash does not implement the features of Debian /bin/test. It is not
sufficient to implement only the features of Posix /bin/test.

The policy requires that I adapt to other Posix shells, not other Posix
implementations of test, ls, and other things.

Or are you saying that it's ok for dash to override random Debian
commands in incompatible ways?

Thomas



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 06:19 PM
Thomas Bushnell BSG
 
Default dash bug which is affecting release goal

On Sun, 2008-02-10 at 10:57 -0800, Russ Allbery wrote:
> Thomas Bushnell BSG <tb@becket.net> writes:
>
> > Dash has a serious bug which is causing grief.
> >
> > The problem is that it overrides the system's "test" command (in
> > Debian, /usr/bin/test and /usr/bin/[) and does so in a way which is
> > inconsistent with the Debian versions.
>
> Onlookers should see http://bugs.debian.org/267142 for the long history of
> the previous discussions of this.

Thank you for adding that Russ; I looked and couldn't find it right
away.

I think we need to address this before we change /bin/sh as default.
Merely papering it over is not suitable, because it means we must deal
with a changing target; every new "Posix shell" that implements slightly
different builtins will cause yet more problems.

Thomas



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 06:26 PM
Mike Bird
 
Default dash bug which is affecting release goal

On Sun February 10 2008 10:16:44 Thomas Bushnell BSG wrote:
> Shells can override commands, but only if they don't play games with the
> syntax.

Agreed. Within the Debian world, dash has redefined test rather
than building in test. Therefore, within the Debian world, dash
is not Posix compliant. Within the Debian world, this is a dash
bug. Possible solutions include Debian-specific patches to either
make dash's test compatible or to disable dash's incompatible test.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 06:29 PM
Pierre Habouzit
 
Default dash bug which is affecting release goal

On Sun, Feb 10, 2008 at 06:57:51PM +0000, Russ Allbery wrote:
> Thomas Bushnell BSG <tb@becket.net> writes:
>
> > Dash has a serious bug which is causing grief.
> >
> > The problem is that it overrides the system's "test" command (in
> > Debian, /usr/bin/test and /usr/bin/[) and does so in a way which is
> > inconsistent with the Debian versions.
>
> Onlookers should see http://bugs.debian.org/267142 for the long history of
> the previous discussions of this.

$ dash -c 'test a = a -a b = b ; echo $?; [ a != a -o a = b ]; echo $?'
0
1

WTF is going on please ? -a and -o are prefectly supported (at least
in the unstable's dash)

And FWIW in the last POSIX copy I own, in the shell and utilities
document:
* test -a
* test -o
* test ( )
are XSI (X/Open System Interfaces) optional features, that unlike what
Thomas pretend are properly documented.

I agree we would like those XSI extensions to be implemented in our
/bin/sh shells. But AFAICT dash complies, even for the () grouping:

$ dash -c 'test ( a = a -o b = 1 ) -a c = c ; echo $?'
0

How come no-one even *bothered* to check. I have my plate full with
whiners.

--
O Pierre Habouzit
O madcoder@debian.org
OOO http://www.madism.org
 
Old 02-10-2008, 06:34 PM
Thomas Bushnell BSG
 
Default dash bug which is affecting release goal

On Sun, 2008-02-10 at 10:57 -0800, Russ Allbery wrote:
> Thomas Bushnell BSG <tb@becket.net> writes:
>
> > Dash has a serious bug which is causing grief.
> >
> > The problem is that it overrides the system's "test" command (in
> > Debian, /usr/bin/test and /usr/bin/[) and does so in a way which is
> > inconsistent with the Debian versions.
>
> Onlookers should see http://bugs.debian.org/267142 for the long history of
> the previous discussions of this.

Indeed, I had forgotten that we had actually reached consensus and then
stalled at the point of getting the list of allowed-to-deviate builtins
settled. Colin had proposed the winning solution, IIRC.

The only builtin which we identified needed to be on that list was test
itself, and the problem here was that the deviations in posh's
implementation of test would pose serious problems.

That could be solved by saying something like "test may be builtin in
inconsistent ways, provided that X, Y, and Z features still are
supported." That could be written (by careful choice of X, Y, and Z) to
enable bash and dash to pass muster and still avoid the problems that
supposedly are raised with posh.

The other solution--which may be an acceptible short-term one, is to
specify explicitly that shell scripts must work with Debian bash and
Debian dash. I have no objection to that, and continue to think it is
the simplest approach.

As always, I am happy with just about any of these solutions, but the
charge-blindly-ahead method is not good.

Thomas



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 06:34 PM
Pierre Habouzit
 
Default dash bug which is affecting release goal

On Sun, Feb 10, 2008 at 07:17:58PM +0000, Thomas Bushnell BSG wrote:
>
> On Sun, 2008-02-10 at 19:58 +0100, Pierre Habouzit wrote:
> > On Sun, Feb 10, 2008 at 06:16:44PM +0000, Thomas Bushnell BSG wrote:
> > > Dash has a serious bug which is causing grief.
> > >
> > > [ strip whining ]
> >
> > > Alas, dash does change the syntax of the command.
> > >
> > > [ whine whine whine ]
> >
> > What is that change please ? Last time I checked dash supported the
> > proper POSIX required options, so I'm surprised. Instead of whining,
> > actually giving a bug's reference and an example of package that is
> > hindert by this issue would've helped.
>
> Dash does not implement the features of Debian /bin/test. It is not
> sufficient to implement only the features of Posix /bin/test.
>
> The policy requires that I adapt to other Posix shells, not other Posix
> implementations of test, ls, and other things.
>
> Or are you saying that it's ok for dash to override random Debian
> commands in incompatible ways?

Well, let's drop bash right away then !

$ bash -c 'type test'; zsh -c 'type test'; posh -c 'type test'; dash -c 'type test'
test is a shell builtin
test is a shell builtin
posh: type: not found
test is a shell builtin

--
O Pierre Habouzit
O madcoder@debian.org
OOO http://www.madism.org
 
Old 02-10-2008, 06:42 PM
Raphael Geissert
 
Default dash bug which is affecting release goal

Pierre Habouzit wrote:

> On Sun, Feb 10, 2008 at 06:16:44PM +0000, Thomas Bushnell BSG wrote:
>> Dash has a serious bug which is causing grief.
>>
>> [ strip whining ]
>
>> Alas, dash does change the syntax of the command.
>>
>> [ whine whine whine ]
>
> What is that change please ? Last time I checked dash supported the
> proper POSIX required options, so I'm surprised. Instead of whining,
> actually giving a bug's reference and an example of package that is
> hindert by this issue would've helped.
>

I just replied to Thomas on the bug report including some information that
demonstrates that his arguments on dash not implementing some (at least the
one mentioned on the report) /usr/bin/test features is not valid.
For further reference please see #464995, which is the bug report Thomas is
talking about.

Sincerely,
--
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org