Thread: Cygwin PostgreSQL Distribution

Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
I have decided to contribute PostgreSQL to the standard Cygwin
distribution.  It will be included in the contrib/postgresql branch on
the Cygwin mirrors.  If interested, see the following for a copy
of the announcement:

    http://sources.redhat.com/ml/cygwin/2001-04/msg00256.html

Please note that this distribution is configured with a prefix of
/usr/pgsql instead of /usr/local/pgsql due to the Cygwin packaging
requirements.

I also implore people to post to pgsql-ports@postgresql.org or
cygwin@sources.redhat.com as appropriate instead of emailing me
directly.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Jason Tishler writes:

> I have decided to contribute PostgreSQL to the standard Cygwin
> distribution.  It will be included in the contrib/postgresql branch on
> the Cygwin mirrors.  If interested, see the following for a copy
> of the announcement:
>
>     http://sources.redhat.com/ml/cygwin/2001-04/msg00256.html
>
> Please note that this distribution is configured with a prefix of
> /usr/pgsql instead of /usr/local/pgsql due to the Cygwin packaging
> requirements.

Any chance of making this /usr/postgresql?

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Wed, Apr 04, 2001 at 05:19:21PM +0200, Peter Eisentraut wrote:
> Jason Tishler writes:
> > Please note that this distribution is configured with a prefix of
> > /usr/pgsql instead of /usr/local/pgsql due to the Cygwin packaging
> > requirements.
>
> Any chance of making this /usr/postgresql?

Sure, it's easy.  I just have to change one line in my build script.

But, why does configure default to /usr/local/pgsql instead of
/usr/local/postgresql?

Anyway, what would the PostgreSQL community like?  If we can reach consensus,
then I will gladly change the prefix, if necessary.  Note however that
the prefix must start with /usr not /usr/local.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Jason Tishler writes:

> But, why does configure default to /usr/local/pgsql instead of
> /usr/local/postgresql?

Ancient tradition, I suppose.

Anyway, the package is called PostgreSQL, the tar ball is
postgresql-xxx.tar.gz, the rpm is postgresql-....rpm, the BSD ports are
also under postgresql somewhere.  Also, we create subdirectories
like .../share/postgresql and .../include/postgresql.  So it only makes
sense to keep that naming scheme.  Or maybe I'm just concerned because
many people can't spell "PostGresSql".  ;-)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Thu, Apr 05, 2001 at 09:54:38PM +0200, Peter Eisentraut wrote:
> Jason Tishler writes:
>
> > But, why does configure default to /usr/local/pgsql instead of
> > /usr/local/postgresql?
>
> Ancient tradition, I suppose.
>
> Anyway, the package is called PostgreSQL, the tar ball is
> postgresql-xxx.tar.gz, the rpm is postgresql-....rpm, the BSD ports are
> also under postgresql somewhere.  Also, we create subdirectories
> like .../share/postgresql and .../include/postgresql.  So it only makes
> sense to keep that naming scheme.  Or maybe I'm just concerned because
> many people can't spell "PostGresSql".  ;-)

OK.  I don't know if Peter equals consensus...

But, if I don't hear from anyone by the time that I build
and package 7.1RC3 (when available), then I will configure with
--prefix=/usr/postgresql.

BTW, my pre-built Cygwin PostgreSQL tarball has the following directory
structure under the configure prefix:

    bin
    doc
    doc/html
    include
    include/lib
    include/libpq
    include/libpq++
    lib
    man
    man/cat1 # added by me to speed up man
    man/catl # added by me to speed up man
    man/man1
    man/manl
    share

I hope that it is OK -- that is I don't see any "include/postgresql" or
"share/postgresql" as indicated above.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Jason Tishler writes:

> BTW, my pre-built Cygwin PostgreSQL tarball has the following directory
> structure under the configure prefix:
>
>     bin
>     doc
>     doc/html
>     include
>     include/lib
>     include/libpq

What do you put into these two?  It's not necessarily a good idea to
divert from the standard layout under include because people might start
relying on `pg_config --includedir` to configure their packages.  But if
there is some standard that requires you to do this...

>     include/libpq++
>     lib
>     man
>     man/cat1 # added by me to speed up man
>     man/catl # added by me to speed up man
>     man/man1
>     man/manl
>     share
>
> I hope that it is OK -- that is I don't see any "include/postgresql" or
> "share/postgresql" as indicated above.

You only get these if $prefix doesn't contain "postgresql" (or pgsql)
already, like in the case of /usr/local.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Thu, Apr 05, 2001 at 11:26:50PM +0200, Peter Eisentraut wrote:
> Jason Tishler writes:
>
> >     include/lib
> >     include/libpq
>
> What do you put into these two?

    $ find lib libpq++
    lib
    lib/dllist.h
    libpq++
    libpq++/pgconnection.h
    libpq++/pgcursordb.h
    libpq++/pgdatabase.h
    libpq++/pglobject.h
    libpq++/pgtransdb.h

> It's not necessarily a good idea to
> divert from the standard layout under include because people might start
> relying on `pg_config --includedir` to configure their packages.  But if
> there is some standard that requires you to do this...

My intention was *not* to deviate from the standard PostgreSQL layout.
I got the previously mentioned directory structure by just configuring
as follows:

    configure --prefix=/usr/pgsql --with-CXX

Did I do something wrong?  How should I configure?

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Thu, Apr 05, 2001 at 05:30:10PM -0400, Jason Tishler wrote:
> My intention was *not* to deviate from the standard PostgreSQL layout.
> I got the previously mentioned directory structure by just configuring
> as follows:
>
>     configure --prefix=/usr/pgsql --with-CXX
>
> Did I do something wrong?  How should I configure?

By extracting pg_config from the following:

    ftp://ftp.postgresql.org/pub/pub/dev/test-rpms/postgresql-devel-7.1RC2-1.i386.rpm

I have discovered that at least one PostgreSQL Distribution is
configured as follows:

    --enable-locale --with-CXX --prefix=/usr --with-perl
    --enable-multibyte --with-tcl --with-odbc --enable-syslog
    --with-python --sysconfdir=/etc/pgsql --mandir=/usr/man
    --docdir=/usr/doc --includedir=/usr/include/pgsql
    --datadir=/usr/share/pgsql

Should I be using the above?  Or, at least the directory affecting
options (with possibly pgsql replaced by postgresql as you previously
suggested)?

My goal is to provide a pre-built Cygwin PostgreSQL distribution that
best serves the community.  Any guidance to help me achieve this goal
would be greatly appreciated.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Jason Tishler writes:

> Peter,
>
> On Thu, Apr 05, 2001 at 11:26:50PM +0200, Peter Eisentraut wrote:
> > Jason Tishler writes:
> >
> > >     include/lib
> > >     include/libpq
> >
> > What do you put into these two?
>
>     $ find lib libpq++
>     lib
>     lib/dllist.h
>     libpq++
>     libpq++/pgconnection.h
>     libpq++/pgcursordb.h
>     libpq++/pgdatabase.h
>     libpq++/pglobject.h
>     libpq++/pgtransdb.h

I see, my fault.  I thought the libpq was for the client side library, but
it's of course the backend's directory.  Everything's great.

>
> > It's not necessarily a good idea to
> > divert from the standard layout under include because people might start
> > relying on `pg_config --includedir` to configure their packages.  But if
> > there is some standard that requires you to do this...
>
> My intention was *not* to deviate from the standard PostgreSQL layout.
> I got the previously mentioned directory structure by just configuring
> as follows:
>
>     configure --prefix=/usr/pgsql --with-CXX
>
> Did I do something wrong?  How should I configure?

This is good, but before long users will pester you for stuff like
--enable-locale, --enable-multibyte, --with-perl, etc.  ;-)

I don't know about the Cygwin file system conventions, but do people have
to alter their PATH and MANPATH (and LD_LIBRARY_PATH?) setting for each
new package they install?  No shared installation locations?

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Lamar Owen
Date:
Jason Tishler wrote:
> By extracting pg_config from the following:

>     ftp://ftp.postgresql.org/pub/pub/dev/test-rpms/postgresql-devel-7.1RC2-1.i386.rpm

> I have discovered that at least one PostgreSQL Distribution is
> configured as follows:

>     --enable-locale --with-CXX --prefix=/usr --with-perl
>     --enable-multibyte --with-tcl --with-odbc --enable-syslog
>     --with-python --sysconfdir=/etc/pgsql --mandir=/usr/man
>     --docdir=/usr/doc --includedir=/usr/include/pgsql
>     --datadir=/usr/share/pgsql

And I'm using 'pgsql' instead of 'postgresql' for historical reasons, as
I must fit the RPMset into an environment where the data has lived for
ages in /var/lib/pgsql, the libraries have lived forever in
/usr/lib/pgsql....  Changing to using 'postgresql' is currently not
planned. I may do so for a future version, however, if the _need_
arises.

After all, even on postgresql.org, the snapshots extract to the 'pgsql'
tree.  Yes, it is inconsistent.

> Should I be using the above?  Or, at least the directory affecting
> options (with possibly pgsql replaced by postgresql as you previously
> suggested)?

For your application, you can pretty much dictate where everything will
go as there really isn't a preexisting standard layout.  However, to get
the 'postgresql' part of the directory name only requires that you drop
the 'pgsql' from the above -- the 'postgresql' will be automatically
appended.

Glad you're grabbing the bull by the horns, though!
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Lamar Owen writes:

> After all, even on postgresql.org, the snapshots extract to the 'pgsql'
> tree.

The snapshots stopped doing that more than half a year ago.  Now
postgresql-snapshot.tar extracts into postgresql-snapshot/.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Lamar Owen
Date:
Peter Eisentraut wrote:
>
> Lamar Owen writes:
>
> > After all, even on postgresql.org, the snapshots extract to the 'pgsql'
> > tree.
>
> The snapshots stopped doing that more than half a year ago.  Now
> postgresql-snapshot.tar extracts into postgresql-snapshot/.

