Essays:Why are GPL-licensed components removed from the FreeBSD base system
I recently studied the FreeBSD operating system development report for the fourth quarter of 2020, which reminded me GPL-licensed components continue being removed from the FreeBSD base system. During the reporting period, the GDB debugger was removed and, a little earlier, so was the GCC compiler suite. These are a couple of the most striking examples of the whole bunch. In this article, I would like to tell you why this removal is happening. Whether you are a FreeBSD user or not, I believe that a clear understanding of the challenges faced by the developers of one of the largest software development projects is very important for you, especially, if you are also a developer. It’s just interesting, after all. So, to answer the question of why FreeBSD developers clean the base systems of components distributed under the GPL, you need to understand:
- what free software and the GPL license are;
- what copyleft licenses are and how they differ from permissive licenses;
- what tivoization is.
But first things first.
Free software[edit source]
Software is considered free if it gives you 4 basic freedoms:
- run the program as you wish, for any purpose;
- study how the program works, and change it so it does your computing as you wish;
- redistribute copies so you can help others;
- distribute copies of your modified versions to others.
These 4 basic freedoms were formulated by the hacker Richard Stallman back in 1986. Stallman began his career as a programmer at the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology (MIT). In his line of work, he repeatedly encountered the fact that the lack of the ability to fix errors in someone else's software, which you have to use for one reason or another, greatly slows you down in solving your issues. One such episode was well described in the book "Free as in Freedom (2.0): Richard Stallman's Crusade for Free Software". The very first chapter of this book tells about the Xerox printer – an unearthly piece of tech that was donated to the laboratory. This printer surpassed its predecessor in both speed and print quality, but after a while, it became known to jam paper. Stallman wanted to fix a printer flaw at the level of the firmware that controlled the device but failed to find its source code. When he asked for the source code, he was simply turned down. It may seem okay now, but at that time software was just beginning to be elevated by corporations to the status of intellectual property which wasn’t handled out to everyone.
Stallman later recalled a conversation with a person who refused him the source code: "If he had refused me his cooperation for personal reasons, it would not have raised any larger issue. I might have considered him a jerk, but no more. The fact that his refusal was impersonal, that he had promised in advance to be uncooperative, not just to me but to anyone whatsoever, made this a larger issue." So, at one point, Stallman became obsessed with software freedom, gave up everything, and even began work on creating a free operating system. The project was named GNU. He started his operating system with a technology basis – development tools such as a code editor, compiler, and debugger – without which building a free operating system would have been unthinkable. But when Stallman met Eben Moglen, a law professor at Columbia University, he managed to create a legal basis for his brainchild. Moglen helped Stallman reflect his software ideals in the treaty that still exists between software developers and users. This agreement is called the GNU General Public License, or GPL for short.
Copyleft licenses[edit source]
It was important for Stallman not only to reflect in the license the four basic freedoms mentioned earlier in the article but also to ensure that once it became publicly available, the code could not be taken away and appropriated. Thus, if someone takes software that is covered under the GPL as a basis and builds something new from it, or just fixes bugs, the derivative work must also be distributed under the GPL. So, once released under the GPL, a piece of code can no longer be closed. Stallman called this legal mechanism copyleft, i.e. copyright turned inside out. The first versions of the GPL came out in the late 80s and early 90s and became very popular.
Permissive licenses[edit source]
Although the industry embraced legal innovation, disagreements began to emerge among the proponents of free software – not everyone shared Stallman's idea of communal ownership that the GPL helped create. The obligation to return the code to the community on the same terms seemed onerous to them. No wonder, that one of the most vivid examples of such a disagreement occurred with the BSD operating system. (Let me remind you that it was a derivative of the original UNIX and developed at the University of California, Berkeley. BSD did not yet have the prefix "Free", "Open", or "Net"). Stallman wanted the code of this operating system to be distributed under the terms of the GPL, but one of the key BSD developers Keith Bostic did not share those very ideas of communal ownership. As a result, when Bostic made the BSD networking code free in 1989, he chose a license for it, which did not restrict anyone in anything and even allowed anyone to close the source. His only condition at that time was to indicate the name of the university in the description of derivative works. Thus, what one person saw as evil, another person saw as an interesting opportunity. By the way, Berkeley also called their license BSD. (Today it is extremely popular in the free software community.)
The GPL and BSD have been the inspiration for a plethora of free software licenses that solve various business tasks and whatnot. Licenses from the GPL camp came to be called copyleft licenses. For example, on the Wikipedia page for a particular license, you can even see if it is copyleft or not. If it is, then it, like the GPL, prevents the source code of derivative works from being closed. Licenses from the BSD camp, in turn, began to be called permissive and, unlike licenses from the GPL camp, they were not against the closure of the code of derivative works.
From the early 1990s to the mid-2000s, the industry's attention was focused on free software. In 1991, the 2nd version of the GPL (also known as GPLv2) came out, which became the symbol of this movement. There were heated debates. Some corporations saw the GPL as a threat, while others began to accept the rules of the game. Obviously, corporations have accepted (and continue to accept) these rules because it is beneficial, but it's not widely understood how much. Free software is the foundation for many software products, but it doesn't come out of anywhere – a meritocratic community of developers is behind it. They generate ideas, produce software, write documentation for it, and train staff. The latter is most often neglected. Corporations were given the opportunity not only to freely take a solid foundation embodied in a piece of code for their products but also to hire engineers who did not need to immerse in this code, which, in turn, made it possible to benefit from their work right at the start. Thus, successful examples of companies whose business was 100% based on the development of free software began to appear. Among them is Red Hat, still afloat and making billions, and long-deceased MySQL AB. The use of free software by corporations, and even distributed under the terms of the GPL, perfectly demonstrated the viability of Stallman's ideas, formulated back in the 80s. Now it became obvious that the development of free software (whatever camp it belongs to) is not up to ascetics who have doomed themselves to unpaid labor for the good of society. Here it is necessary to emphasize that until the mid-2000s, the BSD camp had neighborly relations with the GPL. Indeed, the basic system of FreeBSD got along with software distributed under both BSD (and other permissive) licenses and under the GPL. But everything changed a lot by the end of the 2000s when Stallman decided to fight a new enemy.
The essence of tivoization is that a device whose firmware is based on components covered by GPLv2 or another copyleft license does not allow its owner to run modified or alternative firmware (i.e. re-flashing the device). The term was coined by Stallman himself and came from the name of the TiVo company, which was one of the first to impose this restriction on its products. It is worth noting that GPLv2 never forbade tivoization since Stallman and Moglen could not have predicted such a move by the companies when they were developing the license text. Even though companies that forbade to re-flash their devices could not violate the terms of the license, Stallman still considered their actions to be blameworthy, since they threatened the freedom of device owners to do whatever they wanted with them. After much discussion on this topic, he released the 3rd version of the GPL (also known as GPLv3), which aimed to combat tivoization. The license turned out to be more than effective in this fight – it is enough to have only one component in the system, which is distributed under the terms of GPLv3 so that the manufacturer does not have the right to prohibit to re-flash the device. But Stallman didn't stop there and re-licensed all the software developed under his GNU project. Thus, new versions of the GCC compiler suite, the GDB debugger, and others were released under GPLv3. In the mid-2000s, GCC and GDB had no free counterparts that could match them in stability and functionality. I have already mentioned that creating a free operating system is unthinkable without a free compiler and debugger, which is why Stallman developed them among the earliest towards the creation of his own operating system. For example, GCC was used in FreeBSD to build most of the operating system code and was fairly part of its base system. But when the compiler suite became an anti-tivoization tool, the BSD community was in danger of being dragged into someone else's war. New versions of the software that had always been part of the base system were distributed overnight on terms that contradicted the goals of the system. In the end, it was decided to stay on the sidelines, but the price of this solution was too high – FreeBSD had to abandon the GCC and GDB updates and use those versions that were distributed under the GPLv2. The terms of GPLv3 contradicted not only the goals of FreeBSD but also the goals of most companies, which were mainly engaged in the development of proprietary software. This led to the creation of alternatives for GCC and GDB by the free software development community, funded by corporations. So, within the framework of the LLVM project, the development of alternatives under a permissive license began. At the end of 2012, FreeBSD was completely switched to build with the Clang compiler from LLVM. Now the operating system no longer depends on GCC and GDB, and they have been permanently removed from the base system as unnecessary. Other software distributed under the GPL is removed apparently on mere inertia, as well as because of unwillingness to repeat the bitter experience.
I tried to explain why GPL-licensed components are removed from the FreeBSD base system. Interestingly, the inspiration came from the FreeBSD Quarterly Development Report and a simple question I asked myself as I studied it. The story turned out to be long enough because I was approaching the answer to my question gradually. Within my modest means, I did my best to disclose the very topics that, in my opinion, help to better understand the answer to it. I urge you to study the quarterly reports of free software nonprofits, use free software and participate in its development and ask yourself simple questions.