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 <an...@vieiro.net.INVALID> on 2023/02/09 19:37:07 UTC

How to incorporate MIT source code?

Hi all,

Imagine I need to use some source code released under the MIT license 
(say an Antlr Grammar [1]) and make modifications to it, and cover these 
modifications with the Apache License.

How am I expected to do this? I mean,

a) Shall I keep the original license in a commit, so it can be tracked 
in the future, and then replace the license with the Apache License and 
continue with modifications in future commits? That won't do, because 
commits are only for Apache-2 license, right?

b) May I keep the original MIT license and keep on using this license? 
That won't do eiher, for the same reason as above.

c) Maybe keeping tracking of licensing history in a licenseinfo.xml somehow?

d) Any other ideas I can't think of?

Thanks,
Antonio


[1]
https://github.com/antlr/grammars-v4

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: How to incorporate MIT source code?

Posted by Neil C Smith <ne...@apache.org>.
On Thu, 9 Feb 2023 at 19:37, Antonio <an...@vieiro.net.invalid> wrote:
> How am I expected to do this? I mean,
>
> a) Shall I keep the original license in a commit, so it can be tracked
> in the future, and then replace the license with the Apache License and
> continue with modifications in future commits? That won't do, because
> commits are only for Apache-2 license, right?
>
> b) May I keep the original MIT license and keep on using this license?
> That won't do eiher, for the same reason as above.

We can't remove the existing license and copyright notice, but could
add the Apache header on top.  Closest thing I've found quickly is
here - https://www.apache.org/foundation/license-faq.html#code-developed-elsewhere-received-under-a-category-a-license-incorporated-into-apache-projects-distributed-by-apache-and-licensed-to-downstream-users-under-its-original-license

In particular "If changes are made to the code while at Apache, the
standard Apache header is prepended to each changed file.
Additionally, any legally-required notices related to the code are
published in the distribution."

So we also need to make sure the original license is covered correctly
in the (sources) NOTICE file.

I'm sure I read something more detailed on this scenario quite
recently, but currently am failing to find it! :-\  Anyone else?

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: How to incorporate MIT source code?

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 12 Feb 2023, 09:06 Antonio, <an...@vieiro.net.invalid> wrote:

> I've updated the "licenseinfo.xml" (adding the proper license in
> nbbuild/licenses. Question is, shall I mantain the original MIT license
> header in the file as well as the Apache one such as in [1]?
>


Yes. I covered that with ASF link in my reply.

Best wishes,

Neil

Re: How to incorporate MIT source code?

Posted by Antonio <an...@vieiro.net.INVALID>.
Thanks, Laszlo,

I've updated the "licenseinfo.xml" (adding the proper license in 
nbbuild/licenses. Question is, shall I mantain the original MIT license 
header in the file as well as the Apache one such as in [1]?

On other news, I generate the grammars at build time with [2] (using the 
org.antlrv4.Tool in build.xml).

Thanks,
Antonio



[1]
https://github.com/vieiro/netbeans-cnd/blob/285b1cd5192ba57852e01c0b01057a772d83c6a1/rust/rust.grammar/src/org/netbeans/modules/rust/grammar/antlr4/g4/RustLexer.g4

[2]
https://github.com/vieiro/netbeans-cnd/blob/285b1cd5192ba57852e01c0b01057a772d83c6a1/rust/rust.grammar/build.xml



On 11/2/23 9:03, Laszlo Kishalmi wrote:
> Here is an example: 
> https://github.com/apache/netbeans/blob/master/java/languages.antlr/licenseinfo.xml
> 
> MIT is a pretty permissive license, AFAIK it can be used without 
> restriction. See the nbbuild/licenses folder for examples.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: How to incorporate MIT source code?

Posted by Laszlo Kishalmi <la...@gmail.com>.
Here is an example: 
https://github.com/apache/netbeans/blob/master/java/languages.antlr/licenseinfo.xml

MIT is a pretty permissive license, AFAIK it can be used without 
restriction. See the nbbuild/licenses folder for examples.

On 2/9/23 11:37, Antonio wrote:
> Hi all,
>
> Imagine I need to use some source code released under the MIT license 
> (say an Antlr Grammar [1]) and make modifications to it, and cover 
> these modifications with the Apache License.
>
> How am I expected to do this? I mean,
>
> a) Shall I keep the original license in a commit, so it can be tracked 
> in the future, and then replace the license with the Apache License 
> and continue with modifications in future commits? That won't do, 
> because commits are only for Apache-2 license, right?
>
> b) May I keep the original MIT license and keep on using this license? 
> That won't do eiher, for the same reason as above.
>
> c) Maybe keeping tracking of licensing history in a licenseinfo.xml 
> somehow?
>
> d) Any other ideas I can't think of?
>
> Thanks,
> Antonio
>
>
> [1]
> https://github.com/antlr/grammars-v4
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists