Creating a new SVN repo and adding it to trac
We are managing the code for the VERA project using the combination of Subversion (svn) and trac. This post contains the instructions for how to add a new repo on the VERA server.
In tis example we are adding a new repo called ‘portlets’.
# sudo su
# cd /tmp/
# svnadmin create --fs-type fsfs /var/svn-repos/portlets
# chown -R www-data:subversion /var/svn-repos/portlets/
# chmod -R 770 /var/svn-repos/portlets/
# mkdir tmpsvn && cd tmpsvn
# mkdir branches tags trunk
# svn import https://vera.rdg.ac.uk/tools/svn/portlets
# trac-admin /var/trac/portlets initenv
# chown -R www-data:subversion /var/trac/portlets/db/
# chmod -R 770 /var/trac/portlets/db/
There are three parts to this process. Create a new svn repo. Create and import the basic directory structure we use with an svn repo (trunk, tags and branches). Finally we initialize trac for the new repo.
Unless you want to use the defaults you should set some permissions for trac. The svn directory is already password protected.
# trac-admin /var/trac/portlets/ permission remove anonymous CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW BROWSER_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_CREATE TICKET_MODIFY TICKET_VIEW TIMELINE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_VIEW
# trac-admin /var/trac/portlets/ permission add anonymous WIKI_VIEW
# trac-admin /var/trac/portlets/ permission add developer CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW BROWSER_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_CREATE TICKET_MODIFY TICKET_VIEW TIMELINE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_VIEW
# trac-admin /var/trac/portlets/ permission add mjeg developer
(For some reason the trac * wild card doesn't work for me, hence the expansions).