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'm really confused..

I'm looking into making a commercial program and there are a few open source, GPL covered components i'd like to use..

Am I allowed to sell my product with the components in without distributing my source?

For example.. say i was making a commecial text editor, and my friend has a really awesome GPL free-software text editor..

But i wanted to make a text editor like his but with special features..

Am I allowed to fork his text editor add all my special features and sell it on without having the source code to my special features available to my users?

share|improve this question
14  
Your question is basically, "Can I do <thing the GPL is explicitly intended to forbid>?" No, you can't. –  Rein Henrichs May 27 '11 at 18:41

4 Answers 4

up vote 12 down vote accepted

In a word, No. In fact, you can't even distribute it for free without releasing your code. The reason you even have access to all of that nice code is because of the GPL and its requirements.

There are loopholes, such as the method TiVo used to release their version of the Linux kernel while withholding their core-code, but that was one of the things that GPL v3 closed.

Of course, you can always look at the GPL code and use that as a learning tool as you write all of it over from scratch, but there is thing called Time To Market.

share|improve this answer
    
Ah ok.. Thanks @Peter Quick question.. How is this governed? Say if i were to make a fork of a very popular library but went through renamed the namespaces and classes and "mix it up a bit".. how would a breech of the GPL come to light if i don't distribute my source? (I'm not suggesting i ever would.. just curious!) –  Daniel Upton May 27 '11 at 15:52
7  
@Daniel: "I'm not suggesting I ever would ..." Uhm, I think you just did. Can you get away with it? Maybe. On the other hand, it means you will constantly be looking over your shoulder, waiting for the GPL police to arrive, perhaps in the disguise of a disgruntled employee. Life's too short for stuff like that. Note that a number of companies have played footsie with the GPL and lost, some of them quite publicly. –  Peter Rowell May 27 '11 at 15:58
    
@Daniel Upton: Does it matter? The only thing at issue is when the GPL applies, not when you might be caught. –  greyfade May 27 '11 at 15:59
4  
@Daniel - "how would a breech of the GPL come to light if i don't distribute my source?" Because you just made a post on a public forum describing your plans to violate the GPL? –  Mike Baranczak May 27 '11 at 16:51
1  
Ratz my plans foiled by my big mouth! Jokin' i was never planning on doing it! @Ramhound it's not that I don't wanna give them credit.. It's just me not wanting to show off my code! –  Daniel Upton May 28 '11 at 2:16

No, not if the code is distributed under GPL. GPL is a restrictive or copy-left licence. If you distribute the code at all, even for free, you must distribute your source code too (and you must require the recipient of the code to be bound by the GPL).

There are two types of open source code that you could use:

  • Code distributed under a business-friendly (aka permissive aka unrestrictive) open source license such as MIT, Apache, or BSD. These licenses allow you to fork the code and declare your fork as closed-source.
  • Libraries that are licensed under the LGPL. You are allowed to distribute a closed-source program that uses these libraries, as long as you haven't modified the source code of the library. If you modify the source code of the library, you must make those modifications available when you distribute the library (but not your other code).

See also this StackOverflow question

share|improve this answer
2  
Regarding your second point, even if you don't modify the library, you must make it possible for the end user to replace the library with a modified version. This is something often missed. It means if you have a statically linked program, you have to provide object files and instructions on how to re-link. If dynamically linked, you can't use hard references to restrict the version of the library it will run against. –  Scott Whitlock May 27 '11 at 17:34
    
@Scott Whitlock - Interesting, I'd never noticed that. Presumably though, a supplier of a commercial product which incorporated an LGPL library could stipulate 'use of a library other than the one supplied with this product is not supported' though. –  Mark Booth May 27 '11 at 22:25
    
@Mark Booth - The LGPL doesn't require you to support it, but it does require you to maintain the user's "freedom" when it comes to the library, which includes the ability to change it. Although TiVo had to do with the GPL, it's the same spirit of "freedom to modify" that caused the creation of the GPLv3 to make this explicit. –  Scott Whitlock May 28 '11 at 2:25

In short, the answer is no.

I'd dare add this small twist, however: the obligations set out by the GPL begin and end when you distribute the software... to your customer. You are in no way obligated to post the source code for the public at large to see. Place it in a src folder as you install it and begone with it; it's there.

In practice, nobody will bother asking you for the source code unless they are a) programmers or b) your competition or c) unsatisfied to the point that they feel like posting it on a file sharing site.

Lastly, as much as you cannot prevent your customers from getting your source code, you can prevent them from getting updated source code (until they pay for it, that is) as you continue developing your app. The part about getting updates is not part of the GPL, and you're perfectly entitled to refuse business from anyone you don't feel like working with.

So at length, no, but with a big twist: it won't prevent you from running a business based on GPL software. And at the end of the day, hey, don't worry about it. It's fun to share code, and there's so much of it around that one more one less won't make much difference.

share|improve this answer
    
Awesome point thanks! –  Daniel Upton May 28 '11 at 2:20
    
Identifying loopholes and exploiting them ... I wouldn't do that without this: Lawyer up! –  Subu Subramanian May 28 '11 at 3:20
    
@Subu: No loopholes here, just stating the obvious... the GPL applies when you distribute the software. It has to be distributed for the license to apply. If I write GPL code and don't distribute it to you, you've no right to see the slightest bit of it. If I sell and distribute it to you, by contrast, you've every right to see the code and distribute it all over the place under the same terms, even for free. And some do. What I'm merely pointing out is that, well... most won't. –  Denis May 28 '11 at 8:30

If your friend wrote the entire editor himself, and didn't link any third-party GPL libraries into it, then you could try to get him to license the code to you under a different license, at which point you would be bound by that other license, instead of the GPL.

Chances are that he did use some GPL code, since he released his editor under the GPL as well. It's also likely, if it's any sort of popular editor, that others have contributed code to it, at which point you'd have to get their permission too, or remove their code.

share|improve this answer
    
Thanks @pib the editor was a forinstance.. But still a very useful spin! –  Daniel Upton May 28 '11 at 2:18

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.