I am considering open sourcing some software, but when I read the answers on this questions, it seems like the penalty of ignoring a GPL license is rather small, compared to the costs of the suing party to document that the other party has included GPL code in their proprietary code and the costs of suing.

Therefore, I would like to know if there is a way to make a license or some kind of contract before source code is accessed, which is stricter than GPL. What I want to achieve is that a company including GPL code in their proprietary code have to GPL their whole code, and not just rewrite the GPL code. Is this possible?

  • 15
    If you are really serous about the prospect of someone using your code in this way and you then suing them I think you need to talk to a lawyer and get proper client-attorney advice. – Steve Apr 10 '11 at 9:56
  • Could you clarify what you mean by "company rewriting GPL code"? – vartec Apr 10 '11 at 13:57
  • 16
    It doesn't matter what your license says, if someone uses your code without respecting the license, they have violated your copyright, and that's what you can go after them for. You can't get their source code, or their first-born son, or a trillion dollar license fee, just because that's what your license says. You can get actual and punitive damages, I guess. – Carson63000 Apr 11 '11 at 1:31
  • 2
    I may be wrong, but I don't believe the license can specify what the damages are. – Steve314 Sep 23 '11 at 0:29
  • 2
    I think the GPL will be just fine for you. The cost of suing is the cost of the lawyers. No license is going to make you auto-win a court case. If you aren't willing to put up the fees to take someone to court it doesn't matter what license you write. – Andrew T Finnell Sep 23 '11 at 0:44

Yes and no. You couldn't do it in the form of a copyright license like the GPL. But you could do it in the form of an explicit contract. You would need to retain signed copies of the contract for everyone you distributed code to.

It would take some delicate wording. Simply saying that they have to open their code won't work. Specific performance is not usally an available remedy at contract law because it penalizes efficient breaches. There are ways around this, and a good lawyer will know them.

Unfortunately, if someone got their hands on your software without agreeing to the contract (and without breaking the law), you would only have the normal copyright remedies against them. There's nothing you can do about that. So you would need to prohibit anyone but you from distributing the source code.

As a practical matter, such a license would only be useful if you expected distribution of your source code to be rare. Perhaps the occasional person who might need to customize something. You can't get both widespread distribution and tight control.


The GPL is not a contract; it's a license. That’s why it doesn’t mention penalties.

It’s your code, and your copyright. Let’s say, for example, that someone took some of your code and used it or published it without your permission. What have they done wrong? What could you sue them for? Copyright infringement, that’s what. And that’s all.

Free Software and Open Source licenses give people rights they otherwise would not have. You’re giving people the right to use your code under certain conditions. If they use your code in ways which do not meet those conditions, what have they done wrong? See the paragraph above. Copyright infringement is all they’ve done wrong, and you can sue for.

You could create some form of contract, instead of a license, but I don’t think you could do that in a way which would match the FSF’s definition of “Free Software” or the OSI’s definition of “Open Source Software”. Maybe you could, but I doubt it. Also, the FSF’s licenses are themselves copyrighted. You’re free to use them verbatim, but you can’t make an altered version of the GNU GPL. You’d have to rewrite it altogether. And for that, you’d need a lawyer.


I'm not a lawyer, but currently run an open-source project using a Lesser General Public License (LGPL v. 2.1). I reviewed various open-source license models before selecting LGPL; which happens to be quite accepting of commercial use of my software. It doesn't mean that, for example, people can rename and repackage my software without proper credit, etc.

You can modify the license yourself or with the help of a lawyer if you are not satisfied with the existing models. There is nothing preventing you from modifying the existing models or writing your own license agreement for open-source. Just be sure to make it clear to everyone that you're not using an original unmodified model.

As you probably already know, open-source doesn't even necessarily mean that the software is free. You can for example, start from a commercial license model. The difference from most common uses is that you offer use of the source code, under certain defined rules, not just the executable. That's the defining character of "open source," not limits to recovery of damages if the rules are violated.

In the end, my guess is that you want to recover a realistic amount of damages rather than simply making a statement and stopping someone from violating the agreement. Language can be included in the license that allows you to do that. I'm not sure you'd be stopped from doing it using limited use licenses, unless the license specifically says that damage recovery is limited or explicitly states a limited remedy for violation.

  • @jwenting - That's fine. If you're not paying me to write code for you, then I owe you nothing. If you're on a commercial project and don't want to pay and I don't want to provide free code to commercial projects, then I'm glad you're on board with not using it. It all seems to work out as it should. – Roger F. Gay May 26 '11 at 11:02

If have a license with different terms (stricter or otherwise) than the GPL, it isn't the GPL - trying to continue using the name "GPL" would be misleading, and would probably make the license legally dubious because of that strong potential for confusion.

However, you can write your own software license to include whatever terms you want, within legal reason - but it is important to get an expert to check the "within legal reason" and ensure the wording is legally precise, which is where things can get expensive. That kind of cost (and the legal uncertainty from having a license that hasn't been tested in the courts) is one of the reasons why people tend to re-use existing licenses.

As for the cost of investigating and prosecuting breaches of the license terms, the reality seems to be that (1) you have little hope of detecting a breach yourself, you rely on someone out there noticing for you, and (2) there are free/open source organisations that will do the verification etc, if you use one of the standard licenses (e.g. the GPL), and (3) the courts are the last resort - often people have breached the terms without realising, and telling them (perhaps with the threat of bad publicity, which is often far worse than the threat of legal action) is generally effective and much more constructive.

  • 9
    The license has nothing to do with enforcement. It simply says you can use this code subject to doing this. It can't say "and the penalty is $1m" - that's a contract not a license. – Martin Beckett Apr 11 '11 at 0:40

Note that if you try to do this, you cannot make use of any GPL licensed code, since using such code requires you to license any derived work with the GPL. (You can of course use GPL licensed code and commit copyright infringement; if you then take anyone to court for using your code and they tell the judge that you are already committing copyright infringement, that will be fun time in court).

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