Purging conffiles in stateless packages
Hello,
is there a guideline on how to treat user-provided configuration files
during configuration purging in packages for programs that follow the
"stateless" paradigm (default in `/usr`, override in `/etc`)?
For examples, apticron (the program) has recently switched to a
stateless configuration. The default configuration is shipped in
`/usr/lib/apticron/apticron.conf` and the local configuration is written
by the sysadmin (if they want) in `/etc/apticron.conf`. At the same time
the maintscript of apticron (the package) says
purge)
[...]
if [ -d /etc/apticron ] ; then
rm -rf /etc/apticron || true
fi
[...]
That means that purging the package will remove also all the
configuration files provided by the sysadmin. Is this correct?
(I'm asking in the general case, apticron is just an example.)
When there was only one configuration file for both default and
sysadmin's settings this could had been a sensible way to purge the
package. With these new stateless packages I'm not so sure that removing
user-created configuration files makes sense. They are purely
user-provided data and will never conflict with future
(re-)installations of the same package.
The policy [1] says nothing explicit on this subject, only
> conffiles and any backup files (~-files, #*# files, %-files,
.dpkg-{old,new,tmp}, etc.) are removed.
Are there precedents on how to handle the removal of configuration files
in packages for stateless programs?
Regards,
[1] https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#id6
--
Gioele Barabucci <gioele@svario.it>
Reply to: