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've seen various open source libraries (actually I've seen it for assets as well) having a home-baked license in the following manner :

SomeGuy's License:
1. You can use this code freely in commercial projects and modify it as you wish, but not sell it
2. If you want to sell a modified version, drop me an email first, or give credits to me

Edit:

The above example is ambiguous, so I am giving another one, I want to know if 3 lines of license will hold some ground:

SomeGuy's License:
1. You can use this code in a commercial project as a 3rd party library
2. You can't sell it as a derivative work

I know that such license is not polished at all, for example the Creative Commons set of licenses seem to be short, but actually have some large legal stuff underneath it, but I wonder if at least some level of protection can be gained with a hobby license like that ?

My question is, could this hold any ground in the court, or would the corporative lawyers of the company X tear it apart ?

share|improve this question
    
If someone uses the code in a commercial product, how are they not selling it? –  Keith Thompson Jun 12 '12 at 1:47
    
@Keith - something like "you can use my library to create a commercial project with it but you can't sell my library" ? –  abcd Jun 12 '12 at 1:53
    
I suggest that if your license needs that kind of explanation, it needs some improvement. Don't assume that anyone reading the license knows (or cares) what you intended it to mean. This makes me suspect the answer to your question is "no". –  Keith Thompson Jun 12 '12 at 1:55
    
@Keith Ok, I'll edit it to be less ambiguous, my question is mainly about whether a "3-liner" (if not ambiguous) can have a ground. –  abcd Jun 12 '12 at 2:00
1  
It's dangerous to go alone. Take this: stackoverflow.com/questions/713045/… –  Patrick Hughes Jun 12 '12 at 2:15

3 Answers 3

up vote 6 down vote accepted

There are a number of good Open Source licenses at the Open Source Initiative. You would be best served by starting with one of those as a base and not trying to write your own from scratch.

It is very important that you include the standard non-indemnity clauses, such as this one from the MIT license:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

It would be good to stipulate non-erasure of copyright notice. If you have your name and email address in a copyright notice in every source file then you might at least get some advertising leverage from the pirates. A salaried programmer who works for a boss who violates copyright will usually leave the copyright notices in the source code.

If your software is any good people will copy it, in whole or in part, mangle it, and include it in their commercial products without notifying you or paying you anything. These infringements will never get to court because you wont be able to detect them. Welcome to life as we know it on this planet.

Your best protection is to offer downloads from an attractive site that offers your own commercial support for the software, and to publish updates from time-to-time, and to respond to email inquiries. Having well-known software is in itself a deterrent to violations.

share|improve this answer

Custom licences are huge pain in the a*** for no gain. Those who want to violate it will do so anyway, but those who try to play by the rules will have problems. Such problems exist and Linux distributions and big open-source projects have to deal with them daily, so don't make it worse.

For example your above licenses are incompatible with GPL. So the result would be that the bad guys would be shamelessly copying from your code anyway, but anybody wanting to use your code in GPL software couldn't. Is that what you wanted? It also does not allow Red Hat or Suse to put your library on the CDs they sell? Is that what you wanted?

I'd suggest you just go with either LGPL or GPL with libgcc-like linking exception. The difference being that LGPL requires your code to be linked dynamically to any different-licensed code, the libgcc link exception does not. They don't prohibit selling (that would prohibit selling distribution CDs), but instead requires that the licensee must be given (upon asking) complete source code and that they are allowed to further share that code. Which effectively prevents somebody selling the library itself.

And GPL and it's variants already held a lot of ground in court.

share|improve this answer
2  
+1 for creating lots of problems: having a custom license (i.e. not OSI approved, or even not one of the top-5) is an automatic no-go for many organizations. It's simply not worth the hassle to analyze yet-another-license to see if you can use random-library 0.5. Replacing it with an alternative with a well-known license is usually the simpler solution. –  Joachim Sauer Jun 12 '12 at 7:50
    
A useful LaTeX package had a license that (if I recall correctly) asked to email the author the work produced with the package. It was obviously a way for the author to please himself that his library was used. But the license was not considered to be free, and the author email was dead anyway, so kuvio has disappeared from Debian. :-( –  Andrea Jun 12 '12 at 10:34

Licence alone (custom or GPL or whatever) doesn't provide safety. Only the means you put in fighting for it does.

share|improve this answer

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.