Sunday, August 14, 2005

Using the GPL

April 6th, 2003

"The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too"

The GNU General Public license is the most common "free" software license in the world today. However, it comes with certain responsibilities that you should understand thoroughly before you make the decision to use it.

Why Do I Need a License?

The user's point of view:

Technically speaking, you don't, so long as you understand that without a license, any software you receive must be treated as if it were a book. This means you can't copy it except as necessary to use it (that is, you can install it on your computer). You can sell it or give it away so long as you don't keep a copy. But assuming you acquired the software legally you don't need any license at all to use it.

Most programs do come with licenses, though, and it's important for you to read them. If the licensing doesn't suit you then you should look at other software.

The programmer's point of view:

You have certain specific copyrights granted to you by Title 17 of the U.S. Code. You don't have to register a program or otherwise do anything to acquire those rights. But if you need to defend them in court you should be able to prove your original authorship. Also, you don't have to provide a license to a user to enable him to use your product. Selling him the product gives him the right to do so. But if you want to grant rights to a user beyond those that he would normally have (i.e. the same as he would have for a book), or if you want to restrict the use of a program, then you need to provide a license.

The specific license we're discussing here (the GPL) isn't a restrictive one; but is designed to grant freedoms to the licensee that he wouldn't normally have, while retaining some very important rights for the author that ensure the continued availability of those rights.

Definitions are Important!

One of the first things you notice when reading the GPL is that it defines the meaning of the word "free". Why would they need to do that?

Is free really free?

Merriam-Webster lists 63 entries for the word "free". The primary (adjectival) entry alone lists 15 separate senses of the word, with various nuances of meaning within them. You have to agree that, given a word which can in common usage be interpreted in so many different ways, you're perfectly justified in indicating which of those many definitions you're using. Legally, it may even be your responsibility to do that if you don't want a license to be interpreted according to a meaning chosen by the licensee.

The GPL indicates that it's referring to freedom, not price, But it's not a ´free-for-all´, either. So the GPL goes on to describe the boundaries of the freedoms extended to you by the license.

What is meant by ´distribution´?

Some people suggest that the definition of ´distribute´ is vague and this somehow makes the GPL ´dangerous´ to use (or easy to violate). The questions generally follow in this vein:
  • Do I have to accept the license in order to copy a GPL'd program from a friend?

  • Does the act of giving it to a friend "encumber" me with the responsibility of providing the source code, despite the fact that I may have never even looked at the contents of the CD?

First of all, "distribution" is not vague and it's the same as for software in general. It just means making a copy of the software and providing it to someone else, whether as a gift or for money.

Only a licensee has been granted the right under the GPL to distribute at all. He can do this actively (by copying and giving it away or selling it himself). He can do it passively (by putting it on a website and allowing downloads, or by putting out some free CDs for people to take). He could give you permission to copy it from his machine. In all of the above, he's doing the distributing, and you as the recipient are not yet a licensee.

The act of giving it to a friend means you must give him the source if you've got it, or at least promise in writing to do so. Otherwise you have to tell him where to get it. If you simply pass on the instructions that came with your own copy of the binary then you've satisfactorily discharged this responsibility.

If you just pass on a CD you received, but you haven't accepted the license, then technically you might be infringing a copyright. Big deal, you're not going to jail... when your friend asks for source code (pointing at the license to prove you have to) then you simply refer your friend to whoever it was you got yours from, and Subsection 3c covers you.

What is meant by a ´derivative work´?

The GPL refers to ´derivative works´ but in describing them it describes situations that are described by two separate definitions in Title 17. The first is a ´derivative work´, which is one that is created by modifying a copyrighted work. The second is a ´collective work´, which is one that is created by including a work with another. This second is the situation that occurs when you link an unmodified GPL'd library to your own work.

People often describe the GPL as ´restricting´ the distribution of derivative and collective works. This is not literally true. Those are copyrights that the law grants to the author alone; and rather than restricting their use the GPL instead allows their use if certain conditions are met. The GPL itself is not a restrictive document.

Common Misconceptions

It all comes down to price.

The GPL is about freedom, not price. As a matter of fact, the GPL allows you to sell a program for as much as you can get. It also allows you to re-distribute that same program absolutely gratis. The only thing you can't do is sell the executable without including the source code in the sale. This doesn't mean you have to provide the code if someone doesn't want it immediately, but you do have to make it available at no more than the cost of reproduction, and that offer of availability must be guaranteed for at least three years.

Nevertheless, the GPL isn't really free!

The usual argument here is that "the GPL isn't really free because it requires you to ´give away´ your own code in return. This is a quid pro quo."

The grant of the right to distribute my code is conditioned on your acceptance of the GPL and its extension to code you have derived from my work and which you distribute with my work.

Why isn't this quid pro quo? Because if I simply license GPL'd code to you I don't require anything from you in return, that's why. You might not be a programmer; you might not have anything to offer me but distribution. Guess what? You get the code anyway. You don't want to distribute the code at all? Guess what? You get the code anyway! Only when you choose to distribute (effectively competing with me, as described above) are the reciprocal terms effective. And that's just fair.

I heard the GPL is a viral license!

Steve Ballmer said so, so it must be true, right? This is the single most common misconception regarding the GPL, and those that encourage it prey upon the limited understanding that people have of copyrights. The first foremost thing to remember is that in the eyes of the law, a computer program is a literary work. The same rules that apply to books apply to programs, plus a few extra to ensure that your usage rights to the program are the same.

The argument is this: the GPL says that if you create a "derived work" (i.e., modify my program) you have permission to distribute it only if the result is also released under the GPL. So far, so good... it is based on your work, after all. But the GPL also says that if you simply link to my work (even if you don't modify it, then the program that links to mine must also be released under the GPL. How can that be?

Well, the case of a linked program is more akin to a "collective work" than a derived work, even though the GPL doesn't differentiate between them. Now, keep in mind that without permissions granted by the author, you have no rights to reproduce and distribute my work other than fair use. If I as the author do not want my code distributed with software that is not similarly licensed -- even for purely philosophical grounds -- I'm well within my rights to reserve that right by placing a condition in the license. A similar instance in print would be if I conditioned the reproduction of a story "for non-commercial purposes only". I don't even have to give a reason.

Secondly, by linking my library, which has that restriction, you've created a whole which doesn't easily allow the separation of my work from the work you've linked it to. You -- as a result of your own action -- have limited what you can do with your own work. This isn't any different from you attempting to include my story in a bound anthology which you then offer for sale. A judge would issue an injunction to stop the sale of the entire book even though I didn't write anything but a single story having no relation to the other stories in the book. The restriction on the story is not there to infringe the rights of other authors included in the anthology... rather, it's to exercise my right to control how my story is distributed. If you don't like it, leave my story out.

The perception that the GPL has some unique and unusual ´viral´ nature is therefore completely unsupportable. It's no more than the natural result of the treatment the law has give derivative and collective works since at least 1909. The only thing that makes it ´viral´ is the technology that has in recent years made publishing so effortless that it anyone can do it, thus spread the license.

As you can see, this isn't a restriction of the GPL, but a right that the author had from the start, and which he reserves unless you meet the conditions required for permission which are stated in the GPL.

But even putting my code on a disk with GPL code obligates me, doesn't it?

This is another common misconception, and the best I can tell you is that those who persist in spreading it have either never read the text for themselves, or they have some interest in deliberately misinforming you. Here's what the GPL says about this:
"In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License." -- The GNU General Public License, Section #2

The GPL does not apply to everything else you write just because it's on the same disk. It does not apply to things that are simply on the same storage medium. It applies only to the GPL'd work itself works that you distribute that are derived from it (i.e., which use code from the GPL'd work).

The GPL designed to steal code!

Quite the opposite. it allows you get to retain control over your own work, exactly as allowed by copyright law, and no further. You conceived of your product, you planned it, you spent months creating it and testing it. With a BSD-style license I could pick up that bulk of your work, expend comparatively little effort extending it, and compete with you using your own effort to do so. The GPL allows you to offer that opportunity to me without incurring the liability you'd have to face without such a restriction.

This isn't done to get control of my work... you do it so I can't hijack yours. In making the offer you don't even know whether I'm going to extend the code. This reciprocal agreement is a lot more fair to you than a BSD license is, and in deciding whether to accept I'd have to consider that I'm still receiving the lion's share of the benefit through your initial provision of the base product."


The end user's point of view:

There really aren't any downsides to the GPL for an end-user. If you stick to distributing the software as it was sent to you, then this license pretty much allows you to treat the software as you would if there were no copyrights. Copy it when you want, give it to whom you want, and never feel guilty about it.

The developer's point of view:

There are several points of view for developers when it comes to the GPL. Free Software developers use the GPL so that other people can't appropriate their Free shoftware and make it proprietary. They also use it because it requires people who modify the code to free their modifications as well. As a result Free Software projects are usually organized with the original author acting as a ´maintainer´, coordinating the inclusion of bug-fixes and modifications that are donated by developers who have used and improved the program.

The second point of view is that of those that sell Free Software. They occupy a niche between those that donate their work gratis and proprietary vendors. Often these developers compete on service, branding, time-to-market, or quality; and release the programs as Free Software so that they can more readily gain marketshare and benefit from donated patches.

Yet other developers are commercial proprietary developers. These individuals tend to shun GPL'd software entirely because of its ´viral´ nature. For as long as there have been computers there has been that class of software that is distributed with source code; but usually the source code is limited to the customer who licensed it (often accompanied by a non-disclosure agreement). If you don't want your source code to be distributed to every user, then you should avoid the GPL.

Finally, there are the proprietary developers who do not want to release their code under the GPL, but may wish to benefit from GPL'd libraries. Word to the wise: you can't -- not without releasing your code under the GPL as well. But the Free Software Foundation endorses another license, the "GNU Lesser General Public License", or LGPL, which does allow linking. If you want to use GPL'd software in this fashion, contact the program's author to see if a dual-licensing is available to you. Section 10 of the GPL actually suggests such negotiations, but most people don't seem to bother to read it. Pity.


The GNU General Public License is an ingenious legal device that uses the fact that current copyright law treats computer software as if it were literary works to free the source code rather than restrict it. There are really no downsides to using GPL'd programs for end users, and there can be benefits for software developers that don't object to sharing their work freely. But if you're a developer of proprietary programs, you'll want to find another license, both for your own work, and for the libraries that you use in your work.

No comments:

Post a Comment