You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Antonio Vieiro <an...@vieiro.net> on 2017/10/14 07:15:33 UTC

How to handle patches for external binaries?

Hi all,

Some modules contain patches that must be applied to third-party source projects in order to generate external binaries (an example at [1]).

1. What’s the license of these patches? Same as the original project? Or Apache 2?
2. I will not add maven coordinates for these, right? Shall I open an issue or mark the review as “Done” in the List of Modules to Review?

Thanks,
Antonio


[1] https://github.com/apache/incubator-netbeans/blob/master/o.apache.xml.resolver/external/resolver.patch

Re: How to handle patches for external binaries?

Posted by Sven Reimers <sv...@gmail.com>.
Sounds good for me..

-Sven

Am 14.10.2017 13:33 schrieb "Antonio" <an...@vieiro.net>:



On 14/10/17 11:17, Emilian Bold wrote:

> 1. What’s the license of these patches? Same as the original project? Or
>> Apache 2?
>>
>
> Since it's code from Oracle, it's going to be relicensed as Apache 2.
>

Ok. If I see something weird I'll raise my hand (patching non Apache-2
licensed binaries with an Apache licensed patch, for instance).



> 2. I will not add maven coordinates for these, right? Shall I open an
>> issue or mark the review as “Done” in the List of Modules to Review?
>> Or
>> 3. Build a small ant project that downloads sources from Maven, applies
>> patches as required and recreates the binaries.
>>
>
> Building those in an automatic fashion would be great!
>
>
I think the best thing to do is to add a target to each module (say
"generate-external-binaries") that recreates the binaries. I imagine each
module will have its own issues to generate the binaries (classpath stuff,
whatever...). Keeping the responsibility to recreate the binaries within
each module is a good thing, I think.

Then the main "nbbuild/build.xml" could invoke this task for a set of
modules that need patched binaries.

I'll try to add a PR with this approach later on, as I see more cases of
patched binaries. If anyone thinks this is a wrong approach please let me
know.

Thanks,
Antonio

Re: How to handle patches for external binaries?

Posted by Antonio <an...@vieiro.net>.

On 14/10/17 11:17, Emilian Bold wrote:
>> 1. What’s the license of these patches? Same as the original project? Or Apache 2?
> 
> Since it's code from Oracle, it's going to be relicensed as Apache 2.

Ok. If I see something weird I'll raise my hand (patching non Apache-2 
licensed binaries with an Apache licensed patch, for instance).

> 
>> 2. I will not add maven coordinates for these, right? Shall I open an issue or mark the review as “Done” in the List of Modules to Review?
>> Or
>> 3. Build a small ant project that downloads sources from Maven, applies patches as required and recreates the binaries.
> 
> Building those in an automatic fashion would be great!
> 

I think the best thing to do is to add a target to each module (say 
"generate-external-binaries") that recreates the binaries. I imagine 
each module will have its own issues to generate the binaries (classpath 
stuff, whatever...). Keeping the responsibility to recreate the binaries 
within each module is a good thing, I think.

Then the main "nbbuild/build.xml" could invoke this task for a set of 
modules that need patched binaries.

I'll try to add a PR with this approach later on, as I see more cases of 
patched binaries. If anyone thinks this is a wrong approach please let 
me know.

Thanks,
Antonio

Re: How to handle patches for external binaries?

Posted by Emilian Bold <em...@gmail.com>.
> 1. What’s the license of these patches? Same as the original project? Or Apache 2?

Since it's code from Oracle, it's going to be relicensed as Apache 2.

> 2. I will not add maven coordinates for these, right? Shall I open an issue or mark the review as “Done” in the List of Modules to Review?
> Or
> 3. Build a small ant project that downloads sources from Maven, applies patches as required and recreates the binaries.

Building those in an automatic fashion would be great!


--emi


On Sat, Oct 14, 2017 at 10:22 AM, Antonio Vieiro <an...@vieiro.net> wrote:
> Or
>
> 3. Build a small ant project that downloads sources from Maven, applies patches as required and recreates the binaries.
>
>
>> El 14 oct 2017, a las 9:15, Antonio Vieiro <an...@vieiro.net> escribió:
>>
>> Hi all,
>>
>> Some modules contain patches that must be applied to third-party source projects in order to generate external binaries (an example at [1]).
>>
>> 1. What’s the license of these patches? Same as the original project? Or Apache 2?
>> 2. I will not add maven coordinates for these, right? Shall I open an issue or mark the review as “Done” in the List of Modules to Review?
>>
>> Thanks,
>> Antonio
>>
>>
>> [1] https://github.com/apache/incubator-netbeans/blob/master/o.apache.xml.resolver/external/resolver.patch
>

Re: How to handle patches for external binaries?

Posted by Antonio Vieiro <an...@vieiro.net>.
Or

3. Build a small ant project that downloads sources from Maven, applies patches as required and recreates the binaries.


> El 14 oct 2017, a las 9:15, Antonio Vieiro <an...@vieiro.net> escribió:
> 
> Hi all,
> 
> Some modules contain patches that must be applied to third-party source projects in order to generate external binaries (an example at [1]).
> 
> 1. What’s the license of these patches? Same as the original project? Or Apache 2?
> 2. I will not add maven coordinates for these, right? Shall I open an issue or mark the review as “Done” in the List of Modules to Review?
> 
> Thanks,
> Antonio
> 
> 
> [1] https://github.com/apache/incubator-netbeans/blob/master/o.apache.xml.resolver/external/resolver.patch