Re: Are pgrpm changes for JDBC discussed here before submission?

From: Steven Schlansker <stevenschlansker(at)gmail(dot)com>
To: John Harvey <john(dot)harvey(at)crunchydata(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Are pgrpm changes for JDBC discussed here before submission?
Date: 2015-12-30 23:17:13
Message-ID: 13052901-09F5-4D77-80F2-09FF18B83FBD@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On Dec 30, 2015, at 3:06 PM, John Harvey <john(dot)harvey(at)crunchydata(dot)com> wrote:

> Thank you Dave, for all of the support today.
>
> Devrim, my patch file is attached for the pgrpm repo.
> It will allow EL6/EL7 to build pg-jdbc using maven if you'd like to test it.
>
> Note that you may find some issues building on EL6 due to my dependency on the maven RPM that was discussed earlier in this thread, because it's dependent on openjdk 1.7.0. You'll need to make sure that your JAVA_HOME is set appropriately to compile with Java 1.8, or you'll get a maven enforcer plugin error, since it may use 1.7 as the default when installed this way. But, I think the rest of it should work when tested locally.
>

In case it helps, Maven has a "toolchains" plugin that allows you
to declare in the POM which version of the JDK should be used to
compile.

Each developer box then has a ~/.m2/toolchains.xml file which
maps from JDK version to JAVA_HOME directory to use.

It is a little bit of a pain as each developer must then declare
all installed JDKs, but makes development much easier when multiple
projects and different JDK major versions are possibly involved.

http://maven.apache.org/plugins/maven-toolchains-plugin/index.html

> Let me know if you have any issues or questions; I can try to assist.
>
> Regards,
> -John
>
> On Wed, Dec 30, 2015 at 3:11 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> John,
>
> No, that file does not exist any more. All documentation exists in the www repo now
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
> On 30 December 2015 at 15:10, John Harvey <john(dot)harvey(at)crunchydata(dot)com> wrote:
> Hi Dave,
>
> That sounds good to me. The github tarball will work just fine-- I just wanted to make sure that it was an intended change since it looks a little different.
>
> I think RPM-wise that covers everything except for one last question, about this file:
> doc/pgjdbc.xml
>
> I think this was a docbook that used to be created from all of the javadocs in the ant builds. I don't see that in the current build (note that I am running with -Prelease-artifacts to generate html files). Is that something that needs to be fixed? If so, I could take a stab at it.
>
> Regards,
> -John
>
> On Wed, Dec 30, 2015 at 2:54 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> Download zip file from github would work, no ? I can switch back but was trying to use maven for everything. This is the source file that it provides
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
> On 30 December 2015 at 14:51, John Harvey <john(dot)harvey(at)crunchydata(dot)com> wrote:
> Thanks Dave. I'll have to try that out; it might be what we need.
>
> Devin- I'll try to get you a spec file by tomorrow for testing if that's all right.
>
> BTW, I have a question about the latest PGJDBC release.
>
> On the downloads page (https://jdbc.postgresql.org/download.html) all of the previous "source" items are tar.gz files, whereas for this release, it's a sources jarfile. Is this going to be a permanent switch? If so, I have a concern because the sources jar does not appear to contain the pom file for compilation. Typically the RPM code uses a source tarball as a starting point. Just curious if that's going to be hosted somewhere.
>
> Thanks!
> -John
>
> On Wed, Dec 30, 2015 at 2:41 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> seems there is an rpm for maven http://stackoverflow.com/questions/7532928/how-do-i-install-maven-with-yum
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
> On 30 December 2015 at 14:28, Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:
> Hi,
>
> pgsql-pkg-yum@ is rpm mailing list.
>
> I have zero idea about maven. How much effort would it take to RPMify it?
>
> Can you please send the new spec? I can give a try tomorrow.
>
> Regards, Devrim
>
>
> On December 30, 2015 9:16:20 PM GMT+02:00, John Harvey <john(dot)harvey(at)crunchydata(dot)com> wrote:
> Hello Devrim,
>
> I've got a functioning spec-file, but I have a question which I think needs to be answered before contributing my spec-file changes (which I'm not quite sure how to do for pgrpms-- I couldn't find a mail-list).
>
> The question has to do with the new build being dependent on maven instead of ant.
> Typically, with a spec file it is expected that we could address this with the following line:
> BuildRequires: maven >= 3.0.0
>
> However, there's a problem. Maven isn't generally packaged as an RPM. In fact, even the official RHEL docs point to the maven project site for installation, and that's via tarball unzipping. I found an abandoned java project where somebody tried RPM-ing maven, but they abandoned the project somewhere with maven 2.x, and personally I could not get it to build.
>
> So, I figured I'd try another approach. The other method that I've seen for setting a dependency is to do something like the following:
> BuildRequires: /usr/bin/mvn
>
> However, even that doesn't work for me. I keep getting that the dependency isn't found, when it's definitely there on my system. Note that I have seen that syntax under a "Requires" line (not BuildRequires) in a couple of spec files before, but they were in an ifdef block, so they may not have even been a valid syntax that was tested.
>
> I guess I'm not sure what the right approach here is. If I leave the maven dependency off, that's not the correct answer, as it's definitely a requirement (more specifically, maven 3.x). However, I'm not sure what I can do to make the spec-file recognize this build dependency.
>
> Note that I'm happy to take this to another list if that's appropriate, or have an offline discussion if that makes sense.
>
> Thank you,
> -John
>
>
>
> On Wed, Dec 30, 2015 at 1:16 PM, Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:
> Hi Dave,
>
> Well, *building* RPMs are PITA nowadays, so until we get a stable build, I would prefer this list to catch your attention.
>
> Regards, Devrim
>
>
> On December 30, 2015 6:20:40 PM GMT+02:00, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> Hi John,
>
> We don't have anything to do with the RPMS
>
> Dave
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
> On 30 December 2015 at 11:03, John Harvey <john(dot)harvey(at)crunchydata(dot)com> wrote:
> Hello all,
>
> I have created some changes to the pgrpm repository (git://git.postgresql.org/git/pgrpms.git) in order to support the maven changes that went into PGJDBC REL9.4.1207. The changes allow for the proper generation of RPMS for RHEL6 / 7. Before I submit the changes to pgrpm, I was wondering if those changes are discussed in the community here, or if they're discussed solely with the team that works on the pgrpm repository?
>
> I'd be more than happy to share my changes here if it's worth a discussion.
>
> Regards,
> -John
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
>
>
>
>
> <pgjdbc_el6_7.patch>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Markus KARG 2015-12-31 08:23:48 Re: Recent backward compatibility break in PreparedStatement.setObject()
Previous Message John Harvey 2015-12-30 23:06:37 Re: Are pgrpm changes for JDBC discussed here before submission?