dovecot-sieve post-installation fails when directory /etc/dovecot/conf.d/ is missing

Bug #1752329 reported by Marcel Baur
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

dovecot-sieve post-installation fails when directory /etc/dovecot/conf.d/ is missing.
Maybe post-installation should mkdir -p the directory?

$ sudo apt-get install dovecot-sieve
[sudo] password for imapadmin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  dovecot-sieve
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
Need to get 283 kB of archives.
After this operation, 1,015 kB of additional disk space will be used.
Get:1 http://ch.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dovecot-sieve amd64 1:2.2.22-1ubuntu2.6 [283 kB]
Fetched 283 kB in 0s (2,135 kB/s)
Selecting previously unselected package dovecot-sieve.
(Reading database ... 110575 files and directories currently installed.)
Preparing to unpack .../dovecot-sieve_1%3a2.2.22-1ubuntu2.6_amd64.deb ...
Unpacking dovecot-sieve (1:2.2.22-1ubuntu2.6) ...
Processing triggers for dovecot-core (1:2.2.22-1ubuntu2.6) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dovecot-sieve (1:2.2.22-1ubuntu2.6) ...

Creating config file /etc/dovecot/conf.d/90-sieve.conf with new version
cp: cannot create regular file '/etc/dovecot/conf.d/90-sieve.conf': No such file or directory
dpkg: error processing package dovecot-sieve (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for dovecot-core (1:2.2.22-1ubuntu2.6) ...
Errors were encountered while processing:
 dovecot-sieve
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi, Marcel
thanks for the suggestion and mkdir would not be too hard, but
dovecot-sieve pulls in dovecot-core via a hard dependency which in turn creates that dir.
So it works just fine.

I'd be tempted to call removing /etc/dovecot/conf.d/ a broken config the we don't want to support.
People will later on run into other issues, so I'm not very eager to fix this to only have the next issue due to it being missing.

But you are right still, since this is breaking the install it is really not nice.
I'd rather add the dir to debian/dovecot-sieve.dirs thou.

I'll consider it on the next merge

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hmm,
I rechecked that, there really should be no way to trigger that bug.
As I said dovecot-core will make the dir available, and is a hard dependency.
And no matter how I look at it, it feels wrong to fix without understanding why it happened in the first place.
If it was just a dir deletion by a user, well this will trigger a million more bugs and code for all of these makes now sense.

I tried more combiantions I felt were vaguely possible:
1. removing all of /etc/dovecot/conf.d - still works, as UCF will catch this
    Not replacing deleted config file /etc/dovecot/conf.d/90-sieve.conf
    Not replacing deleted config file /etc/dovecot/conf.d/90-sieve-extprograms.conf
2. removing the file /etc/dovecot/conf.d/90-sieve.conf - still work, ucf catches by
     Not replacing deleted config file /etc/dovecot/conf.d/90-sieve.conf
3. remove /etc/dovecot
     Not replacing deleted config file /etc/dovecot/conf.d/90-sieve.conf
     Not replacing deleted config file /etc/dovecot/conf.d/90-sieve-extprograms.conf

In all those cases it is retaining the deleted config as that (as it is supposed to)

The only one I found was
1. removing /etc/dovecot or /etc/dovecot/conf.d
2. purging dovecot-sieve
3. installing dovecot-sieve

IMHO too much of a broken-config case to be worth the effort.
If you'D not be stopped by the error on the install it would still break later on, maybe worse.
So better realize it right away right?
  $ apt install --reinstall dovecot-core
Will get you back (combine that with purge or not as needed).

Sorry, but unless convinced otherwise, this became a Won't Fix from my POV

Changed in dovecot (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.