Which versioning system is the simplest to use??

David Christensen dpchrist at holgerdanske.com
Tue Sep 11 22:44:23 PDT 2007


Agus wrote:
> I am doing a little bit of security and log watching with sec.pl and
> was trying to mantain de secconf files organized...  So whenever one
> is changed it keeps track of the change and can rollback....
> O that is what i am going to use de versioning sytem for...

If you only have a file or two, I'd suggest RCS.  "man rcs" should get you going.
An earlier version of this book helped me understand RCS well enough to write
custom scripts that used RCS on sets of files:

    http://www.oreilly.com/catalog/rcs/index.html


Then I heard about CVS, which uses RCS format archive files (so you can use
either tool) and provides the set functionality I needed plus more.  "info cvs"
is the online resource, but I did better with an earlier version of the book:

    http://cvsbook.red-bean.com/cvsbook.html


I now use CVS to maintain version control of the configuration files on my
various systems.  I build a CVS tree which is a sparse mirror of the root file
system.  Whenever I want to change a configuration file in the "live" tree, I
copy the intervening directories and/or file into the CVS tree, check everything
in, make my changes, copy the changed filed back to the original location, test,
and repeat the edit/ copy/ test sequence as necessary.  When all is well, I check
in the file to CVS.  As a variation on a theme, I sometimes move the "live" file
and replace it with a symbolic link into the CVS tree.  But this approach can be
messier when you make a mistake and destabilize the system.  YMMV.  Using CVS in
this way provides for the use cases you've identified, and it also allows me to
check out the trees from other machines to compare/ contrast.  Best yet is when I
rebuild a machine -- restoring configuration is a matter of installing CVS, check
out the system configuration file tree, and copying/linking.


I suspect that there is are open-source projects that already do much or all of
what I'm doing with CVS.  You might want to look or ask around -- try "tripwire".


SVN is supposed to be a "better CVS", etc..  But as I understand it, SVN assigns
a the same version number to every file in a set whenever any one of them
changes.  I prefer the RCS and CVS approach of numbering each file independently,
so I can easily determine which files in a set have changed and which haven't.
This ability was critical for me when I was doing kernel/ device driver
development and comparing/ using various FreeBSD, NetBSD, and OpenBSD source
files.  At the time they all used RCS/ CVS numbering, so it was easy to see what
files were the same and what were different between the platforms.


HTH,

David



More information about the freebsd-questions mailing list