[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2011-12-25 Thread Victor Mitin
There is one more DASH bug.

Described here:
http://groups.google.com/group/vim_use/browse_thread/thread/837988813a06c280/f8b4aadd575affaa?lnk=gst&q=expect#f8b4aadd575affaa

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/141481

Title:
  dash as #!/bin/sh introduces countless incompatibilities

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2011-03-15 Thread Paul Smith
If GDM is sourcing the user's setup files using any shell other than the
user's defined shell (from getpwent() or whatever) then that's a bug in
GDM.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/141481

Title:
  dash as #!/bin/sh introduces countless incompatibilities

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2011-03-15 Thread ulin
At the very least, Ubuntu should make sure user's rc scripts
(~/.profile, which sources ~/.bashrc for instance)  does not contain
dash-incompatible code by default, as it currently does. Programs like
gdm source those but are run from dash resulting in user's stuff not
being sourced before startup applications from ~/.config/autostart are
lounched.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/141481

Title:
  dash as #!/bin/sh introduces countless incompatibilities

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2010-05-05 Thread Steve Parker
Not really wanting to get into this debate, but having had my tutorial
linked here and associated with an opinion, I must clarify that my ideal
for UNIX and Linux systems is that /bin/sh be in some way consistent,
and provide all Bourne functionality. That is, my personal view is that
stating "#!/bin/sh" says that SVR4 sh is expected; scripts that assume
bash should state "#!/bin/bash" (or possibly "#!/usr/bin/bash", which is
a different issue).

That is academic; the point of this post is to refute the statement that
"http://steve-parker.org/sh/sh.shtml ... mostly cover[s] outdated
incompatabilites between other shells."

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2010-02-25 Thread neuromancer
Temporary tricks for running an sh scripts
http://liquidweather.net/howto/index.php?id=59

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2008-03-13 Thread probono
This is also being discussed on http://brainstorm.ubuntu.com/idea/2225/
- make your vote count ;-)

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2007-10-16 Thread Colin Watson
I have written https://wiki.ubuntu.com/DashAsBinSh (a new version, to
replace the spec that used to be there) to address many of these issues,
and linked it from the Edgy release notes.

As far as non-POSIX constructs go, Paul Smith is right on the money with
his comments in
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481/comments/4, I
think. The proper analogy is a C compiler: it is not a bug in the C
compiler if it stops accepting code that doesn't conform to the standard
and doesn't declare that it uses an extension (in this case, by saying
#! /bin/bash). This is of course not to say that the real dash bugs that
have been identified here should not be fixed.

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2007-09-21 Thread Paul Smith
First, we have to make a distinction between the issues described here
which are POSIX and which mean that there is a bug in dash that should
be fixed, and those which are NOT POSIX, of which, contrary to the
assertion above, there are definitely some.  For example:

$ dash -c 'a=water;echo ${a:2:2}'
dash: Syntax error: Bad substitution

is not POSIX: POSIX does not define substring syntax.  Also:

$ dash -c 'echo $UID'
# no output. how on earth are we supposed to safely and portably get the UID?

POSIX does not define that the shell should set the UID variable.  You
have to use "id".

$ dash -c 'x="1 2"; local y=$x; echo $y'
local: 1: 2: bad variable name

I don't think "local" is defined in POSIX sh, although it appears dash
does try to implement it; if so it should be done right.

$ dash -c 'cnt=6; while [ $((cnt = cnt - 1)) -gt 0 ]; do echo $cnt; done'
dash: arith: syntax error: "cnt = cnt - 1"

I don't think assignment inside arithmetic expressions is defined in
POSIX.

The rest of these do appear to be bugs in dash, although technically the
POSIX spec only guarantees the shell to handle file descriptors 0-9 so
using any FD >9 is not, strictly, portable.

My opinion is that Ubuntu is 100% correct here: they should be using
POSIX shell scripts and any script that does not adhere to POSIX should
NOT start with #!/bin/sh.  Obviously where dash doesn't support POSIX
that's a bug in dash that needs to be fixed.

But, I hope Ubuntu will not bow down to this decade's version of "all
the world's a VAX" and make more true the maxim "every /bin/sh is bash".

Fight the good fight, Ubuntu!

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2007-09-21 Thread Michael Zawrotny
POSIX compliance is exactly the heart of this.  Just because dash *claims* to 
comply
with the standard doesn't necessarily mean that it *actually* does.  
Specifically, as quoted in bug #92189, section 2.6.4 of IEEE 1003.1 states

If the shell variable x contains a value that forms a valid integer 
constant, then 
the arithmetic expansions "$((x))" and "$(($x))" shall return the same 
value.

If dash doesn't behave this way, which it doesn't, then it is not POSIX
compliant.  That being said, I don't believe that POSIX requires /bin/sh
to be compliant.  However, the whole trend in *nix systems over the last
decade or two has been to _improve_  interoperability by adhering to
standards.  Using a non-POSIX shell for /bin/sh clearly goes against
that trend.  It seems pointless to introduce these compatibility issues
that require either editing an enormous number of scripts or
reconfiguring systems to symlink /bin/sh to bash instead of dash just to
save a few kb of disk space.

In my opinion, that is doubly so since the incompatibility is recently
introduced.  That is, /bin/sh _used_ to be bash, and it was (IMO
gratuitously) changed in a way that created problems.  The maintainers
should acknowledge the error and either patch dash to actually comply
with POSIX or put bash back as the default /bin/sh.

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 141481] Re: dash as #!/bin/sh introduces countless incompatibilities

2007-09-21 Thread William Grant
The scripts *are* buggy. dash is POSIX-compliant, so all POSIX-compliant
scripts will work with it. If they use bash-specific features, they must
specify that they are to be executed by /bin/bash, rather than a general
POSIX-compliant shell.

** Changed in: dash (Ubuntu)
   Status: New => Invalid

-- 
dash as #!/bin/sh introduces countless incompatibilities
https://bugs.launchpad.net/bugs/141481
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs