pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Packaging of postgresql-jdbc
19+ messages / 8 participants
[nested] [flat]

* Packaging of postgresql-jdbc
@ 2016-02-16 12:15 Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Pavel Kajaba @ 2016-02-16 12:15 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org; +Cc: Pavel Raiskup <praiskup@redhat.com>

Hello pg-hackers,

I need advice about postgresql-jdbc driver.

Current version in Fedora is behind latest version of postgresql-jdbc (1200 vs 1207).

We are trying to package latest version into Fedora, but there are dependencies, which are not useless in Fedora (waffle-jna) and ones which we are not 100% open source (osgi-enterprise). We talked with upstream quite intensively but not been able to find any solution which would meet our requirements.

We think that it's not a good, when open-source project depending on packages, which licence is not 100% clear. 

Do you have any ideas how we could solve this problem?

It's quite easy to remove it but it's not best solutions because there is a chance that with each release we would have to work on removing. (Gentoo is doing this way : https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-java/jdbc-postgresql )

Other distros seem to have similar problem (https://launchpad.net/ubuntu/+source/libpgjava).
 
We will be thankful for any idea.

Pavel Kajaba


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
@ 2016-02-16 12:50 ` Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:01   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  0 siblings, 2 replies; 19+ messages in thread

From: Craig Ringer @ 2016-02-16 12:50 UTC (permalink / raw)
  To: Pavel Kajaba <pkajaba@redhat.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>; Pavel Raiskup <praiskup@redhat.com>

On 16 February 2016 at 20:15, Pavel Kajaba <pkajaba@redhat.com> wrote:

> Hello pg-hackers,
>
> I need advice about postgresql-jdbc driver.
>
> Current version in Fedora is behind latest version of postgresql-jdbc
> (1200 vs 1207).
>
> We are trying to package latest version into Fedora, but there are
> dependencies, which are not useless in Fedora (waffle-jna)


Which *are* useless in Fedora. I know that was just an editing mistake.
It's a library used in PgJDBC for windows SSPI support.

I don't really see the problem here. If your packaging policy prevents you
from incorporating it, patch it out. It's use is simple, self-contained and
already optional.


> and ones which we are not 100% open source (osgi-enterprise). We talked
> with upstream quite intensively but not been able to find any solution
> which would meet our requirements.
>

... which you should probably outline here, because otherwise nobody  will
understand the problem.


> We think that it's not a good, when open-source project depending on
> packages, which licence is not 100% clear.
>

Well, frankly, that's Java. So long as they're soft-dependencies I really
don't care.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
@ 2016-02-16 13:01   ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-16 15:00     ` Re: [HACKERS] Packaging of postgresql-jdbc Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-16 13:01 UTC (permalink / raw)
  To: Craig Ringer <craig@2ndquadrant.com>; +Cc: Pavel Kajaba <pkajaba@redhat.com>; PostgreSQL Hackers <pgsql-hackers@postgresql.org>; pgsql-jdbc

Oh, Pavel probably forgot to CC pgjdbc, fixing.

Forwarded message from Craig Ringer:
====================================
On 16 February 2016 at 20:15, Pavel Kajaba <pkajaba@redhat.com> wrote:
> Hello pg-hackers,
>
> I need advice about postgresql-jdbc driver.
>
> Current version in Fedora is behind latest version of postgresql-jdbc
> (1200 vs 1207).
>
> We are trying to package latest version into Fedora, but there are
> dependencies, which are not useless in Fedora (waffle-jna)


Which *are* useless in Fedora. I know that was just an editing mistake.
It's a library used in PgJDBC for windows SSPI support.

I don't really see the problem here. If your packaging policy prevents you
from incorporating it, patch it out. It's use is simple, self-contained and
already optional.


> and ones which we are not 100% open source (osgi-enterprise). We talked
> with upstream quite intensively but not been able to find any solution
> which would meet our requirements.
>

... which you should probably outline here, because otherwise nobody  will
understand the problem.


> We think that it's not a good, when open-source project depending on
> packages, which licence is not 100% clear.
>

Well, frankly, that's Java. So long as they're soft-dependencies I really
don't care.



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:01   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-16 15:00     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 19+ messages in thread

From: Tom Lane @ 2016-02-16 15:00 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: Craig Ringer <craig@2ndquadrant.com>; Pavel Kajaba <pkajaba@redhat.com>; PostgreSQL Hackers <pgsql-hackers@postgresql.org>; pgsql-jdbc

Pavel Raiskup <praiskup@redhat.com> writes:
> Oh, Pavel probably forgot to CC pgjdbc, fixing.

In fact, this is completely off-topic for pgsql-hackers, please confine
the discussion to pgsql-jdbc.

			regards, tom lane


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
@ 2016-02-16 13:04   ` Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  1 sibling, 1 reply; 19+ messages in thread

From: Dave Cramer @ 2016-02-16 13:04 UTC (permalink / raw)
  To: Craig Ringer <craig@2ndquadrant.com>; +Cc: Pavel Kajaba <pkajaba@redhat.com>; PostgreSQL Hackers <pgsql-hackers@postgresql.org>; Pavel Raiskup <praiskup@redhat.com>

On 16 February 2016 at 07:50, Craig Ringer <craig@2ndquadrant.com> wrote:

> On 16 February 2016 at 20:15, Pavel Kajaba <pkajaba@redhat.com> wrote:
>
>> Hello pg-hackers,
>>
>> I need advice about postgresql-jdbc driver.
>>
>> Current version in Fedora is behind latest version of postgresql-jdbc
>> (1200 vs 1207).
>>
>> We are trying to package latest version into Fedora, but there are
>> dependencies, which are not useless in Fedora (waffle-jna)
>
>
> Which *are* useless in Fedora. I know that was just an editing mistake.
> It's a library used in PgJDBC for windows SSPI support.
>
> I don't really see the problem here. If your packaging policy prevents you
> from incorporating it, patch it out. It's use is simple, self-contained and
> already optional.
>
>
>> and ones which we are not 100% open source (osgi-enterprise). We talked
>> with upstream quite intensively but not been able to find any solution
>> which would meet our requirements.
>>
>
> ... which you should probably outline here, because otherwise nobody  will
> understand the problem.
>
>
>> We think that it's not a good, when open-source project depending on
>> packages, which licence is not 100% clear.
>>
>
> Well, frankly, that's Java. So long as they're soft-dependencies I really
> don't care.
>
>
I've already explained the JDBC position here.

There is an impedance mismatch between the java ecosystem and distros.

We have moved to maven as have most other java projects.


As Craig said, if you want to build it, patch it out, and create a
ant/Makefile to make the jar.

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
@ 2016-02-17 09:39     ` Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Matteo Melli @ 2016-02-17 09:39 UTC (permalink / raw)
  To: Pavel Kajaba <pkajaba@redhat.com>; +Cc: Pavel Raiskup <praiskup@redhat.com>; pgsql-jdbc@postgresql.org, Craig Ringer <craig@2ndquadrant.com>

Hi Pavel,

I am in the process of creating package torodb (
https://github.com/torodb/torodb) for Fedora (
https://bugzilla.redhat.com/show_bug.cgi?id=1302156). postgresql-jdbc is a
torodb's dependency and, if possible, our goal is to include it in Fedora
22 and above. Actually we are trying to add the postgresql jdbc driver
latest version as a bundle in our package but, as Pavel Raiskup told us,
the right way is to have it stand-alone and depend on it. Since we have
same goal to build the postgresql jdbc driver I decided to kick in and
share my progresses with the community.

For now I just removed waffle dependency patching code (attached) and
removing a couple classes from build:

* org/postgresql/sspi/NTDSAPI.java
* org/postgresql/sspi/NTDSAPIWrapper.java

Actually I am looking into the org.osgi.enterprise artifact dependency that
is missing, as you mentioned, due to incompatible license with Fedora.
After investigating a bit I found out that org.osgi.enterprise library is
shipped with an Apache License (Version 2.0, January 2004) so it is not
clear to me if there are license issues or not. In any case postgresql-jdbc
package use a single interface (org.osgi.service.jdbc.DataSourceFactory)
from artifact org.osgi.enterprise. It would be really trivial to generate a
clean room implementation of the interface and put it in a separate package
or just use for build without installing.


> On 16 February 2016 at 07:50, Craig Ringer <craig@2ndquadrant.com> wrote:
>
>> On 16 February 2016 at 20:15, Pavel Kajaba <pkajaba@redhat.com> wrote:
>>
>>> Hello pg-hackers,
>>>
>>> I need advice about postgresql-jdbc driver.
>>>
>>> Current version in Fedora is behind latest version of postgresql-jdbc
>>> (1200 vs 1207).
>>>
>>> We are trying to package latest version into Fedora, but there are
>>> dependencies, which are not useless in Fedora (waffle-jna)
>>
>>
>> Which *are* useless in Fedora. I know that was just an editing mistake.
>> It's a library used in PgJDBC for windows SSPI support.
>>
>> I don't really see the problem here. If your packaging policy prevents
>> you from incorporating it, patch it out. It's use is simple, self-contained
>> and already optional.
>>
>>
>>> and ones which we are not 100% open source (osgi-enterprise). We talked
>>> with upstream quite intensively but not been able to find any solution
>>> which would meet our requirements.
>>>
>>
>> ... which you should probably outline here, because otherwise nobody
>>  will understand the problem.
>>
>>
>>> We think that it's not a good, when open-source project depending on
>>> packages, which licence is not 100% clear.
>>>
>>
>> Well, frankly, that's Java. So long as they're soft-dependencies I really
>> don't care.
>>
>>
> I've already explained the JDBC position here.
>
> There is an impedance mismatch between the java ecosystem and distros.
>
> We have moved to maven as have most other java projects.
>
>
> As Craig said, if you want to build it, patch it out, and create a
> ant/Makefile to make the jar.
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
>
>

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Attachments:

pgjdbc-9.4.1207.patch (text/x-patch, 7.7K) download diff -Naur /maven-packager/target/sources-archives/f6c0dfc22adc4acd2943d8f86f61419d.original/pgjdbc-f17e2f3074a95dc767d6d896ffd696e045b48466/pgjdbc/src/main/java/org/postgresql/sspi/SSPIClient.java ./pgjdbc/src/main/java/org/postgresql/sspi/SSPIClient.java --- /maven-packager/target/sources-archives/f6c0dfc22adc4acd2943d8f86f61419d.original/pgjdbc-f17e2f3074a95dc767d6d896ffd696e045b48466/pgjdbc/src/main/java/org/postgresql/sspi/SSPIClient.java 2015-12-22 20:21:27.000000000 +0000 +++ ./pgjdbc/src/main/java/org/postgresql/sspi/SSPIClient.java 2016-02-16 14:42:03.607234432 +0000 @@ -9,26 +9,14 @@ import org.postgresql.util.PSQLException; import org.postgresql.util.PSQLState; -import com.sun.jna.LastErrorException; -import com.sun.jna.Platform; -import com.sun.jna.platform.win32.Sspi; -import com.sun.jna.platform.win32.Sspi.SecBufferDesc; -import com.sun.jna.platform.win32.Win32Exception; - -import waffle.windows.auth.IWindowsAuthProvider; -import waffle.windows.auth.IWindowsCredentialsHandle; -import waffle.windows.auth.IWindowsSecurityContext; -import waffle.windows.auth.impl.WindowsAccountImpl; -import waffle.windows.auth.impl.WindowsAuthProviderImpl; -import waffle.windows.auth.impl.WindowsCredentialsHandleImpl; -import waffle.windows.auth.impl.WindowsSecurityContextImpl; - /** * Use Waffle-JNI to support SSPI authentication when PgJDBC is running on a Windows * client and talking to a Windows server. * * SSPI is not supported on a non-Windows client. * + * Pathed to removed JNA and Waffle support to distribute for Linux Platforms + * * * @author craig * @@ -41,11 +29,6 @@ private final PGStream pgStream; private final String spnServiceClass; private final boolean enableNegotiate; - - private IWindowsCredentialsHandle clientCredentials; - private WindowsSecurityContextImpl sspiContext; - private String targetName; - /** * Instantiate an SSPIClient for authentication of a connection. @@ -87,45 +70,9 @@ * @return true if it's safe to attempt SSPI authentication */ public boolean isSSPISupported() { - try { - /* - * SSPI is windows-only. Attempt to use JNA to identify the platform. - * If Waffle is missing we won't have JNA and this will throw a - * NoClassDefFoundError. - */ - if (!Platform.isWindows()) - { logger.debug("SSPI not supported: non-Windows host"); return false; - } - /* Waffle must be on the CLASSPATH */ - Class.forName("waffle.windows.auth.impl.WindowsSecurityContextImpl"); - return true; - } catch (NoClassDefFoundError ex) { - if (logger.logDebug()) - logger.debug("SSPI unavailable (no Waffle/JNA libraries?)", ex); - return false; - } catch (ClassNotFoundException ex) { - if (logger.logDebug()) - logger.debug("SSPI unavailable (no Waffle/JNA libraries?)", ex); - return false; - } } - - private String makeSPN() throws PSQLException - { - final HostSpec hs = pgStream.getHostSpec(); - - try { - return NTDSAPIWrapper.instance.DsMakeSpn( - spnServiceClass, hs.getHost(), - null, (short)hs.getPort(), null); - } catch (LastErrorException ex) { - throw new PSQLException("SSPI setup failed to determine SPN", - PSQLState.CONNECTION_UNABLE_TO_CONNECT, ex); - } - } - /** * Respond to an authentication request from the back-end @@ -135,60 +82,10 @@ * @throws IOException on network I/O issues */ public void startSSPI() throws SQLException, IOException { - - /* - * We usually use SSPI negotiation (spnego), but it's disabled if the client - * asked for GSSPI and usespngo isn't explicitly turned on. - */ - final String securityPackage = enableNegotiate ? "negotiate" : "kerberos"; - - logger.debug("Beginning SSPI/Kerberos negotiation with SSPI package: " + securityPackage); - - try { - /* - * Acquire a handle for the local Windows login credentials for the current user - * - * See AcquireCredentialsHandle (http://msdn.microsoft.com/en-us/library/windows/desktop/aa374712%28v=vs.85%29.aspx) - * - * This corresponds to pg_SSPI_startup in libpq/fe-auth.c . - */ - try { - clientCredentials = WindowsCredentialsHandleImpl.getCurrent(securityPackage); - clientCredentials.initialize(); - } catch (Win32Exception ex) { throw new PSQLException( - "Could not obtain local Windows credentials for SSPI", - PSQLState.CONNECTION_UNABLE_TO_CONNECT /* TODO: Should be authentication error */, - ex); - } - - try { - targetName = makeSPN(); - - if (logger.logDebug()) - { - logger.debug("SSPI target name: " + targetName); - } - - sspiContext = new WindowsSecurityContextImpl(); - sspiContext.setPrincipalName(targetName); - sspiContext.setCredentialsHandle(clientCredentials.getHandle()); - sspiContext.setSecurityPackage(securityPackage); - sspiContext.initialize(null, null, targetName); - } catch (Win32Exception ex) { - throw new PSQLException( - "Could not initialize SSPI security context", - PSQLState.CONNECTION_UNABLE_TO_CONNECT /* TODO: Should be auth error */, - ex); - } - - sendSSPIResponse(sspiContext.getToken()); - logger.debug("Sent first SSPI negotiation message"); - } catch (NoClassDefFoundError ex) { - throw new PSQLException( - "SSPI cannot be used, Waffle or its dependencies are missing from the classpath", - PSQLState.NOT_IMPLEMENTED, ex); - } + "SSPI not supported", + PSQLState.CONNECTION_UNABLE_TO_CONNECT /* TODO: Should be authentication error */ + ); } /** @@ -201,47 +98,8 @@ * @throws IOException if something wrong happens */ public void continueSSPI(int msgLength) throws SQLException, IOException { - - if (sspiContext == null) throw new IllegalStateException( "Cannot continue SSPI authentication that we didn't begin"); - - logger.debug("Continuing SSPI negotiation"); - - /* Read the response token from the server */ - byte[] receivedToken = pgStream.Receive(msgLength); - - SecBufferDesc continueToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, receivedToken); - - sspiContext.initialize(sspiContext.getHandle(), continueToken, targetName); - - /* - * Now send the response token. If negotiation is complete - * there may be zero bytes to send, in which case we shouldn't - * send a reply as the server is not expecting one; see fe-auth.c - * in libpq for details. - */ - byte[] responseToken = sspiContext.getToken(); - if (responseToken.length > 0) - { - sendSSPIResponse(responseToken); - logger.debug("Sent SSPI negotiation continuation message"); - } else { - logger.debug("SSPI authentication complete, no reply required"); - } - } - - private void sendSSPIResponse(byte[] outToken) throws IOException { - /* - * The sspiContext now contains a token we can send to the server to - * start the handshake. Send a 'password' message containing the - * required data; the server knows we're doing SSPI negotiation - * and will deal with it appropriately. - */ - pgStream.SendChar('p'); - pgStream.SendInteger4(4 + outToken.length); - pgStream.Send(outToken); - pgStream.flush(); } /** @@ -250,13 +108,5 @@ * after disposal. */ public void dispose() { - if (sspiContext != null) { - sspiContext.dispose(); - sspiContext = null; - } - if (clientCredentials != null) { - clientCredentials.dispose(); - clientCredentials = null; - } } }
^ permalink raw reply [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
@ 2016-02-17 11:43       ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 11:43 UTC (permalink / raw)
  To: Matteo Melli <matteom@8kdata.com>; +Cc: Pavel Kajaba <pkajaba@redhat.com>; pgsql-jdbc@postgresql.org, Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

Hi Matteo,

On Wednesday 17 of February 2016 10:39:43 Matteo Melli wrote:
> I am in the process of creating package torodb (
> https://github.com/torodb/torodb) for Fedora (
> https://bugzilla.redhat.com/show_bug.cgi?id=1302156). postgresql-jdbc is a
> torodb's dependency and, if possible, our goal is to include it in Fedora
> 22 and above. Actually we are trying to add the postgresql jdbc driver
> latest version as a bundle in our package but, as Pavel Raiskup told us,
> the right way is to have it stand-alone and depend on it. Since we have
> same goal to build the postgresql jdbc driver I decided to kick in and
> share my progresses with the community.

this is certainly an issue and we have already written similar patches
you've proposed.  Thanks for your work!  As this issue is not "just" about
Fedora, but it rather hurts all GNU/Linux distributions - let's discuss
how to do it a consistent way...

> For now I just removed waffle dependency patching code (attached) and
> removing a couple classes from build:
> 
> * org/postgresql/sspi/NTDSAPI.java
> * org/postgresql/sspi/NTDSAPIWrapper.java

Yeah, that is something which should be optional.  As this is not easy, we
should patch it out.

> Actually I am looking into the org.osgi.enterprise artifact dependency that
> is missing, as you mentioned, due to incompatible license with Fedora.
> After investigating a bit I found out that org.osgi.enterprise library is
> shipped with an Apache License (Version 2.0, January 2004) so it is not
> clear to me if there are license issues or not. In any case postgresql-jdbc
> package use a single interface (org.osgi.service.jdbc.DataSourceFactory)
> from artifact org.osgi.enterprise. It would be really trivial to generate a
> clean room implementation of the interface and put it in a separate package
> or just use for build without installing.

AFAIU, osgi.enterprise refuses you to modify it's code.  That requirement
makes it incompatible with Fedora and all open source re-distributors
(vendor-lock-in).

I'm not sure what are the issues with GPL license compatibility .. IANAL,
but IMO you can use MIT/BSD libraries from GPL licensed project, but then
you have to distribute your whole work as GPL code -- which is not a
problem per se, but GPL *enforces* you to keep the code modifiable, while
osgi.enterprise refuses this;  this sounds like a clear collision.
However, we agreed this is not an issue for pgjdbc project and thus no
need to complicate upstream maintenance.  There was long discussion .. and
probably nothing more to add.

So -- patching out osgi.enterprise support would work for us similarly to
waffle.  And possibly in future; make the 'osgi.enterprise' support in
separate jar file with clear license clarification would work too..

---

People mostly (including pgjdbc upstream maintainers) suggest us to patch
the unclear stuff out from pgjdbc code .. which is pain to do over and
over again in all distributions.  We are considering a "close" fork of
pgjdbc (say 'pgjdbc-foss').  That fork should allow us all to package the
jdbc plugin "consistent" FOSS way.  There is no point in duplicating the
maintenance effort -- pgjdbc upstream does a good job here -- so we would
be in sync with pgjdbc and concentrating just on the distribution POV;
doing just the necessary changes.

I'm going to write a separate mail into new trhead to this list (with CC
to package maintainers in other distros) with ideas, requirements, etc.
But any idea from anyone here is welcome.

Thanks, Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-17 15:55         ` Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Álvaro Hernández Tortosa @ 2016-02-17 15:55 UTC (permalink / raw)
  To: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Raiskup <praiskup@redhat.com>; +Cc: Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com


     Hi list!

On 17/02/16 12:43, Pavel Raiskup wrote:
> Hi Matteo,
>
> On Wednesday 17 of February 2016 10:39:43 Matteo Melli wrote:
>> I am in the process of creating package torodb (
>> https://github.com/torodb/torodb) for Fedora (
>> https://bugzilla.redhat.com/show_bug.cgi?id=1302156). postgresql-jdbc is a
>> torodb's dependency and, if possible, our goal is to include it in Fedora
>> 22 and above. Actually we are trying to add the postgresql jdbc driver
>> latest version as a bundle in our package but, as Pavel Raiskup told us,
>> the right way is to have it stand-alone and depend on it. Since we have
>> same goal to build the postgresql jdbc driver I decided to kick in and
>> share my progresses with the community.
> this is certainly an issue and we have already written similar patches
> you've proposed.  Thanks for your work!  As this issue is not "just" about
> Fedora, but it rather hurts all GNU/Linux distributions - let's discuss
> how to do it a consistent way...

     Absolutely.

>
>> For now I just removed waffle dependency patching code (attached) and
>> removing a couple classes from build:
>>
>> * org/postgresql/sspi/NTDSAPI.java
>> * org/postgresql/sspi/NTDSAPIWrapper.java
> Yeah, that is something which should be optional.  As this is not easy, we
> should patch it out.

     So I believe this is a simple, good solution. The problem with 
waffle is how to "remove" it without asking upstream to change it. Well, 
what Matteo did is simply patch it but as part of the spec to build the 
src.rpm. This patch is very simple and makes it buildable as an RPM 
without asking upstream to make any changes to the code. Thus I think 
this fixes this problem.

>
>> Actually I am looking into the org.osgi.enterprise artifact dependency that
>> is missing, as you mentioned, due to incompatible license with Fedora.
>> After investigating a bit I found out that org.osgi.enterprise library is
>> shipped with an Apache License (Version 2.0, January 2004) so it is not
>> clear to me if there are license issues or not. In any case postgresql-jdbc
>> package use a single interface (org.osgi.service.jdbc.DataSourceFactory)
>> from artifact org.osgi.enterprise. It would be really trivial to generate a
>> clean room implementation of the interface and put it in a separate package
>> or just use for build without installing.
> AFAIU, osgi.enterprise refuses you to modify it's code.  That requirement
> makes it incompatible with Fedora and all open source re-distributors
> (vendor-lock-in).
>
> I'm not sure what are the issues with GPL license compatibility .. IANAL,
> but IMO you can use MIT/BSD libraries from GPL licensed project, but then
> you have to distribute your whole work as GPL code -- which is not a
> problem per se, but GPL *enforces* you to keep the code modifiable, while
> osgi.enterprise refuses this;  this sounds like a clear collision.
> However, we agreed this is not an issue for pgjdbc project and thus no
> need to complicate upstream maintenance.  There was long discussion .. and
> probably nothing more to add.
>
> So -- patching out osgi.enterprise support would work for us similarly to
> waffle.  And possibly in future; make the 'osgi.enterprise' support in
> separate jar file with clear license clarification would work too..
>
> ---
>
> People mostly (including pgjdbc upstream maintainers) suggest us to patch
> the unclear stuff out from pgjdbc code .. which is pain to do over and
> over again in all distributions.  We are considering a "close" fork of
> pgjdbc (say 'pgjdbc-foss').  That fork should allow us all to package the
> jdbc plugin "consistent" FOSS way.  There is no point in duplicating the
> maintenance effort -- pgjdbc upstream does a good job here -- so we would
> be in sync with pgjdbc and concentrating just on the distribution POV;
> doing just the necessary changes.
>
> I'm going to write a separate mail into new trhead to this list (with CC
> to package maintainers in other distros) with ideas, requirements, etc.
> But any idea from anyone here is welcome.
>
> Thanks, Pavel

     I think that creating and maintaining a pgjdbc-foss is both time 
consuming and potentially confusing for end users. I believe what Matteo 
was suggesting is a probably better solution and it's definitely KISS.

     Summarizing Matteo's suggestion:

- osgi.enterprise is not allowed in Fedora (and it seems futile to me to 
discuss whether this is right or wrong).

- Apache Felix, which is already packaged for Fedora, provides almost 
all the code needed for OSGI support in pgjdbc

- Only 1 interface is not provided by Felix. Rather than looking for 
someone else to provide this interface, we should just re-implement it 
(it's just a few lines of code!). It could be done as a clean-room 
implementation to avoid actually copying the code. This interface could 
either be added to pgjdbc or to a side repo (something like 
pgjdbc-osgi-compatibility or any other similar name) and setup a 
dependency on this trivial project.


     With the above recipe, pgjdbc should also be buildable as an RPM, 
without modifying upstream code. I believe no other problems would be 
left for packaging it. What do you think?


     Cheers,

     Álvaro


-- 
Álvaro Hernández Tortosa


-----------
8Kdata



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
@ 2016-02-17 16:47           ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 16:47 UTC (permalink / raw)
  To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On Wednesday 17 of February 2016 16:55:24 Álvaro Hernández Tortosa wrote:
> > Yeah, that is something which should be optional.  As this is not easy, we
> > should patch it out.
> 
>      So I believe this is a simple, good solution. The problem with 
> waffle is how to "remove" it without asking upstream to change it. Well, 
> what Matteo did is simply patch it but as part of the spec to build the 
> src.rpm. This patch is very simple and makes it buildable as an RPM 
> without asking upstream to make any changes to the code. Thus I think 
> this fixes this problem.

Right, but Vladimir called this "time-bomb", and I mostly agree.  And it
fixes RPM packaging only -> not DEB packaging, archlinux, gentoo, etc., ..
This deserves central place.

>      I think that creating and maintaining a pgjdbc-foss is both time 
> consuming and potentially confusing for end users. I believe what Matteo 
> was suggesting is a probably better solution and it's definitely KISS.

It is not better solution, just easier -- but as all distros need to do
this, it should be done on one place.  It wouldn't be confusing, there
would definitely be documentation for it.

>      Summarizing Matteo's suggestion:
> 
> - osgi.enterprise is not allowed in Fedora (and it seems futile to me to 
> discuss whether this is right or wrong).

Right, the Fedora's POV is off-topic.  I'm saying it "might not" be safe
for FOSS distribution model to depend on this software.  That is why the
-foss suffix.

> - Apache Felix, which is already packaged for Fedora, provides almost 
> all the code needed for OSGI support in pgjdbc
> 
> - Only 1 interface is not provided by Felix. Rather than looking for 
> someone else to provide this interface, we should just re-implement it 
> (it's just a few lines of code!). It could be done as a clean-room 
> implementation to avoid actually copying the code. This interface could 
> either be added to pgjdbc or to a side repo (something like 
> pgjdbc-osgi-compatibility or any other similar name) and setup a 
> dependency on this trivial project.

It does not seem to be worth the trouble at all, because nobody wants
this.  Distributions probably don't care about osgi.enterprise too much
(== obsoleted packages provided, probably unused, patching out the osgi
support to allow build, etc.), and upstream does not care (for
understandable reasons) to make this soft-dependancy.  Who would be this
additional work for to make the trouble?

>      With the above recipe, pgjdbc should also be buildable as an RPM, 
> without modifying upstream code. I believe no other problems would be 
> left for packaging it. What do you think?

There are other problems (and we probably don't have all):

- There is the '*-parent-poms' *separate* project, this makes us to make
  the package build done in two phases.  I still don't understand this
  artificial split.

- non-traditional release practices -- we need 'pgdjbc-X.Y.Z.tar.gz'
  file, which clearly describes how to build from source.

- I haven't been able to run the new tests.., which seem to be Travis
  (ubuntu && maven?) oriented

I agree that this could look like expensive effort, but as I said - we do
not want diverge.  Just fix the distribution issues ;).  Nothing more than
what all distributions do anyway with new release, but a consistent way.

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-17 17:25             ` Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 17:43               ` Re: [HACKERS] Packaging of postgresql-jdbc Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 2 replies; 19+ messages in thread

From: Álvaro Hernández Tortosa @ 2016-02-17 17:25 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com



On 17/02/16 17:47, Pavel Raiskup wrote:
> On Wednesday 17 of February 2016 16:55:24 Álvaro Hernández Tortosa wrote:
>>> Yeah, that is something which should be optional.  As this is not easy, we
>>> should patch it out.
>>       So I believe this is a simple, good solution. The problem with
>> waffle is how to "remove" it without asking upstream to change it. Well,
>> what Matteo did is simply patch it but as part of the spec to build the
>> src.rpm. This patch is very simple and makes it buildable as an RPM
>> without asking upstream to make any changes to the code. Thus I think
>> this fixes this problem.
> Right, but Vladimir called this "time-bomb", and I mostly agree.  And it
> fixes RPM packaging only -> not DEB packaging, archlinux, gentoo, etc., ..
> This deserves central place.

     Why would it be a time-bomb?

     While I'd agree a better solution is to work around pgjdbc's code 
to circumvent waffle on non-Windows systems, I see this could take long, 
it's non trivial and I don't see anyone working on it (please correct me 
if I'm wrong). So why not, rather than searching for the perfect 
solution, take a simpler one and then iterate?

     Other distros will surely benefit anyway, as the process of 
patching a source rpm/deb/whatever only differs in implementation 
details (how you do it), not on the concept of doing it.


>
>>       I think that creating and maintaining a pgjdbc-foss is both time
>> consuming and potentially confusing for end users. I believe what Matteo
>> was suggesting is a probably better solution and it's definitely KISS.
> It is not better solution, just easier

     Well, that's already probably better: KISS! :)


>   -- but as all distros need to do
> this, it should be done on one place.  It wouldn't be confusing, there
> would definitely be documentation for it.

     I'd take this one step at a time. Let's package for Fedora, next 
when others ask, we will provide the answer: do this patching and blah 
blah blah, done :)

>
>>       Summarizing Matteo's suggestion:
>>
>> - osgi.enterprise is not allowed in Fedora (and it seems futile to me to
>> discuss whether this is right or wrong).
> Right, the Fedora's POV is off-topic.  I'm saying it "might not" be safe
> for FOSS distribution model to depend on this software.  That is why the
> -foss suffix.
>
>> - Apache Felix, which is already packaged for Fedora, provides almost
>> all the code needed for OSGI support in pgjdbc
>>
>> - Only 1 interface is not provided by Felix. Rather than looking for
>> someone else to provide this interface, we should just re-implement it
>> (it's just a few lines of code!). It could be done as a clean-room
>> implementation to avoid actually copying the code. This interface could
>> either be added to pgjdbc or to a side repo (something like
>> pgjdbc-osgi-compatibility or any other similar name) and setup a
>> dependency on this trivial project.
> It does not seem to be worth the trouble at all, because nobody wants
> this.

     The trouble is just some hours of work, and we're (8Kdata) willing 
to contribute those, no problem.

>   Distributions probably don't care about osgi.enterprise too much
> (== obsoleted packages provided, probably unused, patching out the osgi
> support to allow build, etc.), and upstream does not care (for
> understandable reasons) to make this soft-dependancy.  Who would be this
> additional work for to make the trouble?

     I think we should let the users choose whether they care or not. 
This is a functionality of the driver, and removing it is removing 
functionality from the driver. And upstream seems not to be very happy 
with this.

     We definitely don't know how much or less users use this, but 
removing something that works and might be used is what may cause 
trouble. Specially, if it is just a few hours of work away to fix the 
licensing issue.

>
>>       With the above recipe, pgjdbc should also be buildable as an RPM,
>> without modifying upstream code. I believe no other problems would be
>> left for packaging it. What do you think?
> There are other problems (and we probably don't have all):
>
> - There is the '*-parent-poms' *separate* project, this makes us to make
>    the package build done in two phases.  I still don't understand this
>    artificial split.

     It is done to help make versions of the driver for different 
versions of the JRE without duplicating a lot of code. Whatever it is, 
it is not a big problem, and I believe this is nowadays non-negotiable 
for upstream. Again, at 8Kdata we have been able to work around this 
easily and can provide a spec that handles this :)

>
> - non-traditional release practices -- we need 'pgdjbc-X.Y.Z.tar.gz'
>    file, which clearly describes how to build from source.

     Again this can be easily fixed in the spec. There are of course 
versioned tar.gz on Github: https://github.com/pgjdbc/pgjdbc/releases

>
> - I haven't been able to run the new tests.., which seem to be Travis
>    (ubuntu && maven?) oriented

     I think running tests is cool for the packaging process, but is 
this needed for packaging? I mean, it's upstream who should run them 
before releasing versions, right? :)


>
> I agree that this could look like expensive effort, but as I said - we do
> not want diverge.  Just fix the distribution issues ;).  Nothing more than
> what all distributions do anyway with new release, but a consistent way.

     It's not easy to package Maven-based software, as there is some 
overlapping in the concept but with different point of view. I won't 
further look into expensive efforts. There are few resources and we'd 
better direct them to other areas.

     If the proposed solution works, and it's simple, why not just 
simply go for it?

     Cheers,

     Álvaro



-- 
Álvaro Hernández Tortosa


-----------
8Kdata



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
@ 2016-02-17 17:43               ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  2016-02-17 17:49                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:35                 ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  1 sibling, 2 replies; 19+ messages in thread

From: Vladimir Sitnikov @ 2016-02-17 17:43 UTC (permalink / raw)
  To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: Pavel Raiskup <praiskup@redhat.com>; pgsql-jdbc; Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

Álvaro>    I think running tests is cool for the packaging process,
but is this needed for packaging? I mean, it's upstream who should run
them before releasing versions, right? :)

If you pick "upstream build artifact", you know it is tested.
If you use custom-made-kludge-patched build process, you'd better test
that new artifact before use.
It can easily fail in a unexpected way. For instance: not all ${...}
being replaced, not all the classes present, missing translations,
etc, etc.

Nothing personal. Just facts.

Vladimir


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 17:43               ` Re: [HACKERS] Packaging of postgresql-jdbc Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2016-02-17 17:49                 ` Álvaro Hernández Tortosa <aht@8kdata.com>
  1 sibling, 0 replies; 19+ messages in thread

From: Álvaro Hernández Tortosa @ 2016-02-17 17:49 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: Pavel Raiskup <praiskup@redhat.com>; pgsql-jdbc; Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com



On 17/02/16 18:43, Vladimir Sitnikov wrote:
> Álvaro>    I think running tests is cool for the packaging process,
> but is this needed for packaging? I mean, it's upstream who should run
> them before releasing versions, right? :)
>
> If you pick "upstream build artifact", you know it is tested.
     Yeah, that's what I meant :) No need to test it if taken from upstream.

> If you use custom-made-kludge-patched build process, you'd better test
> that new artifact before use.
> It can easily fail in a unexpected way. For instance: not all ${...}
> being replaced, not all the classes present, missing translations,
> etc, etc.

     Absolutely. But the two proposed changes here are:

- Remove waffle dependency from pom file (it's obviously not needed in 
Fedora). I don't think this requires any testing (if it compiles, of course)

- Replace osgi.enterprise by something else. This something else will be 
present in upstream, and hence tests.

     :)


     Álvaro

-- 
Álvaro Hernández Tortosa


-----------
8Kdata



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 17:43               ` Re: [HACKERS] Packaging of postgresql-jdbc Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2016-02-17 18:35                 ` Pavel Raiskup <praiskup@redhat.com>
  1 sibling, 0 replies; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 18:35 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: Álvaro Hernández Tortosa <aht@8kdata.com>; pgsql-jdbc; Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On Wednesday 17 of February 2016 20:43:50 Vladimir Sitnikov wrote:
> Álvaro>    I think running tests is cool for the packaging process,
> but is this needed for packaging? I mean, it's upstream who should run
> them before releasing versions, right? :)
> 
> If you pick "upstream build artifact", you know it is tested.

Right, test in some defined CI environment, which is perfect -- but you
are still not able to run the tests on Gentoo/Arch/Fedora/RHEL
environments, without maven, etc.

We do care about testing in Fedora -- that is why we enable testsuites
after package builds automatically (before it is provided to end users)
and we have real people doing the QA manually.  So you *still know* that
the software is tested.

It still does not mean that your tests are not beneficial, just saying
that those should be probably more adaptable to allow us to use those.

> If you use custom-made-kludge-patched build process, you'd better test
> that new artifact before use.

This is truth for every software, maven is not an exception.  The negative
thing in maven is that you might easily end-up crossing laws (if you e.g.
distribute to your customer GPL based software dependant on osgi).

> It can easily fail in a unexpected way. For instance: not all ${...}
> being replaced, not all the classes present, missing translations, etc,
> etc.
>
> Nothing personal. Just facts.

The missing classes are not missed on Linux.  And nobody else is going to
use those jar files, so no problem there.  But yes.  What I propose here
is not perfect, but is the safer, legally safer -- and at first it is the
less painful :( if we do sum(downstream maintainers work).

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
@ 2016-02-17 18:22               ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 18:41                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  1 sibling, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 18:22 UTC (permalink / raw)
  To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On Wednesday 17 of February 2016 18:25:30 Álvaro Hernández Tortosa wrote:
> > Right, but Vladimir called this "time-bomb", and I mostly agree.  And it
> > fixes RPM packaging only -> not DEB packaging, archlinux, gentoo, etc., ..
> > This deserves central place.
>
>      Why would it be a time-bomb?

Because the patch might start to not apply in future, and all the
distributions need to start re-patching...

>      While I'd agree a better solution is to work around pgjdbc's code
> to circumvent waffle on non-Windows systems, I see this could take long,
> it's non trivial and I don't see anyone working on it (please correct me
> if I'm wrong).

I believe this has been discussed before, and Pavel Kajaba already worked
on it .. but this is not acceptable by upstream.

> So why not, rather than searching for the perfect solution, take a
> simpler one and then iterate?

Don't take me wrong -- it is easier to do the patching your way, but on
one place!  Then take the tarball and you are done.

>      Other distros will surely benefit anyway, as the process of
> patching a source rpm/deb/whatever only differs in implementation
> details (how you do it), not on the concept of doing it.

Well, how exactly you expect this patch to be applied?  Because deb
maintainers usually do not watch RPM packaging and vice versa.

> >>       I think that creating and maintaining a pgjdbc-foss is both time
> >> consuming and potentially confusing for end users. I believe what Matteo
> >> was suggesting is a probably better solution and it's definitely KISS.
> > It is not better solution, just easier
>
>      Well, that's already probably better: KISS! :)

Again, KISS and DRY principles.

> >   -- but as all distros need to do
> > this, it should be done on one place.  It wouldn't be confusing, there
> > would definitely be documentation for it.
>
>      I'd take this one step at a time. Let's package for Fedora, next
> when others ask, we will provide the answer: do this patching and blah
> blah blah, done :)

Agreed here.

> > It does not seem to be worth the trouble at all, because nobody wants
> > this.
>
>      The trouble is just some hours of work, and we're (8Kdata) willing
> to contribute those, no problem.

Right, but you need to do the contribution somewhere.  This is not about
RPMs only.

> >   Distributions probably don't care about osgi.enterprise too much
> > (== obsoleted packages provided, probably unused, patching out the osgi
> > support to allow build, etc.), and upstream does not care (for
> > understandable reasons) to make this soft-dependancy.  Who would be this
> > additional work for to make the trouble?
>
>      I think we should let the users choose whether they care or not.

Exactly, but not possible ATM if we pay attention to foss principles.

> This is a functionality of the driver, and removing it is removing
> functionality from the driver. And upstream seems not to be very happy
> with this.

End users would be able to use 'pgdjbc-foss' or 'pgjdbc-foss-osgi' (KISS).

>      We definitely don't know how much or less users use this, but
> removing something that works and might be used is what may cause
> trouble. Specially, if it is just a few hours of work away to fix the
> licensing issue.

Oh, I see what you mean :) now -- but those licensing issues should be
fixed upstream..

> >>       With the above recipe, pgjdbc should also be buildable as an RPM,
> >> without modifying upstream code. I believe no other problems would be
> >> left for packaging it. What do you think?
> > There are other problems (and we probably don't have all):
> >
> > - There is the '*-parent-poms' *separate* project, this makes us to make
> >    the package build done in two phases.  I still don't understand this
> >    artificial split.
>
>      It is done to help make versions of the driver for different
> versions of the JRE without duplicating a lot of code. Whatever it is,
> it is not a big problem,

I still don't get the reason why there can't be single one tarball.  It is
a problem, every distro is going to build the package in two-steps.
Gentoo guys do build their packages themselves!

> and I believe this is nowadays non-negotiable for upstream. Again, at
> 8Kdata we have been able to work around this easily and can provide a
> spec that handles this :)

I was able to do this too.  But having a fork will make this easy for
everyone (DRY).

> > - I haven't been able to run the new tests.., which seem to be Travis
> >    (ubuntu && maven?) oriented
>
>      I think running tests is cool for the packaging process, but is
> this needed for packaging? I mean, it's upstream who should run them
> before releasing versions, right? :)

No-no-no :).  Ideally¹ we should be able to (a) run the testsuite during
package build (no root access, no network access) in cloud, and (b) we
should be able to package the testsuite for user -- so anyone is able to
run the testsuite on end-user box.  This sounds like sci-fi now, but it is
really important to run the testsuite at least during package build.

> > I agree that this could look like expensive effort, but as I said - we do
> > not want diverge.  Just fix the distribution issues ;).  Nothing more than
> > what all distributions do anyway with new release, but a consistent way.
>
>      It's not easy to package Maven-based software, as there is some
> overlapping in the concept but with different point of view. I won't
> further look into expensive efforts. There are few resources and we'd
> better direct them to other areas.

Right, thats why I do not plant to do anything expensive!  Just
accumulate the things at one place -- the things which upstream forces us
to do on per-distribution level.

>      If the proposed solution works, and it's simple, why not just
> simply go for it?

It works.

¹ This has been don for postgresql.spec (server).  But with pgjdbc we are
  even unable to *build* from source :).

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-17 18:41                 ` Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 21:47                   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Álvaro Hernández Tortosa @ 2016-02-17 18:41 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com



On 17/02/16 19:22, Pavel Raiskup wrote:
> On Wednesday 17 of February 2016 18:25:30 Álvaro Hernández Tortosa wrote:
>>> Right, but Vladimir called this "time-bomb", and I mostly agree.  And it
>>> fixes RPM packaging only -> not DEB packaging, archlinux, gentoo, etc., ..
>>> This deserves central place.
>>       Why would it be a time-bomb?
> Because the patch might start to not apply in future, and all the
> distributions need to start re-patching...

     The patch is a very very simple one. It's not much more than "under 
this XML Path, remove this XML node (the maven dependency)". While it 
may break at some point (well, that's what happens when you patch 
upstream), but it's unlikely.

     The only other real alternative is change the code to work around 
waffle, and after a long time debating I have seen nobody to come up 
with a fix for this.

     So I'd rather move forward even if the solution is not ideal...

     or is there any other *already working, not theoretically* 
alternative? My main point is: please, GTD! :)


>
>>       While I'd agree a better solution is to work around pgjdbc's code
>> to circumvent waffle on non-Windows systems, I see this could take long,
>> it's non trivial and I don't see anyone working on it (please correct me
>> if I'm wrong).
> I believe this has been discussed before, and Pavel Kajaba already worked
> on it .. but this is not acceptable by upstream.

     Yeah, so we have to work around it. That's why we are suggesting 
this alternative.

>
>> So why not, rather than searching for the perfect solution, take a
>> simpler one and then iterate?
> Don't take me wrong -- it is easier to do the patching your way, but on
> one place!  Then take the tarball and you are done.

     If I understood it correctly, the RPM specs specifically allow (and 
I believe is common place) to patch upstream software, to adapt it to 
the specificities of RPM packaging. I believe this patch perfectly 
belongs to this category.
Good news is that to do this, we don't need any upstream approval :)

>
>>       Other distros will surely benefit anyway, as the process of
>> patching a source rpm/deb/whatever only differs in implementation
>> details (how you do it), not on the concept of doing it.
> Well, how exactly you expect this patch to be applied?  Because deb
> maintainers usually do not watch RPM packaging and vice versa.

     Well, when Debian maintainers would ask pgjdcb, the same way as you 
did, we will point them to the solution applied to the RPM, which will 
be already working, so that they could apply the same technique 
--shouldn't be hard.

>
>>>>        I think that creating and maintaining a pgjdbc-foss is both time
>>>> consuming and potentially confusing for end users. I believe what Matteo
>>>> was suggesting is a probably better solution and it's definitely KISS.
>>> It is not better solution, just easier
>>       Well, that's already probably better: KISS! :)
> Again, KISS and DRY principles.

     We both agree :) But forking pgjdbc to create pgjdbc-foss is, to 
