Package: slapd Version: 2.4.11-1 Severity: important
I have multiple BDB backend directories configured in my slapd.conf; the upgrade from etch fails when attempting to load the second directory from the backup made by the postinst script, with the message > Directory /var/lib/ldap-na for dc=na,dc=gtagalenco,dc=com,dc=au not empty, > aborting. This appears to be because when the first directory is reloaded slapadd is run, and it seems that a DB_CONFIG file is created in each of the configured BDB directories at that time. You can see this in this output of a modified copy of postinst, which shows the content of the second directory before and after the first directory is reloaded: > # dpkg --pending --configure > Setting up slapd (2.4.11-1) ... > Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.3.30-5+etch2... > done. > Upgrading BDB 'checkpoint' options... . > Moving old database directories to /var/backups: > - directory dc=localnet... done. > - directory dc=na,dc=gtagalenco,dc=com,dc=au... done. > - directory dc=vilisbakery,dc=com,dc=au... done. > Loading from /var/backups/slapd-2.3.30-5+etch2: > - directory dc=localnet... About to run slapadd for /var/lib/ldap; content > of /var/lib/ldap-na: > total 8 > drwxr-xr-x 72 root root 4096 2008-11-04 07:45 .. > drwx------ 2 openldap openldap 4096 2008-11-04 08:33 . > Just ran slapadd for /var/lib/ldap; content of /var/lib/ldap-na: > total 12 > drwxr-xr-x 72 root root 4096 2008-11-04 07:45 .. > -rw-r--r-- 1 root root 96 2008-11-04 08:33 DB_CONFIG > drwx------ 2 openldap openldap 4096 2008-11-04 08:33 . > done. > - chowning database directory (openldap:openldap)... done > Directory /var/lib/ldap-na for dc=na,dc=gtagalenco,dc=com,dc=au not empty, > aborting. > dpkg: error processing slapd (--configure): > subprocess post-installation script returned error exit status 1 > Errors were encountered while processing: > slapd > The check that the database directory is empty is in the load_database shell function, which is called once for each database directory before the directory is loaded from the backup. I suggest that you move this check to the shell function move_old_database_away, which is responsible for actually emptying the directory. -- System Information: Debian Release: lenny/sid APT prefers testing-proposed-updates APT policy: (500, 'testing-proposed-updates'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.27.1-0huiac (SMP w/2 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages slapd depends on: ii adduser 3.110 add and remove users and groups ii coreutils 6.10-6 The GNU core utilities ii debconf [debconf-2.0] 1.5.22 Debian configuration management sy ii libc6 2.7-15 GNU C Library: Shared libraries ii libdb4.2 4.2.52+dfsg-5 Berkeley v4.2 Database Libraries [ ii libgnutls26 2.4.2-1 the GNU TLS library - runtime libr ii libldap-2.4-2 2.4.11-1 OpenLDAP libraries ii libltdl3 1.5.26-4 A system independent dlopen wrappe ii libperl5.10 5.10.0-16 Shared Perl library ii libsasl2-2 2.1.22.dfsg1-23 Cyrus SASL - authentication abstra ii libslp1 1.2.1-7.4 OpenSLP libraries ii libwrap0 7.6.q-16 Wietse Venema's TCP wrappers libra ii perl [libmime-base64-per 5.10.0-16 Larry Wall's Practical Extraction ii psmisc 22.6-1 Utilities that use the proc filesy ii unixodbc 2.2.11-16 ODBC tools libraries Versions of packages slapd recommends: ii libsasl2-modules 2.1.22.dfsg1-23 Cyrus SASL - pluggable authenticat Versions of packages slapd suggests: ii ldap-utils 2.4.11-1 OpenLDAP utilities -- debconf information: * slapd/password2: (password omitted) slapd/internal/adminpw: (password omitted) * slapd/password1: (password omitted) slapd/tlsciphersuite: slapd/fix_directory: true shared/organization: localnet slapd/upgrade_slapcat_failure: slapd/backend: BDB slapd/allow_ldap_v2: false slapd/no_configuration: false slapd/move_old_database: true slapd/suffix_change: false slapd/slave_databases_require_updateref: slapd/dump_database_destdir: /var/backups/slapd-VERSION slapd/autoconf_modules: true slapd/domain: localnet slapd/password_mismatch: slapd/invalid_config: true slapd/slurpd_obsolete: slapd/upgrade_slapadd_failure: slapd/dump_database: when needed slapd/migrate_ldbm_to_bdb: false slapd/purge_database: false -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]