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

Re: [Debconf-discuss] Writeup after the "Cleaning up the /bin/sh mess" lunch discussion



Ian Jackson <ijackson@chiark.greenend.org.uk> writes:

> Goswin von Brederlow writes ("Writeup after the "Cleaning up the /bin/sh mess" lunch discussion"):
>> the writeup is largely based on what was already in gobby, what was
>> discussed during and what I figured out later with Jonathan Nieder when
>> refactoring the cleanup solution to have /bin/sh in base-files instead
>> of a virtual package.
>
> Thanks for doing this.  It looks good on the whole but I have some
> small comments.
>
>> 2) Requirements and goals
> ...
>> - Failures of shells as /bin/sh are whishlist bugs unless README.Debian
>>   claims suitability
>
> I think the severity of these bugs would be up to the shell
> maintainer.

Sure. Just a basic default so nobody thinks bugs against tcsh not
working as /bin/sh are RC critical.

>> 3) How to get out of the corner we have painted ourself into
>> ------------------------------------------------------------
> ...
>> Solution in all shells (bash, dash, possibly mksh) we do:
> ...
>> - Remove diversion of /bin/sh (with --package base-files) without moving
>>   files
>
> If we have the order

dash owning the diversion               bash owning the diversion

>   1. new bash unpacked and configured
- bash does nothing                     - bash changes diversion to base-files
- /bin/sh.distrib disapears             - /bin/sh.distrib disapears
- /bin/sh -> dash                       - /bin/sh -> dash
- /bin/sh belongs only to dash          - /bin/sh is not known to dpkg

>   2. new dash unpacked
- dash changes diversion to base-files  - dash does nothing
- /bin/sh.distrib disapears (again)     - /bin/sh.distrib disapears (again)
- /bin/sh -> bash                       - /bin/sh -> dash
- /bin/sh is not known to dpkg          - /bin/sh is not known to dpkg

>   3. new base-files unpacked
- base-files overwrites /bin/sh         - base-files overwrites /bin/sh
- /bin/sh -> dash                       - /bin/sh -> dash
- /bin/sh belongs only to base-files    - /bin/sh belongs only to base-files

At this point we still have a diversion by base-files. Both the dash and
bash postinst will remove the diversion by base-files without altering
/bin/sh and irespective of who created it. The "Replaces" in base-files
takes care of avoiding file overwrite conflicts.

> then after 2 /bin/sh does not exist.
Only /bin/sh.distrib disapears, although it already was deleted in step 1.

> So we need a dependency to prevent this, or we need to retain the
> diversion until after 3.  It might be helpful to try to enumerate all
> of the possible intermediate states.

I think I will actually patch base-files to use /bin/sh -> mksh for
testing purposes. That way it is clear in every step from which package
the /bin/sh link comes from and that we allways end up with /bin/sh
coming from base-files at the end. Just for the tests.

>> Question: Should dash Pre-Depends: base-files (>= version)?
> ...
>> Since bash is still essential nothing breaks. But we temporarily change
>> the shell from dash to bash and then back again. [...]
>
> I don't think that is really a problem.  Certainly not one worth using
> a Pre-Depends to solve.
>
> Thanks,
> Ian.

MfG
        Goswin

Reply to: