LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   GPL License - Source code for shell script? (https://www.linuxquestions.org/questions/linux-general-1/gpl-license-source-code-for-shell-script-621190/)

kushalkoolwal 02-15-2008 03:46 AM

Quote:

Originally Posted by armandino101 (Post 3057566)
I'm not sure you understand what open source means. Read the 2nd point of the OSI's definition of open source . If you don't provide the source code, then you software is not open source. Hence the word open.

Well ok let's say based on what you mentioned, that my question really isn't about open source.

So now based on this assumption, is it ok for me not to provide the source code of the binary that I create on my Linux system?

I think now it should be easy for you to answer this.

kushalkoolwal 02-15-2008 03:47 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 3057755)
Such a funny question, I'd like to know how you're NOT going to provide the source code to a shell script.

Ok, forget shell script. What if I write a program in C and create a binary out of it and then I redistribute it. Do I still have to provide the source code?

Got it?

Trickie 02-15-2008 04:21 AM

Use a BSD license. How do you think that Apple have managed to keep OSX proprietary when it is essentially FreeBSD?

jlliagre 02-15-2008 04:33 AM

Apple doesn't use the BSD license but a proprietary license for its own code, and OS/X is much more than FreeBSD.

If you want to distribute a binary without disclosing the source code, you have no choice but to use a non open-source compliant license, i.e. a proprietary one.

H_TeXMeX_H 02-15-2008 04:58 AM

An open-source license is an open-source license, YOU MUST RELEASE THE SOURCE !

If you don't want to, then use a proprietary license.

Simple.

Trickie 02-15-2008 05:07 AM

My apologies - in trying to be succinct I didn't explain myself properly. What I meant was that because freeBSD is distributed under a BSD license, which is a very open license, this has allowed Apple to make OS X, a freeBSD based OS, proprietary.

raymor 02-15-2008 07:18 AM

Quote:

Originally Posted by kushalkoolwal (Post 3057786)
Well ok let's say based on what you mentioned, that my question really isn't about open source.

So now based on this assumption, is it ok for me not to provide the source code of the binary that I create on my Linux system?

I think now it should be easy for you to answer this.

I think I understand where you're coming from here.
If you don't provide your source code then of course
your software isn't open source. You can create and
sell proprietary (closed) software as long as you don't
distribute any part of of any GPL software as part of
your software and your software is not derived from
any GPL software.

Now the question is if you use "dialog" and other programs
from within your shell script, does that make your software
a direvative work of "dialog" and therefore require that it
be released under the GPL? Probably not. As long as you
distribute only the shell script and not any of the GPL
software on which it depends you're probably OK. That depends,
though. If you wrote a "browser" which did nothing but launch
Firefox with the Firefox logo changed to your logo and other
"commercializations" added a court might decide that Firefox was
such a pervasive part of your software that yours was a
derivative work. Generally, though, if your software just USES
some standard command like "cd" you're probably OK.

The easy way to be safe? Just skip trying to scramble the code
in the first place. Really, you probably don't have anything that
really needs to be "protected". If you were developing anything
complex you wouldn't be doing it as a shell script in the first
place, probably. If you are developing some complex and unique
software as a shell script that's probably your first mistake -
see Perl, C or some other programing language. If it's something
really simple, not too complex for the sell to be the appropriate
language, than it's probably too simple for you to worry about
someone stealing your secret source.

AdaHacker 02-15-2008 08:26 AM

Quote:

Originally Posted by kushalkoolwal (Post 3057790)
Ok, forget shell script. What if I write a program in C and create a binary out of it and then I redistribute it. Do I still have to provide the source code?

No, you don't. As a general rule, just because you use free/open-source software to write a program does not mean your program has to be open-source. As long as you don't copy anybody else's code into your program, it belongs to you and you can license it however you like. So if you write your code in GNU Emacs and compile it with GCC, you can still give out just the binary and charge a licensing fee. You'll just have to come up with a proprietary license that captures the restrictions you want to place on the program's use.

kushalkoolwal 02-15-2008 11:16 AM

Thank you AdaHacker and raymor!

Your comments have really helped me to understand things better. I really appreciate your efforts and other people's effort too for contributing.

raymor you understood my question exactly the way I wanted to. The part where you mentioned "As long as you distribute only the shell script and not any of the GPL software on which it depends you're probably OK. " sometimes can get tricky which you kind of eluded too. So for example, what I understood based on your explanation is that suppose I call a function from a GPL/LGPL license library in my C program, I should be ok, right? Also does this also means that when anybody uses:
<#include <some-lib-header-file> in their C program their program cannot be considered as derivate of that function/library/header file?

Also right now I haven't started anything and that's why I was doing some background check before I embark on this journey. You are right, for a complex project I can use something more sophisticated like C/C++ etc. But at the same time even if we assume that programs based on shell scripts are simple, still there is time cost associated in developing a pretty long and a relatively complex script and that could potentially be a good opportunity to earn some cash, ehh? May be. :)


Thank you once again very much.

AdaHacker 02-15-2008 01:31 PM

Quote:

Originally Posted by kushalkoolwal (Post 3058237)
suppose I call a function from a GPL/LGPL license library in my C program, I should be ok, right? Also does this also means that when anybody uses:
<#include <some-lib-header-file> in their C program their program cannot be considered as derivate of that function/library/header file?

It depends. With the LGPL, this is generally correct, as it is designed to let the library be used by non-free software.

With the GPL, this is not so clear. The problem is that linking libraries and executables necessarily involves an intermingling of the code on some level. The question is whether that makes one a derivative work of the other. As far as I know, there is not universal agreement on this. Many people interpret the GPL as meaning that it is OK if your program links to the library dynamically, but not statically. Others (I believe Richard Stallman falls in this camp) read the GPL as forbidding any linking by non-free software. If you want to be safe, then the best course of action is to avoid GPL-licensed libraries and stick to ones that are under the LGPL, a more permissive BSD/MIT-style license, or a proprietary license.

kushalkoolwal 02-15-2008 01:42 PM

Quote:

Originally Posted by AdaHacker (Post 3058380)
It depends. With the LGPL, this is generally correct, as it is designed to let the library be used by non-free software.

With the GPL, this is not so clear. The problem is that linking libraries and executables necessarily involves an intermingling of the code on some level. The question is whether that makes one a derivative work of the other. As far as I know, there is not universal agreement on this. Many people interpret the GPL as meaning that it is OK if your program links to the library dynamically, but not statically. Others (I believe Richard Stallman falls in this camp) read the GPL as forbidding any linking by non-free software. If you want to be safe, then the best course of action is to avoid GPL-licensed libraries and stick to ones that are under the LGPL, a more permissive BSD/MIT-style license, or a proprietary license.

Hmm interesting...AdaHAcker thanks for your insight. When you say "non-free software" does this definition also includes for example, a C program that I write on my GNU/Linux Debian system?

AdaHacker 02-15-2008 06:10 PM

Quote:

Originally Posted by kushalkoolwal (Post 3058387)
When you say "non-free software" does this definition also includes for example, a C program that I write on my GNU/Linux Debian system?

Well...that depends on what license you use for your program. "Non-free software" just means software that isn't released under a "free software" license like the GNU GPL. In your case, the answer would probably be yes, since you don't seem to want to release the source your hypothetical program.

Again, as far as licensing goes, the simple fact that you're writing your program on a system running Debian is irrelevant. What matters is what libraries your code links to and if you use any source that was written by someone else.

kushalkoolwal 02-16-2008 07:53 PM

Quote:

Originally Posted by AdaHacker (Post 3058627)
Well...that depends on what license you use for your program. "Non-free software" just means software that isn't released under a "free software" license like the GNU GPL. In your case, the answer would probably be yes, since you don't seem to want to release the source your hypothetical program.

Again, as far as licensing goes, the simple fact that you're writing your program on a system running Debian is irrelevant. What matters is what libraries your code links to and if you use any source that was written by someone else.

Yesterday I was reviewing the entire discussion on this thread and was trying to create a summary and I got stuck with the following two questions:

1. Suppose my work is considered as derived because I heavily used a GPL licensed library (statically linked) in my C program, does that mean that I automatically have to choose the GPL license for my C program?

2. Suppose if I statically link a LGPL licensed library to my C program, will my C program can still be considered as a proprietary program and can I still distribute it without releasing the source code? Or can I only do this if and only if dynamically link the LGPL libraries to my C program?

As a appreciation of all your efforts I am willing to write a blog entry which will summarize all the discussion here once I get some idea on the above two questions.

jlliagre 02-17-2008 01:18 AM

Quote:

Originally Posted by kushalkoolwal (Post 3059781)
1. Suppose my work is considered as derived because I heavily used a GPL licensed library (statically linked) in my C program, does that mean that I automatically have to choose the GPL license for my C program?

Yes. Even if you use a small number of GPL'd lines. That is the controversial GPL viral effect.
Quote:

2. Suppose if I statically link a LGPL licensed library to my C program, will my C program can still be considered as a proprietary program and can I still distribute it without releasing the source code?
Your code can then remain proprietary if you choose to. You won't be required to release its source. You are still required to release any change you possibly made to the LGPL library.

H_TeXMeX_H 02-17-2008 05:32 AM

If you want take a look at:
http://creativecommons.org/

They have a summarized version of many open-source licenses that are 'human readable' as opposed to 'lawyer readable' for example here is the one for GPLv2:
http://creativecommons.org/licenses/GPL/2.0/


All times are GMT -5. The time now is 06:37 AM.