[augeas-devel] Augeas Merging Configuration

Francis Giraldeau francis.giraldeau at usherbrooke.ca
Fri May 6 16:11:46 UTC 2011


On Fri, 2011-05-06 at 11:55 +0300, Christos Bountalis wrote:
> Hello,
> 
> My name is Christos Bountalis,I just joined this list. I was about to
> begin coding a new tool from scratch for merging configurations files
> for openSUSE as a student project for Google Summer of Code 2011.
> Recently, however we got a suggestion about Augeas that found very
> interesting. So instead of writing a new application I am thinking of
> extending Augeas with the ability to merge configuration files.

Merging configuration files with augeas reduces to merging trees. Augeas
abstract syntax (how it's written), but not semantic (what it means).
There is a real challenge to guarantee that a merge will yield a valid
configuration file, because it depends on specific configuration values
for an application. 

The basis of tree merging is to match similar nodes and subtrees, and
then "patching" the tree. 

As for the autodetection of format, probably a brute force to parse the
given file with each available lenses may help you to determine the file
syntax. It will be able to tell that it's an ini file for example, but
will not know if it's a samba or php config. 

Cheer, 

Francis

[1] 




More information about the augeas-devel mailing list