KellyKeeton dot Com v3.0 reverse engineering life

13May/080

a windows CVS ‘how-to’

I recently was working with some shared code and didnt like the regulations or the publicity of SourceFourge, so I set up a home CVS server to distro the code. Like another individual I googled out and found a bunch of documentation from linux users, no offence but I dont have time to read 30 pages to edit a password file. so I duplicated notes from here -http://www.adp-gmbh.ch/blog/2004/november/3.html- in case its ever removed and added my own commentary and edited some things for the new version of cvsnt.

Wih the server I also just checked out TortoiseCVS (formallyI used wincvs) I dont like how much its lockedinto explorer but its so easy that I dumped wincvs and only use the turtle.

Installation

The installation turns out to be quite straight forward. Starting the installer takescare of the entire installation.
The default installation installs two windowsservices: the cvsnt service (named CVSNT) and the cvsnt lock (namedCVSNT Locking Service) service. Additionally, it also installs a default certificate.
The cvs.exe was installed into C:\Program Files\cvsnt. Installalso adds to your path statment.

Creating a repository

A repository needsa root directory under which both the files under version control and auxiliary filesfor use by CVS server are stored. I created this directory manually:
C:> mkdir c:\CVSSERVER
However, this is not a CVS repository by itself; the CVS server needs to be told touse this directory as a repository. The CVS server (or service, respectively) is administeredthrough a service control panel that can be invoked in the dos prompt likeso: (or via start menu)
C:\> cvsnt.cpl 
Now, with cvsnt.cpl, one can go to the Repositories tab and add the created repository.I chose /test for the name of the repository.

A dialog informed me: C:/CVSSERVER, but is not a valid CVS repository.
Do you want to initialise it?

And yes, of course, that's what I wanted.
Then I pressed apply.
The initialization basically created a CVSROOT directory beneath c:\CVSSERVERand put some 55 files and yet another directory into CVSROOT.

Adding a user

After creating the repository, I needed to create a user that can access (that isstore and retrieve files) the repository.
C:\>cvs -d:sspi:localhost:/test passwd -asome_user
Adding user some_user@localhost
New password: ******
Verify password: ******
cvs server: *WARNING* CVS user 'some_user' will not be able to log in until they arealiased to a valid system user.
The password that I have specified (and is hidden in the console) was password.
This command created \CVSSERVER\CVSROOT\passwd with the following content:
some_user:AuC4s3kI8ixcs
Now, some_user needs to be aliased (according to the warning returned by cvs) to avalid NT system user:
C:\>cvs -d:sspi:localhost:/test passwd -r SYSTEM\administrator some_user
Changing repository password for some_user@localhost
New password: ******
Verify password: ******
Although this seems a bit redundant, it looks like one has to give the password again.This is the password for the CVS user not the system account. The SYSTEM\administratoris the NT-FQ name of the local admin in this example.

Creating a module

Now, it was time to create a module which I named test_module:
C:\CVSSERVER\>mkdir test_module
C:\CVSSERVER\>cd test_module
For the beginning, I only stored one file, README.txt, into this module. (one fileis required to start the module)
C:\CVSSERVER\test_module\>notepad README.txt
Here's the content of README.txt:
test_module
===========
This is some dummy text.
C:\CVSSERVER\test_module\>cvs -d:pserver:some_user:password@localhost:/test import TestModuleno-vendor initial-release
I didn't specify the -m flag, so CVS opened the default editor likely notepad (asthe environment variable CVSEDITOR is not set) to enter a message. 
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: ----------------------------------------------------------------------

just say C for continue
.. and CVS answered with:
N tm/README.txt

No conflicts created by this import
The N obviously indicates that tm/README.txt is a new file.
Now, let's see what happened in C:\CVSSERVER>.
C:\CVSSERVER\test_module\>cd \..

C:\CVSSERVER>dir
Directory of C:\CVSSERVER
02.11.2004 23:35 <DIR> .
02.11.2004 23:35 <DIR> ..
02.11.2004 15:53 <DIR> CVSROOT
02.11.2004 23:35 <DIR> TestModule
Indeed, it added a new directory called TestModule What's in there?
C:\CVSSERVER\test_module\tm>dir
Directory of C:\test_repository\tm

02.11.2004 23:35 <DIR> .
02.11.2004 23:35 <DIR> ..
02.11.2004 23:35 <DIR> CVS
02.11.2004 23:35 506 README.txt,v
It contains a CVS directory (again, used for CVS use) and the README.txt (with a ,vsuffix)
Now, the repository is ready to be used.

so in the end to connect
cvs -d:pserver:some_user:password@localhost:/test /TestModule

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No trackbacks yet.