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 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?

share|improve this question
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 Haigh Apr 10 '11 at 9:56
Could you clarify what you mean by "company rewriting GPL code"? –  vartec Apr 10 '11 at 13:57
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
I may be wrong, but I don't believe the license can specify what the damages are. –  Steve314 Sep 23 '11 at 0:29
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 Finnell Sep 23 '11 at 0:44
add comment

5 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
@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
add comment

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.

share|improve this answer
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
add comment

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? Breech of copyright, 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. Breech of copyright is all 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 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.

share|improve this answer
add comment

I already won't use GPL licensed code because of the nature of the license. Any license that's even more restrictive in what I can do with a library is going to get automatically blacklisted from any project I'm involved in as well.

So make your choice. Either use a license people can use, or create something that noone can use.

share|improve this answer
So? Why should we care? –  TRiG Sep 6 '11 at 17:27
add comment

Your Answer


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.