#510358 zsh: please allow use as /bin/sh

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
"brian m. carlson"
Date:
2013-12-05 02:57:04 UTC
Severity:
wishlist
#510358#5
Date:
2008-12-31 21:41:27 UTC
From:
To:
It would be very nice if zsh could be used as /bin/sh.  Several other
shells offer this capability, and I'd like to see zsh added to the list.

#510358#10
Date:
2009-01-01 20:44:34 UTC
From:
To:
Hi Brian,

I am not sure to what list you are referring to as /bin/sh
is not using the normal /etc/alternatives system -- Can
you provide more info, please?


Richard

#510358#15
Date:
2009-01-01 21:00:32 UTC
From:
To:
There isn't a list per se; I was using that term metaphorically.  dash,
posh, ksh, mksh, and pdksh all have support for diverting /bin/sh to
their respective shells.  I'd like zsh to add that support.

Obviously, the best solution is to make all the shells use the
alternatives mechanism, but I think that may be impossible since /bin/sh
is so essential to the system that dpkg (which provides
update-alternatives) may not be able to be installed unless there is a
working /bin/sh.  Major props if you can get it to work.

#510358#20
Date:
2009-01-01 21:25:12 UTC
From:
To:
What kind of support are you looking for? Calling zsh as sh will put
it into compatible mode, so bending the symlink is no problem.

That is something for debian-devel@ldo, not for us :p

Wanna write a proposal?


Richard

#510358#25
Date:
2009-01-01 21:41:33 UTC
From:
To:
I want the zsh package to ask me if it should divert /bin/sh, like the
other shells do.  In other words, I want zsh to be supported as
/bin/sh; if there is a bug with /bin/sh compatibility, that that bug
will be taken seriously.

I may at some point.  I suspect it will be technically difficult,
though.

#510358#30
Date:
2009-01-01 21:49:35 UTC
From:
To:
During my bug triage, I have installed pretty much all shells I could
find. None of them asked me if I wanted to bend /bin/sh to them.

What level of questions did you set dpkg to ask you?


Richard

#510358#35
Date:
2009-01-01 21:56:53 UTC
From:
To:
Okay, I just checked, and dash, posh, and mksh all ask.  pdksh and ksh
don't seem to ask like I thought they did.  I would like zsh to ask.

Low.  Try dpkg-reconfigure, which will ask every question, regardless of
priority.

#510358#40
Date:
2009-01-01 22:00:43 UTC
From:
To:
On Thu, Jan 1, 2009 at 22:56, brian m. carlson <sandals@crustytoothpaste.ath.cx> wrote:

Clint, what is your take on this? Do we want to ask this question with
a low priority? I don't know how I feel about touching something as
important as this manually.

Yah, I know. I just wanted to know which level you use. Thanks,
though :)


Richard

#510358#45
Date:
2009-01-02 15:03:29 UTC
From:
To:
In the past, there was at least one incompatibility (that could have
been worked around with a shell function).  I don't know how suitable
zsh is as a Debian /bin/sh right now, and I'm not sure we want to
support that (the only compelling benefit I could see is having zsh
be the only shell on your system, which is currently impossible anyway).

Brian, are you using zsh as /bin/sh already, with a manual symlink change?
If so, have you run into any problems?

If we do want to do this, it will reintroduce a dependency on debconf
(which is not a very big deal).

#510358#50
Date:
2009-01-02 15:29:21 UTC
From:
To:
That's why I filed it as a wishlist bug.  If there are known
incompatibilities, you might want to block this bug with the appropriate
bug numbers.

No, I'm not.  I understand that grml (a live CD distribution based on
Debian) set zsh as /bin/sh for some time, and did find a few bugs.  See
<http://grml.org/faq/#zsh_binsh>.  Mac OS X used to do it as well.

I just performed the symlink change and I'll let you know what does and
doesn't work.  I'll certainly file wishlist bugs if I encounter any
problems.

#510358#55
Date:
2009-01-02 15:57:34 UTC
From:
To:
you need to fix lots of stuff that breaks, especially during package
installation.


The dash initiative will have made this situation a lot better, but I did not
try, since then. Call me a burnt child ;)


Richard

PS: I should have mentioned that in my first mail, sorry..

#510358#60
Date:
2009-01-02 15:59:20 UTC
From:
To:
Anything I can remember has since been fixed, except for "jobs -p", which
may never be.  Admittedly that one shouldn't ever matter.

Great.  Also, why?

#510358#65
Date:
2009-01-02 15:59:38 UTC
From:
To:
If you run into problems, try it with dash, as well.

If if works then, file against Zsh with prio normal.
If it does _not_ work after that, file against the package containing the
script. If it's a preinstall etc script, I think you need to file as grave, but
I could be wrong on that.


RIchard