$Id: README,v 1.4 2000/06/26 18:05:14 flip Exp $
Note: This README is obsolete. The most recent information is
in manual.html
This is the README for cvsd 0.8b2
cvsd is a wrapper program for cvs in pserver mode. it will run 'cvs pserver' under a special uid/gid. You can have many CVSROOT's with different users.
The original work (cvsd-0.6) is by cblack@monkey.com, http://cblack.mokey.com/cvsd/
Then I took over the work. 0.7 was by me but it was bad code. So here is 0.8b1 which is almost completely rewritten and differs from the original cvsd.
See the `installation instructions` for setting up cvsd. cvsd checks for permessions on some files. so read `file permissions' for more details on that subject.
Philippe Kehl <phkehl@gmx.net>,
http://guv.ethz.ch/~flip/cvsd/,
http://sourceforge.net/projects/cvsd/
You should also find this pages in the web subdirectory. There are some links to similar programs and other stuff like that.
1. INSTALLATION INSTRUCTIONS
[For those who don't want to believe, here are the quick installation instructions: make group && make user && make cvsd && make install, then follow instructions on screen. Voilà.]
I think you`ll be fine with a GNUish system to run the installation script (actually the Makefile) succesfully. Please report me any trouble.
You can edit the Makefile to change the default values, but I suggest, that you use the defaults if possible. It should also work with other uid/gid or home, but i didn't try :-)
- create the cvs user and group...
Now create the cvsd group and user. `make group' and `make user' should do the job for you:
make group
make user
The system log file (/var/log/secure on RedHat Linux) should say something like this:
groupadd: new group: name=cvsowner, gid=240 useradd: new user: name=cvsowner, uid=2401, gid=2401, home=/home/cvsowner, shell=/bin/false
Otherwise you may check /etc/passwd and /etc/group for this.
If it fails try to edit the values for USERADD_CMD and GROUPADD_CMD in the Makefile. The Makefile automatically checks for this tools in the path, then in /sbin an also in /usr/sbin. You can specify the full path if you have them in some strange location.
- compile the cvsd binary
make cvsd
Please report me any trouble you get here. Thanks.
- install the files
Now we have to install the the other stuff needed. As cvsd is going to execute `cvs pserver' in a chroot`d environement (/home/cvsowner/cvsd-root by default) we have to put the cvs binary and all needed libraries there. then an example repository is installed (so cvs needs to be in the path!)
[Note: If you plan to run stuff like the scripts from the contrib/ subdir
in cvs, then you have to have all necessary binaries, libraries etc. etc.
in /home/cvsowner/cvsd-root !!!!!!!!! So, if you want to have `cvs commit'
log messages sent to you by mail, then you need perl, mail and just
everything that script uses. Perhaps you can:
rpm -ivh --prefix=/home/cvsowner/cvsd-root
or:
configure --prefix=/home/cvsowner/cvsd-root && make install]
make install
if this worked, you get more instructions on the screen about changing the entries in /etc/services and /etc/inetd.conf and restarting inetd.
2. CHECK IF EVERYTHING WORKS
su to some user and issue the following command:
telnet localhost 2401
then you shuld be able to press the enter key and get something like this:
cvs [pserver aborted]: bad auth protocol start:
Connection closed by foreign host.
in the logfile (usually /var/log/messages) you should see:
Jun 24 19:48:07 rudeboy cvsd[3501]: Connection made. Jun 24 19:48:07 rudeboy inetd[3491]: pid 3501: exit status 1
This means that `cvs pserver' was invoked correctly.
If it didn't work: look at the logfile what went wrong. if it doesn't tell, then add the flag --verbose to cvsd in /etc/inetd.conf. restart inetd. try again and look now at the logfile.
hint: you can monitor the logfile with `tail -f /var/log/messages &'
hint: you can also invoke cvsd directly: `/usr/local/sbin/cvsd --root /home/cvsowner/cvsd-root --uid 2401 --gid 2401 --config /etc/cvsd.conf --verbose'
- see if we can access :pserver:localhost: with cvs
an example CVSROOT has been supplied. it's name is /example, and it has one user (example, password example).
so su to some user and do:
cvs -d :pserver:example@localhost:/example login
This should prompt for password and give no error. The logfile should say:
Jun 24 21:08:30 rudeboy inet: inetd startup succeeded Jun 24 21:08:34 rudeboy cvsd[6408]: Connection made.
now try to import something...
cvs -d :pserver:example@localhost:/example import ...
there's also a read-only user (cvsread, password cvsread) try to checkout the previously imported thing.
cvs -d :pserver:cvsread@localhost:/example login
cvs -d :pserver:cvsread@localhost:/example checkout ...
Now you are ready to move your existing CVSROOT's to the cvsd-root
3. SETTING UP CVSROOTS
- existing repositories
You can copy existing CVSROOT's to the new location or you can set up new ones.
Assume that you already have a CVSROOT in /home/flip/daten/flipCVSroot which you want to access as :pserver:flip@localhost:/flip then do (as root):
Copy the CVSROOT to ist new location and change the ownership and the permissions...
cp -Rv /home/flip/daten/flipCVSroot /home/cvsowner/cvsd-root find /home/cvsowner/cvsd-root/flip -exec chown -v 2401.2401 {} \; find /home/cvsowner/cvsd-root/flip -type f -exec chmod -v 640 {} \; find /home/cvsowner/cvsd-root/flip -type d -exec chmod -v 730 {} \;
Add the location to /etc/cvsd.conf...
echo -e "repository /flip\n" >> /etc/cvsd.conf (or use emacs or so)
And create the necessary passwd entry (as cvsowner)...
su - cvsowner
~/cvsd-root/bin/makepasswd flip flipspassword
copy the passwd line into ~/cvsd-root/flip/CVSROOT/passwd
if you want read-only users, create the entry in CVSROOT/passwd and list this user in CVSROOT/readers. See the cvs documentation and the example in example/CVSROOT
note that these two files need also to be of the aboe ownership and permissions
exit
Voilà.
note: you should not list any user in /etc/passwd unless you want an admin for all repositories. if so add the following entry to /etc/passwd (of course /home/cvsowner/cvsd-root/etc/passwd, not the system's passwd file !!!)
cvsadmin:scrambled_password:2401:2401:::
Check out if it worked...
Login as any user but root, and try:
cvs -d :pserver:flip@localhost:/flip login
this should prompt for a password. if it worked checkout something:
cvs -d :pserver:flip@localhost:/flip checkout projekte/something
- new CVSROOTS
as root:
cvs -d /home/cvsowner/cvsd-root/newrepos init
then do the same as above (list in /etc/cvsd.conf, change permissions, make passwd and readers file)
- there`s a script (/bin/correct-permissions) which sets the ownership and permissions correctly
4. TROUBLESHOOTING
Try to telnet to find out if something's wrong:
telnet localhost 2401
Perhaps this will help.
On my system i didn't have all necessary libraries (those listed in `ldd cvsd` were not all. Everything worked but i always got access denied (user: no such user..). Try to find out which libs are mising or just cp everything from /lib to /home/cvsowner/cvsd-root/lib
If everything fails, first check if you have the null-device in /home/cvsowner/cvsd-root/dev
The last one I know is: change the entry in /etc/inetd.conf to:
cvspserver stream tcp nowait root /usr/sbin/tcpd /usr/bin/strace -o /root/cvsd-trace.log /usr/local/sbin/cvsd --root ... --uid ... --gid ... --config ... --verbose
run a 'cvs :pserver:user@localhost:/cvsroot checkout something' and then look at logfile in /root/cvsd-trace.log
5. TODO
- a tool which sets up cvsroots, users and so on. maybe web interface?
- fulfill user's wishes :-)
