[Pkg-openldap-devel] Bug#594714: slapd upgrade may fail on unset SLAPD_CONF
Steve Langasek
vorlon at debian.org
Mon Sep 6 19:38:59 UTC 2010
On Sat, Aug 28, 2010 at 05:54:43PM +0200, Peter Marschall wrote:
> upgrading slapd to 2.4.23-4 failed.
> Error message
> -------------
> (Reading database ... 244861 files and directories currently installed.)
> Preparing to replace slapd 2.4.23-3pm1 (using slapd_2.4.23-4_amd64.deb) ...
> Stopping OpenLDAP: slapd [ OK ]
> Dumping to /var/backups/slapd-2.4.23-3pm1:
> grep: /cn=config/olcDatabase*: No such file or directory
> Unpacking replacement slapd ...
> Setting up slapd (2.4.23-4) ...
> Installing new version of config file /etc/init.d/slapd ...
> Moving old database directory to /var/backups:
> - directory unknown... done.
> Creating initial configuration... mkdir: missing operand
> Try `mkdir --help' for more information.
> dpkg: error processing slapd (--install):
> subprocess installed post-installation script returned error exit status 1
> Processing triggers for man-db ...
> Errors were encountered while processing:
> slapd
This seems to be a regression introduced in svn revision 1305:
Index: debian/slapd.scripts-common
===================================================================
--- debian/slapd.scripts-common (revision 1304)
+++ debian/slapd.scripts-common (revision 1305)
@@ -755,14 +755,12 @@
fi
# Load the default location of the slapd config file
-if [ -z "$SLAPD_CONF" ]; then
+if [ "${MODE}" = "configure" ] || [ -z "$SLAPD_CONF" ]; then
if previous_version_older 2.4.23-3 && \
[ -f "/etc/ldap/slapd.conf" ] && \
[ ! -e "/etc/ldap/slapd.d" ]; then
SLAPD_CONF="/etc/ldap/slapd.conf"
- else
- SLAPD_CONF="/etc/ldap/slapd.d"
fi
fi
The commit comment is:
* Fix the upgrade procedure with the new slapd.defaults file.
Matthijs, I can't understand your intention here. I'm sure that the last
bit of the diff is wrong - we should *always* have a default fallback value
for SLAPD_CONF, not just in the file-based case - but I don't understand the
purpose of the first part of the diff. In what case is it necessary to
override an already-set SLAPD_CONF variable on configure, and why does this
not also apply to other conditions besides "postinst configure"?
Without understanding that, I'm not sure what the right way is to clean this
up.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20100906/de1485b2/attachment-0001.pgp>
More information about the Pkg-openldap-devel
mailing list