[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Right Way to make a configuration package

On Sun, Oct 17, 2004 at 10:38:06PM +0200, Petter Reinholdtsen wrote:
> [Enrico Zini]
> > One of the suggestions that came out is using dpkg diversions.
> > I remember diversions came out in the past, and I don't remember how
> > come they didn't come out again.  Was there something wrong with them?
> I believe they are forbidden or don't work for conffiles.  And we need
> to do this with conffiles.

 From the dpkg-divert manpage:

   "[...] System administrators can also use it to override some
    package’s configuration file [...]"

In the policy, I find:

  3.10. Maintainer Scripts
  You should not use `dpkg-divert' on a file belonging to another
  package without consulting the maintainer of that package first.

  10.7.4. Sharing configuration files
  Packages which specify the same file as a `conffile' must be tagged as
  _conflicting_ with each other.  (This is an instance of the general
  rule about not sharing files.  Note that neither alternatives nor
  diversions are likely to be appropriate in this case; in particular,
  `dpkg' does not handle diverted `conffile's well.)
  [it also goes on about other ways of sharing configuration files]

One problem with diversion could also be that the original package's
scripts won't probably edit the diverted conffile, but would probably
edit the file in the traditional place instead.  This may not be a
problem with many packages, though.

My dear debian-devel public: is this an unsolvable problem in Debian,
not even in the medium-long term?

> I suspect the only sensible way to do this is to implement multilevel
> configuration files in all applications we want to configure at
> install time.

Is that applicable to all the various kinds of conffiles we have, and
all possible customizations?

I'll make a recap of configuration customization techniques (to be
quoted and extended with pros, cons, dos, donts and gotchas):

 - debconf preseeding
   (can't de-install the customization)
 - cfengine
   (can't de-install the customization, problems during upgrades)
 - dpkg-divert
   (may not work for all packages)
   (may be good for packages which don't automatically edit their
 - multilevel configuration files
   (not all customizations are supported)
   (may be good for packages with complex and useful updated

The last two could complement each other and cover a wide range of
cases, allowing also upgrade and changing from one cdd to the other.



GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>

Attachment: signature.asc
Description: Digital signature

Reply to: