Updating configuration files
Steve Langasek
steve.langasek at ubuntu.com
Fri Feb 11 19:24:59 UTC 2011
On Wed, Feb 09, 2011 at 09:12:12PM -0600, Ted Gould wrote:
> > So these days, there are three major paradigms used for configuration file
> > management within Debian packages.
> > - conffiles - this is the built-in dpkg prompt you refer to, with the
> > incomplete set of choices. Really, this is only a suitable mechanism for
> > configuration files that will rarely, *if ever*, need to be changed by
> > either the local admin or the package maintainer.
> > - templates spit out by maintainer scripts - this avoids the annoying
> > prompts, but also generally doesn't give the admin very much support for
> > updating to new package defaults because the maintainer doesn't go to the
> > effort of manually merging the changes in.
> > - ucf. This option *does* store the original version of the file on disk
> > in order to support a three-way merge, which makes it possible to offer
> > better options on upgrade. Not quite the same as an interactive merge,
> > but an interactive merge option could be added here without too much
> > extra work.
> > This last is the one is the way to go, but it really should be pulled into
> > dpkg itself. I don't recall if Sean's patches were based on ucf or not. In
> > the meantime, use of ucf requires explicit action by the package maintainer,
> > so it's generally only the real problem children that get converted over to
> > its use.
> I guess the fourth that I see in use is having a directory of files that
> are loaded to build the configuration file. Honestly, this is the one
> that I prefer most of the time as it means that the base file always
> upgrades. For sure, this doesn't work for all files, but it seems like
> if effort is going into configuration files it would be worth converting
> all that can to the directory method.
Ah, I don't count this one because this multiplies the number of config
files that have to be dealt with but doesn't change the fundamental way each
of those files are handled. This is mainly used / useful when the
configuration for a package comes from several different packages; it
doesn't address the question of what to do when both the admin and the
package maintainer have modified a config file. Yeah, it does reduce the
*odds* of this happening, but I don't find it very satisfying. :)
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20110211/d5b0dec5/attachment.pgp>
More information about the ubuntu-devel
mailing list