SCM Example Trac

From ArchWiki
Revision as of 03:13, 15 July 2007 by Aquila deus (Talk | contribs) (New page: Category:Development (English) Category:HOWTOs (English) The HOWTO teaches you to setup multi-project Trac/Subversion for a private and trusted environment (ex: a development team)...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The HOWTO teaches you to setup multi-project Trac/Subversion for a private and trusted environment (ex: a development team).

Basic Environment

Network

URL: http://scm.example.com
Subversion URL: http://scm.example.com/svn/PROJECT
Trac URL: http://scm.example.com/trac/PROJECT

Database

PostgreSQL, with trust authentiation method

Filesystem

Configuration files are in /mnt/rpo/conf
Subversion repositories is in /mnt/rpo/svn
Trac project files is in /mnt/rpo/trac

Preparation

Software Requirement

Install the following packages:

  • apache
  • mod_python
  • postgresql
  • pypgsql
  • setuptools
  • subversion
  • trac

Create the directories:

 mkdir -p /mnt/rpo/conf
 mkdir -p /mnt/rpo/svn
 mkdir -p /mnt/rpo/trac

Create User List

Create a new list and add initial user:

 htdigest -c /mnt/rpo/conf/scm-user scm FIRST_USER

To add other users:

 htdigest /mnt/rpo/conf/scm-user scm OTHER_USER

You can edit the scm-user file to remove or rename users

Create Database

Create trac database:

 psql -U postgres postgres
 postgres=# CREATE USER trac;
 postgres=# CREATE DATABASE trac OWNER = trac;
 postgres=# \q

Trac Setup

Disable connection pooling

Edit /usr/lib/python2.5/site-packages/trac/db/postgres_backend.py:

 class PostgreSQLConnection
   ......
   poolable = False   # Change this line

Install webadmin plugin

 svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin
 cd webadmin
 python setup.py bdist_egg
 easy_install dist/*.egg