[PATCH 3/4] Update permissions on grant-all scripts
We need access to Check & Delegationrule. Signed-off-by: Jeremy Kerr --- lib/sql/grant-all.mysql.sql| 3 +++ lib/sql/grant-all.postgres.sql | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql index 6a3d547..1220c8e 100644 --- a/lib/sql/grant-all.mysql.sql +++ b/lib/sql/grant-all.mysql.sql @@ -25,6 +25,8 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout TO 'www-data'@loca GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchchangenotification TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_tag TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchtag TO 'www-data'@localhost; +GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_check TO 'www-data'@localhost; +GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_delegationrule TO 'www-data'@localhost; -- allow the mail user (in this case, 'nobody') to add patches GRANT INSERT, SELECT ON patchwork_patch TO 'nobody'@localhost; @@ -34,6 +36,7 @@ GRANT INSERT, SELECT, UPDATE, DELETE ON patchwork_patchtag TO 'nobody'@localhost GRANT SELECT ONpatchwork_project TO 'nobody'@localhost; GRANT SELECT ON patchwork_state TO 'nobody'@localhost; GRANT SELECT ON patchwork_tag TO 'nobody'@localhost; +GRANT SELECT ON patchwork_delegationrule TO 'nobody'@localhost; COMMIT; diff --git a/lib/sql/grant-all.postgres.sql b/lib/sql/grant-all.postgres.sql index 477e10a..68ff9f1 100644 --- a/lib/sql/grant-all.postgres.sql +++ b/lib/sql/grant-all.postgres.sql @@ -25,7 +25,9 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout, patchwork_patchchangenotification, patchwork_tag, - patchwork_patchtag + patchwork_patchtag, + patchwork_check, + patchwork_delegationrule TO "www-data"; GRANT SELECT, UPDATE ON auth_group_id_seq, @@ -48,7 +50,9 @@ GRANT SELECT, UPDATE ON patchwork_userprofile_id_seq, patchwork_userprofile_maintainer_projects_id_seq, patchwork_tag_id_seq, - patchwork_patchtag_id_seq + patchwork_patchtag_id_seq, + patchwork_check_id_seq, + patchwork_delegationrule_id_seq TO "www-data"; -- allow the mail user (in this case, 'nobody') to add patches @@ -63,7 +67,8 @@ TO "nobody"; GRANT SELECT ON patchwork_project, patchwork_state, - patchwork_tag + patchwork_tag, + patchwork_delegationrule TO "nobody"; GRANT UPDATE, SELECT ON patchwork_patch_id_seq, -- 2.5.0 ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
[PATH 0/4] Fixes for deployment on patchwork.ozlabs.org
Hi all, The following series is a set of fixes I needed to deploy the current stable branch on patchwork.ozlabs.org; the first three are simple but fix show-stoppers for the upgrade. The final fixes isses with lots of "None" links appearing on the projects list. Signed-off-by: Jeremy Kerr ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
[PATCH 2/4] parsemail: Fix default value of verbosity argument
With the current parsemail.py, the default value for the verbosity argument does not exist in the VERBOSITY_LEVELS dict, so we get: Traceback (most recent call last): File "./patchwork/bin/parsemail.py", line 569, in sys.exit(main(sys.argv)) File "./patchwork/bin/parsemail.py", line 555, in main logging.basicConfig(level=VERBOSITY_LEVELS[args['verbosity']]) KeyError: 20 This change uses an actual key instead. Signed-off-by: Jeremy Kerr --- patchwork/bin/parsemail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py index 9640ff3..f369fe4 100755 --- a/patchwork/bin/parsemail.py +++ b/patchwork/bin/parsemail.py @@ -542,7 +542,7 @@ def main(args): group.add_argument('--list-id', help='mailing list ID. If not supplied ' 'this will be extracted from the mail headers.') group.add_argument('--verbosity', choices=list_logging_levels(), - help='debug level', default=logging.INFO) + help='debug level', default='info') args = vars(parser.parse_args()) -- 2.5.0 ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
[PATCH 4/4] templates: don't emit tags for empty URLs, allow both web_url & webscm_url
Rather than always outputting one of web_url or webscm_url, only output when these are present. This prevents us from emitting empty links if both are missing. Signed-off-by: Jeremy Kerr --- patchwork/templates/patchwork/projects.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patchwork/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html index afaf6ab..0db1227 100644 --- a/patchwork/templates/patchwork/projects.html +++ b/patchwork/templates/patchwork/projects.html @@ -30,7 +30,8 @@ {% if p.web_url %} {{p.web_url}} -{% else %} +{% endif %} +{% if p.webscm_url %} {{p.webscm_url}} {% endif %} -- 2.5.0 ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
[PATCH 1/4] parsemail.sh: Always return a zero exit status
This reverts changes to parsemail.sh introduced by cbe992d84fba57831d44afb3a21cdf83454018b2. When parsemail is used as a delivery command from a mail server like postfix (as it is intended to be), a non-zero exit code will cause a bounce message to be returned to the user. From the postfix manual: When the command fails, a limited amount of command output is mailed back to the sender. The file /usr/include/sysexits.h defines the expected exit status codes. For cases where patchwork is unavailable, we absolutely do not want to start bouncing messages to all patch contributors. Signed-off-by: Jeremy Kerr --- patchwork/bin/parsemail.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/bin/parsemail.sh b/patchwork/bin/parsemail.sh index c8220a7..9973392 100755 --- a/patchwork/bin/parsemail.sh +++ b/patchwork/bin/parsemail.sh @@ -26,4 +26,4 @@ PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \ DJANGO_SETTINGS_MODULE=patchwork.settings.production \ "$PATCHWORK_BASE/patchwork/bin/parsemail.py" -exit $@ +exit 0 -- 2.5.0 ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork