Opened 10 years ago

Last modified 7 years ago

#45215 assigned defect

postgresql*-server: don't create and own log

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc: jyrkiwahlstedt
Port: postgreslql*-server

Description

The postgresql*-server ports create a postgres.log log file:

$ ls -l  /opt/local/var/log/postgresql93/postgres.log
-rw-r--r--  1 postgres  postgres  5643 Sep 27 12:47 /opt/local/var/log/postgresql93/postgres.log
$ port provides   /opt/local/var/log/postgresql93/postgres.log
/opt/local/var/log/postgresql93/postgres.log is provided by: postgresql93-server

This file is owned by the port. That means if the postgresql*-server port is uninstalled or even just deactivated or upgraded, the log will be deleted. This is undesirable. The port should not create a logfile. The port should create the logfile's parent directory, with permissions such that the postgres server can create the log inside it when it wants to. Usually this would be done with something like this:

destroot.keepdirs ${destroot}${prefix}/var/log/postgresql93
post-destroot {
    xinstall -u postgres -g postgres -d ${destroot}${prefix}/var/log/postgresql93
}

Change History (1)

comment:1 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from mww@… to macports-tickets@…
Status: newassigned
Note: See TracTickets for help on using tickets.