[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
Thu Sep 9 11:10:22 UTC 2010


Steve Langasek <vorlon at debian.org> writes:

> On Wed, Sep 08, 2010 at 09:13:29PM +0100, Matthew King wrote:
>> Steve Langasek <vorlon at debian.org> writes:
>
>> >> 1) Creating /etc/ldap/noslapd as part of the postinst which the administrator
>> >>    can remove when slapd is configured.
>
>> > I don't consider this appropriate.  If you ask not to automatically
>> > configure slapd, then the package is not usable until manual action is taken
>> > and we should not mark the package as "installed".
>
>> I don't recall coming across that before. Other packages which give the
>> option not to have debconf do configuration don't break dpkg when they
>> do it, eg. postfix. I'm not sure how that works - maybe it just doesn't
>> try to start the daemon in the postinst.
>
>> In my case, slapd is (will be) installed with chef - the recipe must set
>> the no_configuration flag and then configure chef after the package is
>> installed, however if dpkg fails, the recipe will also fail and will
>> never proceed to the configuration stage. Catch 22.
>
> I'm not familiar with chef, but I can see several different ways to address
> this:

- The postinst could not attempt to start a daemon which is installed
but not configured.

I checked postfix and that's exactly what it does:

(at the end of postinst)
if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then
    ...
    # start postfix
    ...
fi

I don't agree with the initial problem that a package is not installed
until after it's configured _even though_ the administrator has chosen
explicitly not to configure it at that time. I can see the point of not
creating the sentinel file, but in that case not even running the init
script would seem the best answer. Unfortunately I can't see any way to
do that and still use debhelper.

Moreover, it doesn't just affect chef, it affects apt and by extension
potentially everything. Any other packages which are being installed at
the same time may also be left in a half-configured state when slapd
fails to start and brings down apt-get.

Matthew

-- 
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