Subject: pkg/9272: Installation bug in postgresql
To: None <gnats-bugs@gnats.netbsd.org>
From: Richard Rauch <rkr@rkr.kcnet.com>
List: netbsd-bugs
Date: 01/21/2000 20:18:37
>Number:         9272
>Category:       pkg
>Synopsis:       Postgrssql needs pgsql user for installation; fails to create
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 21 20:18:00 2000
>Last-Modified:
>Originator:     Richard Rauch
>Organization:
  "I probably don't know what I'm talking about."  --rkr@rkr.kcnet.com
>Release:        NetBSD 1.4.1, recent pkgsrc SUP.
>Environment:
	
System: NetBSD rkr.kcnet.com 1.4.1 NetBSD 1.4.1 (olibGENERIC) #4: Tue Jan 11 09:33:56 CST 2000 root@rkr.kcnet.com:/usr/src/sys/arch/i386/compile/olibGENERIC i386


>Description:
  When trying to install postgresql, it goes to the extent of actually
  installing many files, then fails with the error:

    install: unknown user pgsql

  pkg/DESCR fails to mention this requirement that I can tell, and
  certainly if another package pulls postgresql in as a dependancy,
  one may not know that it needs to be added.  It is not clear what
  privileges the account needs, though it seems to exist solely for
  the sake of ``pgsql.sh'' in the expanded work/ directory.

  At this point, the package seems to be built and partially installed,
  but the installation cannot complete.
>How-To-Repeat:
  On a system lacking a ``pgsql'' user, try to update/install
  postgresql.
>Fix:
  Since I am just peeking at postgresql, I'm not sure what purpose the
  fake ``pgsql'' account serves.

  A workaround is to create a pgsql account.  Note that it MUST have
  a valid login shell for the install to proceed, and it MUST have
  a valid home directory.  Presumably neither are needed in actual use.

  The package depends upon addnerd, but does not make use of addnerd
  to generate a pgsql user.  (At least, it did not for me.)

  I'm not wild about the thing generating user accounts without my
  express permission; perhaps instead of using addnerd (or trying to
  do so, as the case may be), it should simply check whether the
  account exists.  If the account does not exist, then a brief error
  message, accompanied by a reference to a file in the pkg/ directory
  might be best.  (Said file should explain exactly what is needed
  in the pgsql user account, and WHY the account is needed and WHETHER
  the account is needed after installation completes, etc.  A URL
  would be okay for this, but IMHO _some_ explanation should be embedded
  in the pkg/ directory.)
>Audit-Trail:
>Unformatted: