@@ -15,6 +15,7 @@ in brackets):
1515 * A database server (postgresql, mysql)
1616 * relevant python modules for the database server (e.g: python-mysqldb)
1717
18+
18191. Database setup
1920
2021 At present, I've tested with PostgreSQL and (to a lesser extent) MySQL
@@ -89,69 +90,71 @@ in brackets):
8990 it, tests checking for the correct handling of non-ASCII characters
9091 fail.
9192
93+
92942. Django setup
9395
94- Set up some initial directories in the patchwork base directory:
96+ Set up some initial directories in the patchwork base directory:
9597
96- mkdir -p lib/packages lib/python
98+ mkdir -p lib/packages lib/python
9799
98- lib/packages is for stuff we'll download; lib/python is to add
99- to our python path. We'll symlink python modules into lib/python.
100+ lib/packages is for stuff we'll download; lib/python is to add
101+ to our python path. We'll symlink python modules into lib/python.
100102
101- At the time of release, patchwork depends on django version 1.5 or
102- later. Your distro probably provides this. If not, do a:
103+ At the time of release, patchwork depends on django version 1.5 or
104+ later. Your distro probably provides this. If not, do a:
103105
104- cd lib/packages
105- git clone https://github.com/django/django.git -b stable/1.5.x
106- cd ../python
107- ln -s ../packages/django/django ./django
106+ cd lib/packages
107+ git clone https://github.com/django/django.git -b stable/1.5.x
108+ cd ../python
109+ ln -s ../packages/django/django ./django
108110
109- The settings.py file contains default settings for patchwork, you'll
110- need to configure settings for your own setup.
111+ The settings.py file contains default settings for patchwork, you'll
112+ need to configure settings for your own setup.
111113
112- Rather than edit settings.py, create a file 'local_settings.py', and
113- override or add settings as necessary. You'll need to define the
114- following:
114+ Rather than edit settings.py, create a file 'local_settings.py', and
115+ override or add settings as necessary. You'll need to define the
116+ following:
115117
116- SECRET_KEY
117- ADMINS
118- TIME_ZONE
119- LANGUAGE_CODE
120- DEFAULT_FROM_EMAIL
121- NOTIFICATION_FROM_EMAIL
118+ SECRET_KEY
119+ ADMINS
120+ TIME_ZONE
121+ LANGUAGE_CODE
122+ DEFAULT_FROM_EMAIL
123+ NOTIFICATION_FROM_EMAIL
122124
123- You can generate the SECRET_KEY with the following python code:
125+ You can generate the SECRET_KEY with the following python code:
124126
125- import string, random
126- chars = string.letters + string.digits + string.punctuation
127- print repr("".join([random.choice(chars) for i in range(0,50)]))
127+ import string, random
128+ chars = string.letters + string.digits + string.punctuation
129+ print repr("".join([random.choice(chars) for i in range(0,50)]))
128130
129- If you wish to enable the XML-RPC interface, add the following to
130- your local_settings.py file:
131+ If you wish to enable the XML-RPC interface, add the following to
132+ your local_settings.py file:
131133
132- ENABLE_XMLRPC = True
134+ ENABLE_XMLRPC = True
133135
134- Then, get patchwork to create its tables in your configured database:
136+ Then, get patchwork to create its tables in your configured database:
135137
136- cd apps/
137- PYTHONPATH=../lib/python ./manage.py syncdb
138+ cd apps/
139+ PYTHONPATH=../lib/python ./manage.py syncdb
138140
139- And add privileges for your mail and web users. This is only needed if
140- you use the ident-based approach. If you use password-based database
141- authentication, you can skip this step.
141+ And add privileges for your mail and web users. This is only needed if
142+ you use the ident-based approach. If you use password-based database
143+ authentication, you can skip this step.
142144
143- Postgresql:
144- psql -f lib/sql/grant-all.postgres.sql patchwork
145+ Postgresql:
146+ psql -f lib/sql/grant-all.postgres.sql patchwork
145147
146- MySQL:
147- mysql patchwork < lib/sql/grant-all.mysql.sql
148+ MySQL:
149+ mysql patchwork < lib/sql/grant-all.mysql.sql
148150
149151
1501523. Apache setup
151153
152- Example apache configuration files are in lib/apache2/.
154+ Example apache configuration files are in lib/apache2/.
155+
156+ wsgi:
153157
154- wsgi:
155158 django has built-in support for WSGI, which supersedes the fastcgi
156159 handler. It is thus the preferred method to run patchwork.
157160
@@ -164,7 +167,8 @@ wsgi:
164167 a2enmod wsgi
165168 apache2ctl restart
166169
167- mod_python:
170+
171+ mod_python:
168172
169173 An example apache configuration file for mod_python is in:
170174
@@ -174,7 +178,8 @@ mod_python:
174178 web server is used for serving php files, the fastcgi method may suit
175179 instead.
176180
177- fastcgi:
181+
182+ fastcgi:
178183
179184 django has built-in support for fastcgi, which requires the
180185 'flup' python module. An example configuration is in:
@@ -190,6 +195,7 @@ fastcgi:
190195 socket=/srv/patchwork/var/fcgi.sock \
191196 pidfile=/srv/patchwork/var/fcgi.pid
192197
198+
1931994. Configure patchwork
194200 Now, you should be able to administer patchwork, by visiting the
195201 URL:
@@ -201,12 +207,14 @@ fastcgi:
201207 * Set up your projects
202208 * Configure your website address (in the Sites) section
203209
210+
2042115. Subscribe a local address to the mailing list
205212
206- You will need an email address for patchwork to receive email on - for
207- example - patchwork@, and this address will need to be subscribed to the
208- list. Depending on the mailing list, you will probably need to confirm the
209- subscription - temporarily direct the alias to yourself to do this.
213+ You will need an email address for patchwork to receive email on - for
214+ example - patchwork@, and this address will need to be subscribed to the
215+ list. Depending on the mailing list, you will probably need to confirm the
216+ subscription - temporarily direct the alias to yourself to do this.
217+
210218
2112196. Setup your MTA to deliver mail to the parsemail script
212220
@@ -223,6 +231,7 @@ fastcgi:
223231
224232 sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail
225233
234+
2262357. Set up the patchwork cron script
227236
228237 Patchwork uses a cron script to clean up expired registrations, and
@@ -239,6 +248,7 @@ fastcgi:
239248 - the frequency should be the same as the NOTIFICATION_DELAY_MINUTES
240249 setting, which defaults to 10 minutes.
241250
251+
2422528. Optional: Configure your VCS to automatically update patches
243253
244254 The tools directory of the patchwork distribution contains a file
@@ -257,6 +267,7 @@ fastcgi:
257267 similar hook using pwclient to update patch state. If you do write
258268 one, please contribute it.
259269
270+
260271Some errors:
261272
262273* __init__() got an unexpected keyword argument 'max_length'
0 commit comments