From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 9 16:20:03 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DDDF16A4CE for ; Wed, 9 Mar 2005 16:20:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D148B43D39 for ; Wed, 9 Mar 2005 16:20:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j29GK2E3049850 for ; Wed, 9 Mar 2005 16:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j29GK2V2049849; Wed, 9 Mar 2005 16:20:02 GMT (envelope-from gnats) Resent-Date: Wed, 9 Mar 2005 16:20:02 GMT Resent-Message-Id: <200503091620.j29GK2V2049849@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vivek Khera Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69E1216A4CE for ; Wed, 9 Mar 2005 16:12:01 +0000 (GMT) Received: from yertle.kcilink.com (yertle.kcilink.com [65.205.34.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0363443D5A for ; Wed, 9 Mar 2005 16:12:01 +0000 (GMT) (envelope-from khera@kcilink.com) Received: by yertle.kcilink.com (Postfix, from userid 1002) id 4D970B856; Wed, 9 Mar 2005 11:12:00 -0500 (EST) Message-Id: <20050309161200.4D970B856@yertle.kcilink.com> Date: Wed, 9 Mar 2005 11:12:00 -0500 (EST) From: Vivek Khera To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/78630: postgres-server 8.0.1 doesn't allow alternet PG superuser anymore X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Vivek Khera List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 16:20:03 -0000 >Number: 78630 >Category: ports >Synopsis: postgres-server 8.0.1 doesn't allow alternet PG superuser anymore >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 09 16:20:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vivek Khera >Release: FreeBSD 5.3-STABLE amd64 >Organization: >Environment: System: FreeBSD yertle.int.kciLink.com 5.3-STABLE FreeBSD 5.3-STABLE #0: Fri Jan 7 16:42:37 EST 2005 khera@yertle.int.kciLink.com:/usr/obj/usr/src/sys/YERTLE amd64 >Description: I just upgraded Postgres from 7.4 to 8.0 via the ports. After suitably editing the new config files, initializing the database (using my standard procedure), starting postgres fails since the user "pgsql" doesn't exist. The current setup requires that the postgres super user be "pgsql". Up thru the port for 7.4.7, it allowed the postgres super user to be set from the environment in ~pgsql/.profile for PGUSER. Traditionally, many people (including myself) have used "postgres" as the database superuser. Much of my infrastructure assumes superuser='postgres' so this is a hard change to force into the port. >How-To-Repeat: install the port for postgres 8. export PGUSER=postgres in ~pgsql/.profile init the database with: su - pgsql -c 'initdb -U postgres' then start /usr/local/etc/rc.d/010.pgsql.sh start it will fail to start. doing the same process for 7.4 postgres port works just fine. >Fix: Use "su -l" like the 7.4.x init script does. --- /usr/local/etc/rc.d/#010.pgsql.sh~ Wed Mar 9 10:55:17 2005 +++ /usr/local/etc/rc.d/010.pgsql.sh Wed Mar 9 10:55:17 2005 @@ -47,7 +47,7 @@ postgresql_command() { - su -m ${postgresql_user} -c "exec ${command} ${command_args}" + su -l ${postgresql_user} -c "exec ${command} ${command_args}" } postgresql_initdb() >Release-Note: >Audit-Trail: >Unformatted: