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

Re: POSIX shell; bash ash pdksh & /bin/sh

Hello Manoj,

On Mon, Aug 03, 1998 at 01:27:08PM -0500, Manoj Srivastava wrote:
> 	Because bash was essential, packages started using it. It was
>  guaranteed to be on the system, and hence rapidly became a defacto
>  standard. 
> 	Now, because packages and people took to heart the implied
>  promise of things labeled essential, we can't easily do away with it,
>  without breaking expectations and systems. 
> 	The work and expense and the instability involved demand a
>  darned good reason.
> 	I am surprised that I have to spell this out.

Why can't we easily do away with it?

1) Make all shell scripts either posix clean or call "#!/bin/bash"
2) Make a virtual package "posix-shell" and bash and other posix comaptible
   /bin/sh replacements provide it.
3) Make sure that an essential package depends on posix-shell.

4) After a long long time the remaining packages that use "#!/bin/bash" should
depend on bash (which is still essential).

5) Then, as a last step, make bash non-essential.

There is still an issue with partial upgrades, if only bash is updated there
may still be packages which depend informally on the existence of bash. The
long timeframe the transition takes should make this less iportant. Maybe
the last step can be sheduled until another incompatible change (like the
libc5-libc6 transition) occurs. maybe there are other solutions.

Manoj, since when do you fear the technical challenge? Don't you think that
it would be technical elegant to have /bin/sh posix without further
assumptions? Nobody is trying to rush this. All steps above don't break
anything beside the last step (making bash non-essential), and this last
step can be in the very far future. But also if we never have the courage to
take the last step, step 1 is already policy, step 2 and 3 would make it
possible to force-remove-essential bash when another posix shell is
installed. Step 4 would make obvious were bashisms are used/needed.

> 	Please refresh my memory. The only package so downgreaded, in
>  case you have forgotten, was made into a virtual package that also
>  was a dependency of an essential package; and the reasons for doing
>  so were that other packages could provide it.
> 	Does not look like no one raised a fuss. To all intents and
>  practices, an awk package is essential.

Can't the same be done here --- a posix shell is essential?
> 	You make bash a virtual package, and make an essential package
>  depend on it, and all packages that provide the virtual bash can be
>  invoked as bash and not break any scripts; and no one shall talk
>  about implied promises either.

Well, the right approach is to convert the assumption "a bash is installed"
to the better assumption "a posix shell is installed". When all packages
reflect this change of implied dependency, making bash non-essential should
be more safe.
> 	Yes, I do. Raul has talked about how to do it if we are to do
>  it. I see no compulsive reasons to do it, so far. 

The implied prerequisite is that we have a couple of posix shells to choose
from. This has to be examined before any further actions are taken, granted.

I think you are overstating the efforts needed for this. It is not so much a
matter of do it right, but a matter of do it slowly, carefully enough.
> 	Who the hell is talking about not having interchangeable
>  /bin/sh? I am talking about making bash onn-essential, and
>  potentially not present on the system You are confused.
> 	There is no replacement for /bin/bash.

When we have an interchangeable /bin/sh (criterium: posix compliance), we
can also have all packages which really need bash depend on bash. I don't
think that too many are in this category. People who dislike the dependency
on a special shell can still aim at posix compliance and use /bin/sh. I
still think that you are exaggerating the implied dependency on bash of the
Debian distribution. How many packages would really depend on bash if the
steps would be taken?

> 	You are too late. I do not think bash can be made
>  non-essential easily. And I see no reason for doing so.

You still have to substantiate your claim that it is technically hard to
make the change. I can't believe that we maintain our distribution so
incompatible that it breaks heavily if we miss certain extensions of bash
over posix shell.

Could somebody make a grep for "!/bin/bash" on his system?

I would be surprised to found more than twenty-fifty packages affected, but
I may be wrong. And I would be very surprised if there are more than a dozen
packages that really need to depend on bash.

For example:
brinkmds@flora:~$ less /var/lib/dpkg/info/xtron.postinst
#!/bin/bash -e
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
brinkmds@flora:~$ less /var/lib/dpkg/info/xdigger.postinst
#!/bin/bash -e
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
brinkmds@flora:~$ less /var/lib/dpkg/info/uae.postinst
#!/bin/bash -e
update-alternatives --install /usr/bin/uae uae /usr/X11R6/bin/uae-x 100
# Automatically added by dh_installmenu
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
# End automatically added section
brinkmds@flora:~$ less /var/lib/dpkg/info/menu.postinst
set +e
#killall -KILL update-menus 2> /dev/null
chmod a+x /usr/bin/update-menus
brinkmds@flora:~$ less /var/lib/dpkg/info/libjpegg6a.postinst
set -e
if [ "$1" = "configure" ]

Manoj, could you add other circumstances where bash is implied beside shell

Thank you,

"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09

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

Reply to: