...making Linux just a little more fun!

Version control for /etc

Rick Moen [rick at linuxmafia.com]

Sat, 9 Feb 2008 13:34:57 -0800

https://thomas.apestaart.org/thomas/trac/wiki/projects/savon has:

  What is Savon? 
  Savon is a program that allows you to store parts of a file system in
  Subversion. It manages file contents, permissions, owner and group (by
  name, not by id), and even SELinux security context. Layers allow re-use
  of files among different hosts.
  The command-line tool, savon, tries to follow svn in spirit as closely
  as possible in expected behaviour, output, ... Of course, there are
  different commands for the additional functionality, but your knowledge
  of svn will carry over into your use of savon. (One important exception
  is the add command, which is non-recursive by default. svn chose to make
  this recursive, in contrast to CVS, and many a user has made the mistake
  of adding a whole subtree to subversion when they just wanted one
  directory added.)
  What can I use it for? 
      * Use it to store configuration files, scripts, and other local
        modifications for your one or more Unix hosts
      * Use it to manage clusters of machines that share roles and can
        thus share configuration from one central repository
      * Use it to store the same type of information from your user
        directory, again allowing you to share parts of these directory
        layouts among multiple machines 
  High-level overview 
  Savon allows you to manage a part of your file system in an overlay.
  This part can be the whole filesystem or root, or your home directory,
  or something else.
  This overlay is split up into one more more layers. The layers are
  stacked top to bottom to represent the tree of revisioned nodes. If a
  node is present in more than one layer, the version in the top-most
  layer is used.
  Typically, you would use a separate overlay for each host, and then
  share common files in a layer. For example, on my home network, but also
  on hosts of family and friends I maintain, I use the bottom-most layer
  for files that should be the same on all hosts. This includes for
  example authorized_keys for ssh, so that I can log in to every machine.
  The layer above that is used for files that are related to the local
  network configuration; for example, yum configuration files pointing to
  local directories.
  The top-level layer gets used for the host-specific files, including
  interface definitions, a host ChangeLog, ...
  Having separate layers thus makes it easy to share configuration and
  files between machines. 

A fellow Linux user group mailing list member speculated that Savon might be more suitable than Joey Hess's etckeeper for non-.deb-based systems such as RHEL / CentOS / Mandrake / PCLinuxOS / Gentoo / etc., because etckeeper is hooked into apt/dpkg so as to capture changes to /etc resulting from package operations. Having not tried etckeeper on a non-.deb system, I couldn't speak to that, but pass along his comment.

Meanwhile, Joey has merged patches that permit etckeeper to be back-ended by Mercurial, so one can now elect that version control system rather than git, if one prefers.

Top    Back

Rick Moen [rick at linuxmafia.com]

Mon, 11 Feb 2008 04:08:52 -0800

I wrote:

> Meanwhile, Joey has merged patches that permit etckeeper to be
> back-ended by Mercurial, so one can now elect that version control
> system rather than git, if one prefers.

Also, Jelmer Vernooij has created a back-end for etckeeper using the Bazaar (bzr) version-control system. See: http://gitweb.samba.org/?p=jelmer/etckeeper.git;a=summary

I rather suspect that the Ubuntu project for a version-controlled /etc (https://wiki.ubuntu.com/VersionControlledEtc) will adopt that, since Ubuntu makes very extensive use of Bazaar, and it's a Canonical-funded project.

Top    Back