From: Ian Jackson Subject: [OSSTEST PATCH 3/8] Schema: Remove SET OWNER and GRANT/REVOKE from schema/initial.sql Date: Thu, 10 Dec 2015 17:12:20 +0000 Message-ID: <1449767545-9410-4-git-send-email-ian.jackson@eu.citrix.com> References: <1449767545-9410-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a74li-0003jj-Mc for xen-devel@lists.xenproject.org; Thu, 10 Dec 2015 17:12:38 +0000 In-Reply-To: <1449767545-9410-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Really, we don't want the initial schema setup to mess about with permissions. Instead, we simply expect to run the creation as the correct role user. So: - Remove the code in mg-schema-test-database to remove the permission settings from initial.sql; - Instead, run exactly that code on initial.sql and commit the result. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- mg-schema-test-database | 9 +--- schema/initial.sql | 132 +++++++++++++++++++++++------------------------ 2 files changed, 67 insertions(+), 74 deletions(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index 0c4dab7..c68b1d2 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -386,19 +386,12 @@ END tables=$(tsort <$t.tablesortlist) - # We don't want to set the permissions - perl $t.new-schema -pe ' - s/^/--/ if - m/^ALTER TABLE .* OWNER TO / || - m/^GRANT |^REVOKE / - ' - #---------- create test db ---------- psql_do <