Bug 153136 - [patch] databases/postgresql84-server: allow for postgres user to be configurable
Summary: [patch] databases/postgresql84-server: allow for postgres user to be configur...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Palle Girgensohn
Depends on:
Reported: 2010-12-14 01:30 UTC by Jason Helfman
Modified: 2011-04-19 00:40 UTC (History)
0 users

See Also:

file.diff (1.99 KB, patch)
2010-12-14 01:30 UTC, Jason Helfman
no flags Details | Diff
patch2.txt (5.28 KB, text/plain)
2010-12-17 00:55 UTC, Jason Helfman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Helfman 2010-12-14 01:30:10 UTC
Allow for postgres user to be something other than "pgsql," but pgsql should be default.

Fix: This is largely a copy of ports/113707, however, in my humble opinion, I believe this patch would be something that may be considered more of an acceptable solution.
How-To-Repeat: 	1. Rename the PostgreSQL OS user name with PW(8).
	2. Run "/usr/local/etc/rc.d/postgresql start"
	3. It will say: "su: unknown login: pgsql"
Comment 1 Edwin Groothuis freebsd_committer 2010-12-14 01:30:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jason Helfman 2010-12-17 00:55:02 UTC
Previous patch is borked. Please disregard. This attached patch is good.

Changes that needed to be made for this patch to work are listed below.

1. Moved pkg-install-server to files/pkg-install-server.in (as it is now
a substitutable file) Other bits of the port had to be changed to allow
for this behavior.

2. PKGINSTALL was renamed to INSTALLWARNING so it would work in
pre-everything target.

3. Only add pkg-install-server to SUB_FILES array if it existed, which
it doesn't for the client. This was a minor piece, but makes it work
and allows client to build.

4. postgresql84-server/pkg-install-server file is removed with this
patch, and added file postgresql84-server/files/pkg-install-server.in
Same originally patched file, but needs to be in new location to work.

5. PLIST_SUB on pkg-plist-server in the event a different user is
specified in the port.

Phil and I put our heads together on this one and worked through it to
get a clean build in Tinderbox. Much thanks to him on this...

We feel this is a good patch that may apply to other postgresql ports.


Jason Helfman
System Administrator
Comment 3 Palle Girgensohn freebsd_committer 2011-02-01 13:46:33 UTC

Thanks for the patch. The ports tree is in feature freeze now, but after 
that is released, I'll commit this patch.

Comment 4 Jason 2011-02-01 17:38:36 UTC
On Tue, Feb 01, 2011 at 02:46:33PM +0100, Palle Girgensohn thus spake:
>Thanks for the patch. The ports tree is in feature freeze now, but after
>that is released, I'll commit this patch.

Wonderful! Thanks. We created a similar one for 90, if you wanted to look at
that one.

Thanks, again.

Jason Helfman
System Administrator
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
Comment 5 dfilter service freebsd_committer 2011-04-19 00:34:49 UTC
girgen      2011-04-18 23:34:27 UTC

  FreeBSD ports repository

  Modified files:
    databases/postgresql82-server Makefile distinfo 
    databases/postgresql82-server/files pkg-message-client.in 
    databases/postgresql83-server Makefile distinfo 
    databases/postgresql83-server/files pkg-message-client.in 
    databases/postgresql84-server Makefile distinfo 
    databases/postgresql84-server/files pkg-message-client.in 
    databases/postgresql90-server Makefile distinfo 
    databases/postgresql90-server/files pkg-message-client.in 
  Added files:
    databases/postgresql84-server/files 502.pgsql.in 
    databases/postgresql90-server/files 502.pgsql.in 
  Removed files:
    databases/postgresql84-server pkg-install-server 
    databases/postgresql84-server/files 502.pgsql 
    databases/postgresql90-server pkg-install-server 
    databases/postgresql90-server/files 502.pgsql 
  Update PostgreSQL to 9.0.4, 8.4.8, 8.3.15 and 8.2.21.
  This update contains a critical fix to the pg_upgrade utility
  which prevents significant downtime issues. Do not use
  pg_upgrade without installing this update first.
  The issue with pg_upgrade and the fix are detailed on the PostgreSQL
  wiki: http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix
  Users who have already used pg_upgrade should run the database repair
  script given on that page on their databases as soon as possible.
  See the release notes for each version at
  http://www.postgresql.org/docs/current/static/release.html for a full
  list of changes with details.
  Allow the username of the postgresql user to configurable for 8.4 and 9.0.
  Largely inspired by the work of Jason Helfman [153668, 153136].
  Change PGUSER knob to PG_USER not to clash with PGUSER environment.
  PR: 153668, 153136, 155493, 155137
  Revision  Changes    Path
  1.197     +3 -3      ports/databases/postgresql82-server/Makefile
  1.69      +2 -2      ports/databases/postgresql82-server/distinfo
  1.2       +1 -1      ports/databases/postgresql82-server/files/pkg-message-client.in
  1.20      +3 -0      ports/databases/postgresql82-server/pkg-plist-server
  1.210     +3 -3      ports/databases/postgresql83-server/Makefile
  1.78      +2 -2      ports/databases/postgresql83-server/distinfo
  1.3       +1 -1      ports/databases/postgresql83-server/files/pkg-message-client.in
  1.27      +3 -0      ports/databases/postgresql83-server/pkg-plist-server
  1.221     +21 -10    ports/databases/postgresql84-server/Makefile
  1.81      +2 -2      ports/databases/postgresql84-server/distinfo
  1.12      +0 -112    ports/databases/postgresql84-server/files/502.pgsql (dead)
  1.1       +112 -0    ports/databases/postgresql84-server/files/502.pgsql.in (new)
  1.1       +66 -0     ports/databases/postgresql84-server/files/pkg-install-server.in (new)
  1.3       +1 -1      ports/databases/postgresql84-server/files/pkg-message-client.in
  1.5       +2 -2      ports/databases/postgresql84-server/files/postgresql.in
  1.8       +0 -63     ports/databases/postgresql84-server/pkg-install-server (dead)
  1.20      +1 -0      ports/databases/postgresql84-server/pkg-plist-client
  1.31      +4 -1      ports/databases/postgresql84-server/pkg-plist-server
  1.215     +17 -8     ports/databases/postgresql90-server/Makefile
  1.81      +2 -2      ports/databases/postgresql90-server/distinfo
  1.12      +0 -112    ports/databases/postgresql90-server/files/502.pgsql (dead)
  1.1       +112 -0    ports/databases/postgresql90-server/files/502.pgsql.in (new)
  1.1       +66 -0     ports/databases/postgresql90-server/files/pkg-install-server.in (new)
  1.3       +1 -1      ports/databases/postgresql90-server/files/pkg-message-client.in
  1.5       +2 -2      ports/databases/postgresql90-server/files/postgresql.in
  1.8       +0 -63     ports/databases/postgresql90-server/pkg-install-server (dead)
  1.31      +4 -1      ports/databases/postgresql90-server/pkg-plist-server
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Palle Girgensohn freebsd_committer 2011-04-19 00:36:27 UTC
State Changed
From-To: open->closed

Modified patch just slightly and added support for the periodic script