upgrade from hardy to lucid fails

Bug #537472 reported by Brian J. Murrell
72
This bug affects 11 people
Affects Status Importance Assigned to Milestone
postgrey (Debian)
Fix Released
Unknown
postgrey (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Fix Released
Medium
Unassigned
Maverick
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: postgrey

While trying to upgrade my hardy installation to lucid today I got the following failure to upgrade postgrey:

Preparing to replace postgrey 1.31-2 (using .../postgrey_1.32-4_all.deb) ...
invoke-rc.d: ----------------------------------------------------
invoke-rc.d: WARNING: invoke-rc.d called during shutdown sequence
invoke-rc.d: enabling safe mode: initscript policy layer disabled
invoke-rc.d: ----------------------------------------------------
Stopping postfix greylisting daemon: postgrey.
db4.7_upgrade: Program version 4.7 doesn't match environment version 4.6
db4.7_upgrade: DB_ENV->open: DB_VERSION_MISMATCH: Database environment version mismatch
dpkg: error processing /var/cache/apt/archives/postgrey_1.32-4_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
invoke-rc.d: ----------------------------------------------------
invoke-rc.d: WARNING: invoke-rc.d called during shutdown sequence
invoke-rc.d: enabling safe mode: initscript policy layer disabled
invoke-rc.d: ----------------------------------------------------
Starting postfix greylisting daemon: postgrey.

SRU Test Case:
1. Install postgrey on hardy
2. Upgrade libberkeleydb-perl to lucid
3. Run postgrey, then stop it again
4. Upgrade postgrey to lucid. Successful upgrade is the aim of this SRU.

Revision history for this message
CvB (cvb-kruemel) wrote :

Hi - Has anyone found a workaround, yet?

Thanks.

Revision history for this message
Marc Coxall (marcc) wrote :

apt-get -remove --purge postgrey
apt-get -install postgrey

does get it working but you will lose your DB and whit list files if you don't make a copy of them

Revision history for this message
Garrison Hoffman (garrison-codefix) wrote :

You don't actually need to wipe your white list with --purge

description: updated
Revision history for this message
TJ (tj) wrote :

This is a bug in the preinst script of the Lucid package. It specifically calls /usr/bin/db4.7_upgrade but the DB environment is 4.8.

You can work-around the problem for the upgrade by temporarily redirecting /usr/bin/db4.7_upgrade to db4.8_upgrade:

sudo -i
cd /usr/bin
mv db4.7_upgrade db4.7_upgrade.real
ln -s db4.8_upgrade db4.7_upgrade

apt-get install postgrey

mv db4.7_upgrade.real db4.7_upgrade

exit

Revision history for this message
Johan Euphrosine (proppy) wrote :

Here is a patch against postgrey_1.32-5 that I believe correct this issue.

tags: added: patch
Changed in postgrey (Debian):
status: Unknown → New
Changed in postgrey (Debian):
status: New → Fix Committed
Revision history for this message
Stefano Rivera (stefanor) wrote :

The postinst shouldn't need to call db4.Xupgrade, libberkeleydb-perl takes care of that.

Changed in postgrey (Ubuntu):
importance: Undecided → Low
status: New → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgrey - 1.32-5ubuntu1

---------------
postgrey (1.32-5ubuntu1) natty; urgency=low

  [ Stefano Rivera ]
  * Upload 1.32-6 from VCS (LP: #537472)

  [ Antonio Radici ]
  * Drop preinst and thus dependency on dbutil-4.7. (Closes: #594451)
    + patch provided by Stefano Rivera (<email address hidden>), thanks!
 -- Stefano Rivera <email address hidden> Sun, 19 Dec 2010 01:06:33 +0000

Changed in postgrey (Ubuntu):
status: In Progress → Fix Released
Changed in postgrey (Ubuntu Lucid):
status: New → Fix Committed
Changed in postgrey (Ubuntu Maverick):
status: New → Fix Committed
importance: Undecided → Medium
Changed in postgrey (Ubuntu Lucid):
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

I fail to see how the current upload to proposed is a solution for this. If you upgrade from hardy and thus postgrey is using a 4.6 database, something needs to call db_upgrade to update it to the 4.7 format. Arguably this should happen in the postinst, not in the preinst, but completely dropping the migration seems wrong to me. Stefano, can you please elaborate about this?

Thank you!

Revision history for this message
Stefano Rivera (stefanor) wrote :

> something needs to call db_upgrade to update it to the 4.7 format.

It appears that libberkeleydb-perl handles this itself, which was why people run into issues where it tries to upgrade to 4.7 in preinst, but the DB is already 4.8.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted postgrey into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted postgrey into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in postgrey (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Any testers of the lucid/maverick-proposed packages? As these have been in -proposed for nearly three months, I'll remove them soon if there is no feedback. Thank you!

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 537472] Re: upgrade from hardy to lucid fails

On Tue, 2011-01-25 at 09:13 +0000, Martin Pitt wrote:
> Any testers of the lucid/maverick-proposed packages? As these have been
> in -proposed for nearly three months,

I suspect those patches {we,a}re too late to the party. I mean really,
we are talking about issues upgrading from n-2 to n-1. The number of
people that will still be left doing that upgrade is probably pretty
minimal.

> I'll remove them soon if there is
> no feedback. Thank you!

Is there really any harm in leaving them in proposed just in case
somebody comes to the party even later than those patches? Really,
unless a package gets either positive or negative feedback, why not just
leave it in proposed indefinitely? What's the hurry to remove them?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I've installed postgrey from lucid-proposed. It works fine so far.

Revision history for this message
Martin Pitt (pitti) wrote :

Brian J. Murrell [2011-01-25 13:40 -0000]:
> Is there really any harm in leaving them in proposed just in case
> somebody comes to the party even later than those patches?

Only very few people have -proposed enabled, so there they aren't a
real benefit. So we must ensure that the package at least works, to
ensure that we don't have breakage due to underlying toolchain change,
different moon phase, etc. We already had the most stupid regressions
that way; then we can move them to -updates.

> Really, unless a package gets either positive or negative feedback,
> why not just leave it in proposed indefinitely? What's the hurry to
> remove them?

For preparing 10.04.2 CDs we need to "flush" proposed for the packages
which are shipped on any CD/DVD; postgrey doesn't seem to be on the
server CDs, but it's likely that they are on a DVD. But in either case
it's primarily a matter of not using proposed as a dumping ground for
forgotten packages.

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

tags: added: verification-done
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Marius! Leaving v-needed for the maverick proposed update.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgrey - 1.32-4ubuntu0.1

---------------
postgrey (1.32-4ubuntu0.1) lucid-proposed; urgency=low

  * Drop preinst and thus dependency on dbutil-4.7. (LP: #537472)
 -- Stefano Rivera <email address hidden> Sun, 19 Dec 2010 07:07:06 +0000

Changed in postgrey (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Tue, 2011-01-25 at 14:25 +0000, Martin Pitt wrote:
>
> Only very few people have -proposed enabled,

While everything is working, yes, I agree.

> so there they aren't a
> real benefit.

There is when somebody has discovered that something is broken and
either goes looking for a bug and discovers that there is a package in
-proposed that will potentially fix their problem. Or some people might
just go directly to -proposed to see what's "on deck" that might resolve
their issue.

If you remove the package from -proposed you remove a potential fix in
the form of an easy-to-install package.

b.

Martin Pitt (pitti)
tags: removed: verification-done
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Quick note: I installed the lucid-proposed postgrey *after* encountering and working around the original bug, so I've verified that the new package works (no compiler/linker/library issues etc.) but I haven't verified that the new postinst script handles the upgrades correctly.

I've another Hardy server that uses postgrey, but I didn't plan upgrading it any time soon. Hardy is supported until what, 2013? I appreciate having the fixed package in lucid-updates so I won't need to solve this problem again in 2013.

When I stumbled upon this problem, I went to launchpad to look for postgrey bugs and *didn't find any* -- because this one was marked as "Fix committed"? It never occurred to me to look for newer packages in -proposed.

Revision history for this message
Stefano Rivera (stefanor) wrote :

I obviously tested the upgrade path when I prepared the patch, I'm pretty sure it works. Although the SRU testing does obviously benefit from * independent* verification :P

Revision history for this message
Martin Pitt (pitti) wrote :

Stefano, are you using the debs from maverick-proposed or a local build?

Revision history for this message
Stefano Rivera (stefanor) wrote :

Martin: I was testing with local build result, but I've fired up a VM and verified that the maverick-proposed debs upgrade from maverick and run as expected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgrey - 1.32-5ubuntu0.1

---------------
postgrey (1.32-5ubuntu0.1) maverick-proposed; urgency=low

  * Drop preinst and thus dependency on dbutil-4.7. (LP: #537472)
 -- Stefano Rivera <email address hidden> Sun, 19 Dec 2010 07:01:15 +0000

Changed in postgrey (Ubuntu Maverick):
status: Fix Committed → Fix Released
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.