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

Configuration Validation



Dear Ubuntu and APT Developers,

I would like to introduce an idea and see if any of you would like to
review it and see how helpful it would be to solving a problem. These
ideas may have already have been expressed so I'd like to see if they
are under development elsewhere.

In Debian based distros like Ubuntu we have pretty tight control over
lots of files. The guidelines for getting something appropriately
packaged for the repositories are set up as best practice guidelines
for the kinds of support in our projects that make them easier to
install, use and modify.

One of the concerns I have is with configurations, specifically those
in /etc and those in ~/.*  . The files in /etc are known to the apt
system and it's been built to warn the user if config files are to be
overwritten. The config files in ~/.* are not recorded anywhere and
they are at the mercy of the competency of the developers in format
and version control. I'm not aware of any guidelines for these files.

To solve some of the problems with this set-up I had a ponder. A
solution that came to mind was to have a validation system which
involves two steps (below). This system would be employed to check the
integrity of the system at any time, and the integrity of certain
package configurations during upgrade time. In essence, just as we
recommend each executable come with a man page, we should recommend
each configuration file come with a definition and validation xsd.

Checking the entire system would be a matter of going through each
definition, checking the existence of the config file followed by step
one, which would be a translation of the config file from what ever
text format it is in to an xml structure using standard transformation
methods for various formats, these can be made as plugins for which
the definitions would identify in order for translation backwards and
forwards to take place.

Step two is to use an xsd appropriate for each config file to check
the validity of the config against the version of the application
installed it is applicable to.

An optional step three on upgrade time is to use xslt translation to
upgrade configurations assuming no validity or conflict errors. This
would allow for much safer upgrading.

Now once employed this system would not only be applicable to config
files in /etc but also to configurations employed per user in ~/ these
checks can be carried out at any time and especially if there is
problems with logging in (as I have seen with gnome).

I imagine the locations for each xsd, xslt and config definition file
would be set locations much like the man pages and could be if
successful in future revisions integrated into the way apt/deb works.
I propose python as a language of choice to build such a system.

I assume much of these ideas to have been discussed at length before,
but my searches aren't picking up useful results.

Best Regards, Martin Owens


Reply to: