[Pkg-openldap-devel] Bug#596100: When told not to initially configure slapd, (un-)installation fails due to init script return code.
Matthew King
matthew.king at monnsta.net
Wed Sep 8 16:46:49 UTC 2010
Package: slapd
Version: 2.4.23-4
Severity: normal
Tags: patch
If slapd is told not to create an initial configuration, the init script
fails and kills apt-get in its death throes.
aginor:~# debconf-set-selections
slapd slapd/internal/adminpw password insecure
slapd slapd/internal/generated_adminpw password insecure
slapd slapd/password2 password insecure
slapd slapd/password1 password insecure
slapd slapd/no_configuration boolean true
aginor:~# apt-get install slapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
libsasl2-modules
The following NEW packages will be installed
slapd
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/1,584kB of archives.
After this operation, 4,006kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package slapd.
(Reading database ... 23942 files and directories currently installed.)
Unpacking slapd (from .../slapd_2.4.23-4_amd64.deb) ...
Processing triggers for man-db ...
Setting up slapd (2.4.23-4) ...
Omitting slapd configuration as requested.
No configuration file was found for slapd at /etc/ldap/slapd.d. ... (warning).
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error processing slapd (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
aginor:~#
Attempting to immediately remove the package also fails hard.
aginor:~# dpkg --purge slapd
(Reading database ... 24183 files and directories currently installed.)
Removing slapd ...
No configuration file was found for slapd at /etc/ldap/slapd.d. ... (warning).
invoke-rc.d: initscript slapd, action "stop" failed.
dpkg: error processing slapd (--purge):
subprocess installed pre-removal script returned error exit status 1
Backing up /etc/ldap/slapd.d in /var/backups/slapd-... done.
grep: /etc/ldap/slapd.d/cn=config/olcDatabase*: No such file or directory
No configuration file was found for slapd at /etc/ldap/slapd.d. ... (warning).
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
slapd
aginor:~#
The included patch solves this by:
1) Creating /etc/ldap/noslapd as part of the postinst which the administrator
can remove when slapd is configured.
2) Shuffling the init script to deal with the sentinel file more
gracefully. This is done by having functions defined in multiple places,
which I am not keen on but it Does The Job.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slapd-init.patch
Type: text/x-diff
Size: 2673 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20100908/4d6ceab0/attachment.patch>
-------------- next part --------------
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages slapd depends on:
ii adduser 3.112 add and remove users and groups
ii coreutils 8.5-1 GNU core utilities
ii debconf [debconf-2.0] 1.5.35 Debian configuration management sy
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libdb4.8 4.8.30-2 Berkeley v4.8 Database Libraries [
ii libgnutls26 2.8.6-1 the GNU TLS library - runtime libr
ii libldap-2.4-2 2.4.23-4 OpenLDAP libraries
ii libltdl7 2.2.6b-2 A system independent dlopen wrappe
ii libperl5.10 5.10.1-14 shared Perl library
ii libsasl2-2 2.1.23.dfsg1-5 Cyrus SASL - authentication abstra
ii libslp1 1.2.1-7.8 OpenSLP libraries
ii libwrap0 7.6.q-19 Wietse Venema's TCP wrappers libra
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
ii perl [libmime-base64-perl 5.10.1-14 Larry Wall's Practical Extraction
ii psmisc 22.11-1 utilities that use the proc file s
ii unixodbc 2.2.14p2-1 ODBC tools libraries
Versions of packages slapd recommends:
pn libsasl2-modules <none> (no description available)
Versions of packages slapd suggests:
ii ldap-utils 2.4.23-4 OpenLDAP utilities
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages slapd depends on:
ii adduser 3.112 add and remove users and groups
ii coreutils 8.5-1 GNU core utilities
ii debconf [debconf-2.0] 1.5.35 Debian configuration management sy
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libdb4.8 4.8.30-2 Berkeley v4.8 Database Libraries [
ii libgnutls26 2.8.6-1 the GNU TLS library - runtime libr
ii libldap-2.4-2 2.4.23-4monnsta1 OpenLDAP libraries
ii libltdl7 2.2.6b-2 A system independent dlopen wrappe
ii libperl5.10 5.10.1-14 shared Perl library
ii libsasl2-2 2.1.23.dfsg1-6 Cyrus SASL - authentication abstra
ii libslp1 1.2.1-7.8 OpenSLP libraries
ii libwrap0 7.6.q-19 Wietse Venema's TCP wrappers libra
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
ii perl [libmime-base64-pe 5.10.1-14 Larry Wall's Practical Extraction
ii psmisc 22.11-1 utilities that use the proc file s
ii unixodbc 2.2.14p2-1 ODBC tools libraries
Versions of packages slapd recommends:
pn libsasl2-modules <none> (no description available)
Versions of packages slapd suggests:
ii ldap-utils 2.4.23-4monnsta1 OpenLDAP utilities
--
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
-- Fran Lebowitz
More information about the Pkg-openldap-devel
mailing list