Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aW4SW-0003Bh-82 for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Feb 2016 15:56:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aW4SV-0002wA-QL for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Feb 2016 15:56:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aW4S0-0001WF-Bl for pgsql-jdbc@postgresql.org; Wed, 17 Feb 2016 15:55:36 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aW4Rs-0005Hm-Ar for pgsql-jdbc@postgresql.org; Wed, 17 Feb 2016 15:55:35 +0000 Received: by mail-wm0-x22f.google.com with SMTP id b205so161957891wmb.1 for ; Wed, 17 Feb 2016 07:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=8kdata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=YNZHId131UF/ggf2P6cokjDt+H3/3jV3JfdYWqpiX3g=; b=knF4A4ZXEl9NzwO1HtPilf8rljjeXHPWjKTs3LZQLjNANEK8OuKriJ0vvLoqYcCkyA Ci67/dghNKozJO5804cgIotjOtgoeNP912K6oE+6fyqIJzvnRCgXexPdg7PqtfMrrVgu RP+fRyErZ86OyHZsU/yoe0ctPunGR1cvvvRnFXnGegbsTiehaEMl7Evfaj48AveQUZau Mkirf0f5KMf2cECetQsV4xlLQW4e9xrWhBRHyBldSk7C2HUxlserFwu1VM7N4RnzTGGi 97AH3a9nrziFJ5Zk0Me/zPRKPnjLWV0ZtYkgQtjZGiJrv9GBsPndCW3/QuAo+KnLNG2Z xdJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=YNZHId131UF/ggf2P6cokjDt+H3/3jV3JfdYWqpiX3g=; b=YhLqOtEDst2PbeB60rYKeicqYrPEHoZ2xzLwj8gRQzBFbNPHmY05/EZ8kgglJQ9lbj RqFgp2nnJ1c9FH0vQbQnrRy8zICXDAHAZUbzOkFdq8C7iO4a/I0bs42vGQj2BA4MghY4 qbrDvHnJhY6Ef3wVi82lyFoHnI2tzjduUC8Fe4bHnMDXtAS+QZnBoPWGdy+C3bI98hO1 cpnwYb7jiZXLtEmsZN2V/Zw/Peloosjni4EtLs38dnosMBwjD294tu5ghGhQKpumkjoX zt/cjqaH5QgziYLDODg6Qv4v5ir/xh8wF4UIZsMy3S/dMVa1VECQrT/+TiAXxe6UMBCh CVwA== X-Gm-Message-State: AG10YORdjAmxqDI1m4epQtXtntWxXbdV8D6gEmyQypJFYRb/ttvGSGl5DU6mDa6llKeyXg== X-Received: by 10.194.58.12 with SMTP id m12mr3022791wjq.22.1455724526228; Wed, 17 Feb 2016 07:55:26 -0800 (PST) Received: from [192.168.1.39] (220.Red-88-12-72.dynamicIP.rima-tde.net. [88.12.72.220]) by smtp.gmail.com with ESMTPSA id 73sm26142735wmy.22.2016.02.17.07.55.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Feb 2016 07:55:25 -0800 (PST) Subject: Re: [HACKERS] Packaging of postgresql-jdbc To: pgsql-jdbc@postgresql.org, Matteo Melli , Pavel Raiskup References: <934450056.39552109.1455620714473.JavaMail.zimbra@redhat.com> <25542498.BaYXPhgdKY@nb.usersys.redhat.com> From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Cc: Pavel Kajaba , Craig Ringer , hhorak@redhat.com Message-ID: <56C497EC.2030802@8kdata.com> Date: Wed, 17 Feb 2016 16:55:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <25542498.BaYXPhgdKY@nb.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.8 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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