Bug#415248: Purging cyrus-common after upgrading to cyrus-common-2.2 wipes "/var/spool/cyrus" and "/var/lib/cyrus"

Christoph Berg myon at debian.org
Sat Jan 23 12:23:53 UTC 2010


severity 415248 important
thanks

Re: Jan Wagner 2007-03-17 <200703171427.02076.waja at cyconet.org>
> Package: cyrus-common-2.2
> Package: cyrus-common
> Version: 
> Severity: grave

Hi,

Due to the missing version number, the BTS seems to have ignored the
severity. That's probably why your bug didn't hit the release radar.

> After upgrading to etch and my cyrus installation to cyrus-*-2.2, I did have a 
> removed but not purged "cyrus-common" in my installation.
> Maybe it was a silly idea anyways, but I did purge "cyrus-common" via dpkg, 
> since it was removed anyways, I thought, purging can't be wrong.
> This leads into a unuseable cyrus-*-2.2, since it 
> wiped "/var/spool/cyrus", "/var/lib/cyrus" and maybe some other stuff.

Oops.

cyrus-common is long gone, so we can't fix bugs there, but we should
make sure, we don't wipe people's mail when upgrading from 2.2 to 2.3.

cyrus-common-2.2's postrm reads in the purge section:

                        for i in /var/lib/cyrus /var/spool/sieve \
                                 /var/spool/cyrus \
                                 /var/run/cyrus /var/run/cyrus/socket ; do
                                dpkg-statoverride --remove $i || true
                        done
                        rm -rf /var/run/cyrus || true
                        rm  /usr/lib/cyrus/cyrus-db-types.active || true
                        rm usr/lib/cyrus/cyrus-hardwired-config.active || true

                        # Should we remove our precious data?
                        if [ "$DEBCONFEXISTS" = "true" ]; then
                                db_title "Cyrus IMAPd 2.2" || true
                                db_fset cyrus-common-2.2/removespools seen false || true
                                db_input high cyrus-common-2.2/removespools || true
                                db_go || true

                                db_get cyrus-common-2.2/removespools
                        else
                                RET="false"
                        fi
                        [ "${RET}" = "true" ] && {
                                for i in /var/spool/cyrus /var/lib/cyrus \
                                         /var/spool/sieve /etc/sieve ; do
                                        find "$i" -type f -exec rm -f '{}' \; || true
                                        find "$i" -type d -depth -not -name 'lost+found' -exec rmdir '{}' \; || true
                                done
                                # Remove database type information
                                rm -f /usr/lib/cyrus/cyrus-*.active
                        }

It actually asks about purging files (and defaults to false), so we
are not affected, but it does wipe the statoverride settings. We
probably need some clever things in squeeze for cyrus-common-2.2's
maintainer scripts to be able to migrate the settings to
cyrus-common-2.3.

Christoph
-- 
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cyrus-imapd-debian-devel/attachments/20100123/1957f328/attachment.pgp>


More information about the Pkg-Cyrus-imapd-Debian-devel mailing list