Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have this issue with licensing.

I downloaded a third-party class from GitHub and it's under the GPL v3 license. However, I used this class on another open-source project which is under the GPL v2 license, and submitting my script there, requires that everything is under GPL v2 from my side too.

Am I allowed to change the license for that class, even though I am not the author?

share|improve this question
    
My uneducated guess: if you stick with the old version of the 3rd party class, you can stay with GPL v2. Prima-facie observation: you're not allowed to change the terms of the license, so your not allowed to change the license. Otherwise, you could just arbitrarily substitute any license you wanted. –  Robert Harvey Oct 4 '12 at 17:08
add comment

migrated from stackoverflow.com Oct 4 '12 at 17:04

This question came from our site for professional and enthusiast programmers.

5 Answers

up vote 6 down vote accepted

From the Free Software Fundation:

When we say that GPLv2 and GPLv3 are incompatible, it means there is no legal way to combine code under GPLv2 with code under GPLv3 in a single program. This is because both GPLv2 and GPLv3 are copyleft licenses: each of them says, “If you include code under this license in a larger program, the larger program must be under this license too.” There is no way to make them compatible. We could add a GPLv2-compatibility clause to GPLv3, but it wouldn't do the job, because GPLv2 would need a similar clause.

There is no way you can use GPLv2 and GPLv3 code in the same program and/or upgrade the licence.

share|improve this answer
2  
It's worth noting that the FSF has historically encouraged code to be licensed under the GPLv2 or later; the suggested text for LICENSE files is, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version." So while you're right that they're not compatible by default, most GPLv2 software can be incorporated into GPLv3 projects without incident in practice. –  Benjamin Pollack Oct 4 '12 at 17:36
    
You are right, let's just hope it was with the optional text. –  ElderMael Oct 4 '12 at 17:41
    
"Downgrade" in a somewhat similar fashion can be possible, too (but that is less likely in practice, but it is a reality). –  hakre Oct 4 '12 at 17:53
    
Wow, I didn't realize copyleft licenses inhibit freedoms even amongst themselves, to the point of creating a bureaucratic hell over simple versioning. –  Allon Guralnek Oct 4 '12 at 19:01
    
Thanks. I contacted the original author asking him for permission. Now I'm waiting for an answer... –  Aborted Oct 6 '12 at 15:01
add comment

Make sure you check exactly what the license on the GPLv2 software says. Many projects use the copyright notice from the FSF verbatim which includes this clause:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

If it does include this clause, then you can use both products under GPLv3. Some projects, notably the Linux kernel, do not include this clause. If this project doesn't include this clause, you are out of luck. The two versions of the license are not compatible without the "or any later version" clause and only the copyright holder can change the license.

If it does include this clause, you don't have to change either of the licenses, since GPLv2 with the "or any later version" clause is compatible with GPLv3.

share|improve this answer
add comment

on another open-source project which is under the GPL v2 license,

Many GPL v2 projects do not limit their license version to 2.0 only but allow any later version. Some even allow earlier ones (if no license version is specified with the software itself).

So you should double-check if that open source project really requires 2.0 only or if it is possible to add under the current version and allow the project to upgrade smoothly. You should add that open source project to your question to make it more exemplary (also the other one you want to take from).

Am I allowed to change the license for that class, even though I am not the author?

No. However what I wrote above for GPL v2 counts as well for GPL v3: If with that code no specific version has been named, you're allowed to use under any GPL version you wish, which would include GPL v2 then (note: then meaning if the needed pre-conditions are met).

share|improve this answer
add comment

No, you are not.

As a rule of thumb, only the copyright holder (i.e., the author of your third-party library) is allowed to change the license under which code is distributed.

There is a weird exception in the GPL, but it doesn't help you: the FSF has historically encouraged that software be licensed under the GPLv2 or later. Specifically, in most cases, you will find the following in the LICENSE file or equivalent:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This means that GPLv2 code can be used in a GPLv3 project without incident.

Unfortunately, there is no clause, either in the GPLv2 or GPLv3, for using an earlier version of the GPL. You'll either need to convince the GPLv2 project to upgrade to GPLv3 or avoid the GPLv3 library.

share|improve this answer
    
That exception is definitely not weird. They new that upgrade will be needed sooner or later, so they used this to allow it. After all it was GPLv2 meaning that once upon a time there was a GPLv1 from which upgrade had already happened. –  Jan Hudec Dec 18 '12 at 13:14
add comment

I'm not a lawyer, but what I would do is read the license agreement of the GPLv2 work carefully. It may allow you to release your derived work under the GPLv2 or later. In that case, you can just release your combination as GPLv3.

It's very unlikely that you can take GPLv3 code and release it as GPLv2, so you'd have to ask the original author for permission.

Likely you can't do what you're trying to do.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.