1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/header.php // // // echo "\n"; print ""; echo "\n"; echo ""; echo ""; echo "Rossberry.com - The Home of the Mobile Linux Lab"; if ($title != "") { echo " -- $title"; } echo "\n"; // The next line lets us link the header page below // the top ditrectory, and have the buttons work // RPH -- 011124 echo ""; // // scheme://user:pass@host:port/path?query#fragment // //$REQUEST_URI = $_SERVER[REQUEST_URI]; $url=parse_url("$REQUEST_URI"); $svr=$url[host]; //$svr="www.rossberry.net"; $svr="www.rossberry.com"; $server = $server_name ; print ""; ?>


Home of the Mobile Linux Lab

Home Overview Philosophy Infrastructure
Version Control Blogs Files cfengine

Version control systems

Go here for how I'm using Subversion to manage the process pieces

For this project I am using 2 version control systems:

Git vs Subversion

The choice of Subversion is based on my past experience and familiarity with using it for tracking source code. For most enterprises, Subversion or something similar (ie, a centrally managed repository such as Clearcase, Perforce, Accurev) will be in place or mandated. Might as well go with the standards.

(About a month into the project). I can now say that I've tried git for managing my scripts, html, php, etc. My observations..

  1. Git generates change sets, which are changes to sets of files. There really is no file version identifier. It lends itself to making many changes across a large set of files, stabilizing those changes then releasing the stabilized set as the next revision.
  2. Git is designed for distributed, multi-author version control. There is no single point of truth except by convention and agreement. The emphasis is on "pulling" the changes you want from any other repository, rather than "pushing" or "committing" them to a central location for safe keeping. There is not much advantage to this if there is just one person doing the development
  3. You can make git act in a "svn-ish" fashion, ie, with a central repo, but it is unnatural.
Since there is just one of me, and there is a clearly defined central location (rossberry.net) I'm sticking with Subversion for now for tracking my work.

Git for tracking /etc

I was just trying out git by itself for managing and monitoring /etc. However I've recently found the etckeeper package which is a set of scripts for using git (or another version control system) to monitor changes to /etc (or any other directory). This looks extremely useful. If you don't want to try etckeeper, then my notes below on git can be used.

One of the issues I've run into is that Xen (in particular) likes to scribble in somewhat undocumented places. Git has the quality that a directory with existing content can become a 'sandbox' with just a few commands

cd /etc
echo "*passwd*" > .gitignore
echo "*shadow*" >> .gitignore
echo "*lvm*" >> .gitignore
echo "*cache*" >> .gitignore
echo "*gconf*" >> .gitignore
git init
git add *
git commit -m "Adding all of :/etc"

Once this is done, "git status" quickly shows you what files have changed and a "git diff" will show you how they've changed. I do this for /etc, /var/lib/xen (ignoring images), and /var/lib/libvirtd. At this point I'm not pushing or merging these individual repos together, though I may in the future. It provides a very handy way of tracking what and how things have changed.

As a note, this saved me a lot of work while working on this project. While in the /etc/xen directory I executed "scp tempfile cobbler-lt" which of course blew away cobbler-lt rather than copying the file to the cobbler-lt vm. OUCH!. A quick git diff and I was back in business.

Centralized git

As I noted above, you can use git in a central repo fashion. The documentation is umm, misleading on how to set it up. Here's what I found to work
  1. Create a normal git repo with content
  2. Decide on your central location
  3. cd /somedir
  4. git clone /somedir/central local_git
  5. cd local_git;touch t;git add t;git commit -m t;git push
  6. You can pull from or to local_git as usual.
  7. You can push from local_git into central.
  8. You can push from any other repo cloned from central or local_git
  9. You can not push from your original source_git_repo. Nor can you pull from it into central. Delete it.
  10. I never figured out how to push anything other than master. I'm sure it's possible, I just lost interest.
As I said, it is a bit unnatural...

1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/footer.php // print "

"; // print " \n \n \n "; // $url=parse_url("$REQUEST_URI"); $scheme = $url[scheme]; $host = $url[host]; $whereami = $url[path]; $basename = exec("basename $whereami"); $REFERRER=exec("basename $whereami .php"); $SMURF = exec(" ls | grep $REFERRER | grep txt "); if ($SMURF != "") { ## echo ""; ## This next line of code opens the displayed code in a new window when uncommented echo ""; echo "\"View of "; echo ""; echo "$basename"; } else { print "\n"; print "\n"; } // print " Contact mll@rossberry.com Copyright\n © 2010, 2011 Jim Wildman.\n "; print "
All rights reserved.
"; ?>