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

Re: Tools for parsing apache conf files



Steve Langasek <vorlon@netexpress.net> writes:

> On Sat, Nov 02, 2002 at 10:21:43PM -0800, Brian Nelson wrote:
>
>> > I have fewer qualms about a package that only wipes out a config file
>> > when explicitly reconfigured; most of my ire is reserved for packages,
>> > like apt-listchanges, that drop local modifications to such files on
>> > upgrade. Especially when the files are (as in the case of
>> > listchanges.conf) trivial to parse and modify without loss.
>
>> > If your files is really really hard to parse & modify losslessly then
>> > letting the user blow it away by reconfiguring is ok.
>
>> Alright.  So then the next question is:
>
>> Are there any tools for parsing Apache configuration files that would
>> work adequately for handling modifications?  My suspicion is that it's
>> too hard and not worth the effort.
>
> If using perl, Apache::Admin::Config (not packaged) seems quite
> effective at parsing Apache config files.
>
> I have serious doubts that using debconf is the right answer at all if
> you aren't in a position to parse the config losslessly.  What changes
> will you be making to these config files that couldn't just as well be
> left to the admin to handle?

The config file is not a conffile because it's generated from one of two
upstream templates.  Based on the answers gathered by debconf, the
correct template is chosen and the user's answers are inserted.

Fortunately, from the looks of the config file, it probably won't need
to change much at all between upstream versions.  So, the only real
issue is the handling of reconfiguration, which I think is adequately
handled by simply overwriting the file.

-- 
People said I was dumb, but I proved them!



Reply to: