You are viewing a plain text version of this content. The canonical link for it is here.
Posted to legal-discuss@apache.org by OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr> on 2022/11/08 09:51:08 UTC

Copying Code from Apache Commons Math

Greetings, I have my own open source math library called Tephrium and I had to copy paste some code from Apache Commons Math. I made some small modifications on the code that I've copied. Both projects are licensed under the Apache-2.0 license. What do I need to do legally in this situation?

Do I need to state the changes I've made and if so, how exactly? Do I need to write some comments on my source files or do I need a seperate file?

It seems like Apache Commons Math has a NOTICE file. Do I need to copy this file and put it in my repository? And if so can/should I append my information to this file?

What happens if I need multiple NOTICE files in future? Can I merge all of them into one big NOTICE file?

The source files I've copied code from have copyright headers. Do I need to also copy paste these headers into my source file and if so, should I also add my own headers along with the other headers?

I am hoping to find answers to all of my questions since these questions have troubled me for a while now so please take your time.

Best regards, Oğuzhan

Ynt: Copying Code from Apache Commons Math

Posted by OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>.
Dear Justin and Hen,

I sent an email to legal-discuss@apache.org about 12 days ago with some questions about licensing, dependency management, and relicensing projects. I haven’t heard back yet. If you have any information or insights regarding my questions, I would greatly appreciate your assistance. Thank you for your time and consideration.

Here’s the link to the email: https://lists.apache.org/thread/3ohwkg7oop5770x367othdbf0hzy5ww9

Best regards, Oğuzhan

________________________________
Gönderen: OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>
Gönderildi: 13 Kasım 2022 Pazar 14:09
Kime: legal-discuss@apache.org <le...@apache.org>
Konu: Re: Copying Code from Apache Commons Math

Justin and Hen, thank you so much for your answers. You've helped me a lot. :)

Best Regards, Oğuzhan
________________________________
From: Hen <ba...@apache.org>
Sent: Sunday, November 13, 2022 10:33:28 AM
To: legal-discuss@apache.org <le...@apache.org>
Cc: OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>
Subject: Re: Copying Code from Apache Commons Math



On Wed, Nov 9, 2022 at 1:21 PM <ju...@classsoftware.com>> wrote:
Hi,

If I include the ASF headers on top of my source files where I've copy pasted Apache code, I will have multiple headers in a single file (mine and the Apache headers). Is it okay to have multiple headers in one file?

Sure that is fine.

If so, do I need to specify which parts of the file belong to which header? It seems like it would be confusing when it comes to determine which parts belong to ASF and which parts belong to me.

There’s no easy way to do this so I wouldn’t be too concerned about it.

Also generally speaking, in an Apache-2.0 or MIT or GPLv3 licensed open source project, do we have to write our own headers in order to apply the license properly or are they always optional and a LICENSE file is enough?

An ASF project must have headers on files, but for 3rd parties, just having a LICENSE file would be enough.

And finally, is there a shorter version of the Apache-2.0 headers? I know that ASF uses a different one but I couldn't find a short version for 3rd party libraries.

There is not one we suggest people use.

Not an Apache recommendation, but a common short header is to do the following:

    // Your Copyright Statement, however you wish to have it look
    // SPDX-License-Identifier: Apache-2.0

Hen


Re: Copying Code from Apache Commons Math

Posted by OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>.
Justin and Hen, thank you so much for your answers. You've helped me a lot. :)

Best Regards, Oğuzhan
________________________________
From: Hen <ba...@apache.org>
Sent: Sunday, November 13, 2022 10:33:28 AM
To: legal-discuss@apache.org <le...@apache.org>
Cc: OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>
Subject: Re: Copying Code from Apache Commons Math



On Wed, Nov 9, 2022 at 1:21 PM <ju...@classsoftware.com>> wrote:
Hi,

If I include the ASF headers on top of my source files where I've copy pasted Apache code, I will have multiple headers in a single file (mine and the Apache headers). Is it okay to have multiple headers in one file?

Sure that is fine.

If so, do I need to specify which parts of the file belong to which header? It seems like it would be confusing when it comes to determine which parts belong to ASF and which parts belong to me.

There’s no easy way to do this so I wouldn’t be too concerned about it.

Also generally speaking, in an Apache-2.0 or MIT or GPLv3 licensed open source project, do we have to write our own headers in order to apply the license properly or are they always optional and a LICENSE file is enough?

An ASF project must have headers on files, but for 3rd parties, just having a LICENSE file would be enough.

And finally, is there a shorter version of the Apache-2.0 headers? I know that ASF uses a different one but I couldn't find a short version for 3rd party libraries.

There is not one we suggest people use.

Not an Apache recommendation, but a common short header is to do the following:

    // Your Copyright Statement, however you wish to have it look
    // SPDX-License-Identifier: Apache-2.0

Hen


Re: Copying Code from Apache Commons Math

Posted by Hen <ba...@apache.org>.
On Wed, Nov 9, 2022 at 1:21 PM <ju...@classsoftware.com> wrote:

> Hi,
>
> If I include the ASF headers on top of my source files where I've copy
> pasted Apache code, I will have multiple headers in a single file (mine and
> the Apache headers). Is it okay to have multiple headers in one file?
>
>
> Sure that is fine.
>
> If so, do I need to specify which parts of the file belong to which
> header? It seems like it would be confusing when it comes to determine
> which parts belong to ASF and which parts belong to me.
>
>
> There’s no easy way to do this so I wouldn’t be too concerned about it.
>
> Also generally speaking, in an Apache-2.0 or MIT or GPLv3 licensed open
> source project, do we have to write our own headers in order to apply the
> license properly or are they always optional and a LICENSE file is enough?
>
>
> An ASF project must have headers on files, but for 3rd parties, just
> having a LICENSE file would be enough.
>
> And finally, is there a shorter version of the Apache-2.0 headers? I know
> that ASF uses a different one but I couldn't find a short version for 3rd
> party libraries.
>
>
> There is not one we suggest people use.
>

Not an Apache recommendation, but a common short header is to do the
following:

    // Your Copyright Statement, however you wish to have it look
    // SPDX-License-Identifier: Apache-2.0

Hen

Re: Copying Code from Apache Commons Math

Posted by ju...@classsoftware.com.
Hi,

> If I include the ASF headers on top of my source files where I've copy pasted Apache code, I will have multiple headers in a single file (mine and the Apache headers). Is it okay to have multiple headers in one file?

Sure that is fine.

> If so, do I need to specify which parts of the file belong to which header? It seems like it would be confusing when it comes to determine which parts belong to ASF and which parts belong to me.

There’s no easy way to do this so I wouldn’t be too concerned about it.

> Also generally speaking, in an Apache-2.0 or MIT or GPLv3 licensed open source project, do we have to write our own headers in order to apply the license properly or are they always optional and a LICENSE file is enough?

An ASF project must have headers on files, but for 3rd parties, just having a LICENSE file would be enough.

> And finally, is there a shorter version of the Apache-2.0 headers? I know that ASF uses a different one but I couldn't find a short version for 3rd party libraries.

There is not one we suggest people use.

Kind Regards,
Justin

Re: Copying Code from Apache Commons Math

Posted by OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>.
Hello Justin, thank you so much for answering my questions. You've helped me a lot. I just wanted to ask about a detail related to these headers.

If I include the ASF headers on top of my source files where I've copy pasted Apache code, I will have multiple headers in a single file (mine and the Apache headers). Is it okay to have multiple headers in one file? If so, do I need to specify which parts of the file belong to which header? It seems like it would be confusing when it comes to determine which parts belong to ASF and which parts belong to me.

Also generally speaking, in an Apache-2.0 or MIT or GPLv3 licensed open source project, do we have to write our own headers in order to apply the license properly or are they always optional and a LICENSE file is enough?
I believe the Apache-2.0 license page says "consider adding one" but I wanted to make sure. :)

And finally, is there a shorter version of the Apache-2.0 headers? I know that ASF uses a different one but I couldn't find a short version for 3rd party libraries.

Best regards, Oğuzhan
________________________________
From: Justin Mclean <ju...@classsoftware.com>
Sent: Wednesday, November 9, 2022 7:41:10 AM
To: legal-discuss@apache.org <le...@apache.org>
Cc: OĞUZHAN TOPALOĞLU <og...@std.yildiz.edu.tr>
Subject: Re: Copying Code from Apache Commons Math

Hi,

We can’t give you actual legal advice, please see a professional for that, but there is very little you need to do.

> Greetings, I have my own open source math library called Tephrium and I had to copy paste some code from Apache Commons Math. I made some small modifications on the code that I've copied. Both projects are licensed under the Apache-2.0 license. What do I need to do legally in this situation?

Legally nothing, assuming you kept the original headers. It would be nice to credit the ASF but that is not required.

> Do I need to state the changes I've made and if so, how exactly? Do I need to write some comments on my source files or do I need a seperate file?

You can if you want to, but it  is not required.

> It seems like Apache Commons Math has a NOTICE file. Do I need to copy this file and put it in my repository? And if so can/should I append my information to this file?

If you were an ASF project you would need to do that, but there is no requirement for a 3rd party to do so. You can add the contents to your NOTICE file if you want to, but again it is not required.

> The source files I've copied code from have copyright headers. Do I need to also copy paste these headers into my source file and if so, should I also add my own headers along with the other headers?

I would leave the headers as they are and not modify them or add your own.

Kind Regards,
Justin

Re: Copying Code from Apache Commons Math

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

We can’t give you actual legal advice, please see a professional for that, but there is very little you need to do.

> Greetings, I have my own open source math library called Tephrium and I had to copy paste some code from Apache Commons Math. I made some small modifications on the code that I've copied. Both projects are licensed under the Apache-2.0 license. What do I need to do legally in this situation?

Legally nothing, assuming you kept the original headers. It would be nice to credit the ASF but that is not required.

> Do I need to state the changes I've made and if so, how exactly? Do I need to write some comments on my source files or do I need a seperate file?

You can if you want to, but it  is not required.

> It seems like Apache Commons Math has a NOTICE file. Do I need to copy this file and put it in my repository? And if so can/should I append my information to this file?

If you were an ASF project you would need to do that, but there is no requirement for a 3rd party to do so. You can add the contents to your NOTICE file if you want to, but again it is not required.

> The source files I've copied code from have copyright headers. Do I need to also copy paste these headers into my source file and if so, should I also add my own headers along with the other headers?

I would leave the headers as they are and not modify them or add your own.

Kind Regards,
Justin
---------------------------------------------------------------------
To unsubscribe, e-mail: legal-discuss-unsubscribe@apache.org
For additional commands, e-mail: legal-discuss-help@apache.org