fix postgres grant script

Submitted by Simo Sorce on Oct. 24, 2012, 10:20 p.m.

Details

Message ID 1351117239.2010.39.camel@pico.ipa.ssimo.org
State Changes Requested
Headers show

Commit Message

Simo Sorce Oct. 24, 2012, 10:20 p.m.
On Wed, 2012-10-24 at 18:11 -0400, simo wrote:
> Current script fails with a rollback because one of the recently added
> sequences does not exist in the db.

Ops sorry,
attached correct patch without trailing , that makes psql balk

also I noticed that you use nobody for the mail server user and later in
the INSTALL doc you hint that you are using postfix.
On both Debian and Fedora the postfix user is 'postfix', would you like
a patch to change docs and grant script from 'nobody' -> 'postfix' ?

Simo.

Comments

Simo Sorce Oct. 24, 2012, 10:28 p.m.
On Wed, 2012-10-24 at 18:20 -0400, simo wrote:
> On Wed, 2012-10-24 at 18:11 -0400, simo wrote:
> > Current script fails with a rollback because one of the recently added
> > sequences does not exist in the db.
> 
> Ops sorry,
> attached correct patch without trailing , that makes psql balk
> 
> also I noticed that you use nobody for the mail server user and later in
> the INSTALL doc you hint that you are using postfix.
> On both Debian and Fedora the postfix user is 'postfix', would you like
> a patch to change docs and grant script from 'nobody' -> 'postfix' ?

Also to note is that auth_message is gone in latest django.
Jeremy Kerr Oct. 25, 2012, 1:05 a.m.
Hi Simo,

>> Current script fails with a rollback because one of the recently added
>> sequences does not exist in the db.
>
> Ops sorry,
> attached correct patch without trailing , that makes psql balk

Awesome, thank you for the patch. Could you send a Signed-off-by: line too?

> also I noticed that you use nobody for the mail server user and later in
> the INSTALL doc you hint that you are using postfix.
> On both Debian and Fedora the postfix user is 'postfix', would you like
> a patch to change docs and grant script from 'nobody' -> 'postfix' ?

On the Debian machine running patchwork.ozlabs.org, the mail delivery 
seems to be done as 'nobody', as per the docs. Do the default grants not 
work for you?

Cheers,


Jeremy

Patch hide | download patch | download mbox

From 3ecde002d11b5fd4b785b60765361edd1d2e98a0 Mon Sep 17 00:00:00 2001
From: Simo Sorce <idra@samba.org>
Date: Wed, 24 Oct 2012 18:07:00 -0400
Subject: [PATCH] Fix grant script

patchwork_patchchangenotification_id_seq does not exist,
so running this script simply fails with a rollback
---
 lib/sql/grant-all.postgres.sql | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/sql/grant-all.postgres.sql b/lib/sql/grant-all.postgres.sql
index 72abb57..926d5d3 100644
--- a/lib/sql/grant-all.postgres.sql
+++ b/lib/sql/grant-all.postgres.sql
@@ -46,8 +46,7 @@  GRANT SELECT, UPDATE ON
 	patchwork_state_id_seq,
 	patchwork_emailconfirmation_id_seq,
 	patchwork_userprofile_id_seq,
-	patchwork_userprofile_maintainer_projects_id_seq,
-	patchwork_patchchangenotification_id_seq
+	patchwork_userprofile_maintainer_projects_id_seq
 TO "www-data";
 
 -- allow the mail user (in this case, 'nobody') to add patches
-- 
1.7.12.1