Opened 11 years ago

Closed 7 years ago

#39342 closed enhancement (duplicate)

postgresql92-server @9.2.4 more robust initdb invocation

Reported by: gthb (Gunnlaugur Thor Briem) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jyrkiwahlstedt
Port: postgresql92-server

Description

The current invocation of initdb suggested in post-install output:

    sudo su postgres -c '/opt/local/lib/postgresql92/bin/initdb -D /opt/local/var/db/postgresql92/defaultdb'

fails with somewhat confusing error messages if the user is in a directory not accessible to the postgres user — and that's typically the case.

The attached patch changes this to a sudo -i -u postgres invocation, which doesn't care which directory you run it from. That ought to cut down on people stumbling on the initdb step as in #32817.

Attachments (1)

Portfile-postgresql92-server.diff (518 bytes) - added by gthb (Gunnlaugur Thor Briem) 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by gthb (Gunnlaugur Thor Briem)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jwa@… added
Owner: changed from macports-tickets@… to mww@…

Doesn't this also affect the other postgresql*-server ports?

comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)

Either this ticket or #39341 should be closed as a duplicate.

comment:3 Changed 11 years ago by gthb (Gunnlaugur Thor Briem)

Yeah, this one should be closed I guess. Sorry about that; my sleep-deprived thinking was that (a) MacPorts maintainers seemed to prefer separate tickets for separate ports (ticket guidelines being so strict-sounding), and (b) postgresql91-server and down were less important to maintain, and I didn't want to make *more* near-duplicate tickets. Really I should have gotten some sleep and then posted the one ticket. : )

comment:4 Changed 7 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed
Version: 2.1.3
Note: See TracTickets for help on using tickets.