Trac

From Triangle Wiki

Jump to: navigation, search

Contents

Introduction

Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Our mission; to help developers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies.

It provides an interface to Subversion, an integrated Wiki and convenient report facilities.

Trac allows wiki markup in issue descriptions and commit messages, creating links and seamless references between bugs, tasks, change sets, files and wiki pages. A time line shows all project events in order, making getting an overview of the project and tracking progress very easy.

Installation

For docs on installing the Trac application please check out the following:

Below is a bash script for creating SVN repositories and Trac environments very quickly. Use at your own risk, it contains elements that are specific to my environment.

  1. clear
  2. echo "Create and Configure SVN"
  3.  
  4. setup_name=PROJECT
  5.  
  6. rm -rf /opt/trac/$setup_name
  7. rm -rf /opt/svn/$setup_name
  8. rm -rf /opt/svn/template
  9.  
  10. mkdir /opt/svn/template
  11. mkdir /opt/svn/template/$setup_name
  12. mkdir /opt/svn/template/$setup_name/trunk
  13. mkdir /opt/svn/template/$setup_name/tags
  14. mkdir /opt/svn/template/$setup_name/branches
  15.  
  16. mkdir /opt/svn/$setup_name
  17. svnadmin create --fs-type fsfs /opt/svn/$setup_name
  18.  
  19. svn import -m "Initial import" /opt/svn/template/$setup_name file:///\opt/svn/$setup_name
  20.  
  21. rm -rf /opt/svn/template
  22. cp /opt/svn/ALREADY_SETUP/conf/svnserve.conf /opt/svn/$setup_name/conf/svnserve.conf
  23. echo "Create and Configure Trac"
  24.  
  25. trac-admin /opt/trac/$setup_name initenv
  26.  
  27. chmod -R 0775 /opt/trac/$setup_name/db
  28. chown -R wwwrun /opt/trac/$setup_name/db
  29.  
  30. trac-admin /opt/trac/$setup_name permission remove anonymous '*'
  31. trac-admin /opt/trac/$setup_name permission remove ADMIN_USER '*'
  32. trac-admin /opt/trac/$setup_name permission remove authenticated '*'
  33. trac-admin /opt/trac/$setup_name permission add ADMIN_USER TRAC_ADMIN
  34. trac-admin /opt/trac/$setup_name permission add anonymous WIKI_VIEW
  35. trac-admin /opt/trac/$setup_name permission add authenticated ROADMAP_VIEW WIKI_MODIFY
  36. trac-admin /opt/trac/$setup_name permission add authenticated TICKET_VIEW TICKET_CREATE
  37. trac-admin /opt/trac/$setup_name permission add authenticated REPORT_VIEW MILESTONE_VIEW

Trac Admin

  • Usage: trac-admin /path/to/projenv [command [subcommand] [option ...]]
  • Invoking trac-admin /path/to/projenv without any command starts the interactive mode.
  • trac-admin about -- Shows information about trac-admin
  • trac-admin help -- Show documentation
  • trac-admin initenv -- Create and initialize a new environment interactively
    • trac-admin /opt/trac/PATH initenv

Trac Authentication

Firstly we need to add users to the HTTP access, as this is handled through Apache the new user for the project needs to be added to the Auth File. Utilising HTPasswd to create the file and subsequent user accounts.

For first user the -c switch creates the file subsequent users do not need this

  • htpasswd -cs /path/to/project/.auth-file username

Trac Permissions

On set up I instantly remove all anonymous access with trac-admin /opt/trac/PATH permission remove anonymous '*' this takes away all permissions for anonymous users.

  • permission list [user] -- List permission rules
  • permission add <user> <action> [action] [...] -- Add a new permission rule
  • permission remove <user> <action> [action] [...] -- Remove permission rule
  • permission add username TRAC_ADMIN

External Links

Personal tools