Re: Parsing config files in a directory - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Parsing config files in a directory
Date
Msg-id 1256816993.22925.25.camel@fsopti579.F-Secure.com
Whole thread Raw
In response to Re: Parsing config files in a directory  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Wed, 2009-10-28 at 09:39 -0700, Greg Stark wrote:
> On Wed, Oct 28, 2009 at 7:33 AM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > Greg Smith escribió:
> >
> >> This sounds familiar...oh, that's right, this is almost the same
> >> algorithm pgtune uses.  And it sucks,
> 
> It's also a blatant violation of packaging rules for Debian if not
> every distribution. If you edit the user's configuration file then
> there's no way to install a modified default configuration file. You
> can't tell the automatic modifications apart from the user's
> modifications. So the user will get a prompt asking if he wants the
> new config file or to keep his modifications which he never remembered
> making.

This is not quite accurate.  What the Debian policy says is that local
changes to configuration files must be preserved during package
upgrades.  You are free to implement this in a variety of ways.  One way
to do it is to mark the file a "conffile" with dpkg, and then dpkg will
handle the upgrades.  If you mark a configuration file a "conffile",
then packages' maintainer scripts are not allowed to touch the file
(because dpkg handles it).

But this is irrelevant for the postgresql package, because
postgresql.conf is not a conffile, primarily because it is created by
the postgresql package's maintainer script in the first place (via
initdb).

Moreover, it is not illegal for a program or a routine that is
explicitly invoked by a user to modify a configuration file (or a
"conffile" even).  The only policy is again packages' maintainer scripts
(preinst, postint, prerm, postrm, for those reading along) modifying
"conffiles" *automatically* during package installation or removal.

So from a Debian packaging policy point of view, none of the schemes
described so far appear to be disallowed outright.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Parsing config files in a directory
Next
From: Cédric Villemain
Date:
Subject: Re: Parsing config files in a directory