Not logged in - Log In / Register

Revision 2 as of 2008-08-20 08:29:49

Clear message

Installing the Launchpad plugin for Trac


Before installing the Launchpad plugin for Trac, you need to have the following:

Getting the plugin

You can download the plugin from it's Launchpad project page.

Patching Trac 0.10

If you're using Trac 0.10 you need to apply the patches provided in the 0.10-patches directory of the trac-launchpad tarball to your current Trac installation:

$ cd /path/to/trac; patch -p1 < /path/to/trac-launchpad/0.10-patches/*

Systemwide Installation

To install the plugin, unpack the tarball to /tmp and run python setup.py install within the unpacked directory:

$ cd /tmp
$ tar zxvf /path/to/trac-launchpad-0.1.2.tgz
$ cd trac-launchpad
$ sudo python setup.py install

Activating the plugin

To activate the plugin in a specific Trac instance, edit $TRAC_ENV/conf/trac.ini and add the following lines:

# for 0.10
tracrpc.* = enabled
tracext.launchpad.* = enabled

launchpad_bug = text
launchpad_bug.label = Launchpad Bug

You must then grant the special 'launchpad' user permission to access the XML-RPC interface, by executing:

$ trac-admin $TRAC_ENV permission add launchpad XML_RPC
$ trac-admin $TRAC_ENV permission add launchpad LAUNCHPAD_RPC

After restarting your webserver, launchpad should be able to sync bugs. In order to verify whether the plugin was enabled correctly, you can always log in with TRAC_ADMIN privileges and then visit $YOUR_TRAC_URL/plugins if you have version 0.11.

Getting Launchpad to work with your bugtracker

Once the plugin is installed and working you need to register your bugtracker with Launchpad if it isn't already registered. This is really simple to do:

  1. Go to http://launchpad.net/bugs/bugtrackers

  2. Check to see if your bugtracker is registered. If it isn't, click the "Register another bugtracker" link at the bottom of the page.
  3. Enter your bugtracker's details and click the "Add" button.
  4. Your bug tracker should now show up in the list of registered bugtrackers (http://launchpad.net/bugs/bugtrackers).

  5. If there are bugs in Launchpad that can be linked to your bug tracker, link them!
  6. If there aren't any bugs in Launchpad you can go to http://staging.launchpad.net and file some test bugs which you can then link to your bugtracker. Remember that staging's database is reset every day, so don't forget to email the Launchpad team at feedback@launchpad.net and let them know that you've filed some bugs for testing. They can then run the bug watch checker against your bug tracker.
    Note: You may have to wait a day or so for your bugtracker to show up on staging. Alternatively, you can set it up manually by following steps 1-4 but substitute http://staging.launchpad.net for http://launchpad.net where appropriate.


To set up a test tokenserver, edit the environment's trac.ini as follows:

auth_server = http://localhost:8081/tokens/%s/+bugtracker-handshake

Find simple_tokenserver.py in the tarball and run as follows:

$ python simple_tokenserver.py +

The plus gives the default policy, which allows all requested tokens to match.

Now visit $TRAC_URL/launchpad-auth/abc in your browser, and you should get an "OK" along with a cookie. Now visit $TRAC_URL/xmlrpc and you should get a listing of XML-RPC endpoints. If you get a listing but launchpad is not in it, check the permissions for the launchpad user.