summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* lib: Refresh nginx/uwsgi configurationThomas Monjalon2016-09-07
| | | | | | | | | | | | | | | | | As stated in http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html: " Unfortunately nginx is not able to rewrite PATH_INFO accordingly to SCRIPT_NAME. For such reason you need to instruct uWSGI to map specific apps in the so called “mountpoint” and rewrite SCRIPT_NAME and PATH_INFO automatically [...] ancient uWSGI versions used to support the so called “uwsgi_modifier1 30” approach. Do not do it. it is a really ugly hack " Replacing the uwsgi_modifier1 hack by a mount point seems to work. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
* uwsgi: Add python pluginRussell Currey2016-07-15
| | | | | | | | | Given the documentation suggests using Ubuntu, and any Debian derivative requires manually specifying plugins in uwsgi, add the python27 plugin to the example uwsgi settings file. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
* sql: Fix spelling mistakes and typosEric Engestrom2016-05-09
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
* Update permissions on grant-all scriptsJeremy Kerr2016-03-29
| | | | | | | We need access to Check & Delegationrule. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* js: Allow shift-select of checkboxesStephen Finucane2016-03-15
| | | | | | | | | | Allow bulk modification of patches through shift-select of the check boxes on each line. This allows for the removal of the 'common.js' file, which was only being used in one location. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* lib: Add nginx and uWSGI configuration filesStephen Finucane2016-02-14
| | | | | | | | | | | nginx and uWSGI are a well-known option for deploying Django applications today - might as well embrace them. Conversely, the mod_python variable and fastcgi service are both deprecated and should not be used. Remove these. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
* wsgi: Move wsgi file to expected locationStephen Finucane2016-02-08
| | | | | | | | Django places a wsgi.py file in the root of each application's directory. Do this, adding a symlink to preserve existing operation for users. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* package: Add the Sticky Table Header jQuery pluginDamien Lespiau2015-11-05
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* gitignore: Explicitly ignore dirs in lib/packagesDamien Lespiau2015-10-27
| | | | | | | | | | | This file ignores everything at the moment. This doesn't look like a good idea, there are also jquery files there. We ignore django/ because installing django there is what currently is documented to do. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* wsgi.conf: Fix the path in the Directory directiveDamien Lespiau2015-10-26
| | | | | | | | | | The path in <Directory> didn't match the one defined in Alias. While at it, remove the unnecessary quotes. Reported-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* Add patch tag infrastructureJeremy Kerr2015-05-28
| | | | | | | | | | | | | | | | | | | | | This change add patch 'tags', eg 'Acked-by' / 'Reviewed-by', etc., to patchwork. Tag parsing is implemented in the patch parser's extract_tags function, which returns a Counter object of the tags in a comment. These are stored in the PatchTag (keyed to Tag) objects associated with each patch. We need to ensure that the main patch lists do not cause per-patch queries on the Patch.tags ManyToManyField (this would result in ~500 queries per page), so we introduce a new QuerySet (and Manager) for Patch, adding a with_tag_counts() method to populate the tag counts in a single query. As users may be migrating from previous patchwork versions (ie, with no tag counts in the database), we add a 'retag' management command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Update documentation and default settings to suit patchwork deployment modelJeremy Kerr2015-05-28
| | | | | | | | | | | | We've always allowed configuration without altering any of the version-controlled files. With the recent settings changes, we have an extra level of indirection with the dev/prod settings modules. Since we have to edit a config file anyway, this change moves the prod.py settings file to a template, which is then used directly by mange.py (and the wsgi application). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/apache2: Update sample configuration files for new staticfiles applicationJeremy Kerr2015-05-27
| | | | | | | The static files app will collect all of the static files into STATIC_ROOT, which is under htdocs/static/. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/apache2: use django-1.7-compatible wsgi applicationJeremy Kerr2015-05-27
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move to a more recent django project structureJeremy Kerr2015-05-27
| | | | | | | | | | This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* jquery: Fix jqeury typoDamien Lespiau2014-11-10
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* migration: Add cleanup-people migration scriptJeremy Kerr2014-05-08
| | | | | | | Now that we only create Person object once the User has been confirmed, we can clean up unused Person objects from the database. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/sql: remove references to auth_message modelJeremy Kerr2014-04-22
| | | | | | The Message model was deprecated in 1.4, and removed in 1.6 Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Update manage.py to post a post-1.4 version.Jeremy Kerr2014-04-22
| | | | | | | | | | Django version 1.6 deprecates some of the django.core.management API, so we need a post-1.4 version. The semantics with app include paths have changed with this version, so update the urlconf to use the same path as manage.py. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/sql/migration: Fix column names for MySQL/MariaDBRalf Baechle2013-10-13
| | | | | | | | | | | | | | | | | 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. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: remove non-existing auth_message tableFlorian Fainelli2013-10-04
| | | | | | | | During a recent installation the grant-all MySQL script was erroring out because the "auth_message" table does not exist, remove it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: update grant-all.mysql.sqlFlorian Fainelli2013-10-04
| | | | | | | | The MySQL grant all script has a typo on the table "patchwork_bundle_patches" vs "patchwork_bundlepatch" update that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* js: Add jquery and jquery tablednd pluginsJeremy Kerr2013-06-16
| | | | | | | | | | | | Based on a change from Andreas Bießmann <andreas@biessmann.de>. Rather than requiring a download of the jquery library + tablednd plugin, commit these to the repository. In doing so, we upgrade to version 1.10.1 of jqeury, and the current stable tablednd. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* bundles: Don't allow slashes in bundle namesJeremy Kerr2013-04-20
| | | | | | | | Because bundle names are used in URLs, we don't want slashes in them. Include a SQL migration script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add URL and SCM data to projectsSimo Sorce2012-11-15
| | | | | | | | | | | | | | | This allows us to display friendly links to the project website, web SCM UI and SCM URL. For example for the patchwork project these could be set to: web_url: http://jk.ozlabs.org/projects/patchwork/ scm_url: git://ozlabs.org/home/jk/git/patchwork webscm_url: http://git.ozlabs.org/?p=patchwork;a=tree Requires a DB schema upgrade Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Fix grant scriptSimo Sorce2012-10-25
| | | | | | | | patchwork_patchchangenotification_id_seq does not exist, so running this script simply fails with a rollback Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: remove development migration scriptJeremy Kerr2011-12-08
| | | | | | | The projectmaintainer heirachy hasn't been implemented, so we don't need the migration script yet. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* models: Add PatchChangeNotification and record patch state changesJeremy Kerr2011-04-14
| | | | | | | | | Add a PatchChangeNotification model to keep track of changes to a patch's state. Hook this up to Patch's pre_save signal. Requires a DB schema upgrade. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add email opt-out systemJeremy Kerr2011-04-14
| | | | | | | | | | | We're going to start generating emails on patchwork updates, so firstly allow people to opt-out of all patchwork communications. We do this with a 'mail settings' interface, allowing non-registered users to set preferences on their email address. Logged-in users can do this through the user profile view. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* registration: use EmailConfimation rather than separate registration appJeremy Kerr2011-04-14
| | | | | | | | | | Since we have infrastructure for email confirmations, we no longer need the separate registration app. Requires a migration script, which will delete all inactive users, including those newly added and pending confirmation. Use carefully. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use generic email confirmation objectJeremy Kerr2011-04-14
| | | | | | | | | | | | | Rather than having a UserPerson-specific confirmation, add an EmailConfirmation object to allow multiple types of confirmations (eg, opt-out requests in future). To do this, we use a view (patchwork.views.confirm) that will call the type-specific view with the confirmation object. Also, add tests to check that the User/Person linkage system works. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* helpers: Change patchwork.wsgi to include the apps/ dir in sys.pathGuilherme Salgado2011-02-28
| | | | | | | | | | | Without this, templates will crash as they reference patchwork.<module> directly. Also removes the patchwork.wsgi symlink from the root and use the real file in patchwork.wsgi.conf instead, as suggested by Dirk Wallenstein. Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add support for git-pull requestsJeremy Kerr2010-11-01
| | | | | | | | | Add a a pull_url to the Patch object, and update the parser to look for git-pull style emails. Requires SQL migration script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: Add uncommitted migration scriptsJeremy Kerr2010-08-10
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/apache2: Add WSGI HandlerMartin Krafft2010-08-10
| | | | | | | | | | | | | | | | | | | Patchwork/Django can be run directly with WSGI, which is bound to be faster and less complex than FastCGI. This patch provides the necessary Apache configuration and the WSGI handler, as well as an update to the docs. Since python-flup is deprecated and WSGI supersedes FastCGI, it should be(come) the preferred method. Hence I documented it first. For the xmlrpc interface to work with WSGI, the HTTP authorization information needs to be passed to the WSGI handler. This is done by setting WSGIPassAuthorization On in the apache2 config file snippet. Ref: http://www.arnebrodowski.de/blog/508-Django,-mod_wsgi-and-HTTP-Authentication.html Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Adjust postgres "grant all" script to new name of bundle tableJunio C Hamano2009-11-23
| | | | | | | | | | | | | | Since c105cb0 (Initial bundle reordering support, 2009-01-29), the patchwork_bundle_patches table and its associated id sequence does not exist. The script to grant appropriate privileges was not updated when this change was made, and causes the set-up procedure described in docs/INSTALL to fail. This change adjust the script to grant appropriate access rights to match the change in the DB schema. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* migration: fix whitespaceJeremy Kerr2009-02-27
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* migration: reset bundlepatch sequence on setupJeremy Kerr2009-02-27
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [sql] Fix up bundle-reorder migration scriptJeremy Kerr2009-02-10
| | | | | | | We need to add grants for the new table, and drop the old to prevent reference constraint errors. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [sql] Perserve bundle ordering in bundle reorder migration scriptJeremy Kerr2009-02-08
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Normalise order numbers in bundle-ordering migration SQLJeremy Kerr2009-02-07
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Complete bundle ordering migration scriptJeremy Kerr2009-02-07
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial bundle reordering supportJeremy Kerr2009-01-29
| | | | | | | | | todo: * implement ajax reorder api * finish migration script * order patches in bundle view Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [models] Make patches unique on (msgid, project), not just (msgid)Jeremy Kerr2008-10-29
| | | | | | | | | | On patchwork.ozlabs.org, we may see multiple patches for different projects, but with the same message-id. We want these patches to show up on both projects, so we need to change the current UNIQUE contstraint on msgid. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [sql] use separate grant-all scripts for postgresql and mysqlJeremy Kerr2008-10-09
| | | | | | | | | | Mysql doesn't support granting to multiple tables, and requires a different username format. Would be nice to code the permissions somewhere, then generate the grant statements as required. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Don't just rely on random for UserPersonConfirmation keysJeremy Kerr2008-09-11
| | | | | | | | | | | It looks like we're getting identical keys generated for confirmation keys. Problem has been reported to django, but in the meantime, salt with the user and email details, then sha1 to give the final key. This requires an increase in the field size for key, migration script included. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use hex strings for hash valuesJeremy Kerr2008-09-10
| | | | | | | | | | Binary strings a too hard to manage in DB queries and XMLRPC methods, as we get all kinds of encoding issues. Change HashField to use a hex string, and add a migration script for db updates. The patches should be rehashed after migration. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Pass Authorization headers in fastcgi applicationJeremy Kerr2008-09-09
| | | | | | | | By default, mod_fcgi doens't allow the Authorization header, so enable -pass-header, and handle the different header name in the xmlrpc view Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* mod_python example configuration fixesNate Case2008-09-08
| | | | | | | | | | | | | | | | | | | These fixes correct the example patchwork.mod_python.conf file to actually work properly: * Patchwork base directory needs to be in PythonPath so that things like "apps.urls" will import * Set DJANGO_SETTINGS_MODULE to "settings" instead of "patchwork.settings" so that it can find the settings file to import * Use LocationMatch instead of Location in order for the pattern matching to work (this was causing none of the images/stylesheets to be found when using mod_python) Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Exclude packages tree from separate .gitignore fileJeremy Kerr2008-09-05
| | | | | | | | | 'cos it says so in the top-level .gitignore. Also, this means that the lib/packages/ dir will be included in a git checkout, which is helpful. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>