[HEADS UP] PostgreSQL ports split into -server & -client

Ion-Mihai Tetcu itetcu at people.tecnik93.com
Mon Jan 31 07:01:36 PST 2005


On Mon, 31 Jan 2005 15:51:27 +0100
Palle Girgensohn <girgen at FreeBSD.org> wrote:

> 
> 
> --On måndag, januari 31, 2005 15.38.16 +0200 Ion-Mihai Tetcu 
> <itetcu at people.tecnik93.com> wrote:
> 
> > On Mon, 31 Jan 2005 07:49:34 +0100
> > dirk.meyer at dinoex.sub.org (Dirk Meyer) wrote:
> >
> >> Craig Boston schrieb:,
> >>
> >> > With 8.0 out and and 7.x likely continuing to be used in production
> >> > environments for quite some time, it would be nice to have a standard
> >> > way to select which combination of version and server/client to be
> >> > used (if there isn't one already; I'm about to go look at the new
> >> > ports).
> >>
> >> I used this macro in bind9-dlz/Makefile:
> >> POSTGRESQL_PORT?=	databases/postgresql7
> >> LIB_DEPENDS=		pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
> >
> > What about a user settable WITH_PGSQL_VER equivalent of
> > DEFAULT_PGSQL_VER  like in MySQL case ?
> >
> >
> > And: I've set in my mail/dspam's Makefile:
> > ......
> >   .if defined(WITH_POSTGRESQL)
> >   USE_PGSQL=      yes
> > + WANT_PGSQL_VER= 99
> > + DEFAULT_PGSQL_VER=      99
> > + BROKEN_WITH_PGSQL=      74
> > .......
> >
> > and it doesn't complain, just goes on and compiles with the install
> > headers; having this installed:
> >  # pkg_info -I postg\*
> > postgresql-7.4.6    The most advanced open-source database available
> > anywhere postgresql-docs-7.4.6 The PostgreSQL documentation set
> >
> > And I don't understand it, it should bark on this else:
> ># And now we are checking if we can use it
> > .if exists(${PORTSDIR}/databases/postgresql${PGSQL_VER}-client)
> > ......
> > .else
> > BROKEN=         "unknown PostgreSQL version: ${PGSQL_VER}"
> 
> Well, in this case it is because pre.mk is loaded *before* the variables 
> are set. Hmm, this seems like a bug, but it works, kind of... I would have 
> believed that USE_PGSQL would not work either in this case, but it does. 
> This surprises me a bit.
> 
> Standard procedure is to set stuff like USE_PGSQL, WITH_PGSQL_VER and 
> BROKEN_WITH_PGSQL etc *before* including <bsd.port(.pre)?.mk>.

Maybe portlint should yes a warning if not ?

>From what I can tell, it should work when set in ENV or command line,
right ? And that would count as  " before bsd.* " ?  But it doesn't.

> There is a catch-22 when using OPTIONS, though...the OPTIONS stuff is not 
> competent enought, really. You need to include <bsd.port.pre.mk> in order 
> to read stuff from OPTIONS, but then it is too late for setting USE_XXX 
> knobs... :(

I was thinking about splitting the port in 3 slaves - one for each DB
and a master and this would serve also as a kind of workaround in this
case.

> But you're right that it does not do exactly what I would expect in this 
> case. I'll look into it tonight,

Thanks.


-- 
IOnut
Unregistered ;) FreeBSD "user"




More information about the freebsd-ports mailing list