Skip to content

Commit 039d7ba

Browse files
prince-chrismcAndreyMlashkin
authored andcommitted
(conan-io#11720) docs: What to do when there is a custom license
* docs: what to do when there is a custom license this came up in conan-io#11121 and I am trying to capture the information * link hook rules to FAQ * also put it in the faq * relative link same as conan-io#10639 * Update reviewing.md
1 parent 0427160 commit 039d7ba

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

docs/error_knowledge_base.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ The duality creates a heterogeneous way of solving dependencies, making it diffi
360360

361361
#### **<a name="KB-H056">#KB-H056</a>: "LICENSE PUBLIC DOMAIN"**
362362

363-
[Public Domain](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) is not a license by itself, but consists of all the creative work to which no exclusive intellectual property rights apply.
364-
If a project is under Public Domain and there is no license listed, the [Unlicense](https://spdx.org/licenses/Unlicense) should be used.
363+
[Public Domain](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) is not a license by itself, but consists of all the creative work to which
364+
no exclusive intellectual property rights apply. If a project is under Public Domain and there is no license listed, the
365+
[Unlicense](https://spdx.org/licenses/Unlicense) should be used as described in the [FAQ](faqs.md#what-license-should-i-use-for-public-domain).
365366

366367
#### **<a name="KB-H057">#KB-H057</a>: "TOOLS RENAME"**
367368

docs/faqs.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ No. Some projects provide more than a simple library, but also applications. For
172172

173173
[The Public Domain](https://fairuse.stanford.edu/overview/public-domain/welcome/) is not a license by itselt. Thus, we have [equivalent licenses](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) to be used instead. By default, if a project uses Public Domain and there is no offcial license listed, you should use [Unlicense](https://spdx.org/licenses/Unlicense).
174174

175+
## What license should I use for a custom project specific license?
176+
177+
When a non standard open-source license is used, we have decided to use `LicenseRef-` as a prefix, followed by the name of the file which contains a custom license.
178+
See [the reviewing guidlines](reviewing.md#license-attribute) for more details.
179+
175180
## Why is a `tools.check_min_cppstd` call not enough?
176181

177182
Very often C++ projects require a minimum standard version, such as 14 or 17, in order to compile. Conan offers tools which enable checking the relevant setting is enabled and above this support for a certain version is present. Otherwise, it uses the compiler's default.

docs/reviewing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ the order above resembles the execution order of methods on CI. therefore, for i
8181

8282
The mandatory license attribute of each recipe **should** be a [SPDX license](https://spdx.org/licenses/) [short Identifiers](https://spdx.dev/ids/) when applicable.
8383

84+
Outside cases of the SPDX guidelines should do the following:
85+
86+
- When no license is provided or when it's given to the "public domain", the value should be set to [Unlicense](https://spdx.org/licenses/Unlicense) as per [KB-H056](error_knowledge_base.md#kb-h056-license-public-domain) and [FAQ](faqs.md#what-license-should-i-use-for-public-domain).
87+
- When a custom (e.g. project specific) license is given, the value should be set to `LicenseRef-` as a prefix, followed by the name of the file which contains a custom license. See [this example](https://github.com/conan-io/conan-center-index/blob/e604534bbe0ef56bdb1f8513b83404eff02aebc8/recipes/fft/all/conanfile.py#L8). For more details, [read this conversation](https://github.com/conan-io/conan-center-index/pull/4928/files#r596216206)
88+
8489
## Applying Patches
8590

8691
Patches can be applied in a different protected method, the pattern name is `_patch_sources`. When applying patch files, `tools.patch` is the best option.

0 commit comments

Comments
 (0)