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.
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
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.
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
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.
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
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.
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
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).
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.
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..
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?
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