CVS is now managed via the scmcvs plugin which is included in the plugins/
directory in the tarball downloaded from gforge.org. Most of the files in scmcvs are intended for auto-installation on Debian systems and do not apply to the majority of users. The scmcvs plugin is activated by default in the gforge.sql
database and all that you have to do is copy the plugins/scmcvs/etc/*
directories to /etc/gforge
directory and possibly modify the files slightly.
Cronjobs for CVS are included in cronjobs/crontab.in
, but are commented out by default for your security. The CVS cronjobs are in
and consist of:/var/www/gforge
/cronjobs/cvs-cron
usergroup.php
creates user and groups in /etc/passwd
, /etc/shadow
, and /etc/group
.
cvs.php
creates repositories.
ssh_create.php
copies SSH keys to user directories.
history_parse.php
collects statistics.
There are other cronjobs that can be activated too:
plugins/scmcvs/cronjobs/tarballs.php
creates tarballs
plugins/scmcvs/bin/snapshots.sh
creates tarballs. CVSROOT
and SCMSNAPSHOTSDIR
variables are hard-coded in the script, so you'll have to edit the script if necessary.
Make sure these files are executed as root, and have proper execution bits set. Each of these cronjobs has configuration parameters which you may have to edit manually for your specific system. Here is a list of CVS cronjobs:
If you are using CVS 1.12, replace syncmail
with updated version.
#cd
#/var/www/gforge
cp plugins/scmcvs/bin/syncmail-cvs-1.12 cronjobs/cvs-cron/syncmail
Replace %1{sVv}
in
with /var/www/gforge
/cronjobs/cvs-cron/cvs.php%p %{sVv}
. Search for LockDir=
in cronjobs/cvs-cron/cvscreate.sh
and add the following line after it:
echo "UseNewInfoFmtStrings=yes" >> $repositorypath/CVSROOT/config
This guide doesn't cover chrooted CVS repositories which are always recommended.
Create default location for CVS repositories ($cvsdir_prefix
in GForge configuration file):
# mkdir /cvsroot
Optional: Set up basic index.php file for CVS virtual host if desired. This guide has not further instructions on enabling CVS virtual host.
#mkdir
#/var/www/cvs
cp
/var/www/gforge
/cronjobs/cvs-cron/www/*/var/www/cvs
Copy the scmcvs plugin config to /etc/gforge
:
# cp -R /var/www/gforge
/plugins/scmcvs/etc/* /etc/gforge
Make sure the cvs crons are executable:
#cd
#/var/www/gforge
/cronjobs/cvs-cron/chmod 755 *.php *.sh
Copy CVS restricted shell:
# cp /var/www/gforge
/cronjobs/cvs-cron/cvssh.pl /bin
Edit GForge Config File /etc/gforge/local.inc
and change $sys_path_to_scmweb
to be
./var/www/gforge
/plugins/scmcvs/cgi-bin
You may have to edit /etc/gforge/plugins/scmcvs/cvsweb.conf
to change the cvsroot location:
'gforge' => ['GForge-CVS', '/cvsroot/
'],
Install the following non-core Perl modules:
IPC::Run
URI::Escape
You may want to user CVS pserver. First, assure that cvspserver service is defined in /etc/services
. It will look like this:
cvspserver 2401/tcp cvspserver 2401/udp
Add entry for pserver in /etc/inetd.conf
:
cvspserver stream tcp nowait root
/var/www/gforge
/plugins/scmcvs/bin/cvs-pserver cvs-pserver
Make sure that the wrapper script is executable:
# chmod +x /var/www/gforge
/plugins/scmcvs/bin/cvs-pserver
The used wrapper script
assumes that CVS repositories are in chroot environment and you may want to edit the script and change /var/www/gforge
/plugins/scmcvs/bin/cvs-pserverCHROOTDIR
and CVSROOT
variables.
CVS pserver has long history of vulnerabilities and its use is highly discouraged.