CCP (as I wrote about earlier) now has a project on savannah. It now works! It can be downloaded from the CVS repository.
However, it doesn’t use libconf yet, and thus only supports key = value files. It also doesn’t know how to create the templates by itself so those have to be written by hand for now (but this should be easy(ish) to implement I think).
Like i said it currently supports key = value files. Any format will do. It can for instance handle any of the following:
$Key = Value; $Key=Value $Key='Value' $Key="Value" $Key ="Value" Key = Value Key=Value # Comment : Comment ; Comment [Section header that gets ignored]
It doesn’t support comments on the same line as a config option, but this can probably be added at some later time.
I haven’t written any documentation yet – but here’s the same usage sample I used before (edited to suit the way ccp now works).
/etc/example.conf:
# Example configuration file SystemVersion = 0.1 Mode = public Extensions = off
/etc/example.conf.rpmnew:
# Example configuration file SystemVersion = 0.1 Mode = private Extensions = on AllowUsers = yes
/usr/share/example/config.ccptemplate:
# Example configuration file
SystemVersion = {CCP::CONFIG:SystemVersion}
Mode = {CCP::CONFIG::Mode}
Extensions = {CCP::CONFIG::Extensions}
AllowUsers = {CCP::CONFIG::AllowUsers}
Command:
$ ccp --template /usr/share/example/config.ccptemplate --oldfile /etc/example.conf --newfile /etc/example.conf.rpmnew Merging changes between "/etc/example.conf" and "/etc/example.conf.rpmnew"...done
Resulting /etc/example.conf:
# Example configuration file SystemVersion = 0.1 Mode = public Extensions = off AllowUsers = yes
| This entry was posted on Thursday, December 29th, 2005 at 16:56 and is filed under CCP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. |
[...] CCP can now autogenerate the templates, so it’s pretty much ready for real-life testing. Here’s the same example used in earlier posts. [...]