Patchwork it's a widely used patch review system.
This How-To aims to give a basis to setup Patchwork with PostgreSQL as backend.
There are some aspects which can be improved that this how-to is not covering.
- Create an apk for patchwork with init script
- Describe how to setup Patchwork for one project
- Describe how to setup Patchwork with MariaDB
Initial package installation and setup PostgreSQL
Note: we are using py-django1.5 even if py-django (ver.1.7) is present in the repository. This is because Patchwork is not yet compatible with django 1.7.
Create a regular account called "pwuser":
Last two users are hardcoded in one of the next sql script. That's why you need to create it.
Patchwork Installation and Configuration
Login with "pwuser" and clone the patchwork's git repository:
Create a local_settings.py starting from settings.py:
Customize local_settings.py according with your need.
SECRET_KEY can be generated with the following python script:
import string, random chars = string.letters + string.digits + string.punctuation print repr("".join([random.choice(chars) for i in range(0,50)]))
Now, populate PostgreSQL with patchwork database.
At the end, the script will ask for patchwork's administrator username,email, and password.
Run another script for setting up the user's permissions:
Now you can run the server:
Point your browser to http://$PATCHWORKS_SERVER_ADDRESS:8000
Login with the username and password you set before.