Bug 153668 - [patch] databases/postgresql90-server: allow for postgres user to be configurable
Summary: [patch] databases/postgresql90-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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 01:40 UTC by Jason Helfman
Modified: 2011-04-19 00:40 UTC (History)
0 users

See Also:


Attachments
file.diff (5.80 KB, patch)
2011-01-04 01:40 UTC, Jason Helfman
no flags Details | Diff

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

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 freebsd_triage 2011-01-04 01:40:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jason 2011-03-23 23:47:27 UTC
On 'deinstall,' I found the port was noting to "remove pgsql" user, so I am
following this up with a singular patch for pkg-plist-server. This includes
the previous updates for pkg-plist-server.

This same followup may be applied to ports/153136

Thanks!

Index: postgresql90-server/pkg-plist-server
===================================================================
RCS file: /home/jhelfman/ncvs/ports/databases/postgresql90-server/pkg-plist-server,v
retrieving revision 1.30
diff -u -r1.30 pkg-plist-server
--- postgresql90-server/pkg-plist-server	31 Dec 2010 09:57:21 -0000	1.30
+++ postgresql90-server/pkg-plist-server	23 Mar 2011 23:42:57 -0000
@@ -753,9 +753,9 @@
  share/postgresql/tsearch_data/synonym_sample.syn
  share/postgresql/tsearch_data/thesaurus_sample.ths
  @dirrmtry share/postgresql/tsearch_data
-@unexec echo "Warning: If you will *NOT* use this package anymore, please remove the pgsql user manually."
+@unexec echo "Warning: If you will *NOT* use this package anymore, please remove the %%PGUSER%% user manually."
  @dirrmtry share/postgresql
  @dirrmtry etc/periodic/daily
  @dirrmtry etc/periodic
  @dirrmtry lib/postgresql
-@dirrmtry pgsql
+@dirrmtry %%PGUSER% 

-- 
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
Comment 3 dfilter service freebsd_committer freebsd_triage 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 
                                  pkg-plist-server 
    databases/postgresql82-server/files pkg-message-client.in 
    databases/postgresql83-server Makefile distinfo 
                                  pkg-plist-server 
    databases/postgresql83-server/files pkg-message-client.in 
    databases/postgresql84-server Makefile distinfo 
                                  pkg-plist-client 
                                  pkg-plist-server 
    databases/postgresql84-server/files pkg-message-client.in 
                                        postgresql.in 
    databases/postgresql90-server Makefile distinfo 
                                  pkg-plist-server 
    databases/postgresql90-server/files pkg-message-client.in 
                                        postgresql.in 
  Added files:
    databases/postgresql84-server/files 502.pgsql.in 
                                        pkg-install-server.in 
    databases/postgresql90-server/files 502.pgsql.in 
                                        pkg-install-server.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 
  Log:
  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
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Palle Girgensohn freebsd_committer freebsd_triage 2011-04-19 00:35:00 UTC
State Changed
From-To: open->closed

Modified patch just slightly and added support for the periodic script