#1025815 maintainerscripts choke on debconf-set-selection set input

Package:
slapd
Source:
slapd
Description:
OpenLDAP server (slapd)
Submitter:
Marc Haber
Date:
2026-01-10 11:14:57 UTC
Severity:
normal
#1025815#5
Date:
2022-12-09 19:15:29 UTC
From:
To:
Hi,

the autopkgtests for sudo use debconf-set-selections to preconfigure
slapd to test sudo-ldap. The input file was taken from
debconf-get-selections output and contained extra whitspace before "when
needed":

slapd   slapd/dump_database     select when needed
(fixed version)

Since a few months, openldap's maintainer scripts choke on that in the
case construct that has "when needed" in one of the cases. Those scripts
fall through to the *) clause, erroring out.

Using a construct like

RET="$(echo $RET | sed 's/^[[:space:]]\+//')"

before the case fixes the issues for me, but I am not sure whether this
is an acceptable fix for the package.

Nevetheless, openldap should be able to reconfigure itself after the
Debconf database is preseeded with a string that came out of
debconf-get-selections.

If this is a debconf issue, please reassign appropriately.

In sudo, I fixed this by removing extra whitespace from the file

Greetings
Marc

#1025815#10
Date:
2022-12-23 18:44:03 UTC
From:
To:
Hi Marc, thanks for the report, and sorry for the slow response.

The original file appears to have its columns separated by multiple
space characters [1].

On my systems, the output from debconf-get-selections has columns
separated by one tab character [2]. The debconf-set-selections man page
also specifies that the columns should be "separated by one character of
whitespace".

I'm wondering if your file had its tabs converted to spaces at some
point.

You're right that the older slapd package does accept that input. I
haven't figured out exactly what changed.

[1] curl https://salsa.debian.org/sudo-team/sudo/-/raw/e9b19ee70d8b0ac9604b2cb645d32acd5a1fa5e2/debian/tests/03/ldif/debconf | hexdump -C
[2] debconf-get-selections | grep slapd | hexdump -C

thanks,
Ryan

#1025815#15
Date:
2026-01-10 10:08:33 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.