My bad -- the last snapshot I extracted was about nine months ago.  CVS
checkouts still go the 'pgsql', and the module name is still
'pgsql',right?
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Fri, Apr 06, 2001 at 05:50:25PM +0200, Peter Eisentraut wrote:
> This is good, but before long users will pester you for stuff like
> --enable-locale, --enable-multibyte, --with-perl, etc.  ;-)

The above is expected and fine with me.  If Cygwin PostgreSQL can
support the requested functionality, then I will build and package as
appropriate.

> I don't know about the Cygwin file system conventions, but do people have
> to alter their PATH and MANPATH (and LD_LIBRARY_PATH?) setting for each
> new package they install?

No.

> No shared installation locations?

No, so far all (latest and contrib) packages share the same installation
location -- /usr.

I was just blindly going along with what configure (with defaults)
and Kevin Lo's Windows 2000 web page suggested.

With more information and some reflection, I would like to configure
Cygwin PostgreSQL as follows:

    configure --with-CXX --prefix=/usr --sysconfdir=/etc/postgresql \
    --mandir=/usr/man --docdir=/usr/doc/postgresql-$version \
    --includedir=/usr/include/postgresql --datadir=/usr/share/postgresql

where $version is the PostgreSQL version (e.g., 7.1RC3) and the
--docdir value is following a Cygwin /usr/doc convention.

Note that the above configure options are essentially a subset of those
used to generate the RPM on the PostgreSQL ftp site.  The only exception
is the --docdir value.  Is this layout more acceptable?

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cygwin PostgreSQL Distribution

From
Peter Eisentraut
Date:
Jason Tishler writes:

> > I don't know about the Cygwin file system conventions, but do people have
> > to alter their PATH and MANPATH (and LD_LIBRARY_PATH?) setting for each
> > new package they install?
>
> No.

But if every package is installed into their own /usr/<package>, then
they'll have to.

> With more information and some reflection, I would like to configure
> Cygwin PostgreSQL as follows:
>
>     configure --with-CXX --prefix=/usr --sysconfdir=/etc/postgresql \
>     --mandir=/usr/man --docdir=/usr/doc/postgresql-$version \
>     --includedir=/usr/include/postgresql --datadir=/usr/share/postgresql
>
> where $version is the PostgreSQL version (e.g., 7.1RC3) and the
> --docdir value is following a Cygwin /usr/doc convention.
>
> Note that the above configure options are essentially a subset of those
> used to generate the RPM on the PostgreSQL ftp site.  The only exception
> is the --docdir value.  Is this layout more acceptable?

Looks reasonable, but it really depends on what file system conventions
you need to follow.  Btw., you could equivalently write

configure --with-CXX --prefix=/usr --sysconfdir=/etc
--docdir='/usr/doc/postgresql-${VERSION}' #(automatically track version changes)

The rest is set automatically.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Cygwin PostgreSQL Distribution

From
Lamar Owen
Date:
Peter Eisentraut wrote:
> configure --with-CXX --prefix=/usr --sysconfdir=/etc
> --docdir='/usr/doc/postgresql-${VERSION}' #(automatically track version changes)

> The rest is set automatically.

I wish mine could be that simple.

Although, it is much better than it was for 7.0, thanks to Peter.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Cygwin PostgreSQL Distribution

From
Jason Tishler
Date:
Peter,

On Fri, Apr 06, 2001 at 11:10:36PM +0200, Peter Eisentraut wrote:
> Jason Tishler writes:
>
> > > I don't know about the Cygwin file system conventions, but do people have
> > > to alter their PATH and MANPATH (and LD_LIBRARY_PATH?) setting for each
> > > new package they install?
> >
> > No.
>
> But if every package is installed into their own /usr/<package>, then
> they'll have to.

So far no package until my PostgreSQL 7.1RC2 required users to alter
their PATH, MANPATH, etc.  I made a mistake which I will rectify when I
package 7.1RC3.

> > With more information and some reflection, I would like to configure
> > Cygwin PostgreSQL as follows:
> >
> >     configure --with-CXX --prefix=/usr --sysconfdir=/etc/postgresql \
> >     --mandir=/usr/man --docdir=/usr/doc/postgresql-$version \
> >     --includedir=/usr/include/postgresql --datadir=/usr/share/postgresql
>
> Looks reasonable, but it really depends on what file system conventions
> you need to follow.  Btw., you could equivalently write
>
> configure --with-CXX --prefix=/usr --sysconfdir=/etc
> --docdir='/usr/doc/postgresql-${VERSION}' #(automatically track version changes)

Thanks for the above.  This configuration matches perfectly with Cygwin's
file system conventions.

BTW, I am sticking with --docdir=/usr/doc/postgresql-$version with $version
supplied by my build script because --docdir='/usr/doc/postgresql-${VERSION}'
causes pg_config a bit of trouble.  Specifically, pg_config --configure
displays the following if configured as above:

    $ pg_config --configure
    --with-CXX --prefix=/usr --sysconfdir=/etc --docdir=/usr/doc/postgresql-

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com