This agreement proposal follows the discussion on licensing Forgejo under copyleft. It is a first step and does not include the choice of the license which is left for later.
It is an agreement on principle that copyleft contributions are welcome going forward.
The rationale for such an agreement has been developed in a a draft blog post and is copied here for the record.
Developers who choose to publish their work under a copyleft license are excluded from participating in software that is published under a permissive license. That is at the opposite of the core values of the Forgejo project.
Forgejo users already welcome copyleft
Forgejo is a software forge, an online development environment, based on Git. Both Forgejo and Git must be installed together, either as individual binaries or bundled into the official container images. The license of Git is GNU GPLv2 which is a copyleft license. Although the Forgejo codebase includes basic support for gogit, a Go package distributed under a permissive license that can be used in place of Git, it is not supported or packaged because it is not fully compatible and could corrupt git repositories.
There are legal obligations attached to copyleft software which are, in a nutshell, to offer the source code with the binary under the same license. For instance, if an employee was to distribute a Git binary to someone else, the organization can be required to also provide the "complete and corresponding source code". And if they fail to do so, they may loose all their rights under the license, at least until the copyright holders agree to grant them back. For this reason some organizations exclude copyelfted software entirely. However, when they use Git, it means the legal counsel has no objection to copylefted software.
What will change in Forgejo?
The license of Forgejo will change to be copyelft when a copylefted work is merged. The most likely candidate is the adapter for the F3 file format which is a rather isolated package within the codebase.
Before it happens a decision will be made by the community to choose a copyleft license, in accordance to the Forgejo decision making process. The chosen license will apply to Forgejo as a whole (binary and sources) but each file within the codebase will retain its own license. This is nothing new as Forgejo already includes various licenses and contributors are expected to agree to the Developer Certificate of Origin.
Developers who feel strongly about exclusively publishing their work under a permissive license can keep doing so when working on Forgejo in the Git repository. By the terms of this permissive license, they accept that their work can be sublicensed and redistributed under a proprietary license. And they also accept that it can be sublicensed and redistributed as part of Forgejo, under a copyleft license.
The choice of a copyleft license is a delicate balance and it is expected that different opinions will be voiced within the Forgejo community. There already were debates comparing the merits of the AGPL which was designed for online services and the GPL which was designed before the internet age. The least controversial choice would be to choose the same license as Git since there already is a de facto consensus because all developers and users agree on it.
This agreement proposal follows the [discussion](https://codeberg.org/forgejo/discussions/issues/6#issuecomment-858607) on licensing Forgejo under copyleft. It is a first step and does not include the choice of the license which is left for later.
It is **an agreement on principle that copyleft contributions are welcome going forward**.
The rationale for such an agreement has been developed in a [a draft blog post](https://codeberg.org/forgejo/website/pulls/204/files) and is copied here for the record.
---
Developers who choose to publish their work under a copyleft license are excluded from participating in software that is published under a permissive license. That is at the opposite of the [core values](https://codeberg.org/forgejo/governance/src/branch/main/MISSION.md#values) of the Forgejo project.
## Forgejo users already welcome copyleft
Forgejo is a [software forge](<https://en.wikipedia.org/wiki/Forge_(software)>), an online development environment, based on [Git](https://en.wikipedia.org/wiki/Git). **Both Forgejo and Git must be installed together**, either as individual binaries or bundled into the [official container images](https://codeberg.org/forgejo/-/packages/container/forgejo/1.19-rootless). The license of Git is [GNU GPLv2](https://git-scm.com/about/free-and-open-source) which is a [copyleft license](https://www.gnu.org/licenses/copyleft.html). Although the Forgejo codebase includes basic support for [gogit](https://github.com/go-git/go-git), a Go package distributed under a permissive license that can be used in place of Git, it is not supported or packaged because it is [not fully compatible](https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md) and could corrupt git repositories.
There are legal obligations attached to copyleft software which are, in a nutshell, to offer the source code with the binary under the same license. For instance, if an employee was to distribute a Git binary to someone else, the organization can be required to also provide the "complete and corresponding source code". And if they fail to do so, they may loose all their rights under the license, at least until the copyright holders agree to grant them back. For this reason some organizations exclude copyelfted software entirely. However, **when they use Git, it means the legal counsel has no objection to copylefted software.**
## What will change in Forgejo?
The license of Forgejo will change to be copyelft when a copylefted work is merged. The most likely candidate is [the adapter](https://codeberg.org/forgejo/forgejo/commits/branch/forgejo-f3) for the [F3 file format](https://lab.forgefriends.org/friendlyforgeformat/gof3) which is a rather isolated package within the codebase.
Before it happens a decision will be made by the community to choose a copyleft license, in accordance to the [Forgejo decision making process](https://codeberg.org/forgejo/governance/src/branch/main/DECISION-MAKING.md). The chosen license will apply to Forgejo as a whole (binary and sources) but each file within the codebase will retain its own license. This is nothing new as Forgejo [already includes various licenses](https://code.forgejo.org/assets/js/licenses.txt) and contributors are expected to agree to the [Developer Certificate of Origin](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING/DCO.md).
Developers who feel strongly about exclusively publishing their work under a permissive license can keep doing so when working on Forgejo in the Git repository. By the terms of this permissive license, they accept that their work can be sublicensed and redistributed under a proprietary license. And they also accept that it can be sublicensed and redistributed as part of Forgejo, under a copyleft license.
The choice of a copyleft license is a delicate balance and it is expected that different opinions will be voiced within the Forgejo community. There already were debates comparing the merits of the [AGPL](https://en.wikipedia.org/wiki/GNU_Affero_General_Public_License) which was designed for online services and the [GPL](https://en.wikipedia.org/wiki/GNU_General_Public_License) which was designed before the internet age. The least controversial choice would be to choose the same license as Git since there already is a de facto consensus because all developers and users agree on it.