[SRU] spampd 2.30

Bug #76861 reported by Marc Hauswirth on 2006-12-22
22
Affects Status Importance Assigned to Milestone
spampd (Ubuntu)
Undecided
Marc Hauswirth

Bug Description

The first line of the init-script set a wrong shell, so that the package can not be started on a standard Edgy system.

The changes are simple :
In the first line of /etc/init.d/spampd

- #!/bin/sh -e
+ #!/bin/bash

ref : https://bugs.launchpad.net/distros/ubuntu/+source/spampd/+bug/69595

It was Ok on Dapper so when I upgraded my machine I got in troubles. On Feisty this packaged was resynchronized with Debian, and this issues was addresses in the same manner.

Kind regards,

Marc

Marc Hauswirth (marc-practeo) wrote :

My patch proposition

Changed in spampd:
assignee: nobody → marc-practeo
status: Unconfirmed → In Progress
description: updated
StefanPotyra (sistpoty) wrote :

Version number should probably be 2.30-11ubuntu0.1~proposed1, but that one should do as well.

+1.

Reinhard Tartler (siretart) wrote :

you can drop the dependency on bash, since bash is Priority 'required'. Apart from that and fix the version number: +1

Marc Hauswirth (marc-practeo) wrote :

Thanks for all comments and all hints.

I changed the version and the bash dependency.

StefanPotyra (sistpoty) wrote :

still +1

Daniel T Chen (crimsun) wrote :

bash must be declared as a Depends according to Simon Law's comment on the oprofile SRU[0].

[0] https://launchpad.net/distros/ubuntu/+source/oprofile/+bug/69455/comments/10

StefanPotyra (sistpoty) wrote :

Hi,

nope, bash shouldn't be in depends, since it's essential=Yes (cf. debian policy, 3.5).

P.S.: I was confused by sfflaw's comment as well in the first place ;).

Daniel T Chen (crimsun) wrote :

Looks sane, +1.

Daniel T Chen (crimsun) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 22 Dec 2006 14:07:20 +0100
Source: spampd
Binary: spampd
Architecture: source
Version: 2.30-11ubuntu0.1~proposed1
Distribution: edgy-proposed
Urgency: low
Maintainer: Sven Mueller <email address hidden>
Changed-By: Marc Hauswirth <email address hidden>
Description:
 spampd - spamassassin based SMTP/LMTP proxy daemon
Changes:
 spampd (2.30-11ubuntu0.1~proposed1) edgy-proposed; urgency=low
 .
   * Fix in spampd.init from /bin/sh -e to /bin/bash
     In the previous version (2.30-11), the daemon couldn't start correctly on
     a standard edgy machine.
     Reported under bug #76861 ([SRU] Spampd).
     This bug is also referenced under lauchpad #69595 and #76654 and debian #391219.
     This issue as been fixed in Debian/unstable and Ubuntu/Feisty since
Files:
 10c61289d7767a405473df3248bda137 601 mail optional spampd_2.30-11ubuntu0.1~proposed1.dsc
 70f76195c33f8e8c62647b362eb879f0 14616 mail optional spampd_2.30-11ubuntu0.1~proposed1.diff.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFrUmte9GwFciKvaMRAlahAJ0dFZpBApeLDgahJzpi3iDzBE6DAwCcDYBx
wbu1ld0WQOGgyMlW0GFrckQ=
=00wC
-----END PGP SIGNATURE-----

Reinhard Tartler (siretart) wrote :

+1

Tollef Fog Heen (tfheen) wrote :

Accepted into edgy-proposed; please solicit testing as per https://wiki.ubuntu.com/MOTU/SRU

Changed in spampd:
status: In Progress → Fix Committed
Marc Hauswirth (marc-practeo) wrote :

Installed successfully, works for me

Kristoffer H (mputoris) wrote :

spampd_2.30-11ubuntu0.1~proposed1_all.deb didn't work for me.

Kristoffer H (mputoris) wrote :

I got the result:

@disgraceland:~$ sudo dpkg -i spampd_2.30-11ubuntu0.1~proposed1_all.deb
(Läser databasen ... 307396 filer och kataloger installerade.)
Förbereder att ersätta spampd 2.30-11 (med spampd_2.30-11ubuntu0.1~proposed1_all.deb) ...
 * ERROR: Insufficient privileges. Retry as root
invoke-rc.d: initscript spampd, action "stop" failed.
dpkg: varning - gammalt pre-removal-skript returnerade felstatus 4
dpkg - försöker skript från det nya paketet istället ...
 * ERROR: Insufficient privileges. Retry as root
invoke-rc.d: initscript spampd, action "stop" failed.
dpkg: fel vid hantering av spampd_2.30-11ubuntu0.1~proposed1_all.deb (--install):
 underprocess nytt pre-removal-skript gav felkod 4
spampd.postinst: Aborting upgrade
spampd.postinst: Not creating statoverrides on abort-upgrade. other version: 2.30-11ubuntu0.1~proposed1
 * ERROR: Insufficient privileges. Retry as root
invoke-rc.d: initscript spampd, action "start" failed.
dpkg: fel vid upprensning:
 underprocess post-installation script gav felkod 4
Fel uppstod vid hantering:
 spampd_2.30-11ubuntu0.1~proposed1_all.deb

Retry as root? Shouldn't ''sudo'' be enough?

Kristoffer H (mputoris) wrote :

I tried as root; it still seems to generate the same messages.

Marc Hauswirth (marc-practeo) wrote :

Hi did you remove the buggy spampd package completely before ?
  sudo dpkg --remove --force-all spampd

Kristoffer H (mputoris) wrote :

I get this:

root@disgraceland:~# dpkg --remove --force-all spampd
dpkg - varning, ignorerar problem då --force använts:
 Paketet är i ett väldigt dåligt inkonsistent läge - du bör
 ominstallera det innan du försöker ta bort det.
(Läser databasen ... 307394 filer och kataloger installerade.)
Tar bort spampd ...
 * ERROR: Insufficient privileges. Retry as root
invoke-rc.d: initscript spampd, action "stop" failed.
dpkg: fel vid hantering av spampd (--remove):
 underprocess pre-removal script gav felkod 4
 * ERROR: Insufficient privileges. Retry as root
invoke-rc.d: initscript spampd, action "start" failed.
dpkg: fel vid upprensning:
 underprocess post-installation script gav felkod 4
Fel uppstod vid hantering:
 spampd
root@disgraceland:~#

Marc Hauswirth (marc-practeo) wrote :

Ok so the remove of the previous package seams to fail ...
Could you give the result of :

    dpkg -l spampd

(So that we could have your actual installed package version)
Thanks.

Marc Hauswirth (marc-practeo) wrote :

If you have the version 2.30-11

  marc@cancun:~$ dpkg -l spampd
[...]
  ||/ Name Version Description
  iF spampd 2.30-11 spamassassin based SMTP/LMTP proxy daemon

edit the file /etc/init.d/spampd
change only the first line from
#!/bin/sh -e
to
#!/bin/bash

then you should be able to remove the old package
  dpkg --remove spampd

Marc Hauswirth (marc-practeo) wrote :

A Larger question :

Is it possible to modify a file of a previously installed package before removing it via the standard dpkg tools ? (in case of buggy init.d scripts ?)

or what would be a "nice" patch in the case of a unremovable package

thanks.

Kristoffer H (mputoris) wrote :

root@disgraceland:~# dpkg -l spampd
Önskat=Okänd(U)/Installera(I)/Radera(R)/Rensa(P)/Håll(H)
| Status=Ej(N)/Installerad(I)/Konf.(C)/Uppackad(U)/Misslyckad(F)/Delvis(H)
|/ Fel?Inget(=)/Håll(H)/Ominstallera(R)/Båda(X) (Status,Fel: versaler=illa)
||/ Namn Version Beskrivning
+++-==============-==============-============================================
iFR spampd 2.30-11 spamassassin based SMTP/LMTP proxy daemon
root@disgraceland:~#

Kristoffer H (mputoris) wrote :

I tried to change the first line in /etc/init.d/spampd to ''#!/bin/bash/'' and then remove the package with ''dpkg --remove spampd'' and gets:

root@disgraceland:/etc/init.d# dpkg --remove spampd
dpkg: fel vid hantering av spampd (--remove):
 Paketet är i ett väldigt dåligt inkonsistent läge - du bör
 ominstallera det innan du försöker ta bort det.
Fel uppstod vid hantering:
 spampd
root@disgraceland:

It still tells me to reinstall it instead.

Marc Hauswirth (marc-practeo) wrote :

Ok, your are fighting with the old buggy package ( spampd 2.30-11 )

dpkg didn't used the new package for the moment ....

At this point you should try
  dpkg --remove --force-all spampd

or to install the new one
  dpkg -i spampd_2.30-11ubuntu0.1~proposed1_all.deb

Kristoffer H (mputoris) wrote :

After I changed /etc/init.d/spampd update-manager works again. It detected new updates this morning and it was able to down load the updates and is now installing them...

...update-manager offerd a new /etc/init.d/spamd which instead of ''#!/bin/bash'' had ''#!/bin/bash -e'' and then everything is working.

Marc Hauswirth (marc-practeo) wrote :

And now, witch version do you have ?

dpkg -l spampd

Kristoffer H (mputoris) wrote :

illern@disgraceland:~$ dpkg -l spampd
Önskat=Okänd(U)/Installera(I)/Radera(R)/Rensa(P)/Håll(H)
| Status=Ej(N)/Installerad(I)/Konf.(C)/Uppackad(U)/Misslyckad(F)/Delvis(H)
|/ Fel?Inget(=)/Håll(H)/Ominstallera(R)/Båda(X) (Status,Fel: versaler=illa)
||/ Namn Version Beskrivning
+++-==============-==============-============================================
ii spampd 2.30-15 spamassassin based SMTP/LMTP proxy daemon
illern@disgraceland:~$

Marc Hauswirth (marc-practeo) wrote :

Ok so you use the feisty (7.04 beta) distribution and not edgy (6.10) ...

How did you managed to come in this situation ?
Fresh feisty install ?

Upgrade from edgy or 6.05 LTS ?

Kristoffer H (mputoris) wrote :

Upgrade from 6 LTS.

Changed in spampd:
status: Fix Committed → Fix Released
Changed in spampd:
status: Fix Released → Fix Committed
Martin Pitt (pitti) wrote :

Copied to edgy-updates.

Changed in spampd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers