Slashdot Mirror


GPLv2 and GPLv3 Coexisting In the Same Project?

cyclop writes "I am coding a data analysis application in my laboratory that I would like to release as free (as in freedom) software. Moreover I am going to begin a small OSS game that will be based, in part, on GPLv2 libraries. Problem is: in both cases, I'd like to be able to exchange code both with GPLv2 and (future) GPLv3 projects. I have no particular passions about either license — only thing is I don't want BSD-style 'do anything you want' licensing but a copyleft license. I know that GPLv2 and GPLv3 are not compatible. What can I do? Double licensing? Is there a compatible-with-both license? Adding exceptions? What do you think is the best way to address the GPLv2-to-GPLv3 transition without ending up on one or the other side of the barricade?"

24 of 116 comments (clear)

  1. If it's your code do both. by MikeFM · · Score: 5, Informative

    If it's your code you can use whichever licenses you want including making your code available under more than one license. If you're using someone else's code though then you have to stick to their license.

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    1. Re:If it's your code do both. by EsbenMoseHansen · · Score: 2, Informative

      I can't see how, even if all is your code, you could distinguish multiple licenses inside the same program.
      GPLv2 says that in order for a program to legaly have some GPLv2 code, the entire program must be under GPLv2. GPLv3 says the exact same thing, so both can't coexist legaly inside the same program, even if you wrote it all.

      It can be both in the sense you can say: Here is two licenses: GPLv2 and GPLv3. I offer my code on either license. You just pick one. Thus, the mutual incompability never comes into play.

      However, you are right that the code is not covered by both licenses as once. Thus, for code to be dual licensed, all the code it derives from must be available dual-licensed, too. In other words, choosing the dual license makes less code available to you for inclusion than picking either one. On the other hand, it is easier for other people to use your dual licensed code, as they can use it if they can accept just one of the licenses.

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
  2. Probably not as big an issue as you think by shaitand · · Score: 4, Informative

    Remember that almost all GPL'd software permits using the terms of future versions of the GPL. Unless they have chosen to omitt this part of the license you can use GPLv3 without issue. If that won't work, then you should license GPLv2 WITH the option of using the future terms. That way you are compliant with both GPLv2 and GPLv3 and let people work out the library licensing on their own.

  3. Just use GPLv2 by 3247 · · Score: 4, Informative
    The licenses are compatible if you just use the wording suggested by the FSF:

    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.
    I've highlighted the relevant words.
    --
    Claus
    1. Re:Just use GPLv2 by Tim+C · · Score: 4, Informative

      That doesn't make them compatible. That clause allows the recipient to *change* the licence from v2 to v3 (or later). It does not allow you to mix v2-licensed code and v3-licensed code in the same binary; it means that as soon as you add in some v3-licensed code, the entire thing becomes v3-licensed.

  4. GPLv2 or later by Aim+Here · · Score: 3, Informative

    Just pick GPLv2, with the usual 'version 2 or later' language in it, for your own code.

    That allows you to mix any variation of your code, GPLv2-or-later code and/or GPLv3 code in a GPLv3 project.

    It also allows you to use your code with those relatively few projects that are 'GPLv2 only'(such as the Linux kernel) and/or GPLv2-or-later code in a GPLv2-only project.

    That's about as compatible as you'll get with those three flavours of GPL. No license you pick will allow you to mix 'GPLv2 only' code with GPLv3 code.

  5. How many binaries involved? by Penguinisto · · Score: 3, Insightful
    If there's more than one, you can license each binary under whatever license you want, with the libs under LGPL if it floats your boat.

    OR... you can use Trolltech's licensing scheme (OSS projects get to use it free, commercial ones have to pay up licensing fees).

    I like either GPL version, but if you're not too hung-up on using GPL, http://www.opensource.org/ has a whole array of open-source offically-sanctioned licensing - one of those may fit your needs better. (cue RMS fans w/ mod points stampeding in protest, but seriously; if it does the job, use it).

    The beauty of this is, it's all up to you how you want to handle it.

    /P

    --
    Quo usque tandem abutere, Nimbus, patientia nostra?
  6. Closed Source by dangitman · · Score: 4, Funny

    What do you think is the best way to address the GPLv2-to-GPLv3 transition without ending up on one or the other side of the barricade?"

    Just become a closed source developer. That way you won't be on either side of the GPL fence. And you could (nay should) add annoying DRM to your software.

    --
    ... and then they built the supercollider.
  7. Re:GPL 2 or later by codemachine · · Score: 3, Informative

    I believe the person receiving the code gets to choose which version applies. So if they wish to TiVo-ize it, they will opt to accept the terms of the GPLv2 license instead of the GPLv3 license.

  8. What misinformation? by Mostly+a+lurker · · Score: 2, Insightful

    It is a fact that you will not be able to mix code distributed under GPLv2 without the "or later version" option and code licensed under GPLv3 in the same program. How much of a problem this turns out to be in practice is as yet unknown. However, it is not misinformation to point out that a real issue may exist.

  9. Simply ignore it. by IGnatius+T+Foobar · · Score: 3, Insightful

    Seriously, who's going to sue who over this? Ignore the differences between v2 and v3 and mix it up at will. In the extremely unlikely event that someone complains, call it a "bundle" and let the licenses exist on their own.

    Pedantry has no place in this kind of thing.

    --
    Tired of FB/Google censorship? Visit UNCENSORED!
  10. True, but... by ushering05401 · · Score: 3, Interesting

    the issue does not seem as simple to most the developers that I know. Anyone coming from the world of proprietary code is used to a very simple system of cooperation: pay for rights.

    Numerous developers see the GPL licensing issues as a lot more complex than they actually are... but that does not change the fact that there are issues to consider.

    Easy example: I wanted to use some custom GUI components to enhance the look of an app, but have no experience in that realm, and no time or inclination to get experienced. It took me a week of sampling packages from proprietary vendors to choose one. Then another week to decide whether to pay the low price for the right to redistribute, or the high price to actually have the code & rights to modify. Easy. What do I want? how important is access to the code? Pay. Done.

    Doing the same thing with GPL code would have required me to review licenses already involved in my project, and my future plans for the project (would I have to excise large portions of code if my business model needs to change to be successful... or if someone wants to purchase my already successful company and change the business model?).

    Anyhow, the GPL is very good at what it does, protecting code. But your simple statement that sums up the issues actually becomes complex in practice.

    Regards.

    1. Re:True, but... by MikeFM · · Score: 2, Interesting

      Most experienced developers should have a goof knowledge of the big three open source licenses at least - GPL, LGPL, and BSD. The vast majority of open source code will be under one of those. Just knowing how those relate to each other and apply to your code should cover most of your needs.

      As to not being able to use open source licensed code for your business or having it impact your business model I think that it mostly a FUD issue. It's my experience that the license doesn't make much difference to your business model as those who purchase code are either out-of-the-box types that are paying you to put it in a pretty box, make it easy to install, and easy to use or they are IT department types that want good support and to have their ass covered. Availability of source may be a nice feature to either of the above groups but doesn't much impact sales in any negative way. Maybe it'd be an issue if you plan to change from open source to closed source later because that leads to anger in your customer base.

      It may impact the resale value of your business but that isn't to likely since software that is open source and even free is considered an asset worth having by many companies. The only time it's likely to have a negative impact is if your software isn't very good or your company never develops a working business model at all.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  11. Re:Simply ignore it. - Back to the bat cave by ancientt · · Score: 3, Interesting

    Holy cow, I flipped out for a minute when I saw this. My dander went up and I felt the urge to fight for freedom everywhere and punish the blasphemer. Ignore the license? What the heck? How evil! How horrid! Breaking the license is a capital offense!

    In my zeal to fight for the common good I had to consider for a moment who might be hurt and then my dander wilted. I have never personally known anyone who would be offended if their GPL2 code was used in a project by someone trying to use a slightly different license. Not one. I can't rule out the possibility but in the absolute worse case scenario you get a nasty letter that says "stop misusing my code" and you pull it and ask someone else to fill in the blank.

    Back to the bat cave Robin, there is no evil here.

    --
    B) Eliminate all the stupid users. This is frowned upon by society.
  12. GPLv3: licensing by proxy by tepples · · Score: 3, Informative

    At very least, I'd suggest requiring that contributors allow you to relicense their code to future versions of the GPL at your discretion. In fact, the GPLv3 last call draft includes a provision that endorses such a licensing model:

    If the Program specifies that a proxy can decide whether future versions of the GNU General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Program.
  13. RTFL by tepples · · Score: 2, Informative

    You could do GPLv2 and add a clause to make it compatible with GPLv3. I'm not sure what that clause would say, but I think you can do that. The wording suggested by the FSF for such a clause has been at the bottom of GPLv2 for years:

    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.
  14. Re:GPL: Intellectual Theft by Anonymous Coward · · Score: 2, Informative

    You only have to release the source code to the kernel changes if you plan to distribute the modifications. The GPL's restrictions only apply to distributors. Private use of the software, including changes to the source code, is completely unrestricted. The GPL only applies if you intend to release those modifications to the world. Likewise, the GPL does not say that gcc can only compile code released under the GPL. The license only means that gcc itself is under the GPL, meaning that ordinary use of the program is unrestricted. The GPL doesn't apply to code compiled under gcc and then distributed, only to distribution of gcc itself. Anything you compile with gcc, assuming that all of the source it compiled is entirely your own and not from other sources, can be licensed under the license of your choice.

  15. Be careful and keep your options open. by PAjamian · · Score: 3, Informative

    Here's the problems you will face. If you license under GPL version 2 or later then you can't incorporate code that is licensed under version 3 (but not version 2) into your project (others here seem to imply that you can) until you move up to version 3 yourself. Basically you need to think of it this way, in order to use other people's code in your project your license has to be a subset of their license. In order for others to use your code their license has to be a subset of yours. Here is what I would recommend:

    • License your project as a whole (and all included files) under GPL version 2 or later for now.
    • Continue to License under GPL 2 or later until you need to incorporate code that is licensed under GPL version 3.
    • When you need to include code licensed under GPL 3 or later (try to avoid any code licensed under GPL 3 only) then you can relicense your project as a whole under GPL version 3 or later, but keep most of the individual files licensed under GPL 2 or later. Only those files that include the code that was licensed under GPL 3 or later need to have their license headers changed.
    • If you need to include code licensed under GPL 2 only, then contact the authors and ask for permission to relicense that specific code under GPL 2 or later, most (but not all) will happily give you permission to do that. Barring that you will have to find another source of the code or write it yourself.
    • You can, of course link to libraries licensed under the LGPL, and include code licensed under BSD (as long as you comply with the attribution clause). As of GPL 3 you can also include code licensed under the Apache license, plus there are several licenses (such as the perl license) that are actually dual licenses of GPL plus some other license and code from those can be used freely under the GPL (watch out for what versions they specify). Have a look at the Free Software Foundation License Compatibility Page for more details on lots of licenses and their compatibility to the GPL.
    • Watch out for version numbers. If a program specifies that it is licensed under the GPL (without any version number) then it can be used under any version of the GPL. If a program specifies that it is licensed under GPL Version 2 (or some other specific version number) then you can only use the code under that specific version of the GPL. Most programs will specify version 2 or later (and many will soon change to version 3 or later) which means that you can use the code under that version or (at your option) any later version.

    As for allowing others to use your code, you have some options with that as well:

    • You can dual license, or multi-license specific files in your project so that they are compatible with other licenses you want them to be usable with, just don't forget to remove the other licenses from any files that you include someone else's GPL code in.
    • You can give explicit permission to others to license under other licenses of your choice when they write you and ask, just make sure that you specify which parts of the code they can only use under the GPL (and which versions) due to it not being your code.

    I think this about as comprehensive of a guide as I can give you. I'm not a lawyer or a representative of the Free Software Foundation and my statements above are just opinion and not to be taken as legal advice. I just know what I know and am passing that knowledge on.

    --
    Windows is a bonfire, Linux is the sun. Linux only looks smaller if you lack perspective.
    1. Re:Be careful and keep your options open. by cyclop · · Score: 2, Interesting

      Thanks for advice. Just a thing is obscure:

      You can dual license, or multi-license specific files in your project so that they are compatible with other licenses you want them to be usable with, just don't forget to remove the other licenses from any files that you include someone else's GPL code in.

      For what reason should I remove the other licenses from files where I include other GPL code? If it's N-licensed, and one of these licenses is GPL, technically I'm merging GPL code with GPL code, so where's the problem (assuming it's the same GPL version, of course)?

      --
      -- Patent no.123456: A way to personalize /. comments with a sig attached to the end.
    2. Re:Be careful and keep your options open. by Jamie+Lokier · · Score: 2, Informative

      I'll explain with an example.

      Let's say your file says the equivalent of "You may use this file under the terms of the GPL (v2 or later), LGPL or MPL, at your option". (Mozilla source is triple-licensed like this, I believe).

      Then you want to add code from somebody else's project to your file. Their file says "You may use this file under the terms of the GPL v2".

      When you add their code to your file, if you don't change the licensing at the start of your file, and you publish the new version, you are telling everyone that they are allowed to use the combination under any of the licenses which you listed.

      But you don't have permission to do that.

      The code you used from someone else may only be used under the terms of GPL v2 (in this example). And the GPL v2 does not allow the code to be re-licensed under any of those other license. (If it was BSD instead, you could do that).

      Therefore, you must change the license of your file to say GPL v2 only, or not incorporate their code. (Or you can just not publish the combination - you are free to combine them and use the combination without distributing the result to anyone.)

  16. Re:Can you do both at the same time?? by samkass · · Score: 2, Interesting

    I highly doubt that logic will hold up in court. In fact, the "or later" clause of the GPL itself has never been tested in court. In addition, I would be surprised if a huge number of free software projects don't fork over the GPLv2/v3 debacle, meaning you'll have two potentially incompatible versions of every library you use.

    Incidentally, TiVo's use is NOT a "loophole". Back when GPLv2 was written, Stallman only seemed to care about how software was used. Now GPLv3 is trying to restrict people's use of HARDWARE as well. You can take TiVo's code, go build your own hardware, and use TiVo's code on it. But you can't use your own code on TiVo's hardware. I'm afraid I'm in the camp that thinks GPL has no business telling people what they can and can't do on their hardware.

    --
    E pluribus unum
  17. Re:Can you do both at the same time?? by DrJimbo · · Score: 2, Informative
    samkass said:

    Now GPLv3 is trying to restrict people's use of HARDWARE as well.
    The TiVO hardware is compatible with the GPLv3 according to Jim Barton, the CTO of TiVO who said in an ACM article:

    Each TiVo DVR includes a secure microprocessor to which are delegated all public-key-based operations. This secure microprocessor contains a unique public/private key pair for each DVR, so that there are no global secrets for DVR authentication.
    Even existing TiVos could be made GPLv3 compliant if the TiVo corporation made the private keys for each TiVo available to the owner. It is all about the freedom. It's not a hardware issue at all.

    samkass also said:

    But you can't use your own code on TiVo's hardware. I'm afraid I'm in the camp that thinks GPL has no business telling people what they can and can't do on their hardware.
    The GPL is all about giving people control over their own hardware, not anyone else's. Nothing in the GPL gives me the right to crack into TiVo's servers and run my own code on them. The TiVo boxes are owned by the people who bought them from the TiVo corporation. It is the TiVo corporation that is in the business of telling people what they can and cannot run on their own hardware. They are always free to do this with proprietary or BSD (or even GPLv2) code. People who don't want their code used in this way are free to upgrade to the GPLv3 which would prevent TiVo from distributing their code without also passing on the four freedoms.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
  18. my way by pjr.cc · · Score: 2, Interesting

    And i dont know if its the "right" way, but i was confused enought with gplv2 without throwing gplv3 into the mix. So i did is remove all external code (unless it was things like libc) and stopped depending on libraries (as such). Where i couldnt get away with this i simple deleted anything i'd used from my project that was in my code tree and made the install notes say things like "download version 2.1.15 of open=excelent=app, and place it here".

    As i said, i have no idea if thats fair or just but im beginning to get the feeling that i need a lawyer for coding oss ;)

  19. Re:Can you do both at the same time?? by DrJimbo · · Score: 3, Insightful

    The patents in question for example may be third party ones I can't freely license even if I wanted to.
    Third party patents are not affected by the GPL. It is not magical.

    And Linus wants to keep his keys private so he can differentiate between code provided by a trusted party and an untrusted one.
    Torvalds would be able to keep his private signing keys private even with the GPLv3. This FUD was debunked over a year ago. As long as he isn't trying to use his private key to control what GPLv3 software other people can run on their own hardware, he's fine.

    It seems that you're arguing for the essentially elitist and undemocratic idea that a small group of experts should be responsible for deciding what improvements to make, and anyone that disagrees is either dumb or worse dishonest.
    Are you sure you are in the right thread? It seems you are implying that the extremely open process of crafting and refining the lastest version of the GPL was somehow elitist. It was, in fact, one of the most open processes in the history of mankind. The FSF went on a world tour telling anybody and everybody who would listen about their ideas for the new license. The had an interactive version of the license online where anybody could post comments linked directly to any word or phrase in the license and everybody could see all the posted comments. They also encouraged people to email comments. All comments were read and considered by a bunch of committees that were composed of basically everyone who was at all interested in participating.

    My calling people who disagree with the GPLv3 "dumb or dishonest" seems to be a figment of your imagination. I've always insisted that people are free to use whatever license they want for their own code. I haven't called them dumb or dishonest for making that choice.

    Lots of big companies would work with GPL2 but can't accept GPL3.
    SUN and IBM seem happy with the GPLv3. TiVo is not happy because they won't be able to use GPLv3 code without passing on the four freedoms and Microsoft seems horrified by the GPLv3. The GPLv3 does a better job at enforcing freedom. People or corporations who are against freedom will be against the GPLv3. That's fine. But even if a lot of corporations (besides TiVo and Microsoft) were against the GPLv3 I don't think it would be wise to amend it just to cater to them. Most of our world now seems to cater to the large corporations: the mass media is corporate controlled; and even the Congress and the president (both parties) seem to be controlled by the corporations. Would it be such a sin to have one tiny little corner of the world that does not kowtow to the corporations? Free software should not be neutered in order to cater to the whims of people who don't want software to be free.

    And it's absurd for deveopers to leave in the "version X or later" clause when GPL4 or GPL5 may allow end users of the software to make demands on them which they may not legally be able to meet.
    No license or contract can force someone to break the law. If you distrust the FSF so much then you shouldn't use the "any later version" clause in your licenses. That's fine. That's your choice. If you are part of a massive project involving many developers then license upgrades will be difficult, perhaps even impossible. I chose to trust the FSF so I kept the "any later version" clause when I licensed my software. That is my choice. I gave up some control in exchange for an easier upgrade path especially for other people who might want to use some of my code in a new project.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin