GameDev

All About the GNU General Public License: What Restrictions Does the General Public License Impose and How to Avoid Problems

All About the GNU General Public License: What Restrictions Does the General Public License Impose and How to Avoid Problems

Free Course: "Quick Start in Python"

Learn More

By using code from GitHub or GitLab in your projects, you automatically agree to the license terms and enter into a legal relationship with the software authors. Developers often overlook this point when uploading code to commercial projects, which can subsequently lead to lawsuits against their companies. To avoid such situations and ensure legal security, it is important to carefully understand the terms of free licenses. A proper understanding of licenses will help you not only avoid legal problems, but also use community resources in accordance with established rules.

What are free licenses?

Alexander Savelyev, a lawyer specializing in digital law and a lecturer at the Higher School of Economics, classifies free licenses based on their terms and compatibility. His research helps better understand how different licenses interact with each other and what rights they grant to users. This knowledge is especially important for developers, designers, and anyone working with open source software and digital products.

There are two main groups, which are distinguished by specific conditions.

  • Reciprocal licenses - they oblige the user to distribute the modified program under the same conditions as the original. Such licenses are also called viral, because they "infect" the derivative software with their terms. Such licenses include all types of GPL (General Public License), LGPL (Lesser General Public License), and AGPL (Affero General Public License).
  • Permissive licenses - contain minimal user requirements and permit the creation of proprietary software based on the original program. On the other hand, permissive licenses do not allow the author of the source code to control the fate of the modified version of the software. Permissive licenses include the BSD (Berkeley Software Distribution License), MIT, and Apache.

License compatibility refers to the ability to combine programs distributed under different licenses, as well as to use code from one program in another. Permissive licenses, which Richard Stallman calls "recklessly liberal," are generally compatible with each other. At the same time, versions of the GPL license do not have such compatibility, which can create certain restrictions for developers. Understanding these aspects of licensing is important for the effective use and integration of software.

The incompatibility of copyleft licenses arises from their fundamental principles. GPLv2 specifies that derivative programs must be distributed under GPLv2, while GPLv3 requires derivatives to be distributed under GPLv3. This creates a problem for derivative programs based on two licenses, as they cannot simultaneously comply with the requirements of both versions. Thus, developers should consider these restrictions when choosing licenses for their projects to avoid legal conflicts and ensure the lawful distribution of their work.

The permissive BSD and Apache 2.0 licenses are compatible because they do not impose strict licensing requirements. When using these licenses in the final product, it is sufficient to specify the licenses of the original software. This simplifies the process of integrating and using open source, allowing developers to freely adapt and distribute their projects while preserving the rights of the authors of the original code.

To determine the compatibility of complex licenses, it is necessary to carefully study their terms. In case of license incompatibility, a user wishing to combine programs should discuss the possibility of relicensing with the original developer. This will avoid legal problems and ensure compliance with the requirements of both licenses.

Now let's look at specific licenses, in particular the GPL and its derivatives. The GPL (General Public License) is one of the most popular and widely used open source licenses. It provides the freedom to use, change, and distribute software, while preserving the same rights for all subsequent users.

There are different versions of the GPL, each introducing its own changes and clarifications. For example, GPLv2 and GPLv3 differ in terms related to patents, anti-piracy measures, and requirements for compatibility with other licenses. Understanding these differences is important for developers wanting to choose the right license for their projects.

Furthermore, there are derivative licenses, such as the LGPL (Lesser General Public License), which allows the use of GPL-covered libraries in closed projects, making it more flexible for commercial use. Choosing the right license not only helps to comply with legal regulations but also keeps software open and accessible to the community.

GNU General Public License - the main copyleft license

The GNU GPL (General Public License) is the first free license in the history of software. It was developed by Richard Stallman, the founder of the GNU project and the Free Software Foundation (FSF). Early in his work, Stallman created separate licenses for projects such as GNU Emacs, the GDB debugger, and the GCC compilers. He later generalized their principles and developed the first version of the GPL, which became the basis for many other free licenses and had a significant influence on the development of open source software. The GNU GPL ensures users the freedom to use, modify, and distribute software, which promotes its development and distribution. Free software and Open Source are not identical concepts. Free software is distributed only under reciprocal licenses, while open source software can use both reciprocal and permissive licenses. Activists at the Free Software Foundation (FSF) are concerned with the ethical aspects of free software, while representatives of the Open Source Initiative focus on the business models that can be developed based on these technologies. Understanding the differences between these concepts is important for developers and users looking to choose the right software solution.

Both trends are often combined under the term FOSS (Free and Open Source Software). In previous articles, we discussed how businesses have adapted the FOSS model for profit.

The new license provides software users with four key freedoms. These freedoms include the ability to use the program for any purpose, study and modify the program code, share the program with others, and distribute modified versions. These terms foster community development by increasing the accessibility and transparency of technology.

The GPL (General Public License) seeks to resolve technical incompatibilities between programs and their versions using open source code. Users who accept the terms of this license have the right to modify and adapt the software, eliminating any incompatibilities that arise by any means available. It is important to note that any improved or changed code also remains open and available to other users, which promotes the continued development and compatibility of the software.

Achieving the goals of the free software movement includes the freedom to collaborate in software development. This collaboration remains relevant even after the author of the original program has completed their work on it. Users interested in further developing and improving the software continue to make contributions, ensuring its development and relevance.

A modified program is a program that uses the original program's source code or portions of it. Such changes may include adding new features, fixing bugs, or improving performance. Modifying software allows it to be tailored to the specific needs of users or organizations. It is an important process in software development that promotes innovation and a better user experience.

The GPL emphasizes that free software is provided "as is". This means that the author provides no guarantees of quality and is not liable for any damage caused to the user. Moreover, one of the license clauses significantly restricts the commercial use of free software, which is important to consider when developing and distributing software. Users should be aware of the risks and limitations associated with using such programs, especially in the context of business applications.

You must grant all third parties a royalty-free license for any work that you distribute or publish, in whole or in part, that incorporates the Program or its components, subject to the terms and conditions of this License.

Section 2b of the GNU GPL sets the conditions for distributing derivative works. It requires that any modification of the original software that is distributed must also be made available under the GNU GPL. This protects the rights of authors and users by ensuring that all modifications and improvements remain open and available to the public. Thus, the license promotes the development of free software by allowing every user to both use and change software without restrictions. It is important to note that compliance with the GNU GPL is essential for maintaining the openness and availability of software, which is a key aspect of the free software philosophy.

The first version of the GNU GPL is now considered archival and is not included in the list of active licenses maintained by the Free Software Foundation (FSF).

In 1991, Richard Stallman realized that his initiative to protect software and libraries with a radical license had not attracted enough supporters. As a result, he released an updated version of the GPLv2, which removed the requirement to provide free access to programs. This license was an important step in the development of free software and helped attract more developers to open source projects.

Richard Stallman. Photo: Wikimedia Commons

GPLv2 became widely popular among software library distributors. It was complemented by the GNU Library General Public License, in which the term "Library" was later replaced by "Lesser". This change reflects the developers' desire to provide greater flexibility in the use and distribution of libraries while preserving the core principles of free software.

The second version of the license introduced the "freedom or death" principle: if the user cannot exercise the four essential freedoms, the software should not be distributed. This principle emphasizes the importance of ensuring users' freedom to use, study, change, and redistribute the software. It serves as a basis for protecting users' rights and promotes the development of open source software, which in turn enables the creation of higher-quality and more secure solutions.

Often, software development includes patent-protected elements, while other components can be distributed under free licenses. In such situations, the developer is obliged to ensure that users are protected from potential patent lawsuits or, otherwise, refrain from distributing the program under an open source license. This is important for upholding intellectual property rights and minimizing legal risks for end users.

GPLv2, or GNU General Public License version 2, grants users a number of rights and freedoms regarding the use, distribution, and modification of software. The basic provisions of the license include permission to copy and distribute the software, as well as the right to change its code. However, if you decide to modify the software and distribute it, you are obliged to make the source code available to other users under the same terms. This promotes the creation of open and free software, allowing the community to contribute to its development. GPLv2 also ensures that users can use the software as they see fit, thereby providing a high degree of freedom in its use.

  • to run and use the program without restrictions;
  • to reproduce and distribute copies of the program (including for a fee), but you must leave the copyright notices, disclaimers of warranty and liability, and provide a copy of the license and source code on each copy of the program;
  • to make and distribute modified copies of the program.

By downloading a program, the user automatically agrees to the license terms set by the original copyright holder. This means that the agreement is concluded directly between the user and the copyright holder, and not with those from whom the program was actually obtained. Therefore, it is important to carefully read the license terms before downloading to avoid misunderstandings and ensure copyright compliance.

GPLv2 gained widespread popularity thanks to the choice made by Linus Torvalds, who selected this license for the Linux operating system kernel. Today, the Linux kernel remains licensed under the GPLv2, facilitating its development and adoption within the developer community. This license ensures freedom to use, modify, and distribute software, making it attractive to many open source projects. Examples of projects licensed under the GPLv2 include many well-known and respected software solutions. This license allows users to freely use, modify, and distribute software, promoting the development of open source. Notable examples include the Linux operating system, popular text editors such as Vim and Emacs, and content management systems such as WordPress. These projects demonstrate how the GPLv2 license promotes innovation and collaboration in the developer community, ensuring access to high-quality tools and technologies for users worldwide.

  • Adium is a messenger for macOS that can interact with XMPP, IRC, and other protocols;
  • Git is a distributed version control system;
  • Miranda IM is a messenger for Windows;
  • Okular is an application for viewing documents in the KDE graphical environment;
  • Pulse of Currencies is an Android application that provides up-to-date information on exchange rates in banks of Belarus and Russia.

In 2005, Richard Stallman, together with FSF lawyer Eben Moglen, began developing the third version of the GPL license. The main goal of this work was to resolve a number of key issues that had arisen at that time. The GPLv3 license was designed to address concerns about user rights, protect software freedom, and adapt to new conditions such as patents and digital technologies. This version of the license was an important step in the development of open source software, giving users more rights and opportunities to use and modify programs.

  • protect users from patent lawsuits;
  • resist tivoization;
  • become compatible with other popular free licenses such as Apache 2.0 and GNU Affero.

In 2006, consultations and approval of changes began, with the participation of the FSF, the Software Freedom Law Center, and the Free Software Foundation Europe. Linus Torvalds expressed confidence that the Linux kernel would most likely remain under the GPLv2 license. He was categorically opposed to the clause prohibiting tivoization, as it significantly limited the use of the Linux kernel in various projects.

Requiring people to make their private keys publicly available seems absurd to me. I doubt the Linux kernel will be converted to the GPLv3 license, as I am uncomfortable changing anything related to my code.

Linus Torvalds is the founder and main developer of the Linux operating system kernel. In 1991, he began work on a project that became the basis for many distributions and had a significant influence on the development of open source software. Torvalds developed Linux with the goal of creating a free and powerful operating system available to everyone. Under his leadership, the Linux kernel has become one of the most popular platforms in the world, used on both servers and desktop computers. Linus Torvalds' contributions to technology and the developer community are immeasurable, and his work continues to inspire a new generation of programmers and engineers.

Eben Moglen. Photo: Eben Moglen / Flickr

When the licensing of the Solaris operating system arose, Linus Torvalds suggested that Linux might switch to GPLv3 to avoid licensing confusion. However, Sun, the developer of Solaris, chose its own license - the Common Development and Distribution License (CDDL). This license allows a mix of open and closed source code, but is incompatible with any version of the GPL, which creates certain restrictions for developers.

GPLv3 was released in 2007 and is currently the latest version of the GNU General Public License. The Free Software Foundation (FSF) strongly recommends using GPLv3 for most software packages, as it provides stronger protections for users and developers. This version of the license aims to eliminate the shortcomings of previous versions and includes new terms that promote software freedom and combat restrictions imposed by patents and digital rights. Using the GPLv3 helps create a more open and accessible environment for software development.

The license allows third parties to modify the program to suit the needs of a particular user. However, they are not required to disclose the source code for their private modifications. One way to profit from free software is for these "third parties" to act on behalf of the user and receive compensation for their work. Users also have the right to exclude additional terms that may be added by program authors and to introduce their own terms into the license text. This creates flexibility and opens up new opportunities for both users and developers, contributing to the development of the free software community.

The GPLv3 license introduces new terms regarding the exercise of rights. These changes are aimed at better protecting the rights of software users and developers. The primary focus is on ensuring the freedom to use, modify, and distribute software. The license also includes provisions to protect against practices that may limit these rights, such as digital rights management (DRM). In addition, the GPLv3 introduces clearer definitions and compatibility requirements with other licenses, facilitating open source software development. These innovations help create a more transparent and fair ecosystem for all participants.

  • The author must grant the user patent rights if any part of the program is protected by them.
  • The distributor must not resort to technical means of software protection that limit the user's rights. For example, if a program uses cryptographic access keys, the user must obtain them upon request (prohibition of tivoization).
  • Computer device manufacturers must facilitate users who modify the program so that the modified version will run and operate on their devices.

New terms have emerged, such as "propagation" (use) and "convey". Using a program without a valid license qualifies as copyright infringement. Transfer of software is permitted only if all license terms are met. It is important to remember that compliance with license agreements not only protects the rights of copyright holders but also ensures the legality of using software products.

An important aspect concerns user interaction with software over the Internet. According to the GPLv3 license, this method of using the program is not considered "transfer" unless a copy of it is made. This means that the license restrictions do not apply when distributing software through the SaaS model, since no copy of the program is created in this context. Examples of products using the GPLv3 license include many popular programs and applications. This license ensures free access to the source code, allowing users to modify and distribute the software. Well-known examples include operating systems such as GNU/Linux, as well as a number of applications, including text editors, graphics editors, and content management systems. Furthermore, many libraries and software development frameworks also use the GPLv3, promoting the creation of open and accessible software for everyone. Using GPLv3 ensures that any changes made to the software will be available to the community, which helps improve and develop it.

  • GNU Compiler Collection — a set of compilers for different programming languages;
  • GNU GRUB — an operating system boot loader;
  • Booktype — an application for creating, editing, and publishing books in PDF, ePub, ODT, and HTML formats;
  • Blender — professional software for creating 3D graphics;
  • Newscoop — a CMS written in PHP and using MySQL as a data store.

GNU Lesser General Public License — a license for libraries

The GNU LGPL, or Lesser General Public License, is a simplified version of the GPL license. It allows developers to integrate licensed code with proprietary software in certain cases. It is important to note that programs created using LGPL-covered code are not always required to be distributed under the same license. This exception is particularly relevant for libraries, making the LGPL an attractive option for developers looking to use open source in their commercial products.

The acronym LGPL originally stood for Library General Public License, as the license was created specifically for libraries. The GPL restricted the use of library code in commercial products, forcing developers to continually create similar solutions. There are two current versions of the LGPL: the GNU LGPLv2.1, released in 1999, and the GNU LGPLv3, introduced in 2007. These versions provide flexibility in the use of libraries, allowing them to be integrated into various projects, including commercial ones, subject to certain conditions.

The LGPL (Lesser General Public License) defines two main modes of software use. The first mode applies to libraries that can be used in closed or commercial applications without having to disclose the source code of those applications. The second mode means that if you modify the library itself, you must provide the source code for your modifications. This ensures that the software can be used and modified while preserving the rights of its developers. The LGPL provides flexibility for developers, allowing them to integrate libraries into their projects while still complying with the license terms.

  • Library mode - the source code and its modified versions are distributed under terms that are largely the same as the GPL.
  • A work that uses the library is a program that runs with the library but does not contain its code. It is not considered a derivative of the library, and therefore is not covered by the GPL.

The licensee has the right to combine or link a work that uses the Library with the Library itself. This will create a new work that will contain elements of the Library. This unification helps expand the functionality and usability of the Library in various projects.

The licensee has the right to distribute the work under any terms, while the user retains the right to modify the work to adapt it to personal needs. The user is also given the ability to reconstruct the structural diagram of the operating algorithm using the source code of the work to debug the changes made.

Article 6 of the LGPLv2 license describes the conditions regarding the distribution of modified versions of libraries. According to this article, you can modify the library, but you must provide access to the source code of these changes. This means that any changes you make to the library must be available to other users so that they can use, modify, and distribute your version. In addition, if you distribute a modified library, you must notify users that the library has been modified and provide them with access to the source code. Compliance with these terms helps maintain the openness and compatibility of software, which is one of the main goals of the LGPLv2 license.

When using a library licensed under the LGPL, it is important to inform users of this fact. You must include the name of the library, the names of its authors, and, if the program displays a copyright notice, also display the copyright notice of the library itself. A copy of the LGPL license should be included with each copy of the program so that users can read the terms of use. This compliance with the license not only protects the rights of authors but also ensures transparency for users.

The author of a derivative program who has accepted the terms of the LGPL license is obligated to allow interested users to make modifications to the library. The library author has the right to change the license from LGPL to GPL, but reverting to the LGPL will not be possible. This means that when creating a derivative work, it is important to consider the licensing terms and respect the users' rights to modify it.

In 2007, the third version of the LGPL license was released, which introduced new definitions such as "application" and "combined work." These concepts play an important role in understanding the terms of use and distribution of software licensed under the LGPL. An application refers to a final product that uses libraries licensed under this license, while a combined work covers combinations of the original code and libraries. The introduction of these terms made the license clearer and allowed developers to better navigate the rules for using free software.

An application is software that interacts with a library to perform various tasks. Such programs can be used to process data, manage resources, or provide functionality needed by users. The interaction between the application and the library can improve the performance and extend the capabilities of the software, making it more efficient and easier to use.

A combined work is a work created by integrating a library into an application. This allows developers to extend the functionality of their software, improving its capabilities and increasing performance. The use of composite works is becoming increasingly popular in development, as it allows for efficient code management and simplifies the process of updating and supporting applications.

The licensee has the right to distribute modified versions of the library. This allows users to adapt the software to their needs and share improvements with the community. Distributing modified versions of the library promotes innovation and the development of projects based on this technology. It is important to comply with the license terms to ensure that the authors' rights are respected and that transparency in the use of the software is ensured.

  • under the terms of the LGPL, in which case the modified version of the library must be non-functional and the purpose of the changes must be achieved;
  • under the terms of the GPL - in this case, the modified version is not covered by the additional rights granted by the LGPL.

The licensee has the right to independently determine the terms of distribution of derivative and composite works. At the same time, it is important to take into account the requirements set forth in Articles 3 and 4 of the license, which the licensee must comply with. These requirements include mandatory notification to users that a work uses a library, as well as the requirement to keep the library's source code open source. Adherence to these conditions ensures transparency and respect for the rights of all participants in the process.

Examples of products using the LGPL license include various libraries and software that allow free use and modification of code. The LGPL (Lesser General Public License) allows developers to integrate libraries into their applications while retaining the right to keep their own product's source code closed.

Popular examples using the LGPL include libraries such as GTK+ for creating graphical interfaces, OpenCV for image and video processing, and Freetype for working with text and fonts. These tools are widely used in commercial and open source projects, highlighting the flexibility and accessibility of the LGPL for developers.

Using the LGPL promotes community development, as it allows programmers to use and improve existing solutions without violating the license terms. This makes the LGPL an important tool in the free software ecosystem.

  • GNOME Files is the official file manager for the GNOME desktop;
  • GNU Aspell is the spell checker for the GNU system;
  • TinyButStrong is a lightweight interpreted template engine for PHP;
  • ZCAD is a 2D drafting and 3D modeling program.

GNU Affero General Public License is a license for cloud services.

The Affero General Public License, often called a stronger version of the GPL, differs from the LGPL. The AGPL was designed with web applications in mind, to ensure that users of modified software made available on the web could access its source code. This license provides greater openness and freedom for developers and users. Furthermore, the AGPL is fully compatible with the GPL, allowing both licenses to be used in the same project without conflict.

The first version of the GPL, GPLv2, was released in 2002, and the second version, GPLv3, was released in 2007. The Affero License requires that if users have access to a modified program running on a server, the server must provide access to the source code of this program. This requirement is relevant to ensuring the openness and transparency of software, especially in the context of web applications and cloud solutions.

The main goal of the AGPL license is to prevent the hidden use of free software on the Internet. As mentioned earlier, the GPL license does not work effectively within the SaaS model, since users do not have access to the source code of the cloud service. An aggressive version of the GPL, AGPL, solves this problem. If the developer complies with the license terms and provides users with access to the source code, they have the right to make modifications and use them in their version of the software. Thus, the AGPL promotes more open and transparent use of free software in the cloud.

AGPLv3 is a license widely used in various software products. It allows users to modify and distribute the software, while requiring that all derivative works remain open. Examples of products using AGPLv3 include popular web applications such as MongoDB, GNU Social, and Mattermost. These solutions demonstrate how AGPLv3 fosters community development and encourages software innovation. Using this license helps developers and users maintain control over their code and provides access to powerful tools for creating and sharing software solutions.

  • GNUnet is a software suite for secure P2P connections;
  • Grafana is an application for analytics and interactive data visualization;
  • Onlyoffice is an office suite that includes an online document editor, a document management system, CRM, a corporate social network, and a mail server;
  • Nextcloud is a set of client-server programs for creating and using data warehouses.

GNU Free Documentation License

The GNU FDL, or Free Documentation License, is a strict copyleft license that allows users to reproduce, distribute, and modify technical and other documentation. This license is designed to protect the freedom of users by allowing them to share and adapt information to their own needs, while preserving similar rights for others. The GNU FDL promotes the creation and dissemination of open knowledge by supporting the principles of open access and freedom of information. This license is particularly relevant for educational and scientific materials, where it is important to ensure access to high-quality information for a wide audience.

The license was developed for educational and support materials that accompany computer programs, but its use has expanded significantly. For example, Wikipedia texts were originally published exclusively under the GNU FDL. This license allows commercial use of works, which was one of the main purposes of its creation - to attract publishers to fund the development of software documentation.

The first version of the GNU Free Documentation License (GNU FDL) was released in 1999, and the latest version, GNU FDL v1.3, was released in 2008. An important goal in the development of version 1.3 was to enable the distribution of Wikipedia articles under the GNU Free Documentation License (FDL). This license is designed to protect the freedom to use and distribute documentation, making it important for projects focused on open content. The GNU FDL remains relevant for many users and authors seeking the free exchange of knowledge. The core requirements of the GNU Free Documentation License (FDL) are to ensure the freedom to use, distribute, and modify the documentation. The license allows users to freely copy and distribute the material, provided that attribution is preserved and the same rights are granted to others. The documentation must be available in a user-friendly format that facilitates modification and adaptation. In addition, any changes must be clearly marked so that users can distinguish between the original and the revised version. These terms promote openness and accessibility, making the GNU FDL an important tool for developers and authors seeking to share knowledge and foster collaboration.

  • All authors of the work must be credited (including authors of modifications);
  • All modifications to the work must be recorded;
  • Derived works must be licensed under the FDL;
  • If the work contains invariant sections (defined by the author), along with any disclaimers of warranty and liability added by the author, those terms apply to all derivative works;
  • No technological means of copyright protection are allowed.

The GNU FDL has faced many criticisms. One of the main targets of criticism is the provision permitting the inclusion of invariant sections in licensed documents. Opponents believe that this conflicts with the fundamental principles of the GPL, calling into question the compatibility of the FDL with that license. Additionally, there is often dissatisfaction with the prohibition on the use of technical copyright protection measures for copies created for personal use.

Examples of projects using the GNU FDL include a variety of works in the fields of free software and open educational resources. This license allows users to freely copy, modify, and distribute content, promoting community development and knowledge sharing. Notable projects using the GNU FDL include Wikipedia, which provides access to extensive information, as well as various educational materials and reference books. Using the GNU FDL provides legal protection and support for authors who want to share their knowledge with a wide audience, while retaining the right to continue using and modifying that knowledge.

  • Wikipedia is the largest multilingual online encyclopedia;
  • PlanetMath is an English-language encyclopedia of mathematics;
  • Citizendium is a "more authoritative" version of Wikipedia, with articles reviewed by experts;
  • Free On-Line Dictionary of Computing is an encyclopedic dictionary of computer science developed in 1985.

To help you navigate the variety of licenses in the GNU family, we have created a summary table to help you understand the main differences and characteristics of each license. This table will be a useful tool for developers and users looking to choose the right license for their projects. You'll be able to easily navigate the terms of use, modification, and distribution of software, allowing you to make informed decisions.

Before moving on to the main topic, take a look at other interesting materials that may be useful to you. Read also:

  • Where Open Source won, what's wrong with it, and who needs it
  • Higher education in IT: why you shouldn't leave university
  • How .NET works and why you need it