| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes a few omissions in the grant scripts:
- patchrelation is missing from both mysql and postgres scripts; it's
only needed for web user access.
- event is missing from the web grants on postgres, and the mail grants
on mysql.
Tested on postgres only.
Fixes: 27c2acf56c ("models, templates: Add patch relations")
Fixes: 34e3c9c493 ("sql: Update 'grant-all.mysql' script with missing tables")
Fixes: 234bc7c316 ("lib/sql: fix permissions for v2.0.0 on postgres")
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
| |
An assortment of fixes identified through the integration of pre-commit.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch adds missing commas in the table lists where missing, and
removes where unnecessary. This fixes errors such as the following when
feeding the script to psql:
psql:lib/sql/grant-all.postgres.sql:37: ERROR: syntax error at or near "patchwork_emailconfirmation"
LINE 19: patchwork_emailconfirmation,
...
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
Fixes: ca0e79d4db34 ("sql: Sort 'grant-all' scripts alphabetically")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Late in the development of the series feature, it was decided that there
were advantages to allowing an N:M relationship between series and
patches. This would allow us to do things like create complete series
where a sole vN patch was sent to a list rather than the full series.
After some time using series in the wild, it's apparent that such
features are very difficult to implement correctly and will likely never
be implemented. As such, it's time to start cleaning up the mess, paving
the way for things like an improved tagging feature.
There are some significant changes to the model required:
- models.py, migrations/0027, migrations/0028, migrations/0029
The migrations make the following changes:
1. - Add 'Patch.series_alt' and 'Patch.number' fields.
2. - Populate the 'Patch.series_alt' and 'Patch.number' fields from
their 'SeriesPatch' equivalents.
3. - Remove the 'SeriesPatch' model.
- Rename 'Patch.series_alt' to 'Patch.series'.
- Change 'Series.cover_letter' to a 'OneToOneField' since a cover
letter can no longer be assigned to multiple series.
Note that the migrations have to be split into multiple parts as the
combined migration raises an OperationalError as below.
(1072, "Key column 'series_alt_id' doesn't exist in table")
This is due to Django's penchant for creating indexes for newly
created fields, as noted here: https://stackoverflow.com/q/35158530/
Aside from the model changes, there are numerous other changes required:
- admin.py
Reflect model changes for the 'PatchInline' inline used by
'SeriesAdmin'
- api/cover.py, api/patch.py
Update the 'series' field for the cover letter and patch resources to
reflect the model changes. A 'to_representation' function is added in
both cases to post-process this field and make it look like a list
again. This is necessary to avoid breaking clients.
- parser.py
Update to reflect the replacement of 'SeriesPatch' with 'Patch'.
- signals.py
Update to filter on changes to 'Patch' instead of 'SeriesPatch'. This
requires some reworking due to how we set these fields now, as we can
no longer receive on 'post_save' signals for 'SeriesPatch' and must
instead watch for 'pre_save' on 'Patch', which is what we do for
delegate and state changes on same.
- templates/patchwork/*.html
Remove logic that handled multiple series in favour of the (simpler)
single series logic.
- tests/*
Modify the 'create_series_patch' helper to reflect the removal of the
'SeriesPatch' model. This entire helper will be removed in a future
change. Improve some tests to cover edge cases that were highlighted
during development
Unfortunately, all of the above changes must go in at the same time,
otherwise we end up with either (a) broken views, API etc. or (b) split
brain because we need to keep the new single-series fields alongside the
older multi-series fields and models while we rework the views. It's
unfortunate but there's not much to be done here.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Tested-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
| |
These were all introduced in 2.0 and while the postgreSQL script was
fixed in commit 234bc7c3, the MySQL one was not. This suggests either
(a) no one is using this or (b) people are carrying local changes but
for now we just resolve the issues.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
| |
This makes it easier to compare to the output of 'show tables'.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
| |
These have not been used since v1.0 and we don't expect users to jump
straight from pre-v1.0 to post-v2.0. Remove them.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tables are no longer present, and others that are used by the web
interface and mail parser need access permissions added.
This change was required to get patchwork going on patchwork.ozlabs.org;
there may be other permissions required, that we haven't hit yet. So,
some review would be good here.
Also: it's unlikely that we need DELETE for the mail parser, but I'm not
confident enough to remove that at the moment.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8fe68d96f18e ("wsgi: Move wsgi file to expected location")
relocated lib/apache2/patchwork.wsgi to patchwork/wsgi.py but did not
update the Apache2 example configuration file under
lib/apache2/patchwork.wsgi.conf.
Fixes: 8fe68d96f18e ("wsgi: Move wsgi file to expected location")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
| |
Signed-off-by: Stephen Finucane <stephen@that.guru>
Reported-by: Philippe Pepiot <philippe.pepiot@logilab.fr>
Fixes: 150f6150 ("lib: Update uWSGI, nginx config files")
|
|
|
|
|
|
|
|
|
| |
The nginx file was a replacement for '/etc/nginx/nginx.conf' instead of
a "site" file, while the uWSGI file referenced the Python 2 plugin
despite the sample deployment guide, which uses this, being Python
3-based. Correct both issues.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
| |
Allow access to Submission, CoverLetter, Series, SeriesReference and
SeriesPatch.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
| |
We need access to Check & Delegationrule.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The Message model was deprecated in 1.4, and removed in 1.6
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The projectmaintainer heirachy hasn't been implemented, so we don't need
the migration script yet.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|