How to use postgresql-jdbc rpm with Sun JDK

Started by Kevin Murphyover 17 years ago5 messagesgeneral
Jump to latest
#1Kevin Murphy
murphy@genome.chop.edu

What's the easiest RPM-based way to install postgresql-jdbc on CentOS
5? I just became aware of the JPackage project, which seems appealing,
but it doesn't have an up-to-date version of postgresql-jdbc.

I'm using Devrim G�ND�Z's very nice PostgreSQL repository
(pgsqlrpms.org) with yum.

When yum installs the PGDG postgresql-jdbc-8.3.3 RPM on CentOS 5, it
appears to want to drag in GCJ dependencies, but I want to use a Sun
JDK. The JDK is pre-installed by the Rocks V cluster distribution,
which is based on CentOS 5.

Thanks,
Kevin Murphy

#2Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Kevin Murphy (#1)
Re: How to use postgresql-jdbc rpm with Sun JDK

On Thu, 2008-08-07 at 09:57 -0400, Kevin Murphy wrote:

What's the easiest RPM-based way to install postgresql-jdbc on CentOS
5? I just became aware of the JPackage project, which seems
appealing, but it doesn't have an up-to-date version of
postgresql-jdbc.

I don't think that there is an RPM way to do it, at least for now. See
below:

When yum installs the PGDG postgresql-jdbc-8.3.3 RPM on CentOS 5, it
appears to want to drag in GCJ dependencies, but I want to use a Sun
JDK. The JDK is pre-installed by the Rocks V cluster distribution,
which is based on CentOS 5.

Upstream (I mean, Tom) is building -jdbc package with open source
components for a long time, and I am following that, too. We were
directly installing the binary jar files under /usr/share/java without
compilation.

So, you will need to install jar files I think:

http://jdbc.postgresql.org/download.html#supported

Regards,
--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

#3Kevin Murphy
murphy@genome.chop.edu
In reply to: Devrim GÜNDÜZ (#2)
Re: How to use postgresql-jdbc rpm with Sun JDK

Devrim GÜNDÜZ wrote:

On Thu, 2008-08-07 at 09:57 -0400, Kevin Murphy wrote:

When yum installs the PGDG postgresql-jdbc-8.3.3 RPM on CentOS 5, it
appears to want to drag in GCJ dependencies, but I want to use a Sun
JDK. The JDK is pre-installed by the Rocks V cluster distribution,
which is based on CentOS 5.

Upstream (I mean, Tom) is building -jdbc package with open source
components for a long time, and I am following that, too. We were
directly installing the binary jar files under /usr/share/java without
compilation.

So, you will need to install jar files I think:

http://jdbc.postgresql.org/download.html#supported

Speaking as a near-ignoramus, would a simple RPM that wraps the binary
jar file make sense? I'm not sure what dependencies it should have,
though: simply 'java'? My issue is that a Rocks cluster likes to have
all software packaged as RPMs; compute nodes can be automatically built
from scratch when required simply by dumping RPMs in a certain directory
on the head node and adding the RPM name to an XML file.

I guess it can't be that hard for me to custom-build this sort of RPM,
although I've never built one before.

-Kevin Murphy

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Murphy (#3)
Re: How to use postgresql-jdbc rpm with Sun JDK

Kevin Murphy <murphy@genome.chop.edu> writes:

Devrim GÜNDÜZ wrote:

Upstream (I mean, Tom) is building -jdbc package with open source
components for a long time, and I am following that, too. We were
directly installing the binary jar files under /usr/share/java without
compilation.

Speaking as a near-ignoramus, would a simple RPM that wraps the binary
jar file make sense?

Sure, if you want to do it that way. We did in fact do it that way up
till about 8.0. We (or at least I) moved away from it because of Red
Hat's policy that source RPMs should contain only, well, source.
But if you roll your own you certainly need not be bound by that
ideology.

regards, tom lane

#5Kevin Murphy
murphy@genome.chop.edu
In reply to: Tom Lane (#4)
Re: How to use postgresql-jdbc rpm with Sun JDK

Tom Lane wrote:

Kevin Murphy <murphy@genome.chop.edu> writes:

Speaking as a near-ignoramus, would a simple RPM that wraps the binary
jar file make sense?

Sure, if you want to do it that way. We did in fact do it that way up
till about 8.0. We (or at least I) moved away from it because of Red
Hat's policy that source RPMs should contain only, well, source.
But if you roll your own you certainly need not be bound by that
ideology.

After looking in more detail at what the gcj packages install, I've
decided it's no big deal to just use Devrim's
postgresql-jdbc-8.3.603-1PGDG.rhel5.x86_64.rpm package as is.

While the java-1.4.2-gcj-compat and libgcj RPMs are needlessly
installed, they don't interfere with Rocks' Java metapackage (roll), as
I had feared.

Thanks for the responses,
Kevin Murphy