OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 4:55 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 9:17 am 
Offline
Member
Member
User avatar

Joined: Wed Nov 28, 2007 4:15 am
Posts: 62
Hi,

I would be clear with this. My situation is following. I've written a code which I would release under
non-GPL license. However I take use of GPL code which I modified but never changed its license. This
GPL code is just a utility that helps to parse configuration files and outputs final config file. So it's not
linked to any part of my binaries it is totally standalone.

So my question is can I release the source of this modified utility together with my sources if I leave the
license as it is?

Regards,
devel.

_________________
NucleonSoft


Top
 Profile  
 
 Post subject: Re: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 9:28 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7614
Location: Germany
Without knowing further details, I'd say you can, unless the original utility mentions something that any input processed by it is turned into GPL. (I'd be very surprised if it did, they cleaned these corner cases from the common GPL utilities over a decade ago.)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 11:01 am 
Offline
Member
Member
User avatar

Joined: Wed Nov 28, 2007 4:15 am
Posts: 62
Thnx for replay. Without any mysteries I can say that mentioned utility is kconfig from linux kernel tree.
As far as know It doesn't mention anything that processed input is turned into GPL (great for me :D ).

Regards,
devel.

_________________
NucleonSoft


Top
 Profile  
 
 Post subject: Re: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 2:34 pm 
Offline
Member
Member

Joined: Wed Oct 18, 2006 10:43 pm
Posts: 490
Location: Kansas City, KS, USA
devel wrote:
Hi,

I would be clear with this. My situation is following. I've written a code which I would release under
non-GPL license. However I take use of GPL code which I modified but never changed its license. This
GPL code is just a utility that helps to parse configuration files and outputs final config file. So it's not
linked to any part of my binaries it is totally standalone.

So my question is can I release the source of this modified utility together with my sources if I leave the
license as it is?

Regards,
devel.

devel wrote:
Thnx for replay. Without any mysteries I can say that mentioned utility is kconfig from linux kernel tree.
As far as know It doesn't mention anything that processed input is turned into GPL (great for me :D ).

Regards,
devel.


This situation is quite tricky. Here's my understanding of it. You're using the same build and configuration utilities that are used in the linux kernel. These are made up of two parts, KBuild and KConfig. KBuild is basically the Makefiles, and KConfig the configuration scripts, including lxdialog. KBuild was once distributed as a seperate project from the linux kernel (and was GPL licensed), but appears to only be maintained inside the linux kernel these days (and is still GPL'd). KConfig just writes out a couple of config files that get used to control the build process. One of them is included by KBuild to see what gets compiled and how (statically built in, or as a module, or not at all). One of them is generally included by your source code for conditional compilation and preprocessing. As Solar pointed out above, a GPL'd program cannot specify that its output is also governed by the GPL as that is generally impossible to do legally, without the program in question copying part of itself into the output. See http://www.gnu.org/licenses/gpl-faq.html#GPLOutput. So based on that alone, YOUR source code should be fine under the BSD license.

You're definitely using a modified version of KBuild, so your Makefiles at least must be GPL'd. That much is pretty simple to figure out.

Here's the stuff that's not so easy to figure out. The GPL v2 states, under "Terms and Conditions..." section 3 (emphasis mine):
Quote:
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.


Based on that, it seems that the Makefiles fall under the category of "scripts used to control compilation and installation of the executable." And we've already decided that your Makefiles must be GPL'd, since they're a derivative of KBuild. So now comes the question: does using a GPL'd build system (in this case, the Makefiles) mean your code must be GPL'd? That's quite tricky, and there's groups on both sides of this. On the side of "the makefiles are a seperate project", which is the side you really need to be on to be safe here, is people like Jörg Schilling. Remember the cdrtools fiasco that resulted in Debian forking it as cdrkit? (See here for more info: http://cdrecord.berlios.de/private/linux-dist.html. Warning: Biased toward Schilling's point of view.) Anywho, neither KBuild nor KConfig are distributed with separate COPYING or LICENSE files from the linux kernel; you have to look at the code to see if it's licensed seperately from the linux kernel (and it appears not to be).

Really, the only way I see to solve that question for sure is to email the authors of KBuild and ask how they view it, and what their intentions were when they licensed it. Most likely they'll say they never intended for code compiled by KBuild to be governed by the GPL. If that's the case, you're (mostly) set. To be safe, I'd keep a copy of the mail thread somewhere in the source tree, perhaps as part of the COPYRIGHT file. If they say otherwise, you'd have to release your code at least under a GPL compatible license, which your modified BSD license is not due to the advertising clause. (See: http://www.gnu.org/licenses/gpl-faq.html#OrigBSD). Or you could ask for a license exception for your case. You may also want to try emailing the FSF for their take on things.

Either way, however, the licensing situation is not clear in the tarfile you currently have available for distribution. The COPYRIGHT file says nothing about using GPL'd programs in the code. It seems to state that everything in the tree is governed by your license, which I'm sure was not your intent. I think the easiest way to fix this would be to simply put a clause in there somewhere saying something like "The code in the following directories is governed by the GPL", and list the directories.

I'm iffy on the whole subject because the Makefiles are a pretty integral part of the project. Granted they don't usually get linked into the final executable/library/etc. But here's one last thing to consider: Do your makefiles automatically generate any kind of code that is included by your source code? Do you build (or otherwise set) a PROJECTRELEASE string in the Makefile, and echo that out to a file called "version.h" that is then included by your code? That's one example of a GPL'd program copying bits of itself in to its output, and may be enough to force version.h, and therefore your code, to be GPL.

In any case, it IS perfectly acceptable to distribute both GPL and non-GPL code on the same media, or in the same tarfile. This is called an aggregate. You just can't release the aggregate under a license that would prohibit the exercising of the rights granted by each individual license.

Of course, IANAL, but I think it'd just be far easier to not rely on GPL code at all in your case. If you do end up emailing the Kbuild authors and you get a response, it'd be interesting to see what their response was.


Top
 Profile  
 
 Post subject: Re: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 3:51 pm 
Offline
Member
Member
User avatar

Joined: Wed Nov 28, 2007 4:15 am
Posts: 62
Hi,
thnx for comprehensive answer.

Quote:
This situation is quite tricky. Here's my understanding of it. You're using the same build and configuration utilities that are used in the linux kernel. These are made up of two parts, KBuild and KConfig. KBuild is basically the Makefiles, and KConfig the configuration scripts, including lxdialog. KBuild was once distributed as a seperate project from the linux kernel (and was GPL licensed), but appears to only be maintained inside the linux kernel these days (and is still GPL'd). KConfig just writes out a couple of config files that get used to control the build process. One of them is included by KBuild to see what gets compiled and how (statically built in, or as a module, or not at all). One of them is generally included by your source code for conditional compilation and preprocessing. As Solar pointed out above, a GPL'd program cannot specify that its output is also governed by the GPL as that is generally impossible to do legally, without the program in question copying part of itself into the output. See http://www.gnu.org/licenses/gpl-faq.html#GPLOutput. So based on that alone, YOUR source code should be fine under the BSD license.

I would say that I ported only Kconfig because Makefiles (Kbuild if I understand) were completely written from scratch. You are right they look very similar to those from linux that is not just a "piece of luck". I am working with linux every they (at work or at home) so I was definitely inspired by linux build system.

Quote:
You're definitely using a modified version of KBuild, so your Makefiles at least must be GPL'd. That much is pretty simple to figure out.

As I said my Makefiles were completely written from scratch.

Quote:
Either way, however, the licensing situation is not clear in the tarfile you currently have available for distribution. The COPYRIGHT file says nothing about using GPL'd programs in the code. It seems to state that everything in the tree is governed by your license, which I'm sure was not your intent. I think the easiest way to fix this would be to simply put a clause in there somewhere saying something like "The code in the following directories is governed by the GPL", and list the directories.

I will add that clause in the directory where GPL code is located or add an extra statement about mentioned directories at end of COPYRIGHT or both.

Quote:
I'm iffy on the whole subject because the Makefiles are a pretty integral part of the project. Granted they don't usually get linked into the final executable/library/etc. But here's one last thing to consider: Do your makefiles automatically generate any kind of code that is included by your source code? Do you build (or otherwise set) a PROJECTRELEASE string in the Makefile, and echo that out to a file called "version.h" that is then included by your code? That's one example of a GPL'd program copying bits of itself in to its output, and may be enough to force version.h, and therefore your code, to be GPL.

Yes, they generate headesr but once again Makefiles were written from scratch.

Quote:
In any case, it IS perfectly acceptable to distribute both GPL and non-GPL code on the same media, or in the same tarfile. This is called an aggregate. You just can't release the aggregate under a license that would prohibit the exercising of the rights granted by each individual license.

ok

Quote:
Of course, IANAL, but I think it'd just be far easier to not rely on GPL code at all in your case. If you do end up emailing the Kbuild authors and you get a response, it'd be interesting to see what their response was.

I think It is not necessary to email to Kbuild authors :wink:. The design is similar to linux's but implementation is mine.

Regards,
devel.

_________________
NucleonSoft


Top
 Profile  
 
 Post subject: Re: mixing GPL and non-GPL code
PostPosted: Wed Sep 03, 2008 5:20 pm 
Offline
Member
Member

Joined: Wed Oct 18, 2006 10:43 pm
Posts: 490
Location: Kansas City, KS, USA
devel wrote:
I would say that I ported only Kconfig because Makefiles (Kbuild if I understand) were completely written from scratch. You are right they look very similar to those from linux that is not just a "piece of luck". I am working with linux every they (at work or at home) so I was definitely inspired by linux build system.


Well in that case, I'd say the rest of the arguments I made are settled as well.

devel wrote:
quok wrote:
Either way, however, the licensing situation is not clear in the tarfile you currently have available for distribution. The COPYRIGHT file says nothing about using GPL'd programs in the code. It seems to state that everything in the tree is governed by your license, which I'm sure was not your intent. I think the easiest way to fix this would be to simply put a clause in there somewhere saying something like "The code in the following directories is governed by the GPL", and list the directories.


I will add that clause in the directory where GPL code is located or add an extra statement about mentioned directories at end of COPYRIGHT or both.


If it were my project, I'd probably end up doing both. IMO, all licensing information for the entire project should be in one place. You should also provide a copy of the GPL included in the tarfile somewhere. Whether as part of the COPYRIGHT file, or a seperate file in each directory that contains GPL code, it's up to you. I should add that's not required by the GPL, but it's good practice. If you do this on a projec that's GPL v2 only, make sure to edit the GPL text to reflect that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 93 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group