[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using subversion to manage system config files

From: Jeremy Pereira <jeremy.pereira_at_ntlworld.com>
Date: 2004-06-23 12:29:26 CEST

I manage my sendmail config with subversion.

I keep the working copy away from the config directory and have a make
file with an install target. I prefer this approach to having the
actual config directories under version control because

a) I can commit changes as users other than root (important for
auditing).
b) I can handle symlinks if need be by putting the commands to create
them in the make file (which is also under vc).
c) I can make changes in my sendmail.mc, compile to .cf and test them
without screwing around with the live config files.
d) It gives me more control over when changes are pushed out to the
server than using a post commit script. I can make changes during the
day and test, commit and tag them and then push the config change to
the server at night or during scheduled down time.

If you're going to do this, consider putting a comment at the top of
every config file telling people not to edit files directly in /etc as
their changes will disappear sooner or later.

On Jun 21, 2004, at 20:41, Paul Moore wrote:

> I've just started to use Subversion to manage source code, and overall
> I like the feel of it. However, a significant portion of my job is
> managing configuration files (Apache httpd.conf, Oracle init.ora,
> etc). I'd like to keep these files under some form of version control,
> as well.
>
> It's not immediately clear to me how, or if, I could use Subversion
> for this. I can put (copies) of all the config files in a central
> directory, and treat that as a working copy and put it under version
> control. But I can't see a good way that I can automate the process of
> ensuring that the "real" copies are in line with the latest revision
> from Subversion. I suppose this is a similar sort of issue to that of
> program releases, and hence somewhat outside the scope of Subversion.
> But has anyone tried to manage this sort of data with Subversion, and
> if so do you have any tips?
>
> I guess that I could use a post-commit script, along with a per-file
> property for the "release location" of the file, to copy any changed
> files to their correct location on a commit. Maybe a second property,
> to specify a command to run after a change (eg, restart Apache). And
> maybe a pre-commit hook to confirm (somehow!) that the change is
> authorised. Is this type of approach plausible?
>
> Paul.
> --
> This signature intentionally left blank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>

--
Jeremy Pereira
http://www.jeremyp.net
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 23 17:26:29 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.