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

Re: dh_config_model_upgrade: package upgrade with Config::Model



Le vendredi 4 décembre 2009 19:46:04, Stefano Zacchiroli a écrit :
> On Fri, Dec 04, 2009 at 06:54:56PM +0100, Dominique Dumont wrote:
> > The idea was to offer the user a possibility to bail out since
> > config-model is still experimental. But I'm beginning to wonder if
> > this is a good idea...
> 
> IMO it is not, in the sense that it is quite pointless to put this
> choice on the final users. The choice about whether to use it or not
> should be of the final *package maintainer*. If its use of config-model
> works, fine, otherwise _his_ package will be considered RC buggy as any
> other package erroneously fiddling with user conffile.

Ok, I'll remove this question.

> Please detail more the "write the model" case. I want that possibility,
> but it is not clear to me whether the custom model can be shipped within
> the package needing it at configuration time.  (Yes, that of course
> means that no-fiddling would be possible in preinst, but I got the
> impression that it was already the case.)

There are several possibilities:
- either the model can be used also to configure the application. In this 
case, the model should contain help text (description, summary...)
- or the model is used only in batch mode for upgrade. Since there's no user 
interaction, the help text can be skipped.

In the first case, it's better to ship the model in a separate package and 
upload it to CPAN. Debian-perl team will then package it.

In the second case, the model can be shipped only in the debian package.

> No, that's was not my question, sorry if it was not clear; let me try
> again. config-model will have a model for the previous maintainer
> version of some conffile, let's call it m_1; then config-model can have
> several other models m_2, ... m_n and it can jump up to m_n.
> 
> What I want to know is whether config-model allows me not to write a
> model m_i I'd like to arrive to in the package, but rather write a small
> program snippet which takes m_1 and modify it in some way. That's
> basically the different between "here is the model you should arrive to"
> (which I understand is supported) and "here is a recipe/program to
> obtain the model you should arrive to". 

I can easily add some code so that you can use config-model-edit (provided by 
Config::Model::Itself) in such a way.

For instance if you want to change the default value of PermitRootLogin, you 
would need to run this line while packaging libconfig-model-openssh-perl:

 config-model-edit -model Sshd -save class:Sshd element:PermitRootLogin \    
 default=no 

Does this reply to your question ?

Dominique
--
http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/
http://www.ohloh.net/accounts/ddumont


Reply to: