[Pardus-devel] Proposal
Nicolas Lara
nicolaslara at gmail.com
Fri Jun 29 21:58:25 EEST 2007
Hello,
Im writing about an idea that I've been coocking up for a while and would
like to develop for Pardus.
Motivation:
Most of the time we install packages that need no configuration, or the
default configuration is good enough, but some packages have more
complicated configuration files (i.e.: apache) and changing their
configuration files can break our system. Some other times the programs have
trivial changges in their configuration files but changing it manually tends
to be a pain and changing it in the package is complicated, non-standard and
bugy (it's easy to oveerlook something and damage some user's configuration
if it is different from the default).
Proposal:
To manage config files migration I propose using an api based in
substitution rules using regular expresions and/or context free grammars.
The main idea is to include ADD / DEL / CHANGE rules to the packages in
order to maintain older config files.
For example supose you have a variable
USE="mod_python mod_perl jakarta " in a configuration file called httpd.conf
and in a later version it changes to
MOD_PYTHON = ON
MOD_PERL = ON
JAKARTA = ON
in a file called modules/httpd.modules
you could write in a post-install script something like:
cchange(r'^USE=\"(?P<module>\w)*\"', r'<module>|capitalize = ON',
'modules/httpd.conf')
(This needs not be the syntax it is just an idea)
and have the changes recorded in a local subversion repository. This way
changes in config files can be undone very easily (not directly using svn
but easier-to-handle wrapper methods and maybe a gui).
To allow users to take advantage of the versioning control of the config
files and not need to know about subversion or any other command I propose
using iNotify to monitor the changes in /etc and if the files are modified
it automatically commits the changes using logging as comment the first
lines in the file enclosed by #<comment> #</comment> (or any other syntax).
The two parts of this proposal are separete but the first depends on the
second. I would like to develop the subversion part first and then move to
the second (of course depending on the reception the proposal gets).
I would like to get some feedback on this idea. I dont know if it was clear
enough so pleas contact me for any comment.
Hope you like it
--
Nicolas Lara
Linux user #380134
Public key id: 0x152e7713 at http://keyserver.noreply.org/
# Anti-Spam e-mail addresses:
python -c "print '@'.join(['nicolaslara', '.'.join([x for x in reversed(
'com|gmail'.split('|') )])])"
python -c "print '@'.join(['nicolas', '.'.join([x for x in reversed(
've|usb|labf|ac'.split('|') )])])"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liste.pardus.org.tr/pardus-devel/attachments/20070629/88660ade/attachment.htm
More information about the Pardus-devel
mailing list