Re: Configuration file handling
Roger Leigh <firstname.lastname@example.org> writes:
> I would much rather we had a more general mechanism of storing the real
> configuration files (as opposed to just md5s) by dpkg itself, which
> would enable proper merging of admin changes between old and new
> conffiles, and perhaps also allow dpkg to implement ucf-like conffile
> handling (or remove the need for ucf entirely). These could be stored
> under /var/lib/dpkg/conffiles (for example).
Yes, this. The current method for restoring a deleted or modified
configuration file to its original state in the absence of add-on tools
like etckeeper is relentlessly obscure. I've had to walk very experienced
UNIX admins through it, since the various things you have to do are very
unintuitive. We need to do better, including a top-level, user-visible
command to easily restore the pristine configuration of a package.
We could get some of the way there by having a standard option to apt-get
and aptitude to reinstall a package with --force-confnew --force-confmiss,
but better support at the dpkg layer lets us also do other interesting
things, as you note.
> On a related note...
> While we might criticise rpm for its bad conffile handling, dpkg is
> itself fairly woeful, and if we change one thing for wheezy+1, it should
> be sane conffile handling. dpkg should never "forget" about conffiles;
> the fact that maintainer scripts have to take care of purging such files
> is a glaring defect, and possibly the source of the greatest fragility
> in our maintainer scripts--it's impossible for maintainer scripts to get
> this right all the time given all the corner cases like downgrades and
> being taken over by other packages. If this was implemented robustly,
> the maintainer script should never need to concern itself with such
> cleanup, or indeed any manual work with conffiles at all, except maybe
> for deletion ahead of purge where this is needed. And given the
> frequency this is needed, a defined mechanism to do this would be
The criticisms of rpm are nice for making us feel better ourselves and
helping get rid of the lingering trauma of having used Red Hat (speaking
for myself at least *grin*), but they don't make Debian any better. We
have some significant problems ourselves that we could fix.
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>