From patchwork Thu Oct 25 03:08:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simo Sorce X-Patchwork-Id: 194019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 54AF02C00D8 for ; Thu, 25 Oct 2012 14:09:04 +1100 (EST) Received: from mail.samba.org (fn.samba.org [216.83.154.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1D3752C009A for ; Thu, 25 Oct 2012 14:09:01 +1100 (EST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.samba.org (Postfix) with ESMTP id A9E7EAC0F8; Wed, 24 Oct 2012 21:08:58 -0600 (MDT) Message-ID: <1351134538.2010.44.camel@pico.ipa.ssimo.org> Subject: Re: [PATCH] fix postgres grant script From: simo To: Jeremy Kerr Date: Wed, 24 Oct 2012 23:08:58 -0400 In-Reply-To: <50889060.8010405@ozlabs.org> References: <1351116679.2010.35.camel@pico.ipa.ssimo.org> <1351117239.2010.39.camel@pico.ipa.ssimo.org> <50889060.8010405@ozlabs.org> Organization: Samba Team X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Cc: patchwork@lists.ozlabs.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" On Thu, 2012-10-25 at 09:05 +0800, Jeremy Kerr wrote: > 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? Ah sorry, attached. > > 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? No I checked the postfix user there then simply created straight away the 'postfix' user and not the nobody user. However in the end I decided to use a .procmailrc file to dispatch mail so I can keep around mail that is not bound to a project. I think this way all the actions happen as the 'patchwork' user anyway. Simo. From baf11a04b70ebc679301791bed4d092e2df21cd7 Mon Sep 17 00:00:00 2001 From: Simo Sorce 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 Signed-off-by: Simo Sorce --- 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