Patchwork Patchwork broken after server update

login
register
mail settings
Submitter Ralf Baechle
Date July 29, 2013, 2:46 p.m.
Message ID <20130729144633.GA23881@linux-mips.org>
Download mbox | patch
Permalink /patch/262812/
State Accepted
Headers show

Comments

Ralf Baechle - July 29, 2013, 2:46 p.m.
I've upgraded linux-mips.org from Fedora 17 which was reaching EOL to
Fedora 19.  Since then patchwork is no longer working.

The first issue is that patchwork was no longer accepting new patches via
the apps/patchwork/bin/parsemail.sh script.  When I was trying to invoke
it manually, it only printed "no project found".  I was able to figure
out that this was caused by changes to the database scheme which are taken
care of by the two SQL scripts:

  lib/sql/migration/012-project-add-columns.sql
  lib/sql/migration/013-bundle-names.sql

The catch - these first script don't run with MySQL - or rather MariaDB that
Fedora has switched to.  MariaDB doesn't like the quotes around the table
and column names.  Patch below.

With the database scheme fixed patchwork now appears to properly filter
patch from email into its database.

The web interface is a bit harder.  First, Fedora has retired mod_python
which I previously was using, so short of resurrecting that module from
the dead I decided to switch to the wsgi interface instead.

But still no success with the webapp.  All I get for an access to
patchwork.linux-mips.org is a "Server Error (500)" Nothing useful in
apache log files, even with loglevel cranked up to infinity other than the
already known fact that the script resulted in a server error 500.

Django version is 1.5.1, Python 2.7.3, Apache 2.4.4, patchwork is latest
from git, 4e7b62c5 [notifications: add project name to patch update
notification].

Any ideas?

  Ralf

Patch

diff --git a/lib/sql/migration/012-project-add-columns.sql b/lib/sql/migration/012-project-add-columns.sql
index d984ad2..ecade28 100644
--- a/lib/sql/migration/012-project-add-columns.sql
+++ b/lib/sql/migration/012-project-add-columns.sql
@@ -1,5 +1,5 @@ 
 BEGIN;
-ALTER TABLE "patchwork_project" ADD COLUMN "web_url" varchar(2000);
-ALTER TABLE "patchwork_project" ADD COLUMN "scm_url" varchar(2000);
-ALTER TABLE "patchwork_project" ADD COLUMN "webscm_url" varchar(2000);
+ALTER TABLE patchwork_project ADD COLUMN web_url varchar(2000);
+ALTER TABLE patchwork_project ADD COLUMN scm_url varchar(2000);
+ALTER TABLE patchwork_project ADD COLUMN webscm_url varchar(2000);
 COMMIT;