[Pkg-openldap-devel] Bug#665199: Fix for 665199 breaks slapd upgrade from lenny to squeeze

jens at abromeit.info jens at abromeit.info
Tue Feb 26 20:35:35 UTC 2013


Package: slapd
Version: 2.4.23-7.3
Severity: serious

Hello all!

The changes to the installation procedure made between slapd 2.4.23-7.2 
and slapd 2.4.23-7.3
pushed the failure to the late upgraders from Lenny to Squeeze.

The previous version slapd 2.4.23-7.2 worked well in an upgrade 
szenario from last Lenny version 5.0.10
with all patches to Squeeze version 6.0.6 without real trouble.

The failure messages are exactly the same. (see below).

Upgrading the package slapd from Lenny 2.4.11-1+lenny2.1 to 2.4.23-7.3 
fails:

Setting up slapd (2.4.23-7.3) ...
Installing new version of config file 
/etc/ldap/schema/inetorgperson.schema ...
Installing new version of config file /etc/ldap/schema/cosine.ldif ...
Installing new version of config file /etc/ldap/schema/misc.schema ...
Installing new version of config file /etc/ldap/schema/duaconf.schema 
...
Installing new version of config file /etc/ldap/schema/dyngroup.schema 
...
Installing new version of config file /etc/ldap/schema/openldap.ldif 
...
Installing new version of config file 
/etc/ldap/schema/inetorgperson.ldif ...
Installing new version of config file /etc/ldap/schema/openldap.schema 
...
Installing new version of config file /etc/ldap/schema/nis.ldif ...
Installing new version of config file /etc/ldap/schema/README ...
Installing new version of config file /etc/ldap/schema/nis.schema ...
Installing new version of config file /etc/init.d/slapd ...
   Backing up /etc/ldap/slapd.conf in 
/var/backups/slapd-2.4.11-1+lenny2.1... done.
   Moving old database directories to /var/backups:
   - directory o=ccc.com... done.
   Loading from /var/backups/slapd-2.4.11-1+lenny2.1:
   - directory o=ccc.com... failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
     /var/backups/slapd-2.4.11-1+lenny2.1/o=ccc.com.ldif: No such file 
or directory
dpkg: error processing slapd (--configure):
  subprocess installed post-installation script returned error exit 
status 1
Errors were encountered while processing:
  slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Possible cause:
~~~~~~~~~~~~~~~

Instead of giving the same functionality from 7.2 slapd.preinst to 
slapd.prerm the files
where just switched. Whether this was intended or not, the consequences 
for the late
upgraders to squeeze are really bad.

-rwxr-xr-x 1 root root 22617 Dec 16 13:27 
/var/lib/dpkg/info/slapd.prerm         slapd_2.4.23-7.3
-rwxr-xr-x 1 root root   338 Jun 15  2011 
/oldbu/var/lib/dpkg/info/slapd.prerm   slapd_2.4.23-7.2

-rwxr-xr-x 1 root root    99 Dec 16 13:27 
/var/lib/dpkg/info/slapd.preinst	 slapd_2.4.23-7.3
-rwxr-xr-x 1 root root 22378 Jun 15  2011 
/oldbu/var/lib/dpkg/info/slapd.preinst slapd_2.4.23-7.2


hostone:/etc/ldap# diff /var/lib/dpkg/info/slapd.prerm 
/oldbu/var/lib/dpkg/info/slapd.preinst
1c1
< #!/bin/sh
---
> #! /bin/sh
830,838d829
< # Automatically added by dh_installinit
< if [ -x "/etc/init.d/slapd" ]; then
<       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
<               invoke-rc.d slapd stop || exit $?
<       else
<               /etc/init.d/slapd stop || exit $?
<       fi
< fi
< # End automatically added section
843c834
< # vim: set foldmethod=marker:
---
> # vim: set sw=8 foldmethod=marker:


hostone:/etc/ldap# diff /var/lib/dpkg/info/slapd.preinst 
/oldbu/var/lib/dpkg/info/slapd.prerm
1c1
< #! /bin/sh
---
> #!/bin/sh
6a7,15
> # Automatically added by dh_installinit
> if [ -x "/etc/init.d/slapd" ]; then
>       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
>               invoke-rc.d slapd stop || exit $?
>       else
>               /etc/init.d/slapd stop || exit $?
>       fi
> fi
> # End automatically added section
11c20
< # vim: set sw=8 foldmethod=marker:
---
> # vim: set foldmethod=marker:

Suggestion:
~~~~~~~~~~~

Please check, whether it is possible to give the same functionality to 
BOTH scripts:

slapd.prerm
slapd.preinst

It would be nice, if downgraders from Wheezy and late upgraders from 
Lenny could have a working slapd.

Considerations regarding workarounds:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If possible, some hints and or workaround for late upgraders which 
already made
the same experience as myself, would be helpful.

Is there a way of making the old "slapd.preinst" from 2.4.23-7.2 run,
placing in the right place?
Only unpacking slapd_2.4.23-7.3_amd64.deb and suppress md5 complaints
whily manually installing the package from the unpacking directory,
putting the old slapd.preinst from 7.2 in the approbiate directory?

Refill /var/lib/ldap with the content of 
/var/backups/o=ccc.com-2.4.11-1+lenny2.1.ldapdb/
before should be necessary, or?

Or it is suggested to take the last Lenny backup, waiting for a 
hopefully fixed slapd_2.4.23-7.4 ?

Best Regards

Jens



More information about the Pkg-openldap-devel mailing list