Debian Bug report logs - #538822
dash fails to upgrade if /bin/sh is locally diverted

version graph

Package: dash; Maintainer for dash is Gerrit Pape <pape@smarden.org>; Source for dash is src:dash.

Reported by: Helmut Grohne <helmut@subdivi.de>

Date: Mon, 27 Jul 2009 10:24:02 UTC

Severity: grave

Tags: squeeze-ignore, wheezy-ignore

Found in versions dash/0.5.5.1-2.2, dash/0.5.5.1-6

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Jul 2009 10:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Grohne <helmut@subdivi.de>:
New Bug report received and forwarded. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 27 Jul 2009 10:24:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Helmut Grohne <helmut@subdivi.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dash: fails to install overwriting files from bash
Date: Mon, 27 Jul 2009 12:21:40 +0200
Package: dash
Version: 0.5.5.1-2
Severity: grave
Justification: renders package unusable

Upgrading dash fails:
(Reading database ... 181192 files and directories currently installed.)
Preparing to replace dash 0.5.5.1-2 (using .../dash_0.5.5.1-2.2_amd64.deb) ...
Adding `diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Unpacking replacement dash ...
dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.2_amd64.deb (--unpack):
 trying to overwrite `/bin/sh', which is also in package bash
Removing `diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Processing triggers for man-db ...
Processing triggers for menu ...
Errors were encountered while processing:
 /var/cache/apt/archives/dash_0.5.5.1-2.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

If I understand this correctly bash should release the files and dash
should conflict with the current version of bash. In any case this is
not a smooth upgrade.

Helmut

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28.7 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages dash depends on:
ii  libc6                         2.9-20     GNU C Library: Shared libraries

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: false




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Jul 2009 23:27:03 GMT) Full text and rfc822 format available.

Message #8 received at 538822@bugs.debian.org (full text, mbox):

From: Raphael Geissert <geissert@debian.org>
To: Helmut Grohne <helmut@subdivi.de>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 01:14:26 +0200
Hi,

On Monday 27 July 2009 12:21:40 you wrote:
> Package: dash
> Version: 0.5.5.1-2
> Severity: grave
> Justification: renders package unusable
>
> Upgrading dash fails:
> (Reading database ... 181192 files and directories currently installed.)
> Preparing to replace dash 0.5.5.1-2 (using .../dash_0.5.5.1-2.2_amd64.deb)
> ... Adding `diversion of /usr/share/man/man1/sh.1.gz to
> /usr/share/man/man1/sh.distrib.1.gz by dash' Unpacking replacement dash ...
> dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.2_amd64.deb
> (--unpack): trying to overwrite `/bin/sh', which is also in package bash
> Removing `diversion of /usr/share/man/man1/sh.1.gz to
> /usr/share/man/man1/sh.distrib.1.gz by dash' Processing triggers for man-db
> ...
> Processing triggers for menu ...
> Errors were encountered while processing:
>  /var/cache/apt/archives/dash_0.5.5.1-2.2_amd64.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install.  Trying to recover:
>
> If I understand this correctly bash should release the files and dash
> should conflict with the current version of bash. In any case this is
> not a smooth upgrade.
>

Could you please provide the output of $ dpkg-divert --list /bin/sh, and 
readlink -f /bin/sh?

We tested many scenarios and we didn't find any failure, so this must be 
something that should not be common.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Jul 2009 23:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 27 Jul 2009 23:36:05 GMT) Full text and rfc822 format available.

Message #13 received at 538822@bugs.debian.org (full text, mbox):

From: Helmut Grohne <helmut@subdivi.de>
To: Raphael Geissert <geissert@debian.org>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 01:28:55 +0200
Hi,

On Tue, Jul 28, 2009 at 01:14:26AM +0200, Raphael Geissert wrote:
> Could you please provide the output of $ dpkg-divert --list /bin/sh, and 
> readlink -f /bin/sh?

$ dpkg-divert --list /bin/sh
local diversion of /bin/sh to /bin/sh.distrib
$ readlink -f /bin/sh
/bin/dash
$

> We tested many scenarios and we didn't find any failure, so this must be 
> something that should not be common.

I'm one of those users who started early with using dash as /bin/sh.
Maybe it is connected to early code making dash available as /bin/sh?

Helmut




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Jul 2009 23:42:03 GMT) Full text and rfc822 format available.

Message #16 received at 538822@bugs.debian.org (full text, mbox):

From: Raphael Geissert <geissert@debian.org>
To: Helmut Grohne <helmut@subdivi.de>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 01:41:01 +0200
Hi,

On Tuesday 28 July 2009 01:28:55 Helmut Grohne wrote:
> Hi,
>
> On Tue, Jul 28, 2009 at 01:14:26AM +0200, Raphael Geissert wrote:
> > Could you please provide the output of $ dpkg-divert --list /bin/sh, and
> > readlink -f /bin/sh?
>
> $ dpkg-divert --list /bin/sh
> local diversion of /bin/sh to /bin/sh.distrib

And /bin/sh.distrib points to dash? :-/

> $ readlink -f /bin/sh
> /bin/dash
> $
>
> > We tested many scenarios and we didn't find any failure, so this must be
> > something that should not be common.
>
> I'm one of those users who started early with using dash as /bin/sh.
> Maybe it is connected to early code making dash available as /bin/sh?

I'm not quite sure, I'll take a look at this tomorrow. But unless dash used to 
use something other than dpkg-divert to modify the link, I can't immediately 
think of an scenario where that would happen. Of course, it might be that I'm 
just too sleepy and am missing something :)

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Jul 2009 23:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 27 Jul 2009 23:51:02 GMT) Full text and rfc822 format available.

Message #21 received at 538822@bugs.debian.org (full text, mbox):

From: Helmut Grohne <helmut@subdivi.de>
To: Raphael Geissert <geissert@debian.org>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 01:48:14 +0200
Hi Raphael,

On Tue, Jul 28, 2009 at 01:41:01AM +0200, Raphael Geissert wrote:
> And /bin/sh.distrib points to dash? :-/

No:
$ readlink -f /bin/sh.distrib
/bin/bash
$

You probably also want to know my bash version. It is 3.2-6.

> I'm not quite sure, I'll take a look at this tomorrow. But unless dash used to 
> use something other than dpkg-divert to modify the link, I can't immediately 
> think of an scenario where that would happen. Of course, it might be that I'm 
> just too sleepy and am missing something :)

Thanks for investigating. If you need anything else, please ask.
Unfortunately I haven't actively worked with diversions yet.

Helmut




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 28 Jul 2009 00:12:03 GMT) Full text and rfc822 format available.

Message #24 received at 538822@bugs.debian.org (full text, mbox):

From: Raphael Geissert <geissert@debian.org>
To: Helmut Grohne <helmut@subdivi.de>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 02:09:36 +0200
On Tuesday 28 July 2009 01:48:14 Helmut Grohne wrote:
> Hi Raphael,
>
> On Tue, Jul 28, 2009 at 01:41:01AM +0200, Raphael Geissert wrote:
> > And /bin/sh.distrib points to dash? :-/
>
> No:
> $ readlink -f /bin/sh.distrib
> /bin/bash
> $

Ah, right; I really need to get some sleep, the diversion looks fine. Although 
either you added it manually (did you?) or dash used to use local diversions 
(instead of setting the package name on the call to dpkg-divert).

Do you remember more or less since when you started using dash as /bin/sh?

>
> You probably also want to know my bash version. It is 3.2-6.
>
> > I'm not quite sure, I'll take a look at this tomorrow. But unless dash
> > used to use something other than dpkg-divert to modify the link, I can't
> > immediately think of an scenario where that would happen. Of course, it
> > might be that I'm just too sleepy and am missing something :)
>
> Thanks for investigating. If you need anything else, please ask.
> Unfortunately I haven't actively worked with diversions yet.
>

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 28 Jul 2009 00:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 28 Jul 2009 00:33:05 GMT) Full text and rfc822 format available.

Message #29 received at 538822@bugs.debian.org (full text, mbox):

From: Helmut Grohne <helmut@subdivi.de>
To: Raphael Geissert <geissert@debian.org>
Cc: 538822@bugs.debian.org, Luk Claes <luk@debian.org>
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 28 Jul 2009 02:24:49 +0200
Hi Raphael,

On Tue, Jul 28, 2009 at 02:09:36AM +0200, Raphael Geissert wrote:
> Ah, right; I really need to get some sleep, the diversion looks fine. Although 
> either you added it manually (did you?) or dash used to use local diversions 
> (instead of setting the package name on the call to dpkg-divert).

I'm quite sure I did not manually change diversions for /bin/sh. If I
remember correctly I once had to change it back using dpkg-reconfigure
dash after something set it to bash.

> Do you remember more or less since when you started using dash as /bin/sh?

Not really. I seem to have installed dash 0.5.4-12 on Aug 26 2008, but I
have probably been using it longer. It's just long ago. I think it was
some rumors about dash speeding up the boot process that made me switch.
Could it be that this was some debconf talk?

Helmut




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 28 Jul 2009 01:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Bloom <kbloom@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 28 Jul 2009 01:51:04 GMT) Full text and rfc822 format available.

Message #34 received at 538822@bugs.debian.org (full text, mbox):

From: Ken Bloom <kbloom@gmail.com>
To: Debian Bug Tracking System <538822@bugs.debian.org>
Subject: dash: Broken scenario
Date: Mon, 27 Jul 2009 20:46:38 -0500
Package: dash
Version: 0.5.5.1-2.2
Severity: normal

I can report on the broken scenario, since I made this change just a
few days ago to have dash provide /bin/sh on its own.

The following instructions are given in
/usr/share/doc/bash/README.Debian.gz for making /bin/sh point to
something else.

   Type

        dpkg-divert --add /bin/sh

   and then point it to whatever you want. Upgrades to bash  won't upgrade
   the /bin/sh symlink. To put /bin/sh under dpkg control again, type

        dpkg-divert --remove /bin/sh

I ran the first command (dpkg-divert --add /bin/sh), which diverted
/bin/sh to /bin/sh.distrib. No new link was created at
/bin/sh.distrib, nor was the one at /bin/sh removed. Then, I removed
/bin/sh and created a new link /bin/sh -> dash.

And when I upgraded today to 0.5.5.1-2.2, I got the same error that
the orignal reporter has reported here.

I'm not sure what the fix should be, but I suspect at the very least
that we need to modify the the instructions in
/usr/share/doc/bash/README.Debian.gz to account for the new
arrangmenet.

The workaround is pretty simple. Use dpkg-divert --remove /bin/sh to
get back to normal, then if there isn't a link /bin/sh -> bash, create
it. Then you can go ahead and install the current version of dash.

The version of bash on my system is
ii  bash           3.2-6          The GNU Bourne Again SHell

--Ken

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dash depends on:
ii  debianutils                   3.2        Miscellaneous utilities specific t
ii  dpkg                          1.15.3.1   Debian package management system
ii  libc6                         2.9-22     GNU C Library: Shared libraries

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: false




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sun, 02 Aug 2009 06:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to md@Linux.IT (Marco d'Itri):
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sun, 02 Aug 2009 06:09:04 GMT) Full text and rfc822 format available.

Message #39 received at 538822@bugs.debian.org (full text, mbox):

From: md@Linux.IT (Marco d'Itri)
To: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash: Broken scenario
Date: Sun, 2 Aug 2009 07:47:48 +0200
[Message part 1 (text/plain, inline)]
On Jul 28, Ken Bloom <kbloom@gmail.com> wrote:

> I can report on the broken scenario, since I made this change just a
> few days ago to have dash provide /bin/sh on its own.
Same thing for me. Since this was the approved way to switch /bin/sh as
documented by the bash package, the dash package needs to account for it
someway instead of failing on upgrades.

-- 
ciao,
Marco
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 07:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tillea@rki.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 07:12:02 GMT) Full text and rfc822 format available.

Message #44 received at 538822@bugs.debian.org (full text, mbox):

From: Andreas Tille <tillea@rki.de>
To: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash: Broken scenario
Date: Fri, 7 Aug 2009 09:06:23 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Hi,

I can confirm that the problem also occures on my machine.  I did not
manually fiddled around with any dpkg-diverts but just dpkg-reconfigured
dash to be default system shell.  I did this quite recently.

Interestingly enough I was perfectly able to install dash on a machine
where it was NOT configured to be used as default shell.  So I went back
to the machine which showed the problem and tried to take back the
dpkg-reconfigure step I went last week.  But this did not changed the
situation.

So I tried "dpkg --force-depends --purge dash" and ended up with no
/bin/sh at all fiddled around manually around this by (re)installing
bash which has vanished somehow as well ... so I would not recommend
this step to unexperienced users (dpkg will break because it becomes
unable to call any scripts).  After getting a working system again I
reinstalled dash.  The result remained the same ... somehow frustrating
and not really helpful to track down the problem I guess...

I tried to fiddle around manually with all this symlinks using mc
to copy files from dash_0.5.5.1-2.3_i386.deb but nothing helped. I
can confirm that there is actually a symlink /bin/sh pointing to
dash which means that dpkg is right in claiming that dash tries to
override a file from package bash.

I finally patched the source to build a local dash package

--- debian/rules.orig   2009-08-07 09:01:01.000000000 +0200
+++ debian/rules        2009-08-07 08:57:04.000000000 +0200
@@ -71,11 +71,11 @@
        install -d -m0755 '$(DIR)'/bin
        install -m0755 build-tmp/src/dash '$(DIR)'/bin/dash
        $(STRIP) -R .comment -R .note '$(DIR)'/bin/dash
-       ln -s dash '$(DIR)'/bin/sh
+       # ln -s dash '$(DIR)'/bin/sh
        install -d -m0755 '$(DIR)'/usr/share/man/man1/
        install -m0644 src/dash.1 '$(DIR)'/usr/share/man/man1/dash.1
        gzip -9 '$(DIR)'/usr/share/man/man1/dash.1
-       ln -s dash.1.gz '$(DIR)'/usr/share/man/man1/sh.1.gz
+       # ln -s dash.1.gz '$(DIR)'/usr/share/man/man1/sh.1.gz
        install -d -m0755 '$(DIR)'/usr/share/menu
        install -m0644 debian/dash.menu '$(DIR)'/usr/share/menu/dash
        # changelog

which brought me back a working system and thus I was able to solve
the breakage of dpkg.  This is probably no final solution to move to
dash as default shell.

BTW, I *really* wonder how a package broken like this can make it to
testing.  It's not only this breakage it is also the lintian report:

W: dash source: out-of-date-standards-version 3.8.0.1 (current is 3.8.2)
E: dash: postinst-does-not-call-updatemenus usr/share/menu/dash
E: dash: package-uses-local-diversion postinst:11
E: dash: package-uses-local-diversion postinst:23
E: dash: package-uses-local-diversion postinst:45
E: dash: package-uses-local-diversion prerm:15
E: dash: orphaned-diversion * preinst
W: dash: missing-debconf-dependency
E: dash: new-essential-package

Shouldn't we care more for essential packages?

Kind regards

       Andreas.

-- 
http://fam-tille.de
Klarmachen zum Ändern!

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 13:33:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 13:33:08 GMT) Full text and rfc822 format available.

Message #49 received at 538822@bugs.debian.org (full text, mbox):

From: Sven Joachim <svenjoac@gmx.de>
To: 538822@bugs.debian.org
Subject: dash fails to install if /bin/sh points to mksh
Date: Fri, 07 Aug 2009 15:15:57 +0200
Here is a scenario in which I could reproduce this bug.  In a Lenny
chroot, I installed mksh and ran "dpkg-reconfigure mksh" to let it point
at /bin/sh.  Upgrading to Squeeze, I confirmed the question to let dash
provide /bin/sh.  This brought up another debconf screen:


 ┌─────────────────────────────────────┤ Configuring mksh ├──────────────────────────────────────┐
 │                                                                                               │
 │ Cannot install mksh as /bin/sh!                                                               │
 │                                                                                               │
 │ Because dash has already been configured to be installed as /bin/sh, mksh cannot be           │
 │ installed as /bin/sh. Use "dpkg-reconfigure dash" to change dash to not install as /bin/sh,   │
 │ then "dpkg-reconfigure mksh" to install mksh there.                                           │
 │                                                                                               │
 │                                            <Ok>                                               │
 │                                                                                               │
 └───────────────────────────────────────────────────────────────────────────────────────────────┘

Unpacking dash failed then:

,----
| Unpacking dash (from .../dash_0.5.5.1-2.3_i386.deb) ...
| dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.3_i386.deb (--unpack)
|  trying to overwrite `/usr/share/man/man1/sh.1.gz', which is also in package bash
`----

And /bin/sh still pointed at mksh.  The only way to resolve this was to
"dpkg-reconfigure mksh" again to let it _not_ provide /bin/sh, after
which the upgrade succeeded.

I haven't analyzed this in detail, but I suppose this situation will
occur whenever /bin/sh is diverted and points to something else than
dash.

Sven




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 15:42:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luk Claes <luk@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 15:42:05 GMT) Full text and rfc822 format available.

Message #54 received at 538822@bugs.debian.org (full text, mbox):

From: Luk Claes <luk@debian.org>
To: Sven Joachim <svenjoac@gmx.de>, 538822@bugs.debian.org
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Fri, 07 Aug 2009 17:39:51 +0200
Sven Joachim wrote:
> Here is a scenario in which I could reproduce this bug.  In a Lenny
> chroot, I installed mksh and ran "dpkg-reconfigure mksh" to let it point
> at /bin/sh.  Upgrading to Squeeze, I confirmed the question to let dash
> provide /bin/sh.  This brought up another debconf screen:
> 
> 
>  ┌─────────────────────────────────────┤ Configuring mksh ├──────────────────────────────────────┐
>  │                                                                                               │
>  │ Cannot install mksh as /bin/sh!                                                               │
>  │                                                                                               │
>  │ Because dash has already been configured to be installed as /bin/sh, mksh cannot be           │
>  │ installed as /bin/sh. Use "dpkg-reconfigure dash" to change dash to not install as /bin/sh,   │
>  │ then "dpkg-reconfigure mksh" to install mksh there.                                           │
>  │                                                                                               │
>  │                                            <Ok>                                               │
>  │                                                                                               │
>  └───────────────────────────────────────────────────────────────────────────────────────────────┘
> 
> Unpacking dash failed then:
> 
> ,----
> | Unpacking dash (from .../dash_0.5.5.1-2.3_i386.deb) ...
> | dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.3_i386.deb (--unpack)
> |  trying to overwrite `/usr/share/man/man1/sh.1.gz', which is also in package bash
> `----

Because mksh apparently does not divert the manpage...

> And /bin/sh still pointed at mksh.  The only way to resolve this was to
> "dpkg-reconfigure mksh" again to let it _not_ provide /bin/sh, after
> which the upgrade succeeded.

The postinst did not even run because the unpack failed...

> I haven't analyzed this in detail, but I suppose this situation will
> occur whenever /bin/sh is diverted and points to something else than
> dash.

It's something fishy with the manpage, apparently it did not run the
preinst of dash next to mksh not diverting the manpage or something like
that?

Cheers

Luk




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 16:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 16:24:04 GMT) Full text and rfc822 format available.

Message #59 received at 538822@bugs.debian.org (full text, mbox):

From: Sven Joachim <svenjoac@gmx.de>
To: Luk Claes <luk@debian.org>
Cc: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Fri, 07 Aug 2009 18:23:21 +0200
On 2009-08-07 17:39 +0200, Luk Claes wrote:

> Sven Joachim wrote:
>> Here is a scenario in which I could reproduce this bug.  In a Lenny
>> chroot, I installed mksh and ran "dpkg-reconfigure mksh" to let it point
>> at /bin/sh.  Upgrading to Squeeze, I confirmed the question to let dash
>> provide /bin/sh.  This brought up another debconf screen:
>> 
>> 
>>  ┌─────────────────────────────────────┤ Configuring mksh ├──────────────────────────────────────┐
>>  │                                                                                               │
>>  │ Cannot install mksh as /bin/sh!                                                               │
>>  │                                                                                               │
>>  │ Because dash has already been configured to be installed as /bin/sh, mksh cannot be           │
>>  │ installed as /bin/sh. Use "dpkg-reconfigure dash" to change dash to not install as /bin/sh,   │
>>  │ then "dpkg-reconfigure mksh" to install mksh there.                                           │
>>  │                                                                                               │
>>  │                                            <Ok>                                               │
>>  │                                                                                               │
>>  └───────────────────────────────────────────────────────────────────────────────────────────────┘
>> 
>> Unpacking dash failed then:
>> 
>> ,----
>> | Unpacking dash (from .../dash_0.5.5.1-2.3_i386.deb) ...
>> | dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.3_i386.deb (--unpack)
>> |  trying to overwrite `/usr/share/man/man1/sh.1.gz', which is also in package bash
>> `----
>
> Because mksh apparently does not divert the manpage...

It does:

,----
| # LANG=C dpkg -S man1/sh.1
| diversion by mksh from: /usr/share/man/man1/sh.1.gz
| diversion by mksh to: /usr/share/man/man1/sh.distrib.1.gz
| bash: /usr/share/man/man1/sh.1.gz
`----

>> And /bin/sh still pointed at mksh.  The only way to resolve this was to
>> "dpkg-reconfigure mksh" again to let it _not_ provide /bin/sh, after
>> which the upgrade succeeded.
>
> The postinst did not even run because the unpack failed...

True.

>> I haven't analyzed this in detail, but I suppose this situation will
>> occur whenever /bin/sh is diverted and points to something else than
>> dash.
>
> It's something fishy with the manpage, apparently it did not run the
> preinst of dash next to mksh not diverting the manpage or something like
> that?

I suppose dash's preinst ran, because dpkg tried to unpack dash after
all...

Sven




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 16:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luk Claes <luk@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 16:54:03 GMT) Full text and rfc822 format available.

Message #64 received at 538822@bugs.debian.org (full text, mbox):

From: Luk Claes <luk@debian.org>
To: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Fri, 07 Aug 2009 18:49:33 +0200
Sven Joachim wrote:
> On 2009-08-07 17:39 +0200, Luk Claes wrote:
> 
>> Sven Joachim wrote:
>>> Here is a scenario in which I could reproduce this bug.  In a Lenny
>>> chroot, I installed mksh and ran "dpkg-reconfigure mksh" to let it point
>>> at /bin/sh.  Upgrading to Squeeze, I confirmed the question to let dash
>>> provide /bin/sh.  This brought up another debconf screen:
>>>
>>>
>>>  ┌─────────────────────────────────────┤ Configuring mksh ├──────────────────────────────────────┐
>>>  │                                                                                               │
>>>  │ Cannot install mksh as /bin/sh!                                                               │
>>>  │                                                                                               │
>>>  │ Because dash has already been configured to be installed as /bin/sh, mksh cannot be           │
>>>  │ installed as /bin/sh. Use "dpkg-reconfigure dash" to change dash to not install as /bin/sh,   │
>>>  │ then "dpkg-reconfigure mksh" to install mksh there.                                           │
>>>  │                                                                                               │
>>>  │                                            <Ok>                                               │
>>>  │                                                                                               │
>>>  └───────────────────────────────────────────────────────────────────────────────────────────────┘
>>>
>>> Unpacking dash failed then:
>>>
>>> ,----
>>> | Unpacking dash (from .../dash_0.5.5.1-2.3_i386.deb) ...
>>> | dpkg: error processing /var/cache/apt/archives/dash_0.5.5.1-2.3_i386.deb (--unpack)
>>> |  trying to overwrite `/usr/share/man/man1/sh.1.gz', which is also in package bash
>>> `----
>> Because mksh apparently does not divert the manpage...
> 
> It does:
> 
> ,----
> | # LANG=C dpkg -S man1/sh.1
> | diversion by mksh from: /usr/share/man/man1/sh.1.gz
> | diversion by mksh to: /usr/share/man/man1/sh.distrib.1.gz
> | bash: /usr/share/man/man1/sh.1.gz
> `----
> 
>>> And /bin/sh still pointed at mksh.  The only way to resolve this was to
>>> "dpkg-reconfigure mksh" again to let it _not_ provide /bin/sh, after
>>> which the upgrade succeeded.
>> The postinst did not even run because the unpack failed...
> 
> True.
> 
>>> I haven't analyzed this in detail, but I suppose this situation will
>>> occur whenever /bin/sh is diverted and points to something else than
>>> dash.
>> It's something fishy with the manpage, apparently it did not run the
>> preinst of dash next to mksh not diverting the manpage or something like
>> that?
> 
> I suppose dash's preinst ran, because dpkg tried to unpack dash after
> all...

dash's preinst guarantees that there is a diversion so that the unpack
always succeeds...

Cheers

Luk




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Fri, 07 Aug 2009 18:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 07 Aug 2009 18:51:02 GMT) Full text and rfc822 format available.

Message #69 received at 538822@bugs.debian.org (full text, mbox):

From: Sven Joachim <svenjoac@gmx.de>
To: Luk Claes <luk@debian.org>
Cc: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Fri, 07 Aug 2009 20:49:22 +0200
[ Please keep CC'ing me, I'm not subscribed to the bug. ]

On 2009-08-07 18:49 +0200, Luk Claes wrote:

> Sven Joachim wrote:
>> I suppose dash's preinst ran, because dpkg tried to unpack dash after
>> all...
>
> dash's preinst guarantees that there is a diversion so that the unpack
> always succeeds...

Only the first part of this sentence is true.  Indeed there will always
be a diversion, but if a diversion had existed before that was _not_
created by the dash package, the preinst won't change it.

Thus, both the bash and the dash versions of /usr/share/man/man1/sh.1.gz
(and /bin/sh) would be diverted which raises the file conflict.

A possible solution would be to skip the [ -z "$div" ] test in the
preinst and always add dash's diversions, but this might run into bug
#273093¹.

Sven


¹ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273093




Merged 538822 540512. Request was from Sven Joachim <svenjoac@gmx.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 08:03:10 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 10 Aug 2009 13:21:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 10 Aug 2009 13:21:05 GMT) Full text and rfc822 format available.

Message #76 received at 538822@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Sven Joachim <svenjoac@gmx.de>
Cc: 540512@bugs.debian.org, 538822@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#540512: dash upgrade breaks mksh-as-/bin/sh
Date: Mon, 10 Aug 2009 13:19:06 +0000 (UTC)
block 539538 by 538822
block 535970 by 538822
block 532343 by 538822
block 534788 by 538822
thanks

Sven Joachim dixit:

>Because dash now always sets up a diversion, and you cannot have more
>than one package divert the same file (see #273093).

Ah, great. So there now is *no* way to tell dash to not divert it?

We *really* need to have something like a shared/binsh debconf,
like the debconf docs show for window-manager.

This is blocking my upload of an updated mksh.

//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2




Added indication that bug 538822 blocks539538 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:21:08 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks535970 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:21:09 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks532343 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:21:10 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks534788 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:21:11 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks539538 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:51:05 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks535970 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Mon, 10 Aug 2009 13:51:15 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 10 Aug 2009 17:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 10 Aug 2009 17:00:06 GMT) Full text and rfc822 format available.

Message #93 received at 538822@bugs.debian.org (full text, mbox):

From: Sven Joachim <svenjoac@gmx.de>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: Re: Bug#540512: dash upgrade breaks mksh-as-/bin/sh
Date: Mon, 10 Aug 2009 18:57:30 +0200
On 2009-08-10 15:19 +0200, Thorsten Glaser wrote:

> Sven Joachim dixit:
>
>>Because dash now always sets up a diversion, and you cannot have more
>>than one package divert the same file (see #273093).
>
> Ah, great. So there now is *no* way to tell dash to not divert it?

Apparently not.  But even if there were, it would trigger the file
conflict in #538822 because *both dash and bash* ship /bin/sh now.
AFAICS the only possibility to have another package take over /bin/sh is
to remove it from either dash or bash.

> We *really* need to have something like a shared/binsh debconf,
> like the debconf docs show for window-manager.

Do you have an idea how to implement that?  Managing /bin/sh through the
alternatives system does not seem very prudent.

Regards,
        Sven




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 10 Aug 2009 17:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 10 Aug 2009 17:21:02 GMT) Full text and rfc822 format available.

Message #98 received at 538822@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Sven Joachim <svenjoac@gmx.de>
Cc: 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: Re: Bug#540512: dash upgrade breaks mksh-as-/bin/sh
Date: Mon, 10 Aug 2009 17:13:27 +0000 (UTC)
Sven Joachim dixit:

>Do you have an idea how to implement that?  Managing /bin/sh through the
>alternatives system does not seem very prudent.

No, diversions are fine for that, I'd think. But I'm not a
debconf expert.

//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 10 Aug 2009 17:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luk Claes <luk@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 10 Aug 2009 17:33:02 GMT) Full text and rfc822 format available.

Message #103 received at 538822@bugs.debian.org (full text, mbox):

From: Luk Claes <luk@debian.org>
To: Thorsten Glaser <tg@mirbsd.de>, 538822@bugs.debian.org, Guillem Jover <guillem@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>, 540512@bugs.debian.org
Subject: Re: Bug#538822: Bug#540512: dash upgrade breaks mksh-as-/bin/sh
Date: Mon, 10 Aug 2009 19:29:58 +0200
Thorsten Glaser wrote:
> Sven Joachim dixit:
> 
>> Do you have an idea how to implement that?  Managing /bin/sh through the
>> alternatives system does not seem very prudent.
> 
> No, diversions are fine for that, I'd think. But I'm not a
> debconf expert.

I thought Guillem was going to talk to you to see what the best way was
to make sure mksh could provide /bin/sh (I've put him in Cc).

Guillem: do you think the only sane way out is to not have bash ship
/bin/sh? If so, how would bash preferably be adapted?

Cheers

Luk




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 10 Aug 2009 19:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 10 Aug 2009 19:57:06 GMT) Full text and rfc822 format available.

Message #108 received at 538822@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Luk Claes <luk@debian.org>
Cc: 538822@bugs.debian.org, Guillem Jover <guillem@debian.org>, Sven Joachim <svenjoac@gmx.de>, 540512@bugs.debian.org
Subject: Re: Bug#538822: Bug#540512: dash upgrade breaks mksh-as-/bin/sh
Date: Mon, 10 Aug 2009 19:51:30 +0000 (UTC)
Luk Claes dixit:

>I thought Guillem was going to talk to you to see what the best way was

Hm, haven't received any yet...

>to make sure mksh could provide /bin/sh (I've put him in Cc).

Might want to consider ksh93 too. It also attempts to follow
POSIX closely, I even had Dave Korn in in the recent "set -u"
vs "$@" discussion.

Greets,
//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"




Added indication that 538822 affects mksh Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Sat, 15 Aug 2009 12:36:03 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks541617 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Sat, 15 Aug 2009 12:36:07 GMT) Full text and rfc822 format available.

Added indication that bug 538822 blocks541617 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Sat, 15 Aug 2009 12:36:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 22 Sep 2009 10:09:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>, 538822@bugs.debian.org, Luk Claes <luk@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 22 Sep 2009 10:09:12 GMT) Full text and rfc822 format available.

Message #119 received at 538822@bugs.debian.org (full text, mbox):

From: Gerrit Pape <pape@smarden.org>
To: Sven Joachim <svenjoac@gmx.de>, 538822@bugs.debian.org
Cc: Luk Claes <luk@debian.org>
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Tue, 22 Sep 2009 09:51:21 +0000
On Fri, Aug 07, 2009 at 08:49:22PM +0200, Sven Joachim wrote:
> [ Please keep CC'ing me, I'm not subscribed to the bug. ]
> On 2009-08-07 18:49 +0200, Luk Claes wrote:
> > dash's preinst guarantees that there is a diversion so that the unpack
> > always succeeds...
> 
> Only the first part of this sentence is true.  Indeed there will always
> be a diversion, but if a diversion had existed before that was _not_
> created by the dash package, the preinst won't change it.
> 
> Thus, both the bash and the dash versions of /usr/share/man/man1/sh.1.gz
> (and /bin/sh) would be diverted which raises the file conflict.

Yes, the problem can be reproduced with a fresh lenny bootstrap, a
manual diversion of /bin/sh (not with --package dash, e.g. as suggested
by bash's README.Debian), and then upgrade dash to 0.5.5.1-3.

I can also confirm that mksh no longer can provide /bin/sh at all if
dash and bash are installed.  There can only be exactly one diversion
for /bin/sh, and as both packages, dash and bash, currently include
/bin/sh, the diversion must belong to either of them.

I'm not sure what the best solution is.  In dash's preinst we can make
sure not only that a diversion exist, but also that it belongs to the
dash package.  This would require removing a possibly existing
diversion.

If the bash package finds a modified /bin/sh symlink and no diversion,
its preinst outputs a message and prompts for RETURN, we could do
similar for the diversion in dash.  That would fix the upgrade issue,
but doesn't help mksh.  For multiple alternative packages providing
/bin/sh there should be a different solution than diversions, I don't
think they'll work out.

Regards, Gerrit.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 29 Sep 2009 06:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tillea@rki.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 29 Sep 2009 06:48:03 GMT) Full text and rfc822 format available.

Message #124 received at 538822@bugs.debian.org (full text, mbox):

From: Andreas Tille <tillea@rki.de>
To: 538822@bugs.debian.org
Subject: Re: dash: fails to install overwriting files from bash
Date: Tue, 29 Sep 2009 08:44:46 +0200
Hi,

while beeing hit once more by this bug and reading through the bug log
which is discussing the alternatives system: I hope you are aware that
dash is actually not using the alternatives system but rather is
shipping a symlink

   ln -s dash /bin/sh

As I wrote in my private workaround (see above in the bug log) this
symlink is the problem.

Kind regards

       Andreas.

-- 
http://fam-tille.de




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 12 Oct 2009 10:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to 538822@bugs.debian.org, Luk Claes <luk@debian.org>, Raphael Geissert <geissert@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 12 Oct 2009 10:21:04 GMT) Full text and rfc822 format available.

Message #129 received at 538822@bugs.debian.org (full text, mbox):

From: Gerrit Pape <pape@smarden.org>
To: 538822@bugs.debian.org
Cc: Luk Claes <luk@debian.org>, Raphael Geissert <geissert@debian.org>
Subject: Re: Bug#538822: dash fails to install if /bin/sh points to mksh
Date: Mon, 12 Oct 2009 09:50:21 +0000
On Tue, Sep 22, 2009 at 09:51:21AM +0000, Gerrit Pape wrote:
> On Fri, Aug 07, 2009 at 08:49:22PM +0200, Sven Joachim wrote:
> > [ Please keep CC'ing me, I'm not subscribed to the bug. ]
> > On 2009-08-07 18:49 +0200, Luk Claes wrote:
> > > dash's preinst guarantees that there is a diversion so that the unpack
> > > always succeeds...
> > 
> > Only the first part of this sentence is true.  Indeed there will always
> > be a diversion, but if a diversion had existed before that was _not_
> > created by the dash package, the preinst won't change it.
> > 
> > Thus, both the bash and the dash versions of /usr/share/man/man1/sh.1.gz
> > (and /bin/sh) would be diverted which raises the file conflict.
> 
> Yes, the problem can be reproduced with a fresh lenny bootstrap, a
> manual diversion of /bin/sh (not with --package dash, e.g. as suggested
> by bash's README.Debian), and then upgrade dash to 0.5.5.1-3.
> 
> I can also confirm that mksh no longer can provide /bin/sh at all if
> dash and bash are installed.  There can only be exactly one diversion
> for /bin/sh, and as both packages, dash and bash, currently include
> /bin/sh, the diversion must belong to either of them.
> 
> I'm not sure what the best solution is.  In dash's preinst we can make
> sure not only that a diversion exist, but also that it belongs to the
> dash package.  This would require removing a possibly existing
> diversion.
> 
> If the bash package finds a modified /bin/sh symlink and no diversion,
> its preinst outputs a message and prompts for RETURN, we could do
> similar for the diversion in dash.  That would fix the upgrade issue,
> but doesn't help mksh.  For multiple alternative packages providing
> /bin/sh there should be a different solution than diversions, I don't
> think they'll work out.

Hi, do you still work on the transition to make dash the default
/bin/sh?

I'm not sure I know all about the plan that was agreed upon.  E.g., is
there a plan to make bash not include the /bin/sh symlink in the
package, but handle it in the postinst just as dash did previously?

Regards, Gerrit.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Thu, 29 Oct 2009 08:23:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to The Anarcat <anarcat@anarcat.ath.cx>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 29 Oct 2009 08:23:05 GMT) Full text and rfc822 format available.

