Skip to content

dod38fr/config-model-backend-augeas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

With Config::Model::Backend::Augeas, Config::Model now provides a way
to load and save data through RedHat's Augeas library.

Config::Model and Augeas are both configuration editing tool.  Both
parse configuration files in their native formats and transforms them
into a tree. Configuration changes are made by manipulating this tree
and saving it back into native config files.

Both Augeas and Config::Model rely on a tree to represent
configuration data. 

On one side, Augeas is able to load and write data while respecting
the structure and comments of the original configuration file. But
Augeas purpose is not to validate the semantic content of the
configuration file.

On the other side, Config::Model is able to validate the semantic
content of the configuration file, but it may discard all comments and
will write back configuration data using a canonical order. Thus the
structure of the original configuration file is not preserved.

You can now have the best of both worlds by using the Augeas library
to load and write data from Config::Model configuration tree. You can
now instruct Config::Model to use Augeas backend in the autoread and
autowrite feature. See Config::Model::BackendMgr for details.

Unfortunately, you must ensure that the tree representation specified
in Config::Model and Augeas lens are quite close together:
- Config::Model element names and Augeas lens names must be identical
- Both structures must be very close. Each Config::Model node must
  have a corresponding lens.

See Config::Model::Backend::Augeas documentation to use Augeas with
your configuration model.

For more details on Config::Model see:

   https://github.com/dod38fr/config-model/wiki

For more details on Augeas, see:

   http://augeas.net

----------------------------------------------------------------------

BUGS

Augeas 0.3.5 does not handle properly locale on 64 bits
architecture. This is currently being fixed. In the meantime, you must
set either environment variables to "C" locale:
  LANG=C
  LC_COLLATE=C

----------------------------------------------------------------------

    Copyright (c) 2008-2013 Dominique Dumont.

    This file is part of Config-Model-Backend-Augeas.

    Config-Model-Backend-Augeas is free software; you can redistribute
    it and/or modify it under the terms of the GNU Lesser Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    Config-Model is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser Public License for more details.

    You should have received a copy of the GNU Lesser Public License
    along with Config-Model; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA

----------------------------------------------------------------------

INSTALLATION

        tar zxvf <dist_file>.tar.gz
        cd <dist_directory>
        perl Build.PL
        ./Build test

If you want to install this software without packaging, type also:

        ./Build install

About

Bridge between Config::Model and RedHat's Augeas project

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages