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

A configuration tool for debian



Hi,

I've a proposal for a configuration tool; IMHO the features that such
tool should have are:

1) It must have many interfaces (GUI-base, Web-based, etc.).

2) The files where the configurations are stored must be easy to edit
   with a normal text editor.

3) It must be extremely flexible (more on this later).

4) It should be completely transparent for who don't want to use it.

My proposal is a Guile-based system similar to the emacs configuration
system: emacs has a lisp builtin interpreter that parse arbitrary
complex config file.

IMHO this simple and powerful concept should be extended to the Debian
distribution, using a suited language instead of elisp; I suggest
Guile.

The concept is simple: every package that need a configuration tool
(bind, apache, postfix, etc.) should came with a module written in
Guile and a script (written in Guile also) that parse this module and
produce the configuration files that the package needs.

I'm going to make an example with bind: with this new system the
package bind should include a file (say)
/etc/debconf/bind/bind-conf.scm similar to this:

------------------------ bind-conf.scm ---------------------------------
;; configuration file for bind
;;
;; configure this file, and run update-bind.scm to generate the zone
;; files needed by bind

(define mydomain ("farm.it."
  (soa   "@"   "farm.it." "root.farm.it."   ...)
  (ns    ""    "rooster.farm.it.")
  (mx    ""    "rooster.farm.it."    10)
  ...
))

...
------------------------ bind-conf.scm ---------------------------------

and should include the script (say) /etc/debconf/bind/update-bind.scm
that parse bind-conf.scm and produce the zone files for bind.

The pros of this system ideally are:

1) The sys-admin must learn only one language to configure all the
   system.

2) Guile allow to do things that usually aren't possible in normal
   configuration files (in example, conditional branch, function-call,
   etc.).

3) We can make a system library that allow to access to the global
   system configuration in a easy manner. In example, in bind-conf.scm
   it would be possible to write (domain-name) instead of "farm.it"
   and (root-address) instead of "root.farm.it".

4) The *-conf.scm config files can be much simpler than the "real"
   configuration file; in example, in bind-conf.scm we can define the
   function (get-reverse-domain) that produce the address/name map
   from a name/address map. Thus we can easily write something like
   this:

     (define my-reverse-domain ("1.168.192.in-addr.arpa"
       (get-reverse-domain my-domain)))

5) It will not be intrusive: who don't want to use this system, can
   simply not run the update-* scripts.

6) The generated config files could be easily personalized modifying
   the update-* script; if they will be easy to understand and modify
   as I hope, this will lead to a great degree of flexibility.

7) Many interfaces (GUI-based, web-based, etc.) could easily be done;
   they should only generate the *-conf.scm config files.

8) The Debian system would not need anymore the interactive scripts;
   IMVHO they were just good when the package number were in the
   centuries, but now that is in the thousands, they are becoming a
   real pain.

IMHO this system will fully meet the points I've mentioned above.

Please, let me know what do you think about it.

Bye, 

-- 
Diego   | To reply remove the `x' and swap the | Sorry for my
Dainese | words around the `@' in the address. | bad English.


Reply to: