This page should get you up and running with your own branch of lp:errors, the code that powers the web view of the Ubuntu Error Tracker,

Setting up Postgres for caching OAuth credentials


Creating OAuth tokens for use with Launchpad

curl --dump-header - -H "Content-Type: application/x-www-form-urlencoded" -X POST --data 'oauth_consumer_key=testing&oauth_signature_method=PLAINTEXT&oauth_signature=%26'

That will return something like:


Then authorize it:

Then accept it:

curl --dump-header - -H "Content-Type: application/x-www-form-urlencoded" -X POST --data 'oauth_consumer_key=testing&oauth_token=OAuthTokenHex&oauth_signature_method=PLAINTEXT&oauth_signature=%26OAuthTokenSecretHex'

Which returns:


Then put the values for oauth_token ('NewOAuthTokenHex') and oauth_token_secret ('NewOAuthTokenSecretHex') in (as lp_oauth_token and lp_oauth_secret) in your branch of lp:daisy you create in the steps below.

Setting up your environment

This assumes that you keep your bzr branches in ~/bzr. Adapt to suit your needs.

Create a branch of daisy for its configuration: bzr branch lp:daisy ~/bzr/daisy. Copy ~/bzr/daisy/ to ~/bzr/daisy/ Put the values you obtained for oauth_token and oauth_token_secret in the steps above. Put in the values for the postgres database you created in the steps above.

Create ~/bzr/errors.your-branch-name/. Then run bzr branch lp:errors ~/bzr/errors.your-branch-name/errors.

Next, copy the sample configuration in place: sudo cp ~/bzr/errors.your-branch-name/errors/000-default /etc/apache2/sites-enabled/000-default. Modify this to point at your branch:

<VirtualHost *:80>
     DocumentRoot /home/you/bzr/errors.your-branch-name/errors
    WSGIDaemonProcess localhost python-path=/home/you/bzr/errors.your-branch-name:/home/you/bzr
    WSGIProcessGroup localhost
    WSGIScriptAlias / /home/you/bzr/errors.your-branch-name/errors/
    Alias /static /home/you/bzr/errors.your-branch-name/errors/static
    Alias /oops-local /home/you/bzr/errors.your-branch-name/errors/oops-local
        ServerAdmin webmaster@localhost

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined


Restart Apache: sudo /etc/init.d/apache2 restart


Bug creation

Thanks to our CSRF protection this should now return Unauthorized.

curl --dump-header - -H "Content-Type: application/json" -X POST --data '{"signature": "/usr/lib/unity-scope-video-remote/unity-scope-video-remote:GError:<module>:main:function"}' http://localhost/api/1.0/create-bug-report/

ErrorTracker/Contributing/Errors (last edited 2012-09-11 20:08:50 by brian-murray)