Thread: PostgreSQL 7.1 now in OpenBSD ports/packages

PostgreSQL 7.1 now in OpenBSD ports/packages

From
Peter Galbavy
Date:
[Cross posted as approriate - please edit To: and Cc: before replying.]

Thanks to Brandon Palmer (with some help from myself) PostgreSQL
7.1 is now in the OpenBSD ports tree. It made it in just before the
2.9 tree lock and should, all willing, make it onto the 2.9 CD's
(around June) as a binary package.

Anyone who uses OpenBSD and PostgreSQL should be aware of the following,
however:

1. The package is designed to work with the upcoming 2.9 release
and not 2.8. If you are using 2.8-stable, please stick to 7.0.3 for
now or read the notes below about usernames. `postgresql' package
users will not get support from the maintainers on 2.8 systems -
sorry, time is not that available. Also, the binary package will
*not* work as OpenBSD shared library versions have been updated and
are not backward binary compatible.

2. The package name is now `postgresql' and not `pgsql' - the installer
(pkg_add) will spot conflicts between the two though.

3. The suggested administrative username is `postgresql' to match the package
name. This is not hardwired anywhere, and you may continue using the old
suggestion of `pgsql'.

4. You must backup and restore your data as per normal PostgreSQL procedures.

5. The default data directory is now /var/postgresql.

6. The `pgwrap' utility is no longer shipped or supported.

If any users of the package have any OpenBSD or package specific
queries, please contact either myself <peter.galbavy@knowledge.com>
or Brandon Palmer <bpalmer@crimelabs.net>.

Finally, a great big hug and thank you to the PostgreSQL developers
for making 7.1 happen.

rgds,
--
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com/

Re: PostgreSQL 7.1 now in OpenBSD ports/packages

From
Peter Eisentraut
Date:
Peter Galbavy writes:

> Thanks to Brandon Palmer (with some help from myself) PostgreSQL
> 7.1 is now in the OpenBSD ports tree. It made it in just before the
> 2.9 tree lock and should, all willing, make it onto the 2.9 CD's
> (around June) as a binary package.

Coupla comments:

In the port Makefile you have

CONFIGURE_ENV=  POSTGRESDIR="${PREFIX}" LIBS=-lcurses
CONFIGURE_ARGS= --enable-syslog \
                --disable-rpath \
                --with-CXX \
                --datadir="${PREFIX}/share/examples/postgresql" \
                --docdir="${PREFIX}/share/doc/postgresql"

Firstly, POSTGRESDIR doesn't do anything, you want to use the --prefix
option.  (This is done automatically, so in consequence you can just
remove this.)  Secondly, configure should pick up -lcurses automatically
when it needs it (which it probably doesn't).

I don't know why you set --datadir the way you do, but note that datadir
does not contain any examples.  In a full installation, datadir contains
files required for initdb, pgaccess, the JDBC driver, and some *.sql
files.  You probably just want to leave off this option, which will give
you the right default.

Later in Makefile

MAKE_ENV=       USE_TCL=true TCL_INCDIR="${TCL_INCDIR}" \
                TK_INCDIR="${TK_INCDIR}"

This is probably a relict from the past.


CONFIGURE_ARGS+= --with-openssl=/etc

I don't think you install OpenSSL under /etc.

FAKE_FLAGS=     POSTGRESDIR="${WRKINST}${PREFIX}"

No, you want to use gmake install DESTDIR=/else/where.  POSTGRESDIR
doesn't do anything.

post-install:
[...]
        @cd ${WRKSRC}/doc && \
                ${MAKE_PROGRAM} PGDOCS="${PREFIX}/share/doc/postgresql" all
        ${INSTALL_DATA} ${WRKSRC}/doc/*.ps* ${PREFIX}/share/doc/postgresql

The documentation is installed by default, there is no need to do anything
special.  *.ps files are not shipped in the tarball, you need to download
them separately if you want them.

That's it.  Nice work.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: PostgreSQL 7.1 now in OpenBSD ports/packages

From
Peter Galbavy
Date:
On Sun, Apr 22, 2001 at 01:12:29PM +0200, Peter Eisentraut wrote:
> In the port Makefile you have
>
> CONFIGURE_ENV=  POSTGRESDIR="${PREFIX}" LIBS=-lcurses
> CONFIGURE_ARGS= --enable-syslog \
>                 --disable-rpath \
>                 --with-CXX \
>                 --datadir="${PREFIX}/share/examples/postgresql" \
>                 --docdir="${PREFIX}/share/doc/postgresql"
>
> Firstly, POSTGRESDIR doesn't do anything, you want to use the --prefix
> option.  (This is done automatically, so in consequence you can just
> remove this.)  Secondly, configure should pick up -lcurses automatically
> when it needs it (which it probably doesn't).

Hmm. I think that might be a relic from the 7.0.3 port - but I will
check. There is some underlying magic somewhere that used to need
this. Maybe that went when we removed the patches to locate the libs
under libs/pgsql. --prefix is set automatically I agree.

The -lcurses is however *very* important at the moment. The (new
import of the) readline library is found, but ./configure does not
then link with -lcurses which is uses (for tgetent I believe). This
stays.

> I don't know why you set --datadir the way you do, but note that datadir
> does not contain any examples.  In a full installation, datadir contains
> files required for initdb, pgaccess, the JDBC driver, and some *.sql
> files.  You probably just want to leave off this option, which will give
> you the right default.

Hmm. Good point. What we should do is do the fake install and then
move the examples being installed to the "current" default datadir
and then use the PLIST to copy those to the right place. pgaccess
is a problem as to what to do with is, given it appears to be an
entire package in itself. See below for comments re tcl, but one
solution maybe to create another SUBPACKAGE that is pgaccess only,
and then only if the tcl FLAVOR is selected.

> Later in Makefile
>
> MAKE_ENV=       USE_TCL=true TCL_INCDIR="${TCL_INCDIR}" \
>                 TK_INCDIR="${TK_INCDIR}"
>
> This is probably a relict from the past.

I do not do tcl, and I do not think Brandon does either. We tested the
port to build the tcl flavor(s) and they seem to work. Once someone
(you maybe ?) offers to verify what the tcl flavor does, the quicker
we get shot of any problems.

> CONFIGURE_ARGS+= --with-openssl=/etc
>
> I don't think you install OpenSSL under /etc.

Work around for poor GNU configure / autoconf assumtptions. OpenBSD
ships with OpenSSL 0.9.6 installed in the system directories and the
ssl certs etc. in /etc/ssl. There is no way to say "enable ssl with a
config directory of /etc/ssl" except this one without patching.

> FAKE_FLAGS=     POSTGRESDIR="${WRKINST}${PREFIX}"
>
> No, you want to use gmake install DESTDIR=/else/where.  POSTGRESDIR
> doesn't do anything.

Seems to work find, but I see your point. Another one for the pile.

> post-install:
> [...]
>         @cd ${WRKSRC}/doc && \
>                 ${MAKE_PROGRAM} PGDOCS="${PREFIX}/share/doc/postgresql" all
>         ${INSTALL_DATA} ${WRKSRC}/doc/*.ps* ${PREFIX}/share/doc/postgresql
>
> The documentation is installed by default, there is no need to do anything
> special.  *.ps files are not shipped in the tarball, you need to download
> them separately if you want them.

This might be a relic too, I will take a look. For reference, the port
uses the full tarball sources but the non -docs SUBPACKAGE does
not install documentation (the html and internals.ps files).

> That's it.  Nice work.

Thanks, and thanks for the comments. I am taking a couple of days rest
from the port, my head is seeing too many Makefiles.

rgds,
--
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com/

Re: PostgreSQL 7.1 now in OpenBSD ports/packages

From
Peter Eisentraut
Date:
Peter Galbavy writes:

> The -lcurses is however *very* important at the moment. The (new
> import of the) readline library is found, but ./configure does not
> then link with -lcurses which is uses (for tgetent I believe). This
> stays.

Would you mind checking why configure fails to detect the requirement to
link with curses?  It is supposed to do that.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter