Hi Torsten,

As promised I redid my upgrade from slapd from testing to unstable.
First I did a backup and purged everything. (I first tried downgrading
but the got errors about invalid config files, something with uc files?,
Is the downgrade path tested, or should i give that another try as
well?)

cp /etc/ldap/slapd.conf /etc/ldap/ldap.conf /root
slapcat -l /root/backup.ldif
dpkg --purge --force-all libldap2 libldap-2.2-7 slapd ldap-utils libiodbc2 
libslp1 lbiodbc2

Then a reinstall and an upgrade to unstable... 

apt-get install libldap2 slapd ldap-utils libiodbc2 libslp1 lbiodbc2
cp /root/ldap.conf /root/slapd.conf /etc/ldap/
slapadd -l /root/backup.ldif

apt-get -t unstable install slapd ldap-utils

That upgrade gave no errors, so i guess the copied /etc/ldap/slapd.conf
file had no more dos style line endings. Grrr. So I restarted the whole 
process but did a unix2dos on the /etc/ldap/slapd.conf file. I then the 
whole installation succeeded but I got a lot of errors. (see attached
log).  After the upgrade slapcat said there were no entries in the ldap 
database but slapadd couldn't add my backup. A quick:

rm /var/lib/ldap/* 
cp /root/slapd.conf /etc/ldap
slappadd -l /root/backup.ldif

fixed everything. So I cannot reproduce my original problem, but it
seems the maintainer scripts don't like dos line delimiters very much.
Maybe you could make you're scripts handle that more gracefull, but I
think you can downgrade the bug to normal at least.

If you need more info or want me to try the upgrade/downgrade paths
again feel free to email me.

Greetings Arjan Oosting
 
unix2dos /etc/ldap/slapd.conf

[EMAIL PROTECTED]:~# apt-get -t unstable -s install slapd ldap-utils

Dump databases to file on upgrade: when-needed
Directory to dump databases: /var/backups/slapd-VERSION

Preconfiguring packages ...
: No such file or directoryine 202: /etc/ldap/schema/core.schema
: No such file or directoryine 202: /etc/ldap/schema/cosine.schema
: No such file or directoryine 202: /etc/ldap/schema/nis.schema
: No such file or directoryine 202: /etc/ldap/schema/inetorgperson.schema
: No such file or directoryine 202: /etc/ldap/schema/samba.schema
Selecting previously deselected package libldap-2.2-7.
(Reading database ... 129152 files and directories currently installed.)
Unpacking libldap-2.2-7 (from .../libldap-2.2-7_2.2.23-1_i386.deb) ...
Preparing to replace ldap-utils 2.1.30-3 (using .../ldap-utils_2.2.23-1_i386.deb) ...
Unpacking replacement ldap-utils ...
Replacing files in old package slapd ...
Preparing to replace slapd 2.1.30-3 (using .../slapd_2.2.23-1_i386.deb) ...
Stopping OpenLDAP: slapd.
Stopping OpenLDAP: slapd.
: No such file or directory: line 202: /etc/ldap/schema/core.schema
: No such file or directory: line 202: /etc/ldap/schema/cosine.schema
: No such file or directory: line 202: /etc/ldap/schema/nis.schema
: No such file or directory: line 202: /etc/ldap/schema/inetorgperson.schema
: No such file or directory: line 202: /etc/ldap/schema/samba.schema
: No such file or directoryt: line 204: /etc/ldap/schema/core.schema
  Dumping to /var/backups/slapd-2.1.30-3:
: No such file or directoryt: line 204: /etc/ldap/schema/core.schema
: No such file or directoryt: line 204: /etc/ldap/schema/cosine.schema
: No such file or directoryt: line 204: /etc/ldap/schema/nis.schema
: No such file or directoryt: line 204: /etc/ldap/schema/inetorgperson.schema
: No such file or directoryt: line 204: /etc/ldap/schema/samba.schema
Unpacking replacement slapd ...
Replacing files in old package libldap2 ...
Setting up libldap-2.2-7 (2.2.23-1) ...

Setting up ldap-utils (2.2.23-1) ...
Setting up slapd (2.2.23-1) ...
Installing new version of config file /etc/ldap/schema/README ...
Installing new version of config file /etc/ldap/schema/corba.schema ...
Installing new version of config file /etc/ldap/schema/core.schema ...
Installing new version of config file /etc/ldap/schema/cosine.schema ...
Installing new version of config file /etc/ldap/schema/inetorgperson.schema ...
Installing new version of config file /etc/ldap/schema/java.schema ...
Installing new version of config file /etc/ldap/schema/misc.schema ...
Installing new version of config file /etc/ldap/schema/nis.schema ...
Installing new version of config file /etc/ldap/schema/openldap.schema ...
Installing new version of config file /etc/init.d/slapd ...
: No such file or directorynfig: line 202: /etc/ldap/schema/core.schema
: No such file or directorynfig: line 202: /etc/ldap/schema/cosine.schema
: No such file or directorynfig: line 202: /etc/ldap/schema/nis.schema
: No such file or directorynfig: line 202: /etc/ldap/schema/inetorgperson.schema
: No such file or directorynfig: line 202: /etc/ldap/schema/samba.schema
  Updating config access directives... done.
  Moving old database directories to /var/backups:
: No such file or directorystinst: line 205: /etc/ldap/schema/core.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/cosine.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/nis.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/inetorgperson.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/samba.schema
  Loading from /var/backups/slapd-2.1.30-3:
: No such file or directorystinst: line 205: /etc/ldap/schema/core.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/cosine.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/nis.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/inetorgperson.schema
: No such file or directorystinst: line 205: /etc/ldap/schema/samba.schema
Starting OpenLDAP: slapd - failed.
The operation failed but no output was produced. For hints on what went
wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
try running the daemon in Debug mode like via "slapd -d 16383" (warning:
this will create copious output).
invoke-rc.d: initscript slapd, action "start" failed.

cp /root/slapd.conf  /etc/ldap/slapd.conf 
[EMAIL PROTECTED]:~# file /etc/ldap/slapd.conf
/etc/ldap/slapd.conf: ASCII English text
[EMAIL PROTECTED]:~# sudo dpkg --configure --pending
[EMAIL PROTECTED]:~# slapcat
# no data for entry id=00000001
[EMAIL PROTECTED]:~# slapadd -l /root/backup.ldif
slapadd: could not add entry dn="dc=arriesoft,dc=nl" (line=14): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)


Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend

Reply via email to