Bug#521852: sasl2-bin: upgrade from etch fails due to nonexistent /etc/sasldb2

John Morrissey jwm at horde.net
Mon Mar 30 13:35:46 UTC 2009


Package: sasl2-bin
Version: 2.1.22.dfsg1-23
Severity: normal

Upgrading an etch machine to lenny fails on the sasl2-bin package because
/etc/sasldb2 doesn't exist. From the postinst:

--
    # If the database contains no users, just wipe it out,
    # it will be recreated later in the current format
    if [ -e $SASLDB_FILE ] && \
        [ `sasldblistusers2 | wc -l -eq 0` ]; then
        rm $SASLDB_FILE
    else
        # The database had users, begin upgrade procedure

        # Make backup and handle errors  
        db_get cyrus-sasl2/backup-sasldb2
        if ! cp --archive $SASLDB_FILE "$RET" >/dev/null 2>&1; then   
            db_input high cyrus-sasl2/upgrade-sasldb2-backup-failed || true
            db_go || true
            exit 1
        fi
--

If $SASLDB_FILE (/etc/sasldb2) doesn't exist, the else branch is hit and the
cp(1) fails, aborting the package upgrade. Perhaps something like the
following would be better?

--
    if [ -e $SASLDB_FILE ]; then
        if [ `sasldblistusers2 | wc -l -eq 0` ]; then
            rm $SASLDB_FILE
        else
            # The database had users, begin upgrade procedure
[...]
    fi
--

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: alpha

Kernel: Linux 2.6.18-6-alpha-smp (SMP w/1 CPU core)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages sasl2-bin depends on:
ii  db4.6-util            4.6.21-11          Berkeley v4.6 Database Utilities
ii  debconf [debconf-2.0] 1.5.24             Debian configuration management sy
ii  libc6.1               2.7-18             GNU C Library: Shared libraries
ii  libcomerr2            1.41.3-1           common error description library
ii  libdb4.6              4.6.21-11          Berkeley v4.6 Database Libraries [
ii  libkrb53              1.6.dfsg.4~beta1-5 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.11-1           OpenLDAP libraries
ii  libpam0g              1.0.1-5            Pluggable Authentication Modules l
ii  libsasl2-2            2.1.22.dfsg1-23    Cyrus SASL - authentication abstra
ii  libssl0.9.8           0.9.8g-15          SSL shared libraries
ii  lsb-base              3.2-20             Linux Standard Base 3.2 init scrip

sasl2-bin recommends no packages.

sasl2-bin suggests no packages.

-- debconf information:
  cyrus-sasl2/upgrade-sasldb2-failed:
  cyrus-sasl2/backup-sasldb2: /var/backups/sasldb2.bak
* cyrus-sasl2/upgrade-sasldb2-backup-failed:
  cyrus-sasl2/purge-sasldb2: false





More information about the Pkg-cyrus-sasl2-debian-devel mailing list