• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copied source licensing

 
Janis Kazakovs
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure about how to go along with the licenses. Let say I am writing a library and I want to make it freely available under either GPLv3 or Apache license (I do not really care). But, I reuse some code from another library released under GPLv2 license. By reusing I mean copy-pasting. However, I do not want to claim that the code I have copied was written by me. How should indicate that in my source I am reusing a code from another source. Is it enough to just copy a license header from the file the code was partially copied from and put that header my file?

Thanks,
Janis
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Including the original copyright is the least you should do with all code you include in your code. The rest depends on the license. I believe that GPL (either v2 or v3) requires your entire code to be released under the same GPL license (I don't know about included libraries).

Moving to General Computing.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Attribution (mentioning where the code comes from) is basic courtesy, so I'd say adding a header to the file in question is the minimum required.

But note that most licenses do not allow you to publish the code under a different license. The GPL often does (many licenses have wording like "... under this or a later version of the GPL"), so putting GPL2 stuff under GPL3 in those circumstances would be OK. But you can't use something licensed under the GPL in software that's licensed under the Apache license, and vice versa.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd probably also need to include the original license file in any distribution.
 
Janis Kazakovs
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your replies. From your answers I may conclude that I should be fine if I release my source under GPLv3 and if I include an original copyright header in the source file, which includes the copied code.

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should be fine if I release my source under GPLv3 and if I include an original copyright header in the source file, which includes the copied code.

IF the original code was licensed under a variety of the GPL 2 which stated that it's fine to use a later license. As mentioned, many GPL-based instances do, but by no means all.
 
Janis Kazakovs
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The header on the file I copy code from specifies the following:

/*...
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License.
...
*/


So, if I go for GPLv2 and read its description I find the following paragraph:

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.


May I conclude that using the later version of the GPL license, i.e. GPLv3, is still fine?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Er...

"GNU General Public License Version 2 only "

Not only does it specify a version, it says GPLv2 *only*.
 
Janis Kazakovs
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, let be it. I would say it is quite restrictive. The term open source appears to me in a bit different perspective now.

Thank you for your clarifications.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Early GPLs are restrictive in some ways, the most open possible in others.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic