DaqSvn: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
m (21 revisions imported)
 
(10 intermediate revisions by 2 users not shown)
Line 7: Line 7:
== Useful links ==
== Useful links ==


TBW
* viewvc: https://ladd00.triumf.ca/viewvc/ (user svn, password svn)
 
== Newer versions of SVN ==
 
SL6 comes with svn 1.6 which is very old. Newer versions of SVN are available on daqshare:
 
* svn 1.7.22 (matches CentOS7) - /daq/daqshare/olchansk/subversion/1.7.22/bin/svn
* svn 1.8.14 (matches Ubuntu 15.x) - /daq/daqshare/olchansk/subversion/1.8.14/bin/svn


== User instructions ==
== User instructions ==
Line 14: Line 21:


For initial checkout, use username "svn", password "svn". For writing to the repository, the "svn commit" command  will prompt for your username and password.
For initial checkout, use username "svn", password "svn". For writing to the repository, the "svn commit" command  will prompt for your username and password.
* svn checkout https://ladd00.triumf.ca/svn/daqsvn/trunk/vme


=== Setup the svn config file ===
=== Setup the svn config file ===
Line 21: Line 29:
=== Switch repository from svn: to https: ===
=== Switch repository from svn: to https: ===


TBW
* svn switch --relocate svn://ladd00.triumf.ca/rootana https://ladd00.triumf.ca/svn/rootana
 
=== Make PDF files show as PDF files in viewvc ===
 
* svn propset svn:mime-type application/pdf *.pdf


=== Convert CVS repository to SVN ===
=== Convert CVS repository to SVN ===


TBW
* tar xvf dragoncvs.tgz
* svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
* svnadmin create dragonsvn
* ./cvs2svn-trunk/cvs2svn --existing-svnrepos --fallback-encoding utf_8 -s ./dragonsvn ./dragoncvs/cvsroot
* become root@ladd00
* cd /home/daqweb/svn
* mv ~olchansk/daq/dragon/cvs/dragonsvn dragon
* chown -R daqweb.mirror dragon
* chmod -R g+w dragon
* htpasswd  ./dav_passwd dragon (add user dragon, set password)
* xemacs -nw /etc/viewvc/viewvc.conf (add dragon)
* xemacs -nw dav_accessfile (add group dragon, add access section for dragon)


== SVN administration ==
== SVN administration ==
Line 45: Line 68:
       <li>chmod a-r,u+r passwd</li>
       <li>chmod a-r,u+r passwd</li>
       <li>repository is now ready for use.</li></ul>
       <li>repository is now ready for use.</li></ul>
=== Enable https: access ===
=== Enable https: access, add new SVN users ===


* login as root@ladd00
* login as root@ladd00
Line 52: Line 75:
* add new users to dav_passwd using the htpasswd utility: htpasswd dav_passwd username (will prompt for password)
* add new users to dav_passwd using the htpasswd utility: htpasswd dav_passwd username (will prompt for password)
* file dav_group is not used
* file dav_group is not used
To add a new user to an existing repository and existing group, simply do
<pre>
htpasswd dav_passwd <newusername>
then edit dav_accessfile to add new user to existing group.
</pre>


=== Convert plain directory to SVN ===
=== Convert plain directory to SVN ===

Latest revision as of 09:32, 2 February 2022

General information

The TRIUMF DAQ group is hosting SVN repositories for itself and other TRIUMF users and experiments on ladd00.triumf.ca, the main daq server machine. The SVN repositories are stored on a mirrored disk configuration and are backed up to the TRIUMF AMANDA backup storage system.

Access to the SVN repository is provided using Viewvc (web viewer), svn: access method (being phased out) and https: access methods.

Useful links

Newer versions of SVN

SL6 comes with svn 1.6 which is very old. Newer versions of SVN are available on daqshare:

  • svn 1.7.22 (matches CentOS7) - /daq/daqshare/olchansk/subversion/1.7.22/bin/svn
  • svn 1.8.14 (matches Ubuntu 15.x) - /daq/daqshare/olchansk/subversion/1.8.14/bin/svn

User instructions

Checkout from repository

For initial checkout, use username "svn", password "svn". For writing to the repository, the "svn commit" command will prompt for your username and password.

Setup the svn config file

TBW

Switch repository from svn: to https:

Make PDF files show as PDF files in viewvc

  • svn propset svn:mime-type application/pdf *.pdf

Convert CVS repository to SVN

  • tar xvf dragoncvs.tgz
  • svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
  • svnadmin create dragonsvn
  • ./cvs2svn-trunk/cvs2svn --existing-svnrepos --fallback-encoding utf_8 -s ./dragonsvn ./dragoncvs/cvsroot
  • become root@ladd00
  • cd /home/daqweb/svn
  • mv ~olchansk/daq/dragon/cvs/dragonsvn dragon
  • chown -R daqweb.mirror dragon
  • chmod -R g+w dragon
  • htpasswd ./dav_passwd dragon (add user dragon, set password)
  • xemacs -nw /etc/viewvc/viewvc.conf (add dragon)
  • xemacs -nw dav_accessfile (add group dragon, add access section for dragon)

SVN administration

Create an SVN repository called "vf48"

  • login as root@ladd00
  • cd /home/daqweb/svn
  • svnadmin create vf48
  • edit /etc/viewvc/viewcvs.conf, in "svn_roots", add "vf48: /home/daqweb/svn/vf48," (notice the trailing comma!), go to "http://ladd00.triumf.ca/viewcvs", you should see the "vf48" repository, it should be empty.
  • chown -R daqweb.mirror vf48
  • chmod -R u+wr,g+wr vf48

Enable svn: access (DO NOT DO THIS)

  • cd vf48/conf
  • edit "passwd", add users and their passwords (swear at the svn authors: passwords are entered in clear text)
  • edit "svnserve.conf", uncomment "[general]", "anon-access = read" and "passwd-db = passwd". Uncomment the line "realm = " and make it read "realm = VF48 SVN repository"
  • chmod a-r,u+r passwd
  • repository is now ready for use.

Enable https: access, add new SVN users

  • login as root@ladd00
  • cd /home/daqweb/svn
  • add new repository to dav_accessfile: create new groups and usernames as needed. User "svn" (password "svn") should have read-only access
  • add new users to dav_passwd using the htpasswd utility: htpasswd dav_passwd username (will prompt for password)
  • file dav_group is not used

To add a new user to an existing repository and existing group, simply do

htpasswd dav_passwd <newusername>
then edit dav_accessfile to add new user to existing group.

Convert plain directory to SVN

Import stuff into the "trunk"

Import VF48 firmware into the "vendor" branch