ports/108570: databases/postgresql82-server fails when PREFIX is set

Andrew Hammond andrew.george.hammond at gmail.com
Tue Jan 30 19:50:15 UTC 2007


>Number:         108570
>Category:       ports
>Synopsis:       databases/postgresql82-server fails when PREFIX is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 30 19:50:14 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Hammond
>Release:        6.2 on amd64, cvsup'd ports to lastest as of 2007-01-29
>Organization:
AdECN Ltd.
>Environment:
FreeBSD ahammond.ecoffice.experclick.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:43:30 UTC 2007     root at portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  amd64
>Description:
I'm attempting to support multiple versions of the PostgreSQL database on a single box. In order to do this, I'd like to use the PREFIX feature to install binary builds into /usr/local/pgsql<version> subdirs. After setting the PREFIX, make install fails. I tried to attach a typescript of this, but... that didn't fly too well. Here's the tail end of the typescript.

gmake[1]: Leaving directory `/usr/ports/databases/postgresql82-server/work/postgresql-8.2.1/src/pl/plpgsql'
install  -o root -g wheel -m 444 /usr/ports/databases/postgresql82-server/work/dot.profile /usr/local/pgsql821_sl126_amd64_fbsd62/share/postgresql/dot.profile.dist;  install  -o root -g wheel -m 444 -o pgsql -g pgsql /usr/ports/databases/postgresql82-server/work/dot.profile ~pgsql/dot.profile.dist ;  if [ ! -f ~pgsql/.profile ]; then  /bin/cp -p ~pgsql/dot.profile.dist ~pgsql/.profile;  fi
install: /usr/local/pgsql/dot.profile.dist: No such file or directory
*** Error code 71

Stop in /usr/ports/databases/postgresql82-server.
ahammond# pwd
/usr/ports/databases/postgresql82-server
ahammond# exit
exit

Script done on Tue Jan 30 13:17:01 2007

I think this exposes a deeper problem. The current PostgreSQL packaging scripts assume that there is a 1:1 relationship between the box and the PostgreSQL binary, as well as a 1:1 relationship between the binary and the number of back-ends (PGDATA directories) it is running. This is the case in the majority of instances; a single server has a single binary to support a single back-end process, almost certainly on the default port.

Bug ports/104075 documents another symptom of this same problem.

However, in environments where availability or scalability are key goals, it is often the case that a single box will have more than one version of the PostgreSQL binary, and that these binaries may be supporting more than one PostgreSQL back-end (PGDATA/port).
>How-To-Repeat:
cd /usr/ports/databases/postgresql82-server;
PREFIX=/usr/local/pgsql821 sudo make install
>Fix:
The debian packages support this level of flexibility for example.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list