[Pkg-clamav-devel] Bug#870253: clamav-milter: disengaging debconf management destroys config

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Sun Aug 20 16:53:18 UTC 2017


On 2017-07-31 19:38:58 [+0900], Marc Dequènes wrote:
> Quack,
Hi,

> I configured this package using debconf and it worked nicely. I then wanted
> to handle the file via configuration management and to do so I disengaged
> debconf, replying "no" to the question "Handle the configuration file
> automatically?" when doing a dpkg-reconfigure.
> 
> The resulting message was:
>   Replacing config file /etc/clamav/clamav-milter.conf with new version
> The configuration file previously created via debconf was simply replaced
> without any backup, so all my config was lost (thanks backup).

This should not happen. We use ucf for config file modification. I tried
to reproduce this today.
So if I modify the .conf file only with debconf and then (later) tell
debconf not to handle it then the "old" .conf file will be replaced with
upstream's default one.
If you switch back to debconf then it should create the same config file
(as it was before) because the settings stored in debconf are the same.

Now. If you change the file manually (with the configuration management)
and after that you tell debconf to not do anything then ucf should
complain that the file was modified.
I tried this scenario (make a local change, start debconf and answer
the first question with 'no') and ucf complained as it should:
|A new version
|(/usr/share/doc/clamav-milter/examples/clamav-milter.conf.sample) of
|configuration file /etc/clamav/clamav-milter.conf is available, but the
|version installed currently has been locally modified.

so that seems to work. You get
|Replacing config file /etc/clamav/clamav-milter.conf with new version
|Disabling old logrotate script for clamav-milter

if you select "install the package maintainer's version" and if decide
to select "keep the local version currently installed" then you only get
|Disabling old logrotate script for clamav-milter

So this what I had here. It seems to work as expected. Do you have some
ucf auto-magic or did I misunderstand something.

Sebastian



More information about the Pkg-clamav-devel mailing list