CVS server su linux

Finalmente, dopo giri giri e giri son riuscito ad installare CVSsul mio server virtuale con Linux Fedora: per chi è interessto, ecco qui le cose da fare…
Per prima cosa, verificare che sia installato il CVS:

rpm -q cvs
cvs-1.11.17-2

loggandosi come root creiamo il file /etc/xinetd.d/cvspserver con questo contenuto:

# default: off
# description: cvspserver

service cvspserver
{
id          = cvspserver
socket_type = stream
protocol    = tcp
user        = root
wait        = no
disable     = no
server      = /usr/bin/cvs
Port        = 2401
passenv     =
server_args = --allow-root=/home/cvsroot -f pserver
env         = HOME=/home/cvsroot
log         = /var/log/cvslog
}


dopdichè eseguire questi comandi:

export CVSROOT=/home/cvsroot
useradd -M cvsuser            # create user cvsuser without creating home dir
groupadd cvsadmin
mkdir $CVSROOT
chmod -R 775 $CVSROOT
chgrp -R cvsadmin $CVSROOT
touch $CVSROOT/locks
cvs init                      # creates $CVSROOT/CVSROOT
cd /root
cvs checkout CVSROOT

modificare il file /root/CVSROOT/config così:

# Set this to "no" if pserver shouldn't check system users/passwords
SystemAuth=no

# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
# level of the new working directory when using the `cvs checkout'
# command.
TopLevelAdmin=yes

fare il commit:

cd
cvs commit CVSROOT/config

a questo punto dobbiam creare l’utente/i che necessitano di utilizzare il progetto cvs… bisogna fare 2 passaggi: il primo creare l’utente di linux così:

adduser user_test -g cvsadmin
passwd user_test
Changing password for user user_test.
New UNIX password:
Retype new UNIX password:

a questo punto dobbiam settare l’utente user_test come gestore del progetto cvs:

htpasswd -d -c /home/cvsroot/passwd user_test

e inserire la stessa password dell’utente di linux (non ho provato con password diverse se funziona…
nel caso si volessero aggiungere altri utenti:

htpasswd -d /home/cvsroot/passwd user_number_2

aprire il file /home/cvsroot/passwd e aggiungere al fondo della password cifrata :cvsuser

user_test:WEOI$(@(@(#JD(:cvsuser

modificare il file /home/cvsroot/CVSROOT/cvswrappers

# This file affects handling of files based on their names.
#
# The -t/-f options allow one to treat directories of files
# as a single file, or to transform a file in other ways on
# its way in and out of CVS.
#
# The -m option specifies whether CVS attempts to merge files.
#
# The -k option specifies keyword expansion (e.g. -kb for binary).
#
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
#
# wildcard [option value][option value]...
#
# where option is one of
# -f from cvs filter value: path to filter
# -t to cvs filter value: path to filter
# -m update methodology value: MERGE or COPY
# -k expansion mode value: b, o, kkv, &c
#
# and value is a single-quote delimited value.
# For example:
#*.gif -k 'b'
*.gif -k 'b'
*.tga -k 'b'
*.bmp -k 'b'
*.psd -k 'b'
*.tif -k 'b'
*.png -k 'b'
*.iff -k 'b'
*.aiff -k 'b'
*.obj -k 'b'
*.dat -k 'b'
*.exe -k 'b'
*.com -k 'b'
*.dll -k 'b'
*.dsw -k 'b'
*.dsp -k 'b'
*.lwo -k 'b'
*.lws -k 'b'
*.p -k 'b'
*.ico -k 'b'
*.frx -k 'b'
*.class -k 'b'
*.jar -k 'b'
*.zip -k 'b'
*.lzh -k 'b'
*.lha -k 'b'
*.rar -k 'b'
*.arj -k 'b'
*.arc -k 'b'
*.avi -k 'b'
*.mov -k 'b'
*.asf -k 'b'
*.smk -k 'b'
*.jpg -k 'b'
*.mpg -k 'b'
*.swf -k 'b'
*.frx -k 'b'
*.fli -k 'b'
*.flc -k 'b'
*.tiff -k 'b'
*.bin -k 'b'
*.dat -k 'b'
*.wad -k 'b'
*.ppt -k 'b'
*.pdf -k 'b'
*.3ds -k 'b'
*.max -k 'b'

restartare xinetd

/etc/init.d/xinetd restart

e provare se funziona

export CVSROOT=:pserver:user_test@yourhostname:/home/cvsroot
cvs login

a questo punto dovrebbe funzionare…
una cosa che ho notato, se si crea una nuova sottocartella (quindi un nuovo progetto) sotto /home/cvsroot, è necessario risettare gli accessi così:

export CVSROOT=/home/cvsroot
chmod -R 775 $CVSROOT
chgrp -R cvsadmin $CVSROOT

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...