FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 02-09-2008, 12:44 AM
Goswin von Brederlow
 
Default control file Replaces: question

Russ Allbery <rra@debian.org> writes:

> William Francis <wfrancis@gmail.com> writes:
>
>> I want to manage the config files for several other packages centrally
>> in one package that I'm going to maintain. According to the package
>> maintainers guide, section 7.5.1 [1] , this is entirely possible and
>> perfectly reasonable via the Replaces: option in the control file.
>
> That's not what that Policy section is talking about. It's specifically
> covering the case when you have a newer package that's taking over files
> from an older package.
>
> The problem with doing this with a package that's not giving up ownership
> of those files is that when you upgrade the package whose configuration
> files you overwrote, it will ( error out / take the configuration files
> back ) depending on how exactly dpkg tackles this problem. I'm not sure
> which will happen, but either way it isn't what you want.

Iirc the policy specifically excludes conffiles from this. As in one
package is not allowed to meddle in another packages conffile.

But it should work (I'M NOT SAYING IT WILL). Older dpkg would refuse
to install a package that didn't give up a replaced file (trying to
overwrite file error) but newer dpkg remember the replaces line and
ignore the replaced files. That is how it works for non conffiles
anyway. If conffiles break with replaces then I guess you should file
a bug and hopefully patch for this, despite it being policy
non-conformant.

> If you really need to do this, you will need to divert the configuration
> files with dpkg-divert. However, you really don't want to do this.
> Rather than managing configuration files with a package, you really want
> to use something like Puppet or Cfengine to manage configuration.

I tried this once and I setteled on writing a package that would fetch
my conffiles from a RCS. On initial install it would just check them
out and dump them in place. On updates it would update them to the tag
coresponding to the package version. If you have different configs per
host you can create branches for each host and fetch from there.

You can also add a hook to run post dpkg that will compare the state
of conffiles with the RCS and warn you about changes.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-15-2008, 10:22 PM
Andrei Popescu
 
Default control file Replaces: question

On Sat, Feb 09, 2008 at 02:44:20AM +0100, Goswin von Brederlow wrote:

> > If you really need to do this, you will need to divert the configuration
> > files with dpkg-divert. However, you really don't want to do this.
> > Rather than managing configuration files with a package, you really want
> > to use something like Puppet or Cfengine to manage configuration.
>
> I tried this once and I setteled on writing a package that would fetch
> my conffiles from a RCS. On initial install it would just check them
> out and dump them in place. On updates it would update them to the tag
> coresponding to the package version. If you have different configs per
> host you can create branches for each host and fetch from there.
>
> You can also add a hook to run post dpkg that will compare the state
> of conffiles with the RCS and warn you about changes.

Or just use etckeeper.

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 

Thread Tools




All times are GMT. The time now is 03:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org