Skip to content

Commit

Permalink
(#11720) docs: What to do when there is a custom license
Browse files Browse the repository at this point in the history
* docs: what to do when there is a custom license

this came up in #11121 and I am trying to capture the information

* link hook rules to FAQ

* also put it in the faq

* relative link same as #10639

* Update reviewing.md
  • Loading branch information
prince-chrismc authored Jul 18, 2022
1 parent 558ebe3 commit dada12f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/error_knowledge_base.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ The duality creates a heterogeneous way of solving dependencies, making it diffi

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

[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.
If a project is under Public Domain and there is no license listed, the [Unlicense](https://spdx.org/licenses/Unlicense) should be used.
[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. If a project is under Public Domain and there is no license listed, the
[Unlicense](https://spdx.org/licenses/Unlicense) should be used as described in the [FAQ](faqs.md#what-license-should-i-use-for-public-domain).

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

Expand Down
5 changes: 5 additions & 0 deletions docs/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ No. Some projects provide more than a simple library, but also applications. For

[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).

## What license should I use for a custom project specific license?

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.
See [the reviewing guidlines](reviewing.md#license-attribute) for more details.

## Why is a `tools.check_min_cppstd` call not enough?

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.
Expand Down
5 changes: 5 additions & 0 deletions docs/reviewing.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ the order above resembles the execution order of methods on CI. therefore, for i

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

Outside cases of the SPDX guidelines should do the following:

- 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).
- 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)

## Applying Patches

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.
Expand Down

0 comments on commit dada12f

Please sign in to comment.