Re: Complicated re-distribution of pgjdbc the "open source way"

From: Pavel Raiskup <praiskup(at)redhat(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>, Pavel Kajaba <pkajaba(at)redhat(dot)com>, hhorak(at)redhat(dot)com
Cc: Vitalii Tymchyshyn <vit(at)tym(dot)im>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Subject: Re: Complicated re-distribution of pgjdbc the "open source way"
Date: 2016-03-22 11:48:20
Message-ID: 3498474.iS0Ea9eYHK@nb.usersys.redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thursday 10 of March 2016 22:08:18 Craig Ringer wrote:
> > thanks for all your good comments! This is definitely the preferred way
> > to go, Allow me some time to process this, I'll update this thread as soon
> > as possible.
>
> Cool.
>
> It might be a good idea to speak to maintainers of some of the Maven-based
> Fedora packages, as they'll probably be able to offer some hints/guidance
> on the details when it comes to creating profiles, conditionally compiling
> files, etc.
>
> I haven't verified that you can use maven profiles to avoid the OSGi stuff,
> but it'll certainly do the job for Waffle-JNA and the couple of isolated
> files in PgJDBC that use it.

I'm getting lost TBH, it all sounds like some magic to me (taking into
account that I want to do the thing the right way, which means not
breaking actual code and conditionally allow build on offline linux).

There are two WIP testing projects/branches I prepared with kind help of
our Java guys:

https://github.com/praiskup/pgjdbc-parent-poms/commits/pgjdbc-linux-fixes
https://github.com/praiskup/pgjdbc/commits/pgjdbc-linux-fixes

Note that the patches are not final and are somehow destructive, which is
definitely not on schedule for upstream proposal -- I just need to present
where I feel blocked.

When using those changes -- after the parent-poms is built and installed
into ~/.m2, after some dependencies for osgi are installed from maven (I'm
not yet ready to fully avoid osgi code - starting with waffle as you said)
I'm able to "start" compiling with:

$ python3 /usr/share/java-utils/mvn_build.py \
-- -DwaffleEnabled=false -Dmaven.test.skip=true

Which is equivalent to:

$ xmvn --batch-mode --offline -DwaffleEnabled=false \
-Dmaven.test.skip=true verify org.fedoraproject.xmvn:xmvn-mojo:install \
org.apache.maven.plugins:maven-javadoc-plugin:aggregate \
org.fedoraproject.xmvn:xmvn-mojo:builddep

This fails with:
[ERROR] Failed to execute goal com.igormaznitsa:jcp:6.0.1:preprocess
(preprocessSources) on project postgresql: Can't find a source directory
[/home/praiskup/rh/projects/pgjdbc/pgjdbc/target/generated-sources/annotations]
-> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed
to execute goal com.igormaznitsa:jcp:6.0.1:preprocess (preprocessSources)
on project postgresql: Can't find a source directory
[/home/praiskup/rh/projects/pgjdbc/pgjdbc/target/generated-sources/annotations]

The error log is attached. Seems like something wrong is with
preprocessor. Is anybody able to help a bit? It is quite exhausting and
I start to think that, if we want to have it upstream, we need to have a
shell script or Makefile (that would be is more flexible) :( and I'm not
sure whether that will be friendly with igormaznitsa:jcp thing.
Thoughts?

Thanks,
Pavel

Attachment Content-Type Size
build.log.xz application/x-xz 42.1 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2016-03-22 12:48:26 Re: Complicated re-distribution of pgjdbc the "open source way"
Previous Message David Steele 2016-03-16 23:17:12 Re: Patch: Implement failover on libpq connect level.