]> git.ozlabs.org Git - patchwork/blobdiff - docs/INSTALL
docs: update INSTALL for commonly-available packages
[patchwork] / docs / INSTALL
index 1748601954c04cc095318f1cfde346433c94d4b8..cf6544ffa6b473ab22a2838e1acfa7dcbaf3742c 100644 (file)
@@ -9,7 +9,7 @@ You'll need the following (applications used for patchwork development are
 in brackets):
 
   * A python interpreter
 in brackets):
 
   * A python interpreter
-  * djano
+  * django
   * A webserver (apache)
   * mod_python or flup
   * A database server (postgresql)
   * A webserver (apache)
   * mod_python or flup
   * A database server (postgresql)
@@ -29,38 +29,58 @@ in brackets):
     user that your mail server runs as). On Ubuntu these are
     www-data and nobody, respectively.
 
     user that your mail server runs as). On Ubuntu these are
     www-data and nobody, respectively.
 
-      PostgreSQL:
-        createdb patchwork
-        createuser www-data
-        createuser nobody
+    For PostgreSQL
 
 
-      MySQL:
+        $ createdb patchwork
+        $ createuser www-data
+        $ createuser nobody
+
+       - postgres uses the standard UNIX authentication, so these users
+         will only be accessible for processes running as the same username.
+         This means that no passwords need to be set.
+
+     For MySQL:
         $ mysql
        > CREATE DATABASE 'patchwork';
         $ mysql
        > CREATE DATABASE 'patchwork';
-        > INSERT INTO user (Host, User) VALUES ('localhost', 'www-data');
-        > INSERT INTO user (Host, User) VALUES ('localhost', 'nobody');
+        > CREATE USER 'www-data'@'localhost' IDENTIFIED BY '<password>';
+        > CREATE USER 'nobody'@'localhost' IDENTIFIED BY '<password>';
 
 2. Django setup
 
 
 2. Django setup
 
-        At the time of initial release, patchwork depends on a svn version of
-        django. I've been using svn commit 7854 - but anything after this
-        point should be fine. If your distribution provides a sufficiently
-        recent version of django, you can use that; if not, do a:
+        Set up some initial directories in the patchwork base directory:
+
+        mkdir -p lib/packages lib/python
+
+        At the time of release, patchwork depends on django version 1.0 or
+        later. Your distro probably provides this. If not, do a:
 
          cd lib/packages
 
          cd lib/packages
-         svn checkout http://code.djangoproject.com/svn/django/trunk django
+         svn checkout http://code.djangoproject.com/svn/django/tags/releases/1.2
          cd ../python
          ln -s ../packages/django/django ./django
 
         We also use the django-registration infrastructure from
          cd ../python
          ln -s ../packages/django/django ./django
 
         We also use the django-registration infrastructure from
-        http://code.google.com/p/django-registration/
+        http://bitbucket.org/ubernostrum/django-registration/. Your distro
+        may provide the django-registration python module (in Ubuntu/Debian it's
+        called 'python-django-registration'). If not, download the module
+        and symlink it to lib/python/ :
 
          cd lib/packages/
 
          cd lib/packages/
-         svn checkout \
-             http://django-registration.googlecode.com/svn/trunk/registration/ \
-             django-registration
-         cd ../../apps
-         ln -s ../lib/packages/django-registration ./registration
+         hg clone http://bitbucket.org/ubernostrum/django-registration/
+         cd ../python
+         ln -s ../lib/packages/django-registration/registration ./registration
+
+               We also use some Javascript libraries:
+
+                cd lib/packages
+                mkdir jquery
+                cd jquery
+                wget http://jqueryjs.googlecode.com/files/jquery-1.3.min.js
+                wget http://www.isocra.com/articles/jquery.tablednd_0_5.js.zip
+                unzip jquery.tablednd_0_5.js.zip jquery.tablednd_0_5.js
+                cd ../../../htdocs/js/
+                ln -s ../../lib/packages/jquery/jquery-1.3.min.js ./
+                ln -s ../../lib/packages/jquery/jquery.tablednd_0_5.js ./
 
        The settings.py file contains default settings for patchwork, you'll
        need to configure settings for your own setup.
 
        The settings.py file contains default settings for patchwork, you'll
        need to configure settings for your own setup.
@@ -86,6 +106,11 @@ in brackets):
          MEDIA_ROOT
          TEMPLATE_DIRS
 
          MEDIA_ROOT
          TEMPLATE_DIRS
 
+        If you wish to enable the XML-RPC interface, add the following to
+        your local_settings.py file:
+
+         ENABLE_XMLRPC = True
+
        Then, get patchwork to create its tables in your configured database:
 
         cd apps/
        Then, get patchwork to create its tables in your configured database:
 
         cd apps/
@@ -94,8 +119,10 @@ in brackets):
        And add privileges for your mail and web users:
 
        Postgresql:
        And add privileges for your mail and web users:
 
        Postgresql:
-         psql -f lib/sql/grant-all.sql patchwork
+         psql -f lib/sql/grant-all.postgres.sql patchwork
 
 
+       MySQL:
+         mysql patchwork < lib/sql/grant-all.mysql.sql
 
 
 3. Apache setup
 
 
 3. Apache setup
@@ -177,3 +204,11 @@ Some errors:
    doesn't have access to the patchwork tables in the database. Check that
    your web-server user exists in the database, and that it has permissions
    to the tables.
    doesn't have access to the patchwork tables in the database. Check that
    your web-server user exists in the database, and that it has permissions
    to the tables.
+
+* pwclient fails for actions that require authentication, but a username
+  and password is given int ~/.pwclient rc. Server reports "No authentication
+  credentials given".
+
+ - if you're using the FastCGI interface to apache, you'll need the
+   '-pass-header Authorization' option to the FastCGIExternalServer
+   configuration directive.