Implications of GNU Licenses
You have to pay a price for the bounty of Linux-to protect its developers and users, Linux is distributed under the GNU GPL (General Public License), which stipulates the distribution of the source code.This does not mean, however, that you cannot write commercial software for Linux that you want to distribute (either for free or for a price) in binary form only. You can follow all the rules and still sell your Linux applications in binary form.When writing applications for Linux, be aware of two licenses:
The GNU General Public License (GPL), which governs many Linux programs, including the Linux kernel and GCC.
The GNU Library General Public License (LGPL), which covers many Linux libraries.
Understanding the GNU General Public License
The text of the GPL is in a file named COPYING in various directories in your Red Hat Linux system. For example, type cd /usr/share/doc/gdb*, and type more COPYING to read the GPL.The GPL has nothing to do with whether you charge for the software or distribute it for free; its thrust is to keep the software free for all users. GPL does this by requiring that the software is distributed in source-code form and by stipulating that any user can copy and distribute the software in source-code form to anyone else. In addition, everyone is reminded that the software comes with absolutely no warranty.The software that GPL covers is not in the public domain; such software is always copyrighted, and the GPL spells out the restrictions on the software's copying and distribution. From a user's point of view, of course, GPL's restrictions are not really restrictions; they are benefits because the user is guaranteed access to the source code.
Caution | If your application uses parts of any software the GPL covers, your application is considered a derived work; because the GPL covers it, you must distribute the source code to your application. |
Although the GPL covers the Linux kernel, the GPL does not cover your applications that use the kernel services through system calls. Those applications are considered normal use of the kernel.If you plan to distribute your application in binary form (as most commercial software is distributed), you must make sure your application does not use any parts of any software the GPL covers. Your application may end up using parts of other software when it calls functions in a library. Most libraries, however, are covered by a different GNU license, which is described in the following section.You have to watch out for only a few library and utility programs the GPL covers. The GNU dbm (gdbm ) database library is one of the prominent libraries GPL covers. The GNU bison parser-generator tool is another utility the GPL covers. If you allow bison to generate code, the GPL covers that code.Other alternatives for the GNU dbm and GNU bison are not covered by GPL. For a database library, you can use the Berkeley database library db in place of gdbm. For a parser-generator, you might use yacc instead of bison.
Understanding the GNU Library General Public License
The text of the GNU LGPL is in a file named COPYING.LIB . If you have the kernel source installed, a copy of COPYING.LIB file is in one of the source directories. To locate a copy of the COPYING.LIB file, use this find command:
find /usr/share/doc -name "COPYING*" -print
This command lists all occurrences of COPYING and COPYING.LIB in your system. The COPYING file contains the GPL, whereas COPYING.LIB has the LGPL.
The LGPL is intended to allow use of libraries in your applications, even if you do not distribute source code for your application. The LGPL stipulates, however, that users must have access to the source code of the library you use and that users can make use of modified versions of those libraries.The LGPL covers most Linux libraries, including the C library (libc.a ). Thus, when you build your application on Linux by using the GCC compiler, your application links with code from one or more libraries the LGPL covers. If you want to distribute your application in binary form only, you need to pay attention to LGPL.One way to meet the intent of the LGPL is to provide the object code for your application and a makefile that relinks your object files with any updated Linux libraries the LGPL covers.A better way to satisfy the LGPL is to use dynamic linking, in which your application and the library are separate entities, even though your application calls functions in the library when it runs. With dynamic linking, users immediately get the benefit of any updates to the libraries without ever having to relink the application.