Selasa, 24 Juli 2007

Recent CVS Changes

This is a note for myself, so if you're looking for uber-security insights today, please skip this post. If you do stick with me and you can suggest ways to do this better, please share your comments.

Earlier this year I posted TaoSecurity CVS at Sourceforge and Committing Changes to CVS. Since posting my Sguil on FreeBSD scripts at TaoSecurity Sourceforge I needed to make a few changes. The system hosting my original files suffered a lightning strike, so I decided to retrieve the files from CVS and make changes.

Checking out the scripts can be done anonymously without a password. (Note there are some artificial line breaks in these and other lines.)


$ cvs -d:pserver:anonymous@taosecurity.cvs.sourceforge.net:/cvsroot/taosecurity
login
Logging in to :pserver:anonymous@taosecurity.cvs.sourceforge.net:2401
/cvsroot/taosecurity
CVS password:
$ cvs -d:pserver:anonymous@taosecurity.cvs.sourceforge.net:/cvsroot/taosecurity
co -P taosecurity_sguil_scripts
cvs checkout: Updating taosecurity_sguil_scripts
U taosecurity_sguil_scripts/README
...truncated...

When I checked out these files they had headers like this:

# $Id: README,v 1.2 2007/03/22 18:40:25 taosecurity Exp $ #

These headers are added by lines like this from the original files:

# $Id$ #

In order to turn these new checked out files into files that would have the proper headers, I replaced these specific lines in each file with the tag # $Id$ #.

I added several files to the scripts, but for purposes of documentation I'll show how I added one -- sguild_start.sh. I had to connect via SSH to do this.

$ export CVS_RSH=ssh
$ cvs -d:ext:user@taosecurity.cvs.sf.net:/cvsroot/taosecurity
add sguild_start.sh
user@taosecurity.cvs.sf.net's password:
cvs add: scheduling file `sguild_start.sh' for addition
cvs add: use 'cvs commit' to add this file permanently

$ cvs -d:ext:user@taosecurity.cvs.sf.net:/cvsroot/taosecurity
commit sguild_start.sh
user@taosecurity.cvs.sf.net's password:
RCS file: /cvsroot/taosecurity/taosecurity_sguil_scripts/sguild_start.sh,v
done
Checking in sguild_start.sh;
/cvsroot/taosecurity/taosecurity_sguil_scripts/sguild_start.sh,v <-- sguild_start.sh
initial revision: 1.1
done

I think I could have set a CVSROOT variable instead of specifying everything on the command line, perhaps like:

$ export CVSROOT=:ext:user@taosecurity.cvs.sf.net:/cvsroot/taosecurity

Setting that I could ignore the entire -d switch.

When I add or commit files I could add a -m "Comment" line to describe the change.

Currently my scripts assume installation using FreeBSD 6.2, using the packages in the packages-6.2-release directory. The only exception is the package for tcltls because it was not shipped with 6.2.

0 komentar:

Posting Komentar