package mail-stack-delivery 1:1.2.12-1ubuntu7 failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Bug #653362 reported by Col. SC Sood(Retd)
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Fix Released
High
Clint Byrum
Maverick
Fix Released
High
Clint Byrum

Bug Description

During Upgrade.

ProblemType: Package
DistroRelease: Ubuntu 10.10
Package: mail-stack-delivery 1:1.2.12-1ubuntu7
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic-pae 2.6.35.4
Uname: Linux 2.6.35-22-generic-pae i686
Architecture: i386
Date: Sat Oct 2 05:27:26 2010
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release i386 (20100427)
PackageArchitecture: all
SourcePackage: dovecot
Title: package mail-stack-delivery 1:1.2.12-1ubuntu7 failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Related branches

Revision history for this message
Col. SC Sood(Retd) (satishsood1) wrote :
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hello Col., Thank you for taking the time to file this bug report and help us make Ubuntu better.

The error messages in DpkgTerminalLog.txt that show this failure are here:

Selecting previously deselected package mail-stack-delivery.
Unpacking mail-stack-delivery (from .../mail-stack-delivery_1%3a1.2.12-1ubuntu7_all.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/conf.d/01-dovecot-postfix.conf: Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/conf.d/01-dovecot-postfix.conf: Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/auth.d/01-dovecot-postfix.auth: Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/auth.d/01-dovecot-postfix.auth: Permission denied
rmdir: failed to remove `/var/backups/dovecot-postfix/': Directory not empty
dpkg: error processing /var/cache/apt/archives/mail-stack-delivery_1%3a1.2.12-1ubuntu7_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1

This file attempts to rename these files from dovecot-postfix to mail-stack-delivery if they exist.

Is it possible that you have changed the permissions on the directory or files that would cause these errors? Maybe /etc is mounted readonly? The permission denied is odd because these scripts run as root.

I just tested upgrading Lucid -> Maverick with dovecot-postifx installed, and it renamed the file without any errors.

Col, if you could please post the result of

ls -lR /etc/dovecot

That would help us determine whether or not the permissions have been locally modified in a way that breaks the install script, or whether the install scripts need to be changed.

Marking Incomplete pending respond from Col. Sood.

Changed in dovecot (Ubuntu):
status: New → Incomplete
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

And just like that, I see that another user has experienced this exact same sequence of events in DpktTerminalLog.txt.

Marking Confirmed in light of that.

Setting importance to Medium, as it seems to be affecting users who are upgrading from Lucid to Maverick, but does not affect ALL users upgrading.

Still, it would help a lot to get an ls -lR of /etc/dovecot from either of the original reporters.

Changed in dovecot (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
tags: added: lucid2maverick
Revision history for this message
Col. SC Sood(Retd) (satishsood1) wrote : Re: [Bug 653362] Re: package mail-stack-delivery 1:1.2.12-1ubuntu7 failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
Download full text (3.6 KiB)

Dear Mr. Byrum
   I upgraded two different systems. One at my home and the other at my office.
The problem was the same on both. It got stuch at the same point, i.e.
   .....1%3a1.2.12.....
If the problem was the same on both systems, the reason of getting the directory
locked may not be deliberate/accidental.

Subsequently, I un-installed all files related to dovecot and did the
installation again. It needed lot of effort to remove the dovecot package and
its dependencies.

Regards,
Satish

________________________________
From: Clint Byrum <email address hidden>
To: <email address hidden>
Sent: Sat, 2 October, 2010 12:18:25 PM
Subject: [Bug 653362] Re: package mail-stack-delivery 1:1.2.12-1ubuntu7 failed
to install/upgrade: subprocess new pre-installation script returned error exit
status 1

Hello Col., Thank you for taking the time to file this bug report and
help us make Ubuntu better.

The error messages in DpkgTerminalLog.txt that show this failure are
here:

Selecting previously deselected package mail-stack-delivery.
Unpacking mail-stack-delivery (from
.../mail-stack-delivery_1%3a1.2.12-1ubuntu7_all.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/conf.d/01-dovecot-postfix.conf:
Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/conf.d/01-dovecot-postfix.conf:
Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/auth.d/01-dovecot-postfix.auth:
Permission denied
/var/lib/dpkg/tmp.ci/preinst: 74: /etc/dovecot/auth.d/01-dovecot-postfix.auth:
Permission denied
rmdir: failed to remove `/var/backups/dovecot-postfix/': Directory not empty
dpkg: error processing
/var/cache/apt/archives/mail-stack-delivery_1%3a1.2.12-1ubuntu7_all.deb
(--unpack):
subprocess new pre-installation script returned error exit status 1

This file attempts to rename these files from dovecot-postfix to mail-
stack-delivery if they exist.

Is it possible that you have changed the permissions on the directory or
files that would cause these errors? Maybe /etc is mounted readonly? The
permission denied is odd because these scripts run as root.

I just tested upgrading Lucid -> Maverick with dovecot-postifx
installed, and it renamed the file without any errors.

Col, if you could please post the result of

ls -lR /etc/dovecot

That would help us determine whether or not the permissions have been
locally modified in a way that breaks the install script, or whether the
install scripts need to be changed.

Marking Incomplete pending respond from Col. Sood.

** Changed in: dovecot (Ubuntu)
       Status: New => Incomplete

--
package mail-stack-delivery 1:1.2.12-1ubuntu7 failed to install/upgrade:
subprocess new pre-installation script returned error exit status 1
https://bugs.launchpad.net/bugs/653362
You received this bug notification because you are a direct subscriber
of the bug.

Status in “dovecot” package in Ubuntu: Incomplete

Bug description:
During Upgrade.

ProblemType: Package
DistroRelease: Ubuntu 10.10
Package: mail-stack-delivery 1:1.2.12-1ubuntu7
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic-pae 2.6.35.4
Uname: Linux 2.6.35-22-generic-pae i686
Architecture: i386
Date: Sat Oct 2 05:27:26 2010
ErrorMessage:...

Read more...

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This is, apparently, more wide-spread than I had thought.

Raising importance to high.

Changed in dovecot (Ubuntu):
importance: Medium → High
Thierry Carrez (ttx)
Changed in dovecot (Ubuntu Maverick):
assignee: nobody → Clint Byrum (clint-fewbar)
tags: added: server-mrs
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I'm having a hard time reproducing this, or even understanding how the prerm script, which is rather complex for what its supposed to do, would produce the series of errors.

If somebody can please post the output of 'ls -lR /etc/dovecot' from a server that has experienced this problem, that would be very helpful.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ok, I can now reliably reproduce this.

If I install karmic, then install dovecot-postfix, then upgrade to lucid, then maverick, and always choose the default option to keep the conffile that is on the system, this occurs every time.

Changed in dovecot (Ubuntu Maverick):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dovecot - 1:1.2.12-1ubuntu8

---------------
dovecot (1:1.2.12-1ubuntu8) maverick; urgency=low

  * debian/mail-stack-delivery.preinst: Fixing shell syntax and typo in
     file rename code. (LP: #653362)
 -- Clint Byrum <email address hidden> Wed, 06 Oct 2010 00:00:48 -0700

Changed in dovecot (Ubuntu Maverick):
status: In Progress → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Just to offer some final closure on this, I just now tested the same upgrade path, from karmic -> lucid -> maverick and it completed successfully with the new version.

I am working on filing another bug report to try and figure out why the config files are showing up as having changed when they have not.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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