Copyright, free licenses and GPL from scratch

In this post I will give meta-information about copyright and free licenses. That is, what everyone who writes free software should know. I will not dwell on specific examples of such licenses; you can find this elsewhere on the Internet. Also, I'll talk a little about the GPL. I must say right away that I am not a lawyer, and I could have been mistaken somewhere. This entire post is applicable to almost all developed countries, including Russia and America (although, unfortunately, there is no authorized translation of the GPL into Russian, which is why it is not valid in Russia). Wherever I talk about the GPL, I mean the GPL of the third version, although almost all of this information applies to GPL 2, and most likely will be applicable to future versions. (Once again I will say: I am not well versed in the topic, see UPD from 2016-11-10 at the end of the article.)


Any product of intellectual work automatically becomes the subject of copyright. All sorts of “Copyright”, “All right reserved”, “©”, etc. are optional. Registration of copyright is not necessary, however, it can come in handy in order to later prove that you really own copyright, for example, in court. That is, if, for example, you wrote a program, posted it on the Internet, did not subscribe, did not write “Copyright”, etc., then you still own the copyright to it. But here is far from the fact that you will succeed, in which case, prove it.

What does copyright mean? Someone might think that it is the right to charge money for using a work. Yes, it is, but copyright includes more than that. Copyright is the right to establish any restrictions and conditions (i.e., in fact, a license) for the use of a work, including the right to demand royalties. For example, a programmer may require that his program be used only while standing on one leg. And he will be right. And anyone who does not obey this condition will violate the law.

If the author does not specify what the conditions for using the product are, that is, does not establish a license, then automatically everything becomes prohibited. That is, any use becomes prohibited without the consent of the author. Here it is. For example, if you post something on the Internet without specifying terms of use, then even if you do not subscribe and do not put copyrights, it turns out that you prohibit any use of the work. You may ask: “Doesn’t the fact of uploading it to the Internet say that I allow you to do anything with products, or at least something?” No, he doesn’t.

Well, maybe some minimal use is still allowed. For example, if you posted a photo on the Internet, then perhaps people can look at it. But people don’t have the right to transfer it to each other.

However, there is a pleasant trifle. In some countries there is a fixed list of things that are allowed in any case, and which the author is not able to prohibit. In America, this is the so-called "fair use", in Russia - "free use of the work", see details on Wikipedia .

The term of copyright is limited. When it ends, the content goes into the so-called public domain. When content is in the public domain, so-called non-proprietary copyrights still remain with its author. Basically, this is the right to a name, that is, no one has the right to call this work his own.

Under the Berne Convention, copyrights are retained throughout the life of the author and for 50 years after his death. Some countries extend this period, in Russia it is 70 years. If the author is unknown, then the period is counted from the moment of publication of the work.

The author himself can transfer his material into the public domain. But, unfortunately, there is no standard legal way to do this, so it’s better to use a special legal tool: CC0 .

So, the works are divided into those that are the subject of copyright (they can already be divided by the license used: GPL, BSD, etc.), and those that are not, i.e., the public domain.

Thus, if you post something on the Internet for general use, you must necessarily indicate a license, or indicate that it is in the public domain, otherwise everything is prohibited by default.

Free licenses

Now let's talk more about free licenses (GPL, BSD, etc.).

Free, open, free, non-profit. Free software is software distributed under a free license (or in the public domain), and a free license is one that gives the user the right to:
  • Use program
  • Change its source code
  • Distribute the program
  • Distribute modified versions

More specifically, a free license is one that satisfies the Free Software Definition . The FSF maintains a list of licenses that it considers free.

No matter how strange it sounds, but if a person wrote a program and does not give it to anyone, then this is free software. Since this software has one user and it has the 4 rights mentioned above. Stallman confirms: "If the operator developed them and uses them without distributing copies, they are free in a trivial sense since every user (there's only one) has the four freedoms . "

Open source software (open source software) is software distributed under an open license (or in the public domain), and an open license is satisfying the Open Source Definition. OSI maintains a list of licenses that it considers open.

In fact, the Open Source Definition is no different from the Free Software Definition, so we can assume that “free” and “open” are synonyms, although there are exceptions. OSI recognized Artistic License 1.0 as an open license, while FSF did not recognize it as free.

Free and open source software is not at all the same as free software. Red Hat Enterprise Linux is free software, but also paid. Skype is free software, but not free.

Free and open source software is not the same as non-profit. Almost all any large free projects (Linux, gcc, glibc, Gnome, FreeBSD, clang, and many others) are commercialin the sense that there are companies interested in the existence of these projects that help these projects in various ways (transfer money to these projects, hire developers of these projects, enter the code). And of course, there is a lot of non-commercial and non-free software, for example, a small software, posted on the Internet without source codes.

When publishing material under a free license, it is recommended to indicate:
  • The word "Copyright" in English and the copyright sign © (this is optional, but still desirable)
  • Year of publication of the work (for use in calculating the expiration date of copyright)
  • Name of the author (without the author there is no copyright, and without it - the license)
  • Actually, the license itself

Copyright is primary and license is secondary. This means that there can be no license without copyright. When copyright expires, the license also expires. If, say, someone posted a program under the GPL on the Internet, then at some point the copyright will expire, the program will become public domain, which means that the GPL will expire.

When you publish material under a free license, you do not waive copyright (unless you can say that you waive part of the copyright). On the contrary, you retain copyright and this is what gives you the right to install this free license on your content. A license is a contract between an author and a user. Only the author with his own right of the author can establish a license and change it. Putting content on the Internet is fundamentally no different from other distribution methods, from transferring to each user personally. If you post material on the Internet, then we can say that you give it to each user individually, concluding an agreement with him, that is, a license.

Free licenses are non-refundable unless otherwise indicated. I will explain with an example. Suppose that the author posted the program on the Internet, and some users downloaded it. Then he changed the license indicated on the Internet (as I said, he has the right to do this as an author). Then new users download this program under a new license. But old users will retain the right to use this program under the old license.

Each new version of the program is a new copyright.The copyright terms of different versions of the program may expire independently of each other. If the Linux kernel exists for a thousand years, then after this period the current version of the kernel at that time will still be subject to copyright, since each new patch is a new copyright. But the copyright period for old versions of the kernel by that time could easily expire.

Copyleft is a special case of copyright, and in no case is its opposite. Copyleft licenses, for example, the GPL, work due to the fact that the authors retain copyright (copyright). Therefore, when publishing content under the terms of the GPL or any other license, it is necessary to write “Copyright”, not “Copyleft” and not anything else.

The Free Software Foundation (FSF) is a regular organization like any other.It is not legally distinguished by anything. I read somewhere on the Internet that “You can publish a program under the GPL in two ways: by retaining the copyright, or by transferring them to the FSF.” Well, yes, like any other organization. That's just to transfer the rights of the FSF, without even warning him about it - it's stupid. You need to transfer FSF rights in the only case - if you make a contribution to the official GNU package (and even then this is not true for all GNU packages). In this case, you will need to sign and send a special document to the FSF.

Moreover, I read on the Internet that when publishing content under the GPL, you automatically transfer the copyright to FSF, or even Stollman personally. I think it is not necessary to clarify that this is not so. Yes, the GPL text (for example, GPL 3) says “Copyright © 2007 Free Software Foundation”, but this copyright refers to the text of the license itself and not to your work.

All prohibitions in the license text are not absolute. If something is forbidden, it simply means that it is allowed only with the consent of the author.The author can, at his request, allow anything he sees fit to anyone, and generally distribute his content to different people under different licenses. The author himself can generally use his material as he wants and cannot be constrained by his own licenses. For example, licenses prohibiting commercial use (such as CC BY-NC ) are recommended to be used only in one case: when you intend to use the work commercially on your own or when you intend to allow individuals (or organizations) to use it for money. If you publish under CC BY-NC and at the same time do not earn on this material yourself, then you act meanly (neither to yourself nor to people).

Or take an example: some companies, for example, Digia, the owner of Qtearn on the so-called GPL exceptions. This means that they publish the code under the terms of the GPL, but at the same time they can give you the code for money under the terms of another, less restrictive license.

The following very successful comparison was written on the Qt website, which I cannot find now. We can say that the author has an infinite number of copies of his work. Each time he gives content to someone, at that moment he chooses under what conditions he gives it (and by default the user gets the right to dispose of this content on these conditions until the copyright ends, and the author will not be able to cancel this, well and after the end of copyright, the user can generally do anything with this content). But after this, the author still has an infinity of copies of the work, and he can give them to anyone he wants on what conditions he wants.

Well, the transfer of copyright itself is a transfer of this endless armful. That is, the transfer of the right to decide who and how to use. At the same time, the original author no longer has his copyright (except for non-property).

Dual licensing- these are (unless otherwise indicated) two licenses connected by the “or” union (the same applies to triple licensing, etc.). That is, the user can choose under which of these licenses he will use the material. Let us return to the analogy with the infinity of copies: the author gives the user two copies of the work at once, each of them under its own license. The user can select any of these instances. Well, if both licenses allow further distribution, then the user can distribute the product under dual licensing further (i.e. distribute both copies).

With such dual licensing (as opposed to dual licensing with the “and” union, which will be discussed later), any license is compatible with any other. That is, one cannot say: “Double licensing under the license“ A or B ”is impossible, because, say, license A prohibits this.” Because with double licensing, the author actually just distributes the material under one license, and besides this, distributes it also under the terms of another. And, of course, the first license cannot ban the second.

Also, there is a dual licensing with the union “and”. That is, when the author passes the work to the user, requiring compliance with both licenses at once. And here the concept of license compatibility already arises. For example, a BSD license does not prohibit such sharing with other licenses. And therefore, distribution under the BSD license and some other is possible (provided that it is not prohibited by the second license). But the GPL prohibits the imposition of significant additional restrictions over the GPL. The list of permissible restrictions can be found in paragraphs a - f of section "7. Additional Terms ”GPL Licenses 3. In essence, this list is what makes the GPL only compatible with BSD-like free licenses. Therefore, the license “GPL and BSD” is possible (BSD does not impose significant restrictions beyond the GPL), but the license “GPL 2 and GPL 3” (unlike “GPL 2or GPL 3 ”) - impossible, because GPL 3 imposes significant restrictions over GPL 2 and vice versa.

In other words, there is the concept of a “GPL-compatible” license, that is, one that can be connected to the GPL by an “and” union. Such licenses include CC0, BSD-like licenses, and the GPL itself of the same version.

Therefore, when you write that the program is distributed under “GPL conditions of version 3 or higher”, make sure that you write “or”, and not “and”.

Is it possible to change the license of another's workwithout the consent of the author? Of course no. But you have the right to impose additional restrictions (they will be connected with the original license by the “and” union) and distribute the work further (with or without changes), provided that the original license allows it. All free licenses allow changes and further distribution (for which they are free). And at the same time, as I said, some of them (BSD) allow hanging any additional restrictions, and some (GPL) - only some. This means that if there is a work under the BSD license, then you can distribute it further under the “BSD and GPL” license (which will be equivalent to simply the GPL, that is, it turns out that you have effectively changed the license). That is, you can always “change” a GPL-compatible license for the GPL itself (though, the original license [for example, in the case of BSD] this is not going anywhere). But, of course, you cannot “change” the license from the GPL to BSD.

Mixing code in different projects under different licenses. Some licenses (BSDs) do not impose any restrictions on sharing with others. That is, if one file (or one piece of code) in your project has a BSD license, then this does not limit the licenses of another code (provided that these licenses can be used with BSD). But the GPL requires that all code that statically or dynamically links to the GPL code also has a GPL license. Well, if this other code originally had a license other than the GPL, then this license is connected to the GPL with the union “and”, provided that it is possible (that is, provided that the original license is GPL-compatible). If this is not possible, then such a project cannot be distributed.

For example, our project consists of two files: under the BSD license and under the GPL license, and these files are linked. Then the whole project acquires a GPL license. The file that was under BSD becomes "BSD and GPL", that is, essentially the GPL (but the BSD license notice cannot be removed from it anyway, since the notification itself prohibits this).

Another example: the project consists of two files: under the license GPL 2 (“GPL 2 only”, that is, “no later version”) and GPL 3 (the same), and they are linked. Then GPL 2 “infects” the second file, and it acquires the GPL 2 license, and becomes “GPL 2 and GPL 3”. The same thing happens in the opposite direction. But we all know that a license for “GPL 2 and GPL 3” is not possible. This means that the distribution of such a project is prohibited due to incompatibility of licenses.

Common practice in free projects.Any free project has a fixed license under which it is distributed. Also, projects are of two types: those in which the rights to the entire code are transferred to any one organization, and those in which all participants reserve the rights. The first case can be conditionally divided into two more:
  • This is the GNU package, and all rights to the code are transferred to the FSF (I remind you that not all GNU packages accept the transfer of FSF rights). Rights are transferred in order to guarantee that the package will always remain free, that is, to prevent participants from choosing a license other than the GPL for the package, or giving exceptions to the GPL
  • This is a project of a commercial company, and it collects copyright for itself specifically in order to sell exceptions to the license or to reserve the right to change the license

I want to note right away that commercial projects do not carry anything bad in themselves. As I wrote above, many free projects are commercial. And far from all commercial projects accept transfer of rights to the code of one organization. But to those projects where such a transfer is accepted, the attitude in the free software community is negative (if it is not FSF). For example, in the sysvinit vs upstart vs systemd disputes, one of the important arguments against upstart was that Canonical was transferred in this project, which is unacceptable to the free software community.

(UPD, May 19, 2016: transferring FSF rights is still not much different from transferring rights to any other organization. And even if, suppose you are the main author of one of the GNU projects, think twice before transferring rights to FSF. GnuTLS developer withdrew his project from GNU and regretted transferring the copyright to it to FSF: .)

When someone makes a contribution to a project in which if the transfer of rights is accepted, then it reserves the copyright for itself and transfers the code under the terms of the license that was adopted in the project. And this is implied by default, that is, it will be true, even if the participant transmitted his code without any comments.

For example, almost everyone who contributed to the Linux kernel (the transfer of the rights of one organization was not accepted in this project) left the rights with them (since this is assumed by default), even if they did not enter copyright with their name at the beginning of which Any file. And they all transferred their code to the project under the terms of the GPL 2. Now, to change this license, the consent of all participants will be required, and this is a huge number of people. If any company wants to buy an exception to the GPL, it will have to bribe all of these people, and even finding all of them will be a separate problem. Thus, "buying a kernel" is almost impossible. You can read more about this in the article Buying the kernel .

If someone makes a contribution to a project in which the transfer of rights of a certain organization is accepted, then usually he signs a special document and sends it to this organization. After that, its code becomes available in the framework of this project under the terms of a project license, but the organization can change this license in the future.

Also, projects are possible where participants retain their rights, but still sign and send documents confirming that they really own the rights to the transmitted code. By sending these documents, they confirm that, for example, they did not steal this code somewhere.

About those who write free code, and at the same time work in the company.If an employee writes the code on the instructions of his employer, then in the vast majority of cases, the copyrights to the received code belong to the latter. Who owns the rights to the code written at work, but not on assignment, or in free time from work, depends on the employment contract. In particular, it was written in my employment contract that the employer owns the rights to the code written using the workplace (it was also written there that I have no right to disclose the terms of the contract, but to me, figs :)). Well, since if something happens (for example, in court) it will be quite difficult to find out whether the employee wrote the code at the workplace or during working hours or not, then all the code written by this employee is suspicious about the ownership of this company.

Therefore, in those projects where the transfer of rights of one organization is accepted, the documents confirming this transfer require the signature of not only the author of the code, but also his employer, if any. And if this author is studying or working in a university, then the signature of a representative of this university.


Briefly, the essence of the GPL can be expressed as follows: this license allows anything, but at the same time:
  • Upon further distribution, the license must be retained.
  • Source codes should be distributed along with binaries (or a promise should be distributed to provide them on demand, I will not mention this further)
  • Everything that is linked (statically or dynamically) with the GPL code also falls under the GPL

In fact, the only restriction imposed by the GPL is that when distributing binaries, you need to distribute the source too. There are no other restrictions, one might say. It is not required to publish sources or binaries on the Internet or elsewhere. It is not necessary to provide source codes and binaries to someone on demand (unless you need to provide source codes to someone who has already received binaries). The program is not required to be distributed free of charge. All this will be discussed in more detail later.

So who is the GPL for?Suppose Alice wrote the program and transferred it under the terms of the GPL to Bob. Then Bob in accordance with this license receives the right to further distribution. Suppose he decided to transfer the program to Carol. Then he is obliged to transfer it only under the terms of the GPL. And if he transfers binaries, he is obliged to transfer and source codes too. Please note that these obligations arise only in the second gear (from Bob to Carol), and not in the first gear (from Alice to Bob). Why? Yes, because Alice is the author. And as an author, she can do anything at all, and owes nothing to anyone. The author can always violate his own license, I already wrote about this above. In particular, the author may declare that he is distributing a certain program under the terms of the GPL and at the same time not distributing the source texts, and he will not violate the law. But those

For example, one day there was a case that you could only call facepalm: a GPL violation was discovered in GNU Emacs. It turned out that over time, computer-generated files without source codes were distributed with Emacs. You can read more here: GNU Emacs discovered a violation of the GPL . Here I want to note this: the authors of Emacs and FSF, which owns the rights to Emacs, did not violate the GPL. Because copyright holders can do anything. But those who distributed Emacs further (for example, GNU / Linux distributions) violated it. This was confirmed by Stallman in his letter : "Anyone redistributing those versions is violating the GPL." Then Stallman issued a special document, allowing distribution of those versions of Emacs without full source.

Thus, the restrictions imposed by the GPL, and indeed, the real effect of the license, arise only from the second transfer of the code. That is, a license begins to be valid only when at least three actors appear: the author (Alice), the transmitter (Bob) and the receiver (Carol).

Let's look again at who is who, to whom the license is addressed, who is meant by the word “you” in the license, etc. Suppose Alice wrote the program, installed the GPL license on it and transferred the program to Bob. Then Bob began to read the license, it is addressed specifically to him, and “you” in the text of the license means him, Bob. The license tells Bob what rights he has (for example, running the program) and responsibilities (for example, distributing binaries only with the source). Rights and obligations begin only from this place. Alice herself has all the rights that can be, and no duties. The license gives Bob the right to transfer the Carol program. And if Bob passes Carol the program without source, he will violate the license. In general, a license violation is only possible if there are at least three people. And the only one of these three (Alice,

And of course, in reality, everything can be more complicated than in this example: a project can have many authors, the distribution chain can be longer, some people in the chain can make their changes, and so on.

The GPL does not require the publication of source codes or binaries either on the Internet or elsewhere. There is no word “internet” in the GPL text. The GPL does not require the provision of either source or binary on demand. That is, a person who received the code under the terms of the GPL and, perhaps, made some changes to it, can give his changed code to someone he considers necessary. The only requirement is that he must give the source code to the one to whom he has already given the binaries.

I heard that some secret service of Russia created its own GNU / Linux distribution for internal use and does not publish it. If so, then this is not a violation of the GPL. Since they are not obliged to give this distribution kit to anyone. But if this distribution kit leaks outside the service in any form, then the person who received it will have the right to demand the source code of the distribution kit, and then distribute the source code further under the GPL conditions (I am now talking about those parts of the distribution package that have the GPL license )

It is not required that the program (in binary or source form) be distributed free of charge.The only requirement is if you give the binaries (paid or free), then you are obliged to give the source code along with them, or promise that you will give the source code on first request free of charge or at the price of delivery and physical media.

User agreement with the license is not necessary for using the software. It becomes mandatory only when it is distributed. This means that the software installer should not display the message “Do you agree with this license?” during installation, in contrast to the common practice of proprietary software.

PS I talked about the GPL is not everything. For other details, see the GPL itself .

UPD from 2014-12-22. What happens during the first code input?Suppose Alice wrote a program and put it on the Internet. At this moment, she, as the author, can change the project’s license as she wants, is not obliged to comply with the GPL herself (in case the project’s license is GPL), etc. But, suppose, the first contributor (participant), Bob made his contribution ( contribution) to this very program. By default, it is assumed (as I said above) that Bob reserves the copyright and that he contributes his code under the same license as the program itself. From that moment on, Alice ceases to be the sole author of the program, which means that now she cannot change the project’s license in any way and she must comply with the GPL (if the project is under the GPL) when distributing the program. Now, if she wants to change the license, then she has only two ways to do this:
  • Ask for consent from all contributors
  • Change the license in the sense that I wrote about in the section “Can I change the license of someone else’s work?” This means that it can “change” the license from BSD to the GPL (however, BSD license notifications will still remain in the code), but from the GPL to BSD it will not.

UPD from 2016-11-10. Once again I will say that I do not understand the law at all.After the publication of this article, I immediately learned from two lawyers (real lawyers, unlike me!) Such a fact (relating to Russian law). Which still does not fit in my head, and which, it seems to me, contradicts my picture of the world described above. Suppose one firm has licensed its own code (non-free) to another firm. In the license agreement, she wrote that the recipient company has the right to change the code (and no additional explanations about the restrictions on the further fate of this changed code). Then the recipient company can change the code and the copyright for this new code will automatically belong entirely to the recipient company and then it can do anything with this code. And it will not be bound by this license agreement.

I asked a second lawyer: “What about the Linux kernel then? Thousands of people make changes to it. And when the next person makes a change, he does not become the sole owner of the copyright of the amended copy. This copy is subject to the copyright of anyone who has ever made a change. ” He said: “Yes, that's right. The reason for this is that Linux is distributed under a special open license, which, in fact, sets these rules. ”

Okay, why did I say that? And then. So that you understand that I don’t understand anything. In this article, I just talked about common practice in the world of free software. Just to make it clear the various discussions about licenses. My text has little relation specifically to Russian law, and apparently even to American. And it most likely refers only to free software.

UPD from 2017-08-26. The GPL Is a License, not a Contract .

Also popular now: