diff --git a/documentation/content/en/articles/license-guide/_index.adoc b/documentation/content/en/articles/license-guide/_index.adoc new file mode 100644 --- /dev/null +++ b/documentation/content/en/articles/license-guide/_index.adoc @@ -0,0 +1,298 @@ +--- +title: FreeBSD Licensing Policy +authors: + - author: Warner Losh + email: imp@FreeBSD.org +trademarks: ["freebsd", "general"] +--- + += FreeBSD License Policies +:doctype: article +:toc: macro +:toclevels: 1 +:icons: font +:sectnums: +:sectnumlevels: 6 +:source-highlighter: rouge +:experimental: + +''' + +toc::[] + +[[intro]] + +WARNING: This is a draft document for feedback. It has not yet been ratified. + +[[pref-license]] +== Preferred License for New Files + +The FreeBSD Project's full license policy can be found at link:https://www.FreeBSD.org/internal/software-license/[https://www.FreeBSD.org/internal/software-license]. +The rest of this section is intended to help you get started. +As a rule, when in doubt, ask. +It is much easier to give advice than to fix the source tree. + +The FreeBSD Project suggests and uses this text as the preferred license scheme: + +[.programlisting] +.... +/*- + * Copyright (c) [year] [your name] + * + * SPDX-License-Identifier: BSD-2-Clause + * + * [id for your version control system, if any] + */ +.... + +The FreeBSD project strongly discourages the so-called "advertising clause" in new code. +Due to the large number of contributors to the FreeBSD project, complying with this clause for many commercial vendors has become difficult. +If you have code in the tree with the advertising clause, please consider removing it. +In fact, please consider using the above license for your code. + +The FreeBSD project discourages completely new licenses and variations on the standard licenses. +New licenses require the approval of the {core-email} to reside in the main repository. +The more different licenses that are used in the tree, the more problems that this causes to those wishing to utilize this code, typically from unintended consequences from a poorly worded license. + +Project policy dictates that code under some non-BSD licenses must be placed only in specific sections of the repository, and in some cases, compilation must be conditional or even disabled by default. +For example, the GENERIC kernel must be compiled under only licenses identical to or substantially similar to the BSD license. +GPL, APSL, CDDL, etc, licensed software must not be compiled into GENERIC. + +Developers are reminded that in open source, getting "open" right is just as important as getting "source" right, as improper handling of intellectual property has serious consequences. +Any questions or concerns should immediately be brought to the attention of the core team. + +== Software License Policy + +NOTE: This secton was copied verbatim from the internal license polcy page from the web site. +Reviewers please pay attention to differences from the above. + +=== Philosophy + +The FreeBSD Project aims to produce a complete, BSD-licensed operating system allowing consumers of the system to produce derivative products without constraint or further license obligations. +We invite and greatly appreciate the contribution of both changes and additions under the two-clause BSD license, and encourage the adoption of this license by other open source projects. +Use of the BSD license is key to encouraging the adoption of advanced operating system technology, and on many notable occasions has been pivotal to widespread use of new technology. + +We accept however that compelling reasons exist to allow differently-licensed software to be included in the FreeBSD source tree. + +We require any software under alternative licenses to be carefully isolated in the source tree so that it cannot contaminate BSD-only components. +Such cautious management encourages licensing clarity and facilitates the production of BSD-only derivative products. + +Unless a special exception is made, no existing BSD-licensed components may be replaced with differently-licensed software. +We instead encourage FreeBSD and third party developers to seek the relicensing or reimplementation of critical components under the BSD license. +Such would ease their more integral adoption into the FreeBSD operating system. + +=== Policy + +* The import of new software licensed under any licenses other than the BSD license and BSD-Like Licenses (as defined below) requires the prior approval of the FreeBSD Core Team. +Requests for import must include: +** A list of features or bug fixes that the new version or patches contain, along with evidence that our users need those features. +PRs or references to mailing list discussions are ideal forms of evidence. +** This process should be used for all software imports, not just those that require Core Team review. +The mere existence of a new version does not justify an import of software to source or ports. +** A list of FreeBSD branches that may be affected. +Expansions of scope require a new request to and approval from the FreeBSD Core Team. + +* The Apache License 2.0 is acceptable for use in some cases. +The Core Team must approve the import of new Apache License licensed components or the change of license of existing components to the Apache License. +** This license is approved for the following components: +*** LLVM toolchain and (with LLVM Exceptions) runtime components. +*** Subversion and its dependencies + +* The BSD+Patent License is acceptable for use in some cases. +The Core Team must approve the import of new BSD+Patent License licensed components or the change of license of existing components to the BSD+Patent License. +** This license is approved for the following components: +*** EDK2 derived code related to UEFI functionality + +* The Common Development and Distribution License (CDDL) is acceptable for use in some cases. +The Core Team must approve the import of new CDDL licensed components or the change of license of existing components to the CDDL. +** This license is approved for the following components: +*** DTrace +*** ZFS filesystem including kernel support and userland utilities + +* Historically, the phrase 'All Rights Reserved.' was included in all copyright notices. +The BSD releases had it to comply with the Buenos Aires Convention of 1910 in the Americas. +With the ratification of the Berne Convention in 2000, it became obsolete. +As such, the FreeBSD project recommends that new code omit the phrase and encourages existing copyright holders to remove it. +In 2018, the project updated its templates to remove it. + +==== Acceptable licenses + +The following licenses are considered to be acceptable BSD-Like Licenses for the purpose of this Policy. +Deviations or the use of any other license must be approved by the FreeBSD Core Team: + +* The 2 clause version of the BSD license + +[.programlisting] +.... +/*- + * Copyright (c) [year] [your name] + * + * SPDX-License-Identifier: BSD-2-Clause + * + * [id for your version control system, if any] + */ +.... +* The 3 clause version of the BSD license + +.... +/*- + * Copyright (c) [year] [your name] + * + * SPDX-License-Identifier: BSD-3-Clause + * + * [id for your version control system, if any] + */ +.... +* The ISC License + +.... +/*- + * Copyright (c) [year] [copyright holder] + * + * SPDX-License-Identifier: ISC + * + * [id for your version control system, if any] + */ +.... +* The MIT License + +.... +/*- + * Copyright (c) [year] [copyright holders] + * + * SPDX-License-Identifier: MIT + * + * [id for your version control system, if any] + */ +.... +== Software Collection License + +The FreeBSD Project licenses its compilation of software as described in [.filename]#/COPYRIGHT# under the BSD-2-Clause license. +This license does not supersede the license of individual files, which is described below. +Files that do not have an explicit license are licensed under the BSD-2-Clause license. + +[[individual-files]] +== Individual Files License + +The individual files in the FreeBSD software collection have their own copyright and license. + +A copyright notice identifies who claims the legal copyright to a file. +These are provided on a best effort basis by the project. +Due to legal transfers of copyright notices the project has not been informed of, the current copyright holder may vary. + +A license is a legal contract between the contributor and the users of the software granting permission to use the copyrighted portions of the software, subject to certain terms and conditions set forth in the license. +Licenses can be expresssed in one of two ways in the FreeBSD software collection. +Linceses can be explicit in a file. +When a license grant is explicit in the file, that file may be used, copied and modified in accordance with that license. +Licenses can also be expressed indirectly, where the text of the license is elsewhere. +The project uses the Software Package Data Exchange (SPDX) license identifiers for this purpose, as described in the following subections. +SPDX license identifiers are managed by the SPDX Workgroup at the Linux Foudnation and have been agreed on by partners throughout the industry, tool vendors and legal teams. +For further information see https://spdx.org/ and the following sections for how the FreeBSD Project uses them. + +Entities that contrinubute fixes and enhancments to the software collection without an explicit license agree to license those changes under the terms of the licenses that apply to the file(s) modified. +Project policy, in line with industry practice, only includes a copyright notice from signficant contributors to the files in the collection. + +There are four types of files in the FreeBSD software collection +. Files that have only an explicit copyright and license. +. Files that have both an explicit copyright and license, and a SPDX. +. Files that have only a copyirght and only an SPDX tag, but no explicit license +. Files that lack any copyright or license at all + +=== Only Copyright and License + +Files in the FreeBSD software collection that have a copyright notice and explicit license inline are licensed subject to that license. + +=== Copyright and License with SPDX-License-Identifier expression + +Files in the FreeBSD software collection that have a copyright notice and both a SPDX-License-Identifier tag and an explicit license inline are licensed subject to the excplicit license. +The SPDX tag is the project's best effort attempts to characterize the license, but is only informative for automated tools. +See <> for how to interpret the expression. + +=== Only Copyright and SPDX-License-Identifier expression. + +Some files in the tree contain detached licenses. +These are indicated when the file contains only a copyright noitce and a SPDX-License-Identifier tag. +When an explicit license is present, that license applies. +See <> for how to interpret the expression. + +To constuct the detached license from the file: + +. Start the lcense with the copyright notice from the file. +Include all the copyright holders. +. For each sub-expression, copy the license text from [.filename]#/usr/share/license/text/`id`.txt#. +When exceptions are present, append them from [.filename]#src/share/license/exceptions/`id`.txt#. +When multiple licenses are separated by `OR` the user has a choice which one to use. +When a contributor specifies multiple clauses separate by `OR` they understand it is the user of this file's choice which license will be used. + +Where `id` is the SPDX short license identifier from the `Identifier` column of https://spdx.org/licenses/[SPDX Identifiers] or https://spdx.org/licenses/exceptions-index.html[license exception]. +If there is no file in [.filename]#/usr/share/license/#, then that license or exception cannot be specified as a detached license under this section. + +No SPDX-License-Identifier expression may contain an AND clause when expressing a detached license. +Contributors wishing to license files like this are strongly discouraged from doing so. +When it is not possible to license in a way that avoids this, an explicit license must be used instead. + +When reading the that is detached from a file, a number of phrases need to be construed to make the detached license make sense. + +. Any reference to a copyright notice shall refer to the copyright notice constructed from the licensed file, not from any copyright notice in the license text file itself. +. When names of entities are referred to in the license text, they shall be construed to apply to the list of all copyright holders listed in the copyright notices of the licensed file. +. When the SPDX offers variations of the license, it is understood the license in the [.filename]#/usr/share/license/# file represents the exact version of the license selected. + +For licenses that have slight variations in text, the SPDX has guidelines to match them. +These guidelines are not relevant here. +Contributors wishing to license under a variant of a SPDX license not contained verbatim in [.filename]#/usr/share/license/# cannot use the detached option and must specify the license explicitly. + +=== Files without Copyright or any License Marking + +Files created by the project that lack a copyright notice are understood to fall under the blanket copyright and licensing in [.filename]#/COPYRIGHT#. +Either the file is a mere recitation of facts, not protectable by Copyright Law, or the content is so trivial as to not warrant the overhead of an explicit license. + +Files that lack marking and have more than a trivial amount of copyrightable material, or whose author believes them to be improperly marked should be brought to the attention of the FreeBSD core team. +It is the strong policy of the FreeBSD Project to comply with all appropriate licenses. + +[[expressions]] +=== SPDX-License-Identifier Expressions + +A `SPDX License sub-expression` is either an SPDX short form license identifier from th https://spdx.org/licenses/[SPDX License List], or the combination of two SPDX short form license identifiers separated by "WITH" when a https://spdx.org/licenses/exceptions-index.html[license exception] applies. +When multiple licenses apply, an expression consists of keywords "AND", "OR" separating sub-expressions and surrounded by "(", ")" . +The https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/[full specification of expressions] spells out all the details and takes precidence when it conflicts with the simplified treament of this section. + +Some license identifiers, like [L]GPL, have the option to use only that version, or any later version. +SPDX defines the suffix `-or-later` to mean that version of the license or a later version. +It defines `-only` to mean only that specific version of the file. +There is an old convention to have no suffix (which means what the new '-only' suffix means, but which people confuse for `-or-later`). +In addition, affixing a `+` suffix was meant to mean `-or-later`. +New files in FreeBSD should not use these two conventions. +Old files that use this convention should be converted as appropriate. + +[.programlisting] +.... + // SPDX-License-Identifier: GPL-2.0-only + // SPDX-License-Identifier: LGPL-2.1-or-later +.... + +`WITH` should be used when there is a modifier to a license needed. +In the FreeBSD project, a number of files from LLVM have an exception to the Apache 2.0 license: + +[.programlisting] +.... + // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +.... + +https://spdx.org/licenses/exceptions-index.html[Exception tags] are managed by SPDX. +License exceptions can only be applied to certain license, as sepcified in the exception. + +`OR` should be used if the file has a choice of license and one license is selected. +For example, some dtsi files are available under dual licenses: + +[.programlisting] +.... + // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +.... + +`AND` should be used if the file has multiple licenses whose terms all apply to use the file. +For example, if code has been incorporated by a series of project, each with their own license: + +[.programlisting] +.... + // SPDX-License-Identifier: BSD-2-Clause AND MIT +....