[augeas-devel] augeas target configuration files

David Lutterkort dlutter at redhat.com
Fri Apr 25 17:01:15 UTC 2008


On Fri, 2008-04-25 at 18:22 +0200, Harald Hoyer wrote:
> Can we define a list of config files, which augeas does/will/should support?

I think a list of config files that are supported, with some indication
of how stable the schema for them is, is sorely needed. The tree schema
after all is part of the API. The main thing that is keeping me from
doing that is that I'd like to generate the schema from the lenses
themselves, and am not sure what the most useful format for that is,
though Relax-NG sounds like a reasonable choice.

As to what it should support, I'd like to start collecting a wish list
of config files people need .. maybe I should just get a Wiki set up.
The list you put together is definitely a reasonable goal.

What it _will_ support, I'd definitely add dhcpd.conf and httpd.conf to
the list of things I want to have schema for. Writing schema for
httpd.conf will probably be painful, but I don't think there's a
principal reason why it can't be done (besides ENOTIME, of course)

The biggest limitation of Augeas is that it can not handle context-free
file formats; luckily, they are few and far between. An easy litmus test
for that is whether the format has some form of nesting that is allowed
to be arbitrarily deep (that's what makes httpd.conf doable: sections
can be nested, but not aribitrarily deep, i.e. you can't have a
Directory section buried inside a Directory section; still, processing
httpd.conf will be a major undertaking)

The context-free limitation will make it impossible to write a generic
XML processor with Augeas (though you can do it for specific XML
formats, since most of the ones used for config are regular, not
context-free) Other file formats that run into this are krb5.conf
(allows values to be sections, though I am not sure if nesting isn't
restricted to two or three levels, in which case we can hack it), and a
generic processor for libconfig/libconfuse syntax, which is also
context-free.

As we cover more (and more complex) config files, I am pretty certain
the language will have to evolve to make certain things less painful
(look at key_re in yum.aug for an example of what I mean) But there's
plenty of files that could be processed with Augeas right now, without
breaking too much sweat - for example, most of /etc/sysconfig really
only requires a few tweaks to the ifcfg schema that Alan did.

David





More information about the augeas-devel mailing list