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

Re: RFS: personalbackup

On Thu, Sep 07, 2006 at 05:26:53PM -0500, Luis Rodrigo Gallardo Cruz wrote:
> On Thu, Sep 07, 2006 at 08:27:43PM +0200, kku wrote:
> > >You are programaticaly managing a configuration file in /etc. You
> > >should look into using ucf, that already handles this.
> > 
> > I've had a look at ucf, but I do not think it fits my need (unless I have 
> > overlooked something).
> > 
> > I have a template file 
> > "/usr/share/doc/personalbackup/personalbackup.apache" and the parameter 
> > "webalias"
> > is being replaced in that template during postinst. Depending on the user's 
> > choose for apache/apache2 this file will be placed in 
> > '/etc/apache/conf.d/personalbackup' or 
> > '/etc/apache2/sites-enabled/personalbackup'
> > 
> > Now to detect that the user did (not) change the conf file, I check the 
> > md5sum of the content of the appropriate conf file 'except' for the Alias 
> > line.
> > And as far as I can see this is something ucf cannot handle...or am I wrong 
> > here?
> Uhh. From apt-cache show ucf

Luis, I think you missed a critical bit of what's being done with the config
file -- the md5sum of only part of the config file is being checked, which
(unless it's has had some *very* interesting features added lately) ucf
can't do.

This doesn't, however, change the fact that this "only compare parts of the
config file" approach isn't policy compliant.  If I change *any* part of a
config file, I expect those changes to be preserved.  Debconf Is Not A
Registry is a sacred and hallowed principle, and it's still applicable here.

I don't care if I answered a certain question a certain way when the package
was first installed -- the Unix philosophy is that I go and edit config
files directly when I want things changed.  If the package goes and puts
things back how they were because of a debconf setting (overriding my
carefully hand-crafted changes) then that's a bug.

- Matt

Reply to: