Russ Allbery <[EMAIL PROTECTED]> writes: > William Francis <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]