upgrade aborts: errors encountered while processing amavisd-new

Bug #226891 reported by Krishna E. Bera
10
Affects Status Importance Assigned to Milestone
Software Updater
Invalid
Undecided
Unassigned
amavisd-new (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Won't Fix
Medium
Unassigned

Bug Description

console transcript follows below.
this was during a text console network-based upgrade from 6.06 to 8.04
after this, i apt-get remove'd amavisd-new
then removed the file /etc/fstab.pre-uuid
then ran dpkg --configure -a
then apt-get update and apt-get dist-upgrade
and it seems to be done

transcript ----------------------------->

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.24-16-server
Errors were encountered while processing:
 amavisd-new

Could not install the upgrades

The upgrade aborts now. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).

Please report this bug against the 'update-manager' package and
include the files in /var/log/dist-upgrade/ in the bugreport.
E:Sub-process /tmp/tmpe_dHbI/backports/usr/bin/dpkg returned an error
code (1)

Setting up amavisd-new (1:2.5.3-1ubuntu3) ...
Creating/updating amavis user account...
Broken amavis system user found. To insure data-safety,
it is up to you the local administrator to remove the broken
amavis user, or repair it so that it is sane
dpkg: error processing amavisd-new (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 amavisd-new
/etc/fstab.pre-uuid already exists
remove this file before running the script again

Could not install the upgrades

The upgrade aborts now. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).

Please report this bug against the 'update-manager' package and
include the files in /var/log/dist-upgrade/ in the bugreport.
installArchives() failed

Setting up amavisd-new (1:2.5.3-1ubuntu3) ...
Creating/updating amavis user account...
Broken amavis system user found. To insure data-safety,
it is up to you the local administrator to remove the broken
amavis user, or repair it so that it is sane
dpkg: error processing amavisd-new (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 amavisd-new
/etc/fstab.pre-uuid already exists
remove this file before running the script again

Revision history for this message
Krishna E. Bera (keb) wrote :
Revision history for this message
Sergiu Bivol (sergiu-bivol) wrote : This is a bug in amavisd-new

Actually, the "amavisd-new" package is broken.
I am trying to install amavis on my mail server and it keeps complaining that the user "amavis" exists already:
-------------
Se despachetează amavisd-new (din .../amavisd-new_1%3a2.5.3-1ubuntu3_all.deb) ...
Se pregătește amavisd-new (1:2.5.3-1ubuntu3) ...
Creating/updating amavis user account...
Broken amavis system user found. To insure data-safety,
it is up to you the local administrator to remove the broken
amavis user, or repair it so that it is sane
---------------

Well, the user "amavis" is created during the installation of "amavisd-new". This is a stupid situation.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I think the package that is broken is the Dapper one. It does some odd (to me anyway) over-riding in the postinst. I think that all you can do is follow the instructions given and remove the old amavis user:

sudo deluser amavis

I'm guessing that once you've done that, the upgrade will proceed.

Revision history for this message
Sergiu Bivol (sergiu-bivol) wrote :

@Scott: Deleting the user has no effect.
Have a look at ./DEBIAN/postinst in the amavis package:
-----------
# Sanity-checks (see #367807)
if [ ! -d "${homedir}" ] ; then
  echo "Broken amavis system user found. To insure data-safety," >&2
  echo "it is up to you the local administrator to remove the broken" >&2
  echo "amavis user, or repair it so that it is sane" >&2
  exit 1
fi
-------------
We identify the error message that me and Krishna encountered. The problem is that user "amavis" does not have its home directory.

Creating the directory /var/lib/amavis and setting the right permissions does the trick – I have already tested it on my server.
But this is not the Ubuntu way, right? So please somebody fix this strange behavior of amavis.

Revision history for this message
Scott Kitterman (kitterman) wrote :

What permissions did you set? I'll see what I can do to fix it.

Sorry about that. When I tested it locally, that seemed to solve it.

The Dapper amavisd-new package has some real oddities due to it trying to inherit users from amavis, amavis-ng, and amavisd-new transparently.

Revision history for this message
Sergiu Bivol (sergiu-bivol) wrote :

Directory: /var/lib/amavis
User: amavis
Group: amavis
Permissions: 755

In my case, amavis didn't want to install (I did not try to upgrade, but it should be similar).

Creating the directory was not everything I did:
Because I have already tried to install amavis once, the install command should (probably) look like "$ sudo apt-get install -f " (but I am not sure about that since I did it through aptitude).

The error message displayed by amavis is not adequate: if it fails to find /var/lib/amavis, it should say so in a message like "Please check that ${homedir} exists and has the right permissions".

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

This is a problem with the amavisd-new package, I reassign and close the update-manager task.

Changed in update-manager:
status: New → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote :

Only an issue for Dapper -> Hardy updates. Marking Fix Released for Intrepid. Should be nominated for Hardy when Bug 249434 is fixed.

Changed in amavisd-new:
importance: Undecided → Medium
status: New → Fix Released
Changed in amavisd-new:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in amavisd-new (Ubuntu Hardy):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.