Message #134 received at 538822@bugs.debian.org (full text, mbox):

From: The Anarcat <anarcat@anarcat.ath.cx>
To: Debian Bug Tracking System <538822@bugs.debian.org>
Subject: dash: here too
Date: Wed, 28 Oct 2009 19:33:23 -0400
Package: dash
Version: 0.5.4-12
Followup-For: Bug #538822

Upgrading from lenny here:

anarcat@lenny$ ls -al /bin/sh
lrwxrwxrwx 1 root root 9 mai 31  2006 /bin/sh -> /bin/dash

I *may* have broken that symlink before. I would expect dash to
gracefully recover from this nonetheless.

Even if I symlink /bin/sh to bash, the dash upgrade fails.

# dpkg-divert --list /bin/sh
local diversion of /bin/sh to /bin/sh.distrib
# readlink -f /bin/sh.distrib 
/bin/bash

The workaround is to dpkg-divert --remove /bin/sh as recommended
earlier. You also need to make sure the symlink is right:

# readlink -f /bin/sh
/bin/bash

However, that doesn't actually set dash as the primary shell, which is
odd to me. I get this when upgrading after the workaround:

Removing diversion of /bin/sh to /bin/sh.distrib by dash
Adding diversion of /bin/sh to /bin/sh.distrib by bash 
Removing diversion of /usr/share/man/man1/sh.1.gz to
/usr/share/man/man1/sh.distrib.1.gz by dash
Adding diversion of /usr/share/man/man1/sh.1.gz to
/usr/share/man/man1/sh.distrib.1.gz by bash 

(This may not be the exact messages of dpkg, I translated them from
french, sorry).

Notice how bash is adding the diversion...

I hope this will help some people dealing with the issue.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_CA.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dash depends on:
ii  libc6                         2.10.1-2   GNU C Library: Shared libraries

dash recommends no packages.

dash suggests no packages.

-- debconf information:
  dash/sh: false




Bug No longer marked as found in versions dash/0.5.5.1-2, dash/0.5.5.1-2.3, and dash/0.5.5.1-2.2. Request was from Gerrit Pape <pape@dbnbgs.smarden.org> to control@bugs.debian.org. (Fri, 26 Mar 2010 15:36:04 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions dash/0.5.4-12. Request was from Gerrit Pape <pape@dbnbgs.smarden.org> to control@bugs.debian.org. (Fri, 26 Mar 2010 15:36:06 GMT) Full text and rfc822 format available.

Bug Marked as found in versions dash/0.5.5.1-2.2. Request was from Sven Joachim <svenjoac@gmx.de> to control@bugs.debian.org. (Tue, 06 Apr 2010 07:42:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Thu, 03 Jun 2010 09:21:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tsang <miklcct@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a $gBug is determined using this field. Please remember to include a Subject field in your messages in future.

(Thu, 03 Jun 2010 09:21:10 GMT) Full text and rfc822 format available.


Message #145 received at 538822@bugs.debian.org (full text, mbox):

From: Michael Tsang <miklcct@gmail.com>
To: 538822@bugs.debian.org
Date: Thu, 3 Jun 2010 17:16:44 +0800
Is it possible to move /bin/sh to the Debian alternatives system to 
permanently solve this bug?

Make anything which requires POSIX shell to depend on a new virtual package 
called "posix-shell" and provide this virtual package by bash, dash, ksh, etc. 
Then every shell uses the update-alternatives perl script to manage /bin/sh

Upgrade path:
When every shell is ready for the alternatives system, check if /bin/sh is 
managed by alternatives. If not, remove it and install the link again.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 19 Jun 2010 06:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Morris <cymraegish@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 19 Jun 2010 06:03:03 GMT) Full text and rfc822 format available.

Message #150 received at 538822@bugs.debian.org (full text, mbox):

From: Brian Morris <cymraegish@gmail.com>
To: debian-amd64@lists.debian.org
Cc: 538822@bugs.debian.org
Subject: Re: Bug #538822
Date: Fri, 18 Jun 2010 23:01:48 -0700
I have got this thing bad, it blocked my upgrades completely in sid, I
tried to remove dash and i got bash removed instead, i got into a
chroot via rescue mode with the installer and with placing emergency
copies of the files from the bash deb onto my system. however I am
stumped what to do to work around. my system will still not boot now
the normal way.

here's the error:


Setting up dash (0.5.5.1-6) ...
dpkg-divert: mismatch on package
  when removing `diversion of /bin/sh by dash'
  found `diversion of /bin/sh to /bin/sh.distrib by bash'
dpkg: error processing dash (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 dash


I tried using dpkg-divert removal  for the "bad" diversion as shown in
the manpage for it but that didn't work.

Is there anything I can do other than a complete reinstall ?

My system is a macbook late'06.

Thanks,
Brian




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 19 Jun 2010 06:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jaime Ochoa Malagón <chptma@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 19 Jun 2010 06:27:03 GMT) Full text and rfc822 format available.

Message #155 received at 538822@bugs.debian.org (full text, mbox):

From: Jaime Ochoa Malagón <chptma@gmail.com>
To: Brian Morris <cymraegish@gmail.com>
Cc: debian-amd64@lists.debian.org, 538822@bugs.debian.org
Subject: Re: Bug #538822
Date: Sat, 19 Jun 2010 01:25:00 -0500
do you has tried to reinstall bash? perhaps force reinstall?

On Sat, Jun 19, 2010 at 1:01 AM, Brian Morris <cymraegish@gmail.com> wrote:
> I have got this thing bad, it blocked my upgrades completely in sid, I
> tried to remove dash and i got bash removed instead, i got into a
> chroot via rescue mode with the installer and with placing emergency
> copies of the files from the bash deb onto my system. however I am
> stumped what to do to work around. my system will still not boot now
> the normal way.
>
> here's the error:
>
>
> Setting up dash (0.5.5.1-6) ...
> dpkg-divert: mismatch on package
>  when removing `diversion of /bin/sh by dash'
>  found `diversion of /bin/sh to /bin/sh.distrib by bash'
> dpkg: error processing dash (--configure):
>  subprocess installed post-installation script returned error exit status 2
> Errors were encountered while processing:
>  dash
>
>
> I tried using dpkg-divert removal  for the "bad" diversion as shown in
> the manpage for it but that didn't work.
>
> Is there anything I can do other than a complete reinstall ?
>
> My system is a macbook late'06.
>
> Thanks,
> Brian
>
>
> --
> To UNSUBSCRIBE, email to debian-amd64-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/AANLkTilRnITOEoTDtQGshziQ6cdgrnCaHmkKuez_WC6v@mail.gmail.com
>
>



-- 
Perhaps the depth of love can be calibrated by the number of different
selves that are actively involved in a given relationship.
					Carl Sagan (Contact)

Absolute certainty is a privilege of uneducated minds-and fanatics. It
is, for scientific folk, an unattainable ideal.
					Cassius J. Keyser

					Jaime Ochoa Malagón
					Arquitecto de Soluciones
					Cel: +52 (55) 1021 0774




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 09 Aug 2010 21:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wolfram Sang <wolfram@the-dreams.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 09 Aug 2010 21:27:02 GMT) Full text and rfc822 format available.

Message #160 received at 538822@bugs.debian.org (full text, mbox):

From: Wolfram Sang <wolfram@the-dreams.de>
To: 538822@bugs.debian.org
Subject: Bitten, too
Date: Mon, 09 Aug 2010 23:09:55 +0200
I have also been bitten by this, although I don't know if my local 
modifications will classify it as a bug:

I switched very early to dash by simply changing the /bin/sh-symlink by 
hand (it ought to be a test). I totally forgot that I did it this way 
until the upgrade to squeeze yesterday. The symptoms were the same as in 
message #5. The solution was given in message #134 (thanks a lot!). 
Removing the divert and restoring the original /bin/sh-symlink solved 
the problem for me. I could continue upgrading, although /bin/sh was 
pointing to bash afterwards.

Regards!




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 05 Oct 2010 21:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 05 Oct 2010 21:18:04 GMT) Full text and rfc822 format available.

Message #165 received at 538822@bugs.debian.org (full text, mbox):

From: Axel Beckert <abe@debian.org>
To: 538822@bugs.debian.org
Subject: Ran into #538822 (dash: fails to install overwriting files from bash) or similar on Squeeze today
Date: Tue, 5 Oct 2010 23:14:01 +0200
Package: dash
Version: 0.5.5.1-6

To check if some Xen issue on Squeeze was bash/dash related I switched
back to bash as /bin/sh and then to dash again which failed:

20/0/0 root@acromantula:pts/3 23:05:57 [~] # dpkg-reconfigure dash
Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
21/0/0 root@acromantula:pts/3 23:06:10 [~] # 
[...]
26/0/0 root@acromantula:pts/3 23:06:46 [~] # dpkg-reconfigure dash
dpkg-divert: mismatch on package
  when removing `diversion of /bin/sh by dash'
  found `diversion of /bin/sh to /bin/sh.distrib by bash'
27/2/0 root@acromantula:pts/3 23:06:51 [~] # 

Bascially I'd expect that I should be able to switch back and forth
without problems.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 01 Nov 2010 00:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 01 Nov 2010 00:12:02 GMT) Full text and rfc822 format available.

Message #170 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Debian Bug Tracking System <538822@bugs.debian.org>
Cc: Ken Bloom <kbloom@gmail.com>, Thorsten Glaser <tg@mirbsd.de>
Subject: [PATCH/RFC 1/2] debian/dash.preinst: cope better with local diversions
Date: Sun, 31 Oct 2010 19:08:41 -0500
Hi Gerrit,

Ken Bloom wrote:

> I can report on the broken scenario, since I made this change just a
> few days ago to have dash provide /bin/sh on its own.
> 
> The following instructions are given in
> /usr/share/doc/bash/README.Debian.gz for making /bin/sh point to
> something else.
> 
>    Type
> 
>         dpkg-divert --add /bin/sh
> 
>    and then point it to whatever you want. Upgrades to bash  won't upgrade
>    the /bin/sh symlink. To put /bin/sh under dpkg control again, type
> 
>         dpkg-divert --remove /bin/sh

Here's a patch implementing (II) from
<http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=97;bug=546528>:

-- 8< --
Subject: debian/dash.preinst: Cope better with local diversions

Before dash was essential, local sysadmins and various packages
like dash, pdksh, posh, and mksh would use dpkg-divert to redirect
bash's /bin/sh elsewhere before installing their own /bin/sh
symlink.

Unfortunately now that dash is essential, that method means
trouble: any diversion by a package other than dash and bash will
divert both /bin/sh symlinks to the same destination, resulting
in a file conflict between essential packages (ouch).

The fix depends on the specific case:

A.  Local diversions to make room for bash or dash can be
replaced by package-specific diversions.

B.  Diversions making room for other shells will have to wait
until bash or dash loses its /bin/sh symlink.

This patch handles case A, by treating the target of the
/bin/sh symlink as sacred and using that to decide which
package should divert /bin/sh.

Caveats:

 - Without this patch, dash would set up its /bin/sh symlink
   immediately when first installed.  With it, it leaves /bin/sh
   as is until postinst (which I consider to be better behavior
   anyway).

 - set_diversions () could be interrupted between removing an
   old diversion and adding a new one, with unpleasant
   consequences.

   The old preinst has that problem, too.  dpkg-divert probably
   needs to learn a new option to transfer diversions between
   packages before we can fix it properly.

Case B is not handled by this patch; it would still be reported
as a file conflict.
---
Thoughts?

 debian/changelog    |    2 +
 debian/dash.preinst |   97 ++++++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 78 insertions(+), 21 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 808edf0..18ba498 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ dash (0.5.5.1-7.1) unstable; urgency=low
 
   * debian/dash.preinst: change shebang line to use /bin/bash
     (closes: #546528).
+  * debian/dash.preinst: reset diversion for /bin/sh on behalf of
+    the current /bin/sh link target (closes: #538822).
 
  -- Jonathan Nieder <jrnieder@gmail.com>  Sun, 17 Oct 2010 01:58:20 -0500
 
diff --git a/debian/dash.preinst b/debian/dash.preinst
index 4fdbb0d..6287cdd 100644
--- a/debian/dash.preinst
+++ b/debian/dash.preinst
@@ -1,27 +1,82 @@
 #!/bin/bash
+# Examples:
+#
+# A. New install.
+#     1. /bin/sh is already a symlink to dash from bootstrapping.
+#     2. Add diversion by dash of sh.
+#     3. Add diversion by bash of sh.1.gz.
+#
+# B. Upgrade from lenny with bash but dash not installed.
+#     1. /bin/sh is already a symlink to bash.
+#     2. Add diversion by bash of sh.
+#     3. Add diversion by bash of sh.1.gz.
+#
+# C. Upgrade from lenny with mksh configured as /bin/sh.
+#     1. /bin/sh is already a symlink to mksh.
+#     2. Keep diversion by mksh of sh.
+#     3. Keep diversion by mksh of sh.1.gz.
+#
+# D. Upgrade from lenny with dash configured via a local diversion
+#    as /bin/sh <http://bugs.debian.org/538822>.
+#     1. /bin/sh is already a symlink to dash.
+#     2. Replace local diversion with diversion by dash.
+#     3. Add diversion by dash of sh.1.gz.
+#
 set -e
 
-divert() {
-	dfile=$1
-	ltarget=$2
-	div=$(dpkg-divert --list $dfile)
-	distrib=${3:-$dfile.distrib}
-	if [ -z "$div" ]; then
-		dpkg-divert --package dash --divert $distrib --add $dfile
-		# This differs from dpkg-divert's --rename because we
-		# first make a copy of $dfile (the file being diverted)
-		# in $distrib. Then, a symlink to $ltarget is forcibly created
-		# from $dfile.
-		# dpkg-divert's --rename direct equivalent would be:
-		# mv $dfile $distrib -- but we could end up without a symlink
-		cp -dp $dfile $distrib
-		ln -sf $ltarget $dfile
+set_diversions () {
+	if test "$(dpkg-divert --listpackage /bin/sh)" != "$1"
+	then
+		dpkg-divert --quiet --remove /bin/sh
+		dpkg-divert --package "$1" --divert /bin/sh.distrib --add /bin/sh
 	fi
+	if test "$(dpkg-divert --listpackage /usr/share/man/man1/sh.1.gz)" != "$1"
+	then
+		dpkg-divert --remove /usr/share/man/man1/sh.1.gz
+		dpkg-divert --package "$1" \
+			--divert /usr/share/man/man1/sh.distrib.1.gz \
+			--add /usr/share/man/man1/sh.1.gz
+	fi
+}
+
+divert_sh () {
+	shell=$(readlink /bin/sh)
+	shell=${shell#/bin/}
+
+	case "$shell" in
+	dash|bash|mksh|ksh|posh|pdksh|zsh)
+		set_diversions "$shell"
+		;;
+	ksh93)
+		set_diversions ksh
+		;;
+	mksh-static)
+		set_diversions mksh
+		;;
+	zsh4|/usr/bin/zsh)
+		set_diversions zsh
+		;;
+	*)
+		# Unknown shell.  Trust the existing diversion.
+		case "$(dpkg-divert --listpackage /bin/sh)" in
+		dash)
+			echo >&2 \
+ "dash.preinst: Overwriting /bin/sh -> $shell link as requested by diversion"
+			;;
+		"")
+			echo >&2 "dash.preinst: Overwriting /bin/sh -> $shell link."
+		esac
+	esac
 }
 
-# Divert the following files if no diversion exists already
-# It is currently used to prevent the files collision between bash and
-# dash: they both provide the files in the package.
-divert /bin/sh dash
-divert /usr/share/man/man1/sh.1.gz dash.1.gz \
-	/usr/share/man/man1/sh.distrib.1.gz
+# 1. Ensure /bin/sh is a symlink.
+if ! test -h /bin/sh
+then
+	echo >&2 'dash.preinst: No /bin/sh symlink found.  Aborting.'
+	exit 1
+fi
+# 2. Ensure /bin/sh is diverted by the package corresponding to
+#    the symlink target.
+# 3. Set /usr/share/man/man1/sh.1.gz diversion to match /bin/sh
+#    diversion.
+divert_sh
-- 
1.7.2.3.557.gab647.dirty





Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 01 Nov 2010 02:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 01 Nov 2010 02:57:03 GMT) Full text and rfc822 format available.

Message #175 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Axel Beckert <abe@debian.org>
Cc: 538822@bugs.debian.org
Subject: Re: Bug#538822: dash: fails to install overwriting files from bash
Date: Sun, 31 Oct 2010 21:52:42 -0500
unmerge 538822
retitle 538822 dash fails to upgrade if /bin/sh is locally diverted
quit

Hi,

Axel Beckert wrote:

> 20/0/0 root@acromantula:pts/3 23:05:57 [~] # dpkg-reconfigure dash
> Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
> Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
> Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
> Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
> 21/0/0 root@acromantula:pts/3 23:06:10 [~] # 
> [...]
> 26/0/0 root@acromantula:pts/3 23:06:46 [~] # dpkg-reconfigure dash
> dpkg-divert: mismatch on package
>   when removing `diversion of /bin/sh by dash'
>   found `diversion of /bin/sh to /bin/sh.distrib by bash'
> 27/2/0 root@acromantula:pts/3 23:06:51 [~] # 

Please file a new bug.

Thanks,
Jonathan




Disconnected #538822 from all other report(s). Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 01 Nov 2010 02:57:05 GMT) Full text and rfc822 format available.

Changed Bug title to 'dash fails to upgrade if /bin/sh is locally diverted' from 'dash: fails to install overwriting files from bash' Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 01 Nov 2010 02:57:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 01 Nov 2010 08:51:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 01 Nov 2010 08:51:06 GMT) Full text and rfc822 format available.

Message #184 received at 538822@bugs.debian.org (full text, mbox):

From: Axel Beckert <abe@debian.org>
To: 538822@bugs.debian.org, Jonathan Nieder <jrnieder@gmail.com>
Cc: Debian Bug Tracking System E-Mail Control Server <control@bugs.debian.org>
Subject: Re: Bug#538822: dash: fails to install overwriting files from bash
Date: Mon, 1 Nov 2010 09:48:14 +0100
clone 538822 -1
retitle -1 dash: dpkg-divert: mismatch on package when removing `diversion of /bin/sh by dash' found `diversion of /bin/sh to /bin/sh.distrib by bash'
notfound -1 dash/0.5.5.1-2.2
kthxbye

Hi,

Jonathan Nieder wrote:
> Axel Beckert wrote:
> > 20/0/0 root@acromantula:pts/3 23:05:57 [~] # dpkg-reconfigure dash
> > Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
> > Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
> > Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
> > Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
> > 21/0/0 root@acromantula:pts/3 23:06:10 [~] # 
> > [...]
> > 26/0/0 root@acromantula:pts/3 23:06:46 [~] # dpkg-reconfigure dash
> > dpkg-divert: mismatch on package
> >   when removing `diversion of /bin/sh by dash'
> >   found `diversion of /bin/sh to /bin/sh.distrib by bash'
> > 27/2/0 root@acromantula:pts/3 23:06:51 [~] # 
> 
> Please file a new bug.

Well, then let's clone the current one to have all context including
possible relations to other bugs.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5




Bug 538822 cloned as bug 602062. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Mon, 01 Nov 2010 08:51:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Wed, 17 Nov 2010 16:21:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 17 Nov 2010 16:21:06 GMT) Full text and rfc822 format available.

Message #191 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Cc: 546528@bugs.debian.org, 538822@bugs.debian.org, 602483@bugs.debian.org
Subject: Re: Bug#546528: [PATCH] make dash's preinst a C binary
Date: Wed, 17 Nov 2010 10:17:37 -0600
Hi,

Adam D. Barratt wrote:

> This bug report seems to have branched in to a couple of issues relating
> to dash's use of diversions and its use as /bin/sh, rather than the
> original issue of whether the preinst should be moved to something that
> doesn't rely on /bin/sh working; some of these should probably be moved
> elsewhere:

Thanks, this is a good summary.

> * handling of local diversions
> - already #538822
> - as such diversions must have been manually added, for squeeze this may
> be a documented upgrade issue (in the release notes)

This was advertised by bash as the way to use dash as /bin/sh for a long
time.

An automagic upgrade is a lovely thing, but for a few reasons this
seems less important than the other issues, especially:

 - it's a noisy failure, not silent breakage.
 - if those diversions were added in order to set dash as /bin/sh,
   it's easy to repair.

> * extending the handling of /bin/sh to include more shells than bash and dash
> - definitely post-squeeze material

That's probably the right choice, since only one person seems to be
working on it. :(

This is a serious regression from lenny.  I wish it would be fixed
soon in squeeze-backports at least.

The main component (an upgrade path in bash to remove /bin/sh from its
files list without disturbing the configured shell) has been written
and seems to work fine.  See Bug#602483.  I have some cosmetic
improvements saved up for that patch but I can't tell if there's any
interest...

To be clear, anyone can help out with this; it does not have to be a
release manager or bash maintainer.  A nice first step to work towards
would be a collection of updated packages in experimental, so we can
have people test it.

> * the preinst isn't idempotent
> - from a few quick tests, it looks like this could be resolved by changing
> the execution order to "cp, ln, divert" rather than "divert, cp, ln"; I
> may have missed something, however

Technically one would need

	# nothing except dash prerm seems to care about the .distrib
	# file, so this is relatively safe.
	cp -dp $dfile $distrib

	# ln -sf is not idempotent, though ln -s to temporary + mv is.
	ln -sf $ltarget $tmpfile
	mv -f $tmpfile $dfile

	dpkg-divert --package dash --divert $distrib --add $dfile

The window when this can happen is very short, and the failure modes
are not so bad (except if ln -sf is interrupted in the middle.  That
one would mean no /bin/sh).

> * make it a /bin/bash script instead
>
> This is a "no brainer" change in terms of ensuring correctness; no changes
> are required to the remainder of the script.  It does mean that dash can't
> be reinstalled in a situation where the installation of bash is damaged.

That is not a big problem.  dash can't be reinstalled in a situation
where the installation of libc is damaged, either.  In practice what
you would do is, from an open shell,

 1. Reinstall bash.
 2. Reinstall dash.

and all is well again.

> * make it a compiled C program
>
> This means that dash can be reinstalled in situations where both bash and
> dash are damaged or otherwise unavailable and means dash doesn't require
> bash.  Both of these are certainly reasonable goals, but this approach is
> a more fundamental change and may be more difficult to test, so the
> question is whether the potential gains are worth the risk at this stage
> of the release process.

I think this could be done safely, but the effect on maintainability
just doesn't seem worth it.

> Regards,

Thanks.
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Wed, 17 Nov 2010 16:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 17 Nov 2010 16:30:03 GMT) Full text and rfc822 format available.

Message #196 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Cc: 546528@bugs.debian.org, 538822@bugs.debian.org, 602483@bugs.debian.org
Subject: Re: Bug#538822: Bug#546528: [PATCH] make dash's preinst a C binary
Date: Wed, 17 Nov 2010 10:26:11 -0600
Jonathan Nieder wrote:
> Adam D. Barratt wrote:

>> * the preinst isn't idempotent
>> - from a few quick tests, it looks like this could be resolved by changing
>> the execution order to "cp, ln, divert" rather than "divert, cp, ln"; I
>> may have missed something, however
>
> Technically one would need
> 
> 	# nothing except dash prerm seems to care about the .distrib
> 	# file, so this is relatively safe.
> 	cp -dp $dfile $distrib
> 
> 	# ln -sf is not idempotent, though ln -s to temporary + mv is.
> 	ln -sf $ltarget $tmpfile
> 	mv -f $tmpfile $dfile
> 
> 	dpkg-divert --package dash --divert $distrib --add $dfile
> 
> The window when this can happen is very short, and the failure modes
> are not so bad (except if ln -sf is interrupted in the middle.  That
> one would mean no /bin/sh).

To be precise, of course "ln -sf dash /bin/sh" is idempotent; it's just that
it's not safe to interrupt it because it works by calling unlink() followed
by symlink().  Sorry for the lack of clarify.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sun, 26 Dec 2010 17:33:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sun, 26 Dec 2010 17:33:07 GMT) Full text and rfc822 format available.

Message #201 received at 538822@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: 540512@bugs.debian.org, 538822@bugs.debian.org, release-notes@packages.debian.org
Subject: dash and local diversions
Date: Sun, 26 Dec 2010 18:29:53 +0100
[Message part 1 (text/plain, inline)]
user release.debian.org@packages.debian.org
usertag 540512 squeeze-can-defer
usertag 538822 squeeze-can-defer
tag 540512 squeeze-ignore
tag 538822 squeeze-ignore
affects 540512 + release-notes
affects 538822 + release-notes
kthxbye

Hi,

the release notes for squeeze will need to mention that any local
diversions of /bin/sh need to be removed prior to the upgrade.  Any more
tweaking of this code path to support other shells as /bin/sh, if at all
necessary, will wait for post-squeeze.

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Added tag(s) squeeze-ignore. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Sun, 26 Dec 2010 17:33:11 GMT) Full text and rfc822 format available.

Added indication that 538822 affects release-notes Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Sun, 26 Dec 2010 17:33:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sun, 26 Dec 2010 20:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sun, 26 Dec 2010 20:42:03 GMT) Full text and rfc822 format available.

Message #210 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Julien Cristau <jcristau@debian.org>
Cc: 538822@bugs.debian.org
Subject: Re: dash and local diversions
Date: Sun, 26 Dec 2010 14:38:44 -0600
Julien Cristau wrote:

> the release notes for squeeze will need to mention that any local
> diversions of /bin/sh need to be removed prior to the upgrade.  Any more
> tweaking of this code path to support other shells as /bin/sh, if at all
> necessary, will wait for post-squeeze.

Thanks, makes sense.  I hope to find time to fix this in wheezy soon
so users could avoid trouble by installing a backport.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Dec 2010 21:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Adam D. Barratt" <adam@adam-barratt.org.uk>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 27 Dec 2010 21:30:03 GMT) Full text and rfc822 format available.

Message #215 received at 538822@bugs.debian.org (full text, mbox):

From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
To: Julien Cristau <jcristau@debian.org>, 538822@bugs.debian.org
Cc: 540512@bugs.debian.org, release-notes@packages.debian.org, 538822-submitter@bugs.debian.org, 540512-submitter@bugs.debian.org
Subject: Re: Bug#538822: dash and local diversions
Date: Mon, 27 Dec 2010 21:27:29 +0000
[Message part 1 (text/plain, inline)]
On Sun, 2010-12-26 at 18:29 +0100, Julien Cristau wrote:
> the release notes for squeeze will need to mention that any local
> diversions of /bin/sh need to be removed prior to the upgrade.  Any more
> tweaking of this code path to support other shells as /bin/sh, if at all
> necessary, will wait for post-squeeze.

I put together a proposed patch (attached) for the Release Notes,
listing this as a potential problem in the "Issues to be aware of"
section; comments welcome.

Regards,

Adam
[squeeze-rn-shell-diversions.diff (text/x-patch, attachment)]

Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Mon, 27 Dec 2010 21:30:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 27 Dec 2010 21:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 27 Dec 2010 21:57:03 GMT) Full text and rfc822 format available.

Message #223 received at 538822@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>, 540512@bugs.debian.org
Cc: Julien Cristau <jcristau@debian.org>, 538822@bugs.debian.org, 540512@bugs.debian.org, release-notes@packages.debian.org, 538822-submitter@bugs.debian.org
Subject: Re: Bug#540512: Bug#538822: dash and local diversions
Date: Mon, 27 Dec 2010 21:52:31 +0000 (UTC)
Adam D. Barratt dixit:

>I put together a proposed patch (attached) for the Release Notes,

Looks good to me, thanks. (Indeed, I should have known the issue,
but forgot that these were its symptoms.)

bye,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (241 (259) bugs: 0 RC, 172 (187) I&N, 69 (82) M&W, 0 F&P)
‣ src:dash (74 (82) bugs: 3 (4) RC, 51 (57) I&N, 20 (21) M&W, 0 F&P)
‣ src:mksh (4 bugs: 0 RC, 0 I&N, 4 M&W, 0 F&P)




Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Mon, 27 Dec 2010 21:57:24 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Wed, 29 Dec 2010 19:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Adam D. Barratt" <adam@adam-barratt.org.uk>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 29 Dec 2010 19:51:03 GMT) Full text and rfc822 format available.

Message #231 received at 538822@bugs.debian.org (full text, mbox):

From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
To: Thorsten Glaser <tg@mirbsd.de>, 538822@bugs.debian.org
Cc: 540512@bugs.debian.org, Julien Cristau <jcristau@debian.org>, release-notes@packages.debian.org, 538822-submitter@bugs.debian.org
Subject: Re: Bug#538822: Bug#540512: Bug#538822: dash and local diversions
Date: Wed, 29 Dec 2010 19:45:38 +0000
On Mon, 2010-12-27 at 21:52 +0000, Thorsten Glaser wrote:
> Adam D. Barratt dixit:
> 
> >I put together a proposed patch (attached) for the Release Notes,
> 
> Looks good to me, thanks. (Indeed, I should have known the issue,
> but forgot that these were its symptoms.)

Thanks.  Any comments / additions from others?

Regards,

Adam





Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Wed, 29 Dec 2010 19:51:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Thu, 30 Dec 2010 18:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 30 Dec 2010 18:18:03 GMT) Full text and rfc822 format available.

Message #239 received at 538822@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>, 538822@bugs.debian.org
Cc: Thorsten Glaser <tg@mirbsd.de>, 540512@bugs.debian.org, release-notes@packages.debian.org, 538822-submitter@bugs.debian.org
Subject: Re: Bug#538822: Bug#540512: Bug#538822: dash and local diversions
Date: Thu, 30 Dec 2010 19:14:56 +0100
[Message part 1 (text/plain, inline)]
On Wed, Dec 29, 2010 at 19:45:38 +0000, Adam D. Barratt wrote:

> On Mon, 2010-12-27 at 21:52 +0000, Thorsten Glaser wrote:
> > Adam D. Barratt dixit:
> > 
> > >I put together a proposed patch (attached) for the Release Notes,
> > 
> > Looks good to me, thanks. (Indeed, I should have known the issue,
> > but forgot that these were its symptoms.)
> 
> Thanks.  Any comments / additions from others?
> 
Patch committed (r7973), thanks.

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Thu, 30 Dec 2010 18:18:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 01 Jan 2011 23:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 01 Jan 2011 23:03:03 GMT) Full text and rfc822 format available.

Message #247 received at 538822@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>, 538822@bugs.debian.org
Cc: Thorsten Glaser <tg@mirbsd.de>, 540512@bugs.debian.org, release-notes@packages.debian.org, 538822-submitter@bugs.debian.org
Subject: Re: Bug#538822: Bug#540512: Bug#538822: dash and local diversions
Date: Sat, 1 Jan 2011 23:57:50 +0100
[Message part 1 (text/plain, inline)]
affects 538822 - release-notes
affects 540512 - release-notes
kthxbye

On Thu, Dec 30, 2010 at 19:14:56 +0100, Julien Cristau wrote:

> Patch committed (r7973), thanks.
> 
Removing the release-notes 'affects' from those bugs to get them out of
my todo list :)

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Removed indication that 538822 affects release-notes Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Sat, 01 Jan 2011 23:03:06 GMT) Full text and rfc822 format available.

Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Sat, 01 Jan 2011 23:03:21 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Thu, 13 Jan 2011 13:03:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 13 Jan 2011 13:03:07 GMT) Full text and rfc822 format available.

Message #257 received at 538822@bugs.debian.org (full text, mbox):

From: Helmut Grohne <helmut@subdivi.de>
To: "Adam D. Barratt" <adam@adam-barratt.org.uk>, 538822@bugs.debian.org
Cc: Julien Cristau <jcristau@debian.org>, 540512@bugs.debian.org
Subject: Re: Bug#538822: dash and local diversions
Date: Thu, 13 Jan 2011 13:34:31 +0100
Hi,

I am the submitter of the original dash upgrade bug.

On Mon, Dec 27, 2010 at 09:27:29PM +0000, Adam D. Barratt wrote:
> diff --git a/en/issues.dbk b/en/issues.dbk
> index 9498399..83f1408 100644
> --- a/en/issues.dbk
> +++ b/en/issues.dbk
> @@ -244,6 +244,34 @@ works for <literal>root</literal>.
>    </para>
>  </section>
>  
> +<section id="shell-diversions">
> +  <title>Potential issues with diversions of /bin/sh</title>
> +  <para>
> +    If you have previously added a local diversion for <literal>/bin/sh</literal>,
> +    or modified the <literal>/bin/sh</literal> symlink to point to somewhere
> +    other than <literal>/bin/bash</literal>, then you may encounter problems
> +    when upgrading the <systemitem role="package">dash</systemitem> or
> +    <systemitem role="package">bash</systemitem> packages.
> +    Note that this includes changes made by allowing other packages (for example
> +    <systemitem role="package">mksh</systemitem>) to become the default system
> +    shell by taking over <literal>/bin/sh</literal>.
> +  </para>
> +  <para>
> +    If you encounter any such issues, please remove the local diversion and
> +    ensure that the symlinks for both <literal>/bin/sh</literal> and its
> +    manual page point to the files provided by the <systemitem role="package">
> +    bash</systemitem> package and then
> +    <command>dpkg-reconfigure --force dash</command>.
> +  </para>
> +  <programlisting>
> +    dpkg-divert --remove /bin/sh
> +    dpkg-divert --remove /usr/share/man/man1/sh.1.gz
> +    
> +    ln -sf bash /bin/sh
> +    ln -sf bash.1.gz /usr/share/man/man1/sh.1.gz
> +  </programlisting>
> +</section>
> +
>  </section>
>  
>  <section id="upgrade-to-2.6" condition="fixme">

I verified that the steps you proposed solved the issue on my system.

Thank you very much for finally (after one and a half year) addressing
the issue.

Helmut




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 11 Apr 2011 08:00:19 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 11 Apr 2011 08:00:22 GMT) Full text and rfc822 format available.

Message #262 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 538822@bugs.debian.org, 540512@bugs.debian.org
Cc: 538822-submitter@bugs.debian.org, 540512-submitter@bugs.debian.org
Subject: Re: Shipping /bin/sh
Date: Mon, 11 Apr 2011 02:57:29 -0500
tags 538822 + patch
tags 540512 + patch
# unrelated:
unblock 619820 by 540512
quit

Hi,

Sven Joachim wrote:

> This is #538822, the reason being that both bash and dash ship this
> file.

I've put up a fix at

- git://repo.or.cz/dash/debian/jrn.git proposed-updates
- http://mentors.debian.net/debian/pool/main/d/dash/dash_0.5.6.1-1~exp3.dsc

It uses an old trick from Michael Stone (as explained by ajt), from
<http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=85;bug=34717>.

Known bug: the /bin/sh link switches to bash and back to dash if dash
and bash are being upgraded in a single dpkg run on a typical
installation.  Seems harmless.  Fixing that would require a small
change to bash's preinst.

Please feel free to test bootstraps and weird scenarios and let me
know how it goes.  After a few days I would be interested in uploading
this to experimental.

Thanks, and hope that helps.
Jonathan




Added tag(s) patch. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 11 Apr 2011 08:00:32 GMT) Full text and rfc822 format available.

Message sent on to Helmut Grohne <helmut@subdivi.de>:
Bug#538822. (Mon, 11 Apr 2011 08:00:40 GMT) Full text and rfc822 format available.

Removed tag(s) patch. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Tue, 27 Sep 2011 01:18:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 16 Jun 2012 12:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arne Wichmann <aw@anhrefn.saar.de>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 16 Jun 2012 12:39:03 GMT) Full text and rfc822 format available.

Message #274 received at 538822@bugs.debian.org (full text, mbox):

From: Arne Wichmann <aw@anhrefn.saar.de>
To: 538822@bugs.debian.org
Subject: Ping
Date: Sat, 16 Jun 2012 14:28:46 +0200
[Message part 1 (text/plain, inline)]
So, this is now unhandled for more than 9 months after it seemed almost
fixed. What are the problemsat the moment?

cu

AW
-- 
[...] If you don't want to be restricted, don't agree to it. If you are
coerced, comply as much as you must to protect yourself, just don't support
it. Noone can free you but yourself. (crag, on Debian Planet)
Arne Wichmann (aw@linux.de)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 16 Jun 2012 19:18:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 16 Jun 2012 19:18:06 GMT) Full text and rfc822 format available.

Message #279 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Arne Wichmann <aw@anhrefn.saar.de>
Cc: 538822@bugs.debian.org
Subject: Re: dash fails to upgrade if /bin/sh is locally diverted (Re: Ping)
Date: Sat, 16 Jun 2012 14:14:42 -0500
Hi Arne,

Arne Wichmann wrote:

> [Subject: Bug#538822: Ping]

Please keep in mind that these appear as emails in a crowded inbox, so
the subject line can be a good place to put valuable context.

> So, this is now unhandled for more than 9 months after it seemed almost
> fixed. What are the problemsat the moment?

Thanks for a ping.  This is a complex one.

If /bin/sh is locally diverted, upgrading dash or bash within squeeze
would just not work (it produces file conflicts).  So this is a
somewhat esoteric bug.

For squeeze -> wheezy upgrades:

 - if bash is upgraded first, it respects the diversion and removes
   /bin/sh.distrib instead of /bin/sh.  Then when the updated dash is
   unpacked it would respect the diversion, too and replace
   /bin/sh.distrib instead of /bin/sh.  No problem.

   Except that postinst does not cope with local diversions, which is
   easy enough to fix (fixed on the experimental branch already).

 - if dash is upgraded first, there is a file conflict.  No go.

So a versioned Pre-Depends by dash on bash should be enough to deal
with the unpack-time part of squeeze -> wheezy upgrades, and all
that's left is to work out what dash.postinst should do.

If we had time to update debootstrap and cdebootstrap (multistrap
requires manual work anyway so it isn't relevant here), we could even
avoid that Pre-Depends[*] and that would be the Right Thing to do.

Going one step down in invasiveness:

 * Keep /bin/sh in dash's files list for the sake of the initial
   bootstrap.

 * In dash's preinst, ensure that /bin/sh is diverted on behalf of a
   package other than dash, so whereever the sysadmin has chosen to
   make /bin/sh point, the package does not have to change it (already
   done in experimental).

   Likewise in bash's preinst (already done in sid).

 * Use existing well-tested maintainer script magic to handle upgrades
   from versions in which both bash and dash had the /bin/sh symlink
   in their files list.

That doesn't sound so bad to me.  The main question is how to handle
UI for configuration of where the /bin/sh symlink points.

How about something along these lines (against the packaging on the
debian-experimental branch)?
---
[*] Will go into that in a separate message.

 debian/dash.config       |    8 +--
 debian/dash.postinst     |  156 ++++++++++++++++------------------------------
 debian/dash.preinst.c    |   20 +++---
 debian/dash.templates.in |   12 +++-
 4 files changed, 76 insertions(+), 120 deletions(-)

diff --git i/debian/dash.config w/debian/dash.config
index b000f2d9..7528f741 100644
--- i/debian/dash.config
+++ w/debian/dash.config
@@ -35,11 +35,5 @@ if [ "$1" = configure ] && [ -z "$2" ]; then
 	esac
 fi
 
-# if "configuring and for the first time and bash is already installed"
-if [ "$1" = configure ] && [ -z "$2" ] && dpkg-query -W bash >/dev/null; then
-	# bash is pulling in dash
-	db_input high dash/sh || true
-else
-	db_input low dash/sh || true
-fi
+db_input low dash/sh || true
 db_go
diff --git i/debian/dash.postinst w/debian/dash.postinst
index 799a4237..846524c5 100644
--- i/debian/dash.postinst
+++ w/debian/dash.postinst
@@ -3,7 +3,7 @@ set -e
 
 # $1: dfile, $2: link target, $3: distrib
 replace_with_link() {
-	dfile=$1; ltarget=$2; distrib=$3
+	dfile=$1; ltarget=$2; distrib=${3:-$dfile.distrib}
 	temp=$dfile.tmp
 	# Safely create a symlink to $ltarget at $dfile, first
 	# making a backup of $dfile (the file being diverted)
@@ -20,90 +20,6 @@ replace_with_link() {
 	mv -f "$temp" "$dfile"
 }
 
-claim_binsh() {
-	dfile=$1 ltarget=$2 distrib=${3:-$dfile.distrib}
-	diverter=$(dpkg-divert --listpackage $dfile)
-	truename=$(dpkg-divert --truename $dfile)
-
-	if [ "$diverter" = dash ]; then
-		# good.
-		return
-	fi
-
-	if [ "$diverter" = LOCAL ]; then
-		# The sysadmin wants it this way.  Who am I to argue?
-		return
-	fi
-
-	if [ "$diverter" != bash ]; then
-		# Let dpkg-divert error out; we are not taking
-		# over the diversion, unless we added it
-		# ourselves on behalf of bash.
-		dpkg-divert --package dash --remove $dfile
-		echo "This should never be reached"
-		exit 1
-	fi
-
-	dpkg-divert --package bash --remove $dfile
-	dpkg-divert --package dash --divert $distrib --add $dfile
-	# remove the old equivalent of $distrib, if it existed.
-	if [ -n "$truename" ]; then
-	       rm -f "$truename"
-	fi
-	replace_with_link $dfile $ltarget $distrib
-}
-
-unclaim_binsh() {
-	dfile=$1 ltarget=$2 distrib=${3:-$dfile.distrib}
-	diverter=$(dpkg-divert --listpackage $dfile)
-	truename=$(dpkg-divert --truename $dfile)
-
-	if [ "$diverter" != dash ]; then
-		# good.
-		return
-	fi
-
-	# Donate the diversion and sh symlink to the bash package.
-	ltarget=$(echo $ltarget | sed s/dash/bash/)
-	dpkg-divert --package dash --remove $dfile
-	dpkg-divert --package bash --divert $distrib --add $dfile
-	if [ -n "$truename" ]; then
-		rm -f "$truename"
-	fi
-	replace_with_link $dfile $ltarget $distrib
-}
-
-initial_binsh_setup() {
-	dfile=$1 ltarget=$2 distrib=${3:-$dfile.distrib} ashfile=$4
-	diverter=$(dpkg-divert --listpackage $dfile)
-	truename=$(dpkg-divert --truename $dfile)
-
-	if [ -z "$diverter" ]; then
-		# good.
-		return
-	fi
-
-	if [ "$diverter" = ash ]; then
-		dpkg-divert --package ash --remove $dfile
-		dpkg-divert --package dash --divert $distrib --add $dfile
-
-		if [ "$truename" != "$distrib" ] && [ -e "$truename" ]; then
-			mv "$truename" "$distrib"
-		fi
-		replace_with_link $dfile $ltarget
-		return
-	fi
-
-	if
-		[ -h $dfile ] &&
-		[ -f $dfile ] &&
-		[ -f $ashfile ] &&
-		cmp $dfile $ashfile
-	then
-		replace_with_link $dfile $ltarget
-	fi
-}
-
 add_shell() {
 	if ! type add-shell > /dev/null 2>&1; then
 		return
@@ -112,36 +28,74 @@ add_shell() {
 	add-shell /bin/dash
 }
 
+# This should never happen.
+if [ ! -e /bin/sh ]; then
+	ln -s dash /bin/sh
+fi
+
+test "$1" = 'configure' || exit 0
+
 debconf=
 if [ -f /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
 	debconf=yes
 fi
 
-if [ "$1" = configure ] && [ -z "$2" ]; then
-	initial_binsh_setup /bin/sh dash '' /bin/ash
-	initial_binsh_setup /usr/share/man/man1/sh.1.gz dash.1.gz \
-		/usr/share/man/man1/sh.distrib.1.gz \
-		/usr/share/man/man1/ash.1.gz
-	add_shell
-elif [ "$1" = configure ] && dpkg --compare-versions "$2" lt 0.4.18; then
+if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.4.18; then
 	add_shell
 fi
 
+shell=
 if [ $debconf ]; then
 	db_get dash/sh
-	if [ "$RET" = true ]; then
-		claim_binsh /bin/sh dash
-		claim_binsh /usr/share/man/man1/sh.1.gz dash.1.gz \
-			/usr/share/man/man1/sh.distrib.1.gz
-	else
-		unclaim_binsh /bin/sh dash
-		unclaim_binsh /usr/share/man/man1/sh.1.gz dash.1.gz \
-			/usr/share/man/man1/sh.distrib.1.gz
+	shell=$RET
+fi
+
+case $shell in
+/bin/sh | sh)
+	# Leave /bin/sh as is.
+	shell=
+	;;
+true)
+	# "Use dash as the default system shell (/bin/sh)?" Yes.
+	shell=dash
+	;;
+false)
+	# "Use dash as the default system shell (/bin/sh)?" No.
+	shell=bash
+	;;
+esac
+
+case $shell in
+/*)
+	if [ ! -f "$shell" ] || [ ! -x "$shell" ]; then
+		echo >&2 "dash.postinst: shell $shell not found or unusable"
+		exit 1
 	fi
+	shellname=${shell##*/}
+	replace_with_link /bin/sh $shell
+	replace_with_link /usr/share/man/man1/sh.1.gz $shellname.1.gz \
+		/usr/share/man/man1/sh.distrib.1.gz
+	;;
+"")
+	# Nothing to do (hoorah!)
+	;;
+*)
+	if [ ! -f "/bin/$shell" ] || [ ! -x "/bin/$shell" ]; then
+		echo >&2 "dash.postinst: shell $shell not found or unusable"
+		exit 1
+	fi
+	shellname=${shell##*/}
+	replace_with_link /bin/sh $shell
+	replace_with_link /usr/share/man/man1/sh.1.gz $shellname.1.gz \
+		/usr/share/man/man1/sh.distrib.1.gz
+	;;
+esac
+
+if [ $debconf ]; then
+	db_set dash/sh ''
 fi
 
-test "$1" = 'configure' || exit 0
 test -x /usr/bin/update-menus || exit 0
 test -z "$2" || dpkg --compare-versions "$2" lt 0.5.2-3 || exit 0
 exec update-menus
diff --git i/debian/dash.preinst.c w/debian/dash.preinst.c
index 966b65de..200c1be4 100644
--- i/debian/dash.preinst.c
+++ w/debian/dash.preinst.c
@@ -47,7 +47,6 @@ static void reset_diversion(const char *package, const char *file,
 		"--divert", distrib, "--add", file, NULL};
 	run(remove_old_diversion);
 	run(new_diversion);
-	copy(file, distrib);
 }
 
 static int undiverted(const char *path)
@@ -78,6 +77,17 @@ static int undiverted(const char *path)
 
 int main(int argc, char *argv[])
 {
+	/* /bin/sh needs to point to a valid target. */
+	if (access("/bin/sh", X_OK)) {
+		copy("/bin/sh", "/bin/sh.distrib")
+		copy("/usr/share/man/man1/sh.1.gz",
+			"/usr/share/man/man1/sh.distrib.1.gz");
+
+		force_symlink("dash", "/bin/sh", "/bin/sh.temp");
+		force_symlink("dash.1.gz", "/usr/share/man/man1/sh.1.gz",
+			"/usr/share/man/man1/sh.1.gz.temp");
+	}
+
 	/*
 	 * To help with bootstrapping Debian, the dash package includes
 	 * symlinks for /bin/sh and the sh(1) manpage in its data.tar.
@@ -95,13 +105,5 @@ int main(int argc, char *argv[])
 	if (undiverted("/usr/share/man/man1/sh.1.gz"))
 		reset_diversion("bash", "/usr/share/man/man1/sh.1.gz",
 				"/usr/share/man/man1/sh.distrib.1.gz");
-
-	/* /bin/sh needs to point to a valid target. */
-	if (access("/bin/sh", X_OK)) {
-		force_symlink("dash", "/bin/sh", "/bin/sh.temp");
-		force_symlink("dash.1.gz", "/usr/share/man/man1/sh.1.gz",
-			"/usr/share/man/man1/sh.1.gz.temp");
-	}
-
 	return 0;
 }
diff --git i/debian/dash.templates.in w/debian/dash.templates.in
index dfaf25db..9d9961b6 100644
--- i/debian/dash.templates.in
+++ w/debian/dash.templates.in
@@ -7,14 +7,20 @@
 # Even minor modifications require translation updates and such
 # changes should be coordinated with translators and reviewers.
 Template: dash/sh
-Type: boolean
-Default: true
-_Description: Use dash as the default system shell (/bin/sh)?
+Type: string
+_Description: What shell should be the default system shell (/bin/sh)?
  The system shell is the default command interpreter for shell scripts.
  .
  Using dash as the system shell will improve the system's overall
  performance. It does not alter the shell presented to interactive
  users.
+ .
+ For historical reasons, 'true' is a synonym for dash and 'false'
+ means bash.
+ .
+ If this value is left empty (recommended), the target of the /bin/sh
+ symlink is left unchanged. The target of that symbolic link is
+ completely under the control of the system admin.
 # _Description: Install dash as /bin/sh?
 #  The default /bin/sh shell on Debian and Debian-based systems is bash.
 #  .




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 16 Jun 2012 19:18:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 16 Jun 2012 19:18:08 GMT) Full text and rfc822 format available.

Message #284 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Arne Wichmann <aw@anhrefn.saar.de>
Cc: 538822@bugs.debian.org
Subject: Re: dash fails to upgrade if /bin/sh is locally diverted (Re: Ping)
Date: Sat, 16 Jun 2012 14:16:50 -0500
Jonathan Nieder wrote:

> If we had time to update debootstrap and cdebootstrap (multistrap
> requires manual work anyway so it isn't relevant here), we could even
> avoid that Pre-Depends[*] and that would be the Right Thing to do.
[...]
> [*] Will go into that in a separate message.

 * introduce a "bootstrap" maintainer script.  It uses only minimal
   POSIX facilities to perform some steps of bootstrapping _before_ the
   initial boot into the target environment, and can be used to perform
   such important steps as preparing dpkg's initial database and setting
   the initial targets of the /bin/sh and /bin/awk symlinks so the target
   system has the essential functionality needed to continue the
   bootstrap from the beginning.

 * Make sure bootstrapping tools in stable support the "bootstrap"
   maintainer script, so they will be capable to bootstrapping stable+1.

 * Add a bootstrap script to dash to creates the initial /bin/sh symlink.
   Or to some other package --- it doesn't really matter, as long as the
   /bin/sh symlink is created during the initial unpacking on the host
   environment and is not owned by any package.

 * Use existing well-tested maintainer script magic to handle upgrades
   from versions in which both bash and dash had the /bin/sh symlink in
   their files list.  The new versions of both packages would not have
   the symlink.

A more lightweight version of the same thing would be the following:

 * Instead of a generic "bootstrap" maintainer script, just teach
   bootstrap tools to set up /bin/sh, just like some of them have
   hardcoded magic to write /bin/awk already.

That's more lightweight but not really lightweight enough for wheezy.

Based on an idea by Bastian Blank, if I remember correctly.




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Mon, 29 Oct 2012 19:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Gevers <elbrus@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 29 Oct 2012 19:27:03 GMT) Full text and rfc822 format available.

Message #289 received at 538822@bugs.debian.org (full text, mbox):

From: Paul Gevers <elbrus@debian.org>
To: 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: dash and sh diversions: wouldn't it be nice to fix 538822 and 540512?
Date: Mon, 29 Oct 2012 20:26:37 +0100
[Message part 1 (text/plain, inline)]
Hi all involved,

[This is a ping].

Reading through RC bug 538822 and 540512 (which were already RC during
Squeeze release in 2010) I have the feeling that it is known how these
bug could be fixed and changes are available in the git repository.
Shouldn't we discuss this with the release team and see if we can upload
the latest changes? I tried to review them, but this is to complicated
for me.

If we can not get this fixed for Wheezy, do we (again) need
release-notes to note the fact? Or just use the Pre-Depends as mentioned
in bug 538822?

Willing to help, if I can.
Paul

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 30 Oct 2012 06:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 30 Oct 2012 06:18:03 GMT) Full text and rfc822 format available.

Message #294 received at 538822@bugs.debian.org (full text, mbox):

From: Christian PERRIER <bubulle@debian.org>
To: Paul Gevers <elbrus@debian.org>, 538822@bugs.debian.org
Cc: 540512@bugs.debian.org
Subject: Re: Bug#538822: dash and sh diversions: wouldn't it be nice to fix 538822 and 540512?
Date: Tue, 30 Oct 2012 06:59:24 +0100
[Message part 1 (text/plain, inline)]
Quoting Paul Gevers (elbrus@debian.org):
> Hi all involved,
> 
> [This is a ping].
> 
> Reading through RC bug 538822 and 540512 (which were already RC during
> Squeeze release in 2010) I have the feeling that it is known how these
> bug could be fixed and changes are available in the git repository.
> Shouldn't we discuss this with the release team and see if we can upload
> the latest changes? I tried to review them, but this is to complicated
> for me.
> 
> If we can not get this fixed for Wheezy, do we (again) need
> release-notes to note the fact? Or just use the Pre-Depends as mentioned
> in bug 538822?
> 
> Willing to help, if I can.


IMHO (not involved in any of these packages), now is bad time to fix
these bugs: too late in the release process.

What's needed is someone taking care of them as soon as possible after
the release of wheezy. Such important and hairy issues should be dealt
with at the beginning of a release cycle and not when we're polishing
things for a release.

My 2 cents, only.


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Tue, 30 Oct 2012 06:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 30 Oct 2012 06:27:03 GMT) Full text and rfc822 format available.

Message #299 received at 538822@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Christian PERRIER <bubulle@debian.org>
Cc: 538822@bugs.debian.org, Paul Gevers <elbrus@debian.org>, 540512@bugs.debian.org
Subject: Re: dash and sh diversions: wouldn't it be nice to fix 538822 and 540512?
Date: Mon, 29 Oct 2012 23:24:28 -0700
Christian PERRIER wrote:

> IMHO (not involved in any of these packages), now is bad time to fix
> these bugs: too late in the release process.

Yes, I think we should try to fix the diversion mess in experimental,
ignoring the release cycle, and wait for wheezy+1 or later before
including the changes in sid.

Sorry I dropped the ball on this.  Help testing and tweaking the
patches is always welcome.

On the plus side, this means we have time to make the appropriate
debootstrap improvements to get this working cleanly and well.

Thanks,
Jonathan



Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Wed, 31 Oct 2012 19:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Gevers <elbrus@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 31 Oct 2012 19:15:03 GMT) Full text and rfc822 format available.

Message #304 received at 538822@bugs.debian.org (full text, mbox):

From: Paul Gevers <elbrus@debian.org>
To: 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: Re: Bug#540512: dash and sh diversions: wouldn't it be nice to fix 538822 and 540512?
Date: Wed, 31 Oct 2012 20:11:06 +0100
[Message part 1 (text/plain, inline)]
On 30-10-12 07:24, Jonathan Nieder wrote:
> Christian PERRIER wrote:
> 
>> IMHO (not involved in any of these packages), now is bad time to fix
>> these bugs: too late in the release process.
> 
> Yes, I think we should try to fix the diversion mess in experimental,
> ignoring the release cycle, and wait for wheezy+1 or later before
> including the changes in sid.

So even the pre-depends solution is not an option for this release? I
agree that the patch you propose now is quite involved, but wouldn't it
help to release wheezy with a proper pre-depends and then fix this
properly in wheezy+1? Or do you consider the pre-depends solution too ugly?

> On the plus side, this means we have time to make the appropriate
> debootstrap improvements to get this working cleanly and well.

Of course.

If we don't want to fix this now for wheezy, I will as the release team
to properly tag these bugs.

Paul

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Wed, 07 Nov 2012 19:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Gevers <elbrus@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 07 Nov 2012 19:45:03 GMT) Full text and rfc822 format available.

Message #309 received at 538822@bugs.debian.org (full text, mbox):

From: Paul Gevers <elbrus@debian.org>
To: Debian release team <debian-release@lists.debian.org>
Cc: 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: Postpone fix for 540512 and 538822 till after release (dash and sh diversions)
Date: Wed, 07 Nov 2012 20:40:58 +0100
[Message part 1 (text/plain, inline)]
Hi release team,

There has been a small discussion about dash RC bugs 538822 and 540512
in the bts and the general idea is to postpone the proper fix (again)
till after the release. Do you agree, and if so, can you tag this bug
appropriate as wheezy-ignore? If you do, these bugs should again
"affects release-notes" as well. I believe the previous text in the
release-notes were fine.

Kind regards
Paul

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#538822; Package dash. (Sat, 26 Jan 2013 12:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil McGovern <neilm@debian.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sat, 26 Jan 2013 12:03:03 GMT) Full text and rfc822 format available.

Message #314 received at 538822@bugs.debian.org (full text, mbox):

From: Neil McGovern <neilm@debian.org>
To: Paul Gevers <elbrus@debian.org>
Cc: Debian release team <debian-release@lists.debian.org>, 540512@bugs.debian.org, 538822@bugs.debian.org
Subject: Re: Postpone fix for 540512 and 538822 till after release (dash and sh diversions)
Date: Sat, 26 Jan 2013 12:01:54 +0000
[Message part 1 (text/plain, inline)]
Control: tag 540512 +wheezy-ignore
Control: tag 538822 +wheezy-ignore

This is obviously not going to get fixed this time. Adding ignore tags.

On Wed, Nov 07, 2012 at 08:40:58PM +0100, Paul Gevers wrote:
> There has been a small discussion about dash RC bugs 538822 and 540512
> in the bts and the general idea is to postpone the proper fix (again)
> till after the release. Do you agree, and if so, can you tag this bug
> appropriate as wheezy-ignore? If you do, these bugs should again
> "affects release-notes" as well. I believe the previous text in the
> release-notes were fine.
> 

Neil

-- 
[signature.asc (application/pgp-signature, inline)]

Added tag(s) wheezy-ignore. Request was from Neil McGovern <neilm@debian.org> to 538822-submit@bugs.debian.org. (Sat, 26 Jan 2013 12:03:03 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 05:44:51 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.