Problem with cvs commit failed in cvs-freebsd setup [REVISED]

Jose Liang jliang at so-net.net.tw
Wed Mar 1 22:11:50 PST 2006


> Where is commitcheck?  Does that directory contain CFG.pm?

The commitcheck is in /home/cvs/cvsroot/CVSROOT, and there is CFG.pm too.

> They should be a part of your CVSROOT/ directory already.

> Have you followed the instructions of the article to set up all the
> CVSROOT/ files correctly?  I refer to:

> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/cvs-freebsd/

Well, I followed the article to set up everying, but cvs always complains:

Can't locate CVSROOT/cfg.pm in @INC (@INC contains: :local:/home/cvs/cvsroot
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach
/usr/libdata/perl/5.00503) at /home/cvs/cvsroot/CVSROOT/commitcheck line 13.
BEGIN failed--compilation aborted at /home/cvs/cvsroot/CVSROOT/commitcheck
line 13.
cvs commit: Pre-commit check failed
cvs [commit aborted]: correct above errors first!

The following is the detail I set up my cvs server and repository:

1. Add new user and group for cvs (both named cvs and uid/gid=2401), and add
my account to cvs group.

2. Initializing the repository
# cd /home/cvs
# mkdir cvsroot
# cvs -d /home/cvs/cvsroot init
# chown -R cvs:cvs cvsroot
# cd cvsroot
# chmod 775 CVSROOT

3. Setting up a CVS pserver
# vi /etc/inetd.conf
Uncomment and edit for:

cvspserver     stream  tcp     nowait  root    /usr/bin/cvs
   cvs --allow-root=/home/cvs/cvsroot pserver

# vi /etc/rc.conf
Add for:

inetd_enable="YES"
inetd_program="/usr/sbin/inetd"
inetd_flags="-wW"

4. Creat encrypted password for CVS pserver
# cd /home/cvs
# vi encrypt.pl
Add for:

#!/usr/bin/perl

srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);

print "${crypttext}\n";

# chown cvs:cvs encrypt.pl
# chmod 775 encrypt.pl
# ./encrypt.pl "my_password"

# vi /home/cvs/cvsroot/CVSROOT/passwd
Add for:
jose:CRYPTED_PASSWORD:cvs

5. Settings in .profile
$ vi ~/.profile
Add for:

export CVSEDITOR=vi
# To use pserver
export CVSROOT=:pserver:jose at localhost:/home/cvs/cvsroot
# local
# export CVSROOT=:local:/home/cvs/cvsroot

$ source ~/.profile

6. Checkout CVSROOT
$ mkdir ~/cvsroot
$ cd ~/cvsroot
$ cvs login
$ cvs checkout CVSROOT
$ cvs logout
$ cvs -d :pserver:anoncvs at anoncvs.jp.FreeBSD.org:/home/ncvs login
$ cvs -d :pserver:anoncvs at anoncvs.jp.FreeBSD.org:/home/ncvs checkout
CVSROOT-doc
$ cvs -d :pserver:anoncvs at anoncvs.jp.FreeBSD.org:/home/ncvs logout

7. Copying and customizing the scripts
$ cd CVSROOT
$ cp ../CVSROOT-doc/* ./
$ cvs add *
$ cvs rm -f access
Then I modified something followed
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/cvs-freebsd/
and the difference between CVSROOT and CVSROOT-doc is at
http://www.jose.idv.tw/CVSROOT.diff
$ mkdir commitlogs
$ cvs add commitlogs
$ cvs commit -m '- Initial FreeBSD scripts commit'
(this step was done)
$ cvs commit -f -m 'Forced commit to test the new CVSROOT scripts' avail
Can't locate CVSROOT/cfg.pm in @INC (@INC contains: :local:/home/cvs/cvsroot
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach
/usr/libdata/perl/5.00503) at /home/cvs/cvsroot/CVSROOT/commitcheck line 13.
BEGIN failed--compilation aborted at /home/cvs/cvsroot/CVSROOT/commitcheck
line 13.
cvs commit: Pre-commit check failed
cvs [commit aborted]: correct above errors first!

I have tried FreeBSD 4 , 5 and 6-STABLE, but I got the same result.
The perl version was the latest of ports tree by default, and I didn't
install any p5-*.

Well, it is a long states, what have I omitted ? Are there any wrong that I
do?

Thanks a lot!

Regards,

Jose Liang



More information about the freebsd-questions mailing list