]> git.ozlabs.org Git - patchwork/blob - docs/NEWS
cron: Move patchwork-cron script to a management command
[patchwork] / docs / NEWS
1 == Cron script changes ==
2
3 The patchwork cron script has been moved to a manage.py command. Instead
4 of running patchwork-cron.py, run:
5
6   ./manage.py cron
7
8 == Upgrading to 3b8a61c ==
9
10 Recent commits have changed a few admin-visible components of patchwork, so
11 upgrading to post-commit 3b8a61c involves a few steps:
12
13 - Update the database schema, by running the 015-add-patch-tags.sql script,
14   and re-run the grants script.
15
16   For example, on postgres:
17
18     psql -f lib/sql/migration/015-add-patch-tags.sql patchwork
19     psql -f lib/sql/grant-all.postgres.sql patchwork
20
21 - Update to the new settings infrastructure. By default, settings are read
22   from patchwork/settings/production.py. To migrate, use the template:
23
24     cp patchwork/settings/production{.example,}.py
25
26   and merge your previous settings (from apps/local_settings.py) into
27   this file
28
29 - Fixup external references to apps/
30
31   The apps/ directory is gone; the patchwork module is now in the top-level
32   directory. If you have scripts that run anything from apps/ (eg, incoming
33   mail parsers that call parsemail.sh, and cron scripts), then remove the apps/
34   directory from those.
35
36     apps/patchwork/ -> patchwork/
37
38   (or you can create a symlink - apps/ -> .)
39
40 - Update any external scripts to use the new settings module
41
42   If you have been running scripts (eg, from cron) that set the
43   DJANGO_SETTINGS_MODULE environment variable, you'll need to update that
44   to the new settings system. Typically:
45
46     DJANGO_SETTINGS_MODULE=patchwork.settings.production
47
48   The manage.py script has been moved from apps/ into the top-level directory
49   too.
50
51 - Run the 'collectstatic' management command:
52
53     ./manage.py collectstatic
54
55   Ensure that the STATIC_ROOT setting points somewhere sensible (eg, the
56   absolute path of htdocs/static in the patchwork tree).
57
58 - Update apache to use the new static content.
59
60   Static content is now in all under STATIC_ROOT, the apache configuration
61   should be simpler now. The core config will be:
62
63         DocumentRoot /srv/patchwork/htdocs/
64         Alias /static/ /srv/patchwork/htdocs/static/
65         WSGIScriptAlias / /srv/pathchwork/lib/apache2/patchwork.wsgi
66         WSGIPassAuthorization On
67