me, much more DRY than a tiny patch that might be distribution-dependant.

>
>>>    -- but as all distros need to do
>>> this, it should be done on one place.  It wouldn't be confusing, there
>>> would definitely be documentation for it.
>>       I'd take this one step at a time. Let's package for Fedora, next
>> when others ask, we will provide the answer: do this patching and blah
>> blah blah, done :)
> Agreed here.
>
>>> It does not seem to be worth the trouble at all, because nobody wants
>>> this.
>>       The trouble is just some hours of work, and we're (8Kdata) willing
>> to contribute those, no problem.
> Right, but you need to do the contribution somewhere.  This is not about
> RPMs only.

     We can do this contribution on our own repos, and send a PR to 
pgjdbc. This is not hard, we can do it in <24h.

>
>>>    Distributions probably don't care about osgi.enterprise too much
>>> (== obsoleted packages provided, probably unused, patching out the osgi
>>> support to allow build, etc.), and upstream does not care (for
>>> understandable reasons) to make this soft-dependancy.  Who would be this
>>> additional work for to make the trouble?
>>       I think we should let the users choose whether they care or not.
> Exactly, but not possible ATM if we pay attention to foss principles.

     I care a lot about FOSS principles, and that's the main reason if 
we rewrite the interfaces, they will be completely FOSS.

>
>> This is a functionality of the driver, and removing it is removing
>> functionality from the driver. And upstream seems not to be very happy
>> with this.
> End users would be able to use 'pgdjbc-foss' or 'pgjdbc-foss-osgi' (KISS).
     I think this will make users nuts. There will be three versions of 
the driver:

- One in the official website (pgjdbc), not in Fedora
- One called pgjdbc-foss, only in Fedora, not mentioned anywhere else
- One called pgjdbc-foss-osgi, only in Fedora, not mentioned anywhere 
else, which will create even confusion against the non-osgi one

     Plus the huge burden of maintaining two! forks of pgjdbc.

     I believe it's more KISS to just re-write the OSGI stuff used in 
pgjdbc, license that PostgreSQL, and you're good to go, with a pure FOSS 
package.

>
>>       We definitely don't know how much or less users use this, but
>> removing something that works and might be used is what may cause
>> trouble. Specially, if it is just a few hours of work away to fix the
>> licensing issue.
> Oh, I see what you mean :) now -- but those licensing issues should be
> fixed upstream..

     Right. We can work on fixing them and submitting a PR.

>
>>>>        With the above recipe, pgjdbc should also be buildable as an RPM,
>>>> without modifying upstream code. I believe no other problems would be
>>>> left for packaging it. What do you think?
>>> There are other problems (and we probably don't have all):
>>>
>>> - There is the '*-parent-poms' *separate* project, this makes us to make
>>>     the package build done in two phases.  I still don't understand this
>>>     artificial split.
>>       It is done to help make versions of the driver for different
>> versions of the JRE without duplicating a lot of code. Whatever it is,
>> it is not a big problem,
> I still don't get the reason why there can't be single one tarball.  It is
> a problem, every distro is going to build the package in two-steps.
> Gentoo guys do build their packages themselves!

     I think this is a matter of taste. I believe having a separate 
package for the osgi interfaces that you are "copying" to provide a 
compatibility layer belong to a separate project, and hence two 
tarballs. But if that would be a showstopper, it could be integrated 
into pgjdbc itself. But I'd wait for other's (pgjdbc core) opinion here 
before doing that.
>
>> and I believe this is nowadays non-negotiable for upstream. Again, at
>> 8Kdata we have been able to work around this easily and can provide a
>> spec that handles this :)
> I was able to do this too.  But having a fork will make this easy for
> everyone (DRY).
>
>>> - I haven't been able to run the new tests.., which seem to be Travis
>>>     (ubuntu && maven?) oriented
>>       I think running tests is cool for the packaging process, but is
>> this needed for packaging? I mean, it's upstream who should run them
>> before releasing versions, right? :)
> No-no-no :).  Ideally¹ we should be able to (a) run the testsuite during
> package build (no root access, no network access) in cloud, and (b) we
> should be able to package the testsuite for user -- so anyone is able to
> run the testsuite on end-user box.  This sounds like sci-fi now, but it is
> really important to run the testsuite at least during package build.

     OK, nothing against that :)

>
>>> I agree that this could look like expensive effort, but as I said - we do
>>> not want diverge.  Just fix the distribution issues ;).  Nothing more than
>>> what all distributions do anyway with new release, but a consistent way.
>>       It's not easy to package Maven-based software, as there is some
>> overlapping in the concept but with different point of view. I won't
>> further look into expensive efforts. There are few resources and we'd
>> better direct them to other areas.
> Right, thats why I do not plant to do anything expensive!  Just
> accumulate the things at one place -- the things which upstream forces us
> to do on per-distribution level.
>
>>       If the proposed solution works, and it's simple, why not just
>> simply go for it?
> It works.
>
> ¹ This has been don for postgresql.spec (server).  But with pgjdbc we are
>    even unable to *build* from source :).

     I'm sorry I'm not that familiar with pgjdbc test suite, but post a 
separate message to this list with the errors you encountered to check 
them :)

     Thanks for all your input!

     Álvaro


-- 
Álvaro Hernández Tortosa


-----------
8Kdata



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 18:41                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
@ 2016-02-17 21:47                   ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 21:57                     ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 21:47 UTC (permalink / raw)
  To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

Thanks a lot, I appreciate your concerns and I mostly agree with you.  Let
me answer just quickly to the important points which need to be
underlined.  I could more, but I would repeat myself:

  I do agree that the fork is not optimal, but that is the
  only way to go to keep the distribution sane, consistent.
  At least as long as upstream considers downstream packaging
  as something which is not important.

On Wednesday 17 of February 2016 19:41:52 Álvaro Hernández Tortosa wrote:
>      The only other real alternative is change the code to work around
> waffle, and after a long time debating I have seen nobody to come up
> with a fix for this.

Please 's/work-around/make soft-dependency/' and specify that the work
must be done upstream.

> > I believe this has been discussed before, and Pavel Kajaba already
> > worked on it .. but this is not acceptable by upstream.
>
>      Yeah, so we have to work around it. That's why we are suggesting
> this alternative.

This _is good alternative_ which needs, however, to be done on one place.
More eyes see more bugs -- so the "hacks" will be done properly if
distributions concentrate on one place.  At least those upstreams who are
interested.

> > Don't take me wrong -- it is easier to do the patching your way, but on
> > one place!  Then take the tarball and you are done.
>
>      If I understood it correctly, the RPM specs specifically allow (and
> I believe is common place) to patch upstream software, to adapt it to
> the specificities of RPM packaging. I believe this patch perfectly
> belongs to this category.

No, this is not possible.  If you fix our spec file to apply some
downstream patch, you fix only RPM.

> Good news is that to do this, we don't need any upstream approval :)

That is what the fork is meant for.  From that forked code we can generate
(the only one - self-standing) tarball -- which anybody can take and use
to build from source easily (fixed build scripts).

> >>       Other distros will surely benefit anyway, as the process of
> >> patching a source rpm/deb/whatever only differs in implementation
> >> details (how you do it), not on the concept of doing it.
> > Well, how exactly you expect this patch to be applied?  Because deb
> > maintainers usually do not watch RPM packaging and vice versa.
>
>      Well, when Debian maintainers would ask pgjdcb, the same way as you
> did, we will point them to the solution applied to the RPM, which will
> be already working, so that they could apply the same technique
> --shouldn't be hard.

Yeah, I'll ping (not only) Debian guys soon.  We should do the hacking
technique together and the constant way.

>      We both agree :) But forking pgjdbc to create pgjdbc-foss is, to
> me, much more DRY than a tiny patch that might be distribution-dependant.

The patches we plan to support in fork are distribution-independent.
Otherwise it would make no sense to concentrate the work.

>      I care a lot about FOSS principles, and that's the main reason if
> we rewrite the interfaces, they will be completely FOSS.

Thanks that you do care here..  foss alternative is acceptable, but see
below it is still not perfect.  The dependancy hell -- you should be able
to build/test/deploy your software without software you actually don't
need.

> > End users would be able to use 'pgdjbc-foss' or 'pgjdbc-foss-osgi' (KISS).
>
>      I think this will make users nuts. There will be three versions of
> the driver:
>
> - One in the official website (pgjdbc), not in Fedora
> - One called pgjdbc-foss, only in Fedora, not mentioned anywhere else
> - One called pgjdbc-foss-osgi, only in Fedora, not mentioned anywhere
> else, which will create even confusion against the non-osgi one

This is all unfortunate, I agree with you.  I would still prefer to have
fixed upstream so it is re-distributable correctly.

On the other hand, that is what using hard-to-package-correctly
licenses/software result in, and anybody should be aware of.

>      Plus the huge burden of maintaining two! forks of pgjdbc.

This is not a problem.  Patching out the 'osgi.enterprise' and 'waffle' is
easy enough to take care of.  And all distros will be sure that it is done
the right way (and if not, somebody needs to fix it or everybody will
loose -- thats why we need to be together).

>      I believe it's more KISS to just re-write the OSGI stuff used in
> pgjdbc, license that PostgreSQL, and you're good to go, with a pure FOSS
> package.

Right, it is the right - foss way.  But I still claim this is useless
effort.  If the osgi was an issue, people would care to have up-2-date
alternatives in GNU/Linux ecosystem already.  So ... repeating myself ...
to make it super perfect, :) users should be able to build the software
without osgi.  You can look how postgresql server is built! (tons of
options available during build, nobody tries to pretend that all the
functionality needs to be built in, _everywhere_ OR _nowhere_).  Even if
you switch to free alternative to osgi.enterprise, 90% of the packagers
will still patch it out .. and there you go -- something is wrong and the
work-around needs to be done on one place.

> >>       We definitely don't know how much or less users use this, but
> >> removing something that works and might be used is what may cause
> >> trouble. Specially, if it is just a few hours of work away to fix the
> >> licensing issue.
> > Oh, I see what you mean :) now -- but those licensing issues should be
> > fixed upstream..
>
>      Right. We can work on fixing them and submitting a PR.

Let's wait for upstream.

> > I still don't get the reason why there can't be single one tarball.  It is
> > a problem, every distro is going to build the package in two-steps.
> > Gentoo guys do build their packages themselves!
>
>      I think this is a matter of taste.

Disagree :( it is a lot of thinking to make the packaging right;  and
nobody convinced me that this is actually necessary.  U just agree that
this issue can be worked around...

>      I believe having a separate
> package for the osgi interfaces that you are "copying" to provide a
> compatibility layer belong to a separate project, and hence two
> tarballs.

I must disagree here.  The osgi as opt-out can't exist, so the osgi in
separate "layer above" pgjdbc (not talking about copying the code) sounds
like natural solution.

> But if that would be a showstopper, it could be integrated
> into pgjdbc itself. But I'd wait for other's (pgjdbc core) opinion here
> before doing that.

That is what we need to do! :)

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 18:41                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 21:47                   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-17 21:57                     ` Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 22:13                       ` Re: [HACKERS] Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 21:57 UTC (permalink / raw)
  To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: pgsql-jdbc@postgresql.org, Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On Wednesday 17 of February 2016 22:47:04 Pavel Raiskup wrote:
> On Wednesday 17 of February 2016 19:41:52 Álvaro Hernández Tortosa wrote:
> >      The only other real alternative is change the code to work around
> > waffle, and after a long time debating I have seen nobody to come up
> > with a fix for this.
> 
> Please 's/work-around/make soft-dependency/' and specify that the work
> must be done upstream.

And also note that we can't start to work on patches if we are told that
this is something which is not desired for upstream.  So the fact that
nobody (we in particular :)) come up with fix is due to this.

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 18:41                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 21:47                   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 21:57                     ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
@ 2016-02-17 22:13                       ` Dave Cramer <pg@fastcrypt.com>
  2016-02-17 22:43                         ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Dave Cramer @ 2016-02-17 22:13 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: Álvaro Hernández <aht@8kdata.com>; pgsql-jdbc; Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On 17 February 2016 at 16:57, Pavel Raiskup <praiskup@redhat.com> wrote:

> On Wednesday 17 of February 2016 22:47:04 Pavel Raiskup wrote:
> > On Wednesday 17 of February 2016 19:41:52 Álvaro Hernández Tortosa wrote:
> > >      The only other real alternative is change the code to work around
> > > waffle, and after a long time debating I have seen nobody to come up
> > > with a fix for this.
> >
> > Please 's/work-around/make soft-dependency/' and specify that the work
> > must be done upstream.
>
> And also note that we can't start to work on patches if we are told that
> this is something which is not desired for upstream.  So the fact that
> nobody (we in particular :)) come up with fix is due to this.
>
> Pavel
>
>
>
I think I already made my position clear. The time to chime in on how we
organized the code is not after we do a major re-organization.

FWIW, I've had conversations with other people in redhat projects that
consume the driver and they use maven

This is the defacto standard for java dependency resolution. At least one
other programming language use a similar mechanism. I can think of three
off the top of my head. Python, go, ruby.


What project in the distribution requires this dependency? Probably JBoss
as it appears to be the last major product that is still built using ant?

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [HACKERS] Packaging of postgresql-jdbc
  2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
  2016-02-16 12:50 ` Re: Packaging of postgresql-jdbc Craig Ringer <craig@2ndquadrant.com>
  2016-02-16 13:04   ` Re: Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
  2016-02-17 09:39     ` Re: [HACKERS] Packaging of postgresql-jdbc Matteo Melli <matteom@8kdata.com>
  2016-02-17 11:43       ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 15:55         ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 16:47           ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 17:25             ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 18:22               ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 18:41                 ` Re: [HACKERS] Packaging of postgresql-jdbc Álvaro Hernández Tortosa <aht@8kdata.com>
  2016-02-17 21:47                   ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 21:57                     ` Re: [HACKERS] Packaging of postgresql-jdbc Pavel Raiskup <praiskup@redhat.com>
  2016-02-17 22:13                       ` Re: [HACKERS] Packaging of postgresql-jdbc Dave Cramer <pg@fastcrypt.com>
@ 2016-02-17 22:43                         ` Pavel Raiskup <praiskup@redhat.com>
  0 siblings, 0 replies; 19+ messages in thread

From: Pavel Raiskup @ 2016-02-17 22:43 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: Álvaro Hernández <aht@8kdata.com>; pgsql-jdbc; Matteo Melli <matteom@8kdata.com>; Pavel Kajaba <pkajaba@redhat.com>; Craig Ringer <craig@2ndquadrant.com>; hhorak@redhat.com

On Wednesday 17 of February 2016 17:13:29 Dave Cramer wrote:
> I think I already made my position clear. The time to chime in on how we
> organized the code is not after we do a major re-organization.

ACK.

> FWIW, I've had conversations with other people in redhat projects that
> consume the driver and they use maven

At least this discussion is with Fedora hat on so if some Red Hat people
use jar from maven, it is not that important.  I'm taking Fedora as
self-standing distribution, which provides Java ; provides PostgreSQL ;
but needs to provide up-2-date 'pgjdbc' (important part of system!).
Sounds like trivial task.

> This is the defacto standard for java dependency resolution. At least
> one other programming language use a similar mechanism. I can think of
> three off the top of my head. Python, go, ruby.

Right, we must support 'maven', 'pip', 'gem', 'npm', ... but it does not
mean that we can make "system package" dependant on software provided by
repository managed by those tools.  We can't.  Our users are free to use
this software, and it is their's responsibility.

> What project in the distribution requires this dependency? Probably JBoss
> as it appears to be the last major product that is still built using ant?

(a) it is not as important as you think - and I thus do not care too much
who is using it within Red Hat.  Within the set of packages I
(co-)maintain [1] there are pieces of system which need to be available on
in native repositories (including pgjdbc).  This is similar for other
distros.
(b) How is this relevant to 'ant' build system?  We can use maven build.

[1] https://admin.fedoraproject.org/pkgdb/packager/praiskup/

Pavel



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 19+ messages in thread


end of thread, other threads:[~2016-02-17 22:43 UTC | newest]

Thread overview: 19+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 12:15 Packaging of postgresql-jdbc Pavel Kajaba <pkajaba@redhat.com>
2016-02-16 12:50 ` Craig Ringer <craig@2ndquadrant.com>
2016-02-16 13:01   ` Pavel Raiskup <praiskup@redhat.com>
2016-02-16 15:00     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-02-16 13:04   ` Dave Cramer <pg@fastcrypt.com>
2016-02-17 09:39     ` Matteo Melli <matteom@8kdata.com>
2016-02-17 11:43       ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 15:55         ` Álvaro Hernández Tortosa <aht@8kdata.com>
2016-02-17 16:47           ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 17:25             ` Álvaro Hernández Tortosa <aht@8kdata.com>
2016-02-17 17:43               ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2016-02-17 17:49                 ` Álvaro Hernández Tortosa <aht@8kdata.com>
2016-02-17 18:35                 ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 18:22               ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 18:41                 ` Álvaro Hernández Tortosa <aht@8kdata.com>
2016-02-17 21:47                   ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 21:57                     ` Pavel Raiskup <praiskup@redhat.com>
2016-02-17 22:13                       ` Dave Cramer <pg@fastcrypt.com>
2016-02-17 22:43                         ` Pavel Raiskup <praiskup@redhat.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox