Bug#393596: cyrus-common-2.2: Parts of old installation still active

Ross Boylan ross at biostat.ucsf.edu
Mon Oct 16 23:23:39 UTC 2006


Package: cyrus-common-2.2
Version: 2.2.13-7
Severity: minor

Severity note: I don't think this problem is doing any harm, except
perhaps some wasted effort.  If my analysis is wrong/incomplete, a
higher severity might be appropriate.

Scope: Fixing this may involve changes to other versions (e.g., 2.1).

PROBLEM

I had Cyrus 2.1 installed, and upgraded to 2.2.  However, some of the
scripts from 2.1 appear to remain active.  In particular, both the 2.1
and 2.2 init scripts do
DAEMON=/usr/sbin/cyrmaster
test -x ${DAEMON} || exit 0

Since /usr/sbin/cyrmaster is in both the 2.1 and 2.2 packages (as well
as kolab-cyrus-common) this test does not suffice to disable the
script when the corresponding package is removed.

HMH suggested one possible solution would be to install some flag file
and test on it.  That file would need to be a regular file, not a conf
file, so that it would be removed when the package is removed.

Because the init scripts are conf files, policy requires they be left
when the package is removed (AFAIK).

There is also a daily cron job associated with the package.  It may
need a similar flag file check.


SIGNIFICANCE

The central operation of the init script is usually to
start-stop-daemon; since the pid file will exist after the first init
script runs, the 2nd run may (I'm not sure) be a no-op.  However,
there is other code in the init files (especially about checking for
upgrades) that looks as if it will still run.

I suspect that the duplicate cron scripts will simply do 2 backups in
a row.

Even if there is no problem now, it seems possible that future 2.2 or
2.3 scripts might change enough so that there would be a problem.

I think the cyrus2.2 scripts will run before the cyrus21 scripts in
init because of alphabetical sorting.  So at the moment, 2.2 runs
first, which is probably good.

AUDIENCES

There are at least 2 groups that might be affected by this issue:
those who have already upgraded, and those who do so in the future.
Each group may require a separate solution.  To the extent automatic
solutions are not possible, new upgraders could be clued in by the
appropriate upgrading README (and maybe messages at upgrade time,
though I suspect that would be debconf abuse).  Those who have already
upgraded may be best addressed through a NEWS items (I believe those
doing a new install will not see such items, so they won't help or
confuse the first group).

Solutions which involve altering previous packages will not help those
who have already removed those packages (i.e., people who already
upgraded).

WORK-AROUND
dpkg --purge cyrus21-common
seems to have worked for me.  I suspect it is not OK to do this
automatically on installation of 2.2; a suggestion to do this manually
could go in the upgrade notes.

The purge did not remove /etc/cyrus.conf or imapd.conf, which are now
owned by cyrus-common-2.2 (I was worried that they'd be swept away
too).  However, the purge has a very big risk: it asks if you want to
delete the spools.  The default is no, but if someone puts the wrong
answer (yes) here in confusion the result would be disastrous.  That's
one reason alternate solutions/recommendations might be better.

OTHER VERSIONS

I've been focussed on 2.1 -> 2.2; older or later versions may raise
other issues.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable'), (40, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-k7-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages cyrus-common-2.2 depends on:
ii  adduser         3.97                     Add and remove users and groups
ii  debconf [debcon 1.5.5                    Debian configuration management sy
ii  dpkg            1.13.22                  package maintenance system for Deb
ii  exim4-daemon-he 4.63-3                   exim MTA (v4) daemon with extended
ii  gawk            1:3.1.5.dfsg-4           GNU awk, a pattern scanning and pr
ii  libc6           2.3.6.ds1-4              GNU C Library: Shared libraries
ii  libdb4.2        4.2.52+dfsg-1            Berkeley v4.2 Database Libraries [
ii  libsasl2        2.1.19.dfsg1-0.5         Authentication abstraction library
ii  libsnmp9        5.2.3-1                  NET SNMP (Simple Network Managemen
ii  libssl0.9.8     0.9.8c-3                 SSL shared libraries
ii  libwrap0        7.6.dbs-11               Wietse Venema's TCP wrappers libra
ii  libzephyr3      2.1.20010518.SNAPSHOT-15 The original "Instant Message" sys
ii  netbase         4.25                     Basic TCP/IP networking system
ii  perl            5.8.8-6.1                Larry Wall's Practical Extraction 

Versions of packages cyrus-common-2.2 recommends:
ii  cyrus-admin-2.2               2.2.13-7   Cyrus mail system (administration 
ii  cyrus-imapd-2.2               2.2.13-7   Cyrus mail system (IMAP support)

-- debconf information:
  cyrus-common-2.2/warnbackendchange:
  cyrus-common-2.2/removespools: false




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