mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/introduce_spdx_licenseref' into 'master'
tools: allow to use LicenseRef-[idstring] in SPDX-License-Identifier Closes IDF-4486 See merge request espressif/esp-idf!22132
This commit is contained in:
commit
1dc3d5ef22
@ -1,6 +1,8 @@
|
||||
Copyright Header Guide
|
||||
======================
|
||||
|
||||
.. highlight:: c
|
||||
|
||||
ESP-IDF is released under :project_file:`the Apache License 2.0 <LICENSE>` with some additional third-party copyrighted code released under various licenses. For further information please refer to :doc:`the list of copyrights and licenses <../../../COPYRIGHT>`.
|
||||
|
||||
This page explains how the source code should be properly marked with a copyright header. ESP-IDF uses `The Software Package Data Exchange (SPDX) <https://spdx.dev>`_ format which is short and can be easily read by humans or processed by automated tools for copyright checks.
|
||||
@ -23,7 +25,7 @@ Common Examples of Copyright Headers
|
||||
The simplest case is when the code is not based on any licensed previous work, e.g. it was written completely from scratch. Such code can be decorated with the following copyright header and put under the license of ESP-IDF::
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -34,7 +36,7 @@ Less restrictive parts of ESP-IDF
|
||||
Some parts of ESP-IDF are deliberately under less restrictive licenses in order to ease their re-use in commercial closed source projects. This is the case for :project:`ESP-IDF examples <examples>` which are in Public domain or under the Creative Commons Zero Universal (CC0) license. The following header can be used in such source files::
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@ -53,12 +55,33 @@ The following example is a suitable header for a code licensed under the "GNU Ge
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*
|
||||
* SPDX-FileContributor: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
|
||||
The licenses can be identified and the short SPDX identifiers can be found in the official `SPDX license list <https://spdx.org/licenses>`_. Other very common licenses are the GPL-2.0-only, the BSD-3-Clause, and the BSD-2-Clause.
|
||||
The licenses can be identified and the short SPDX identifiers can be found in the official `SPDX license list`_. Other very common licenses are the GPL-2.0-only, the BSD-3-Clause, and the BSD-2-Clause.
|
||||
|
||||
In exceptional case, when a license is not present on the `SPDX license list`_, it can be expressed by using the `LicenseRef-[idString]`_ custom license identifier, for example ``LicenseRef-Special-License``. The full license text must be added into the ``LICENSES`` directory under ``Special-License`` filename. ::
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Special-License
|
||||
*/
|
||||
|
||||
Dedicated ``LicenseRef-Included`` custom license identifier can be used to express a situation when the custom license is included directly in the source file. ::
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* <Full custom license text>
|
||||
*/
|
||||
|
||||
The configuration stored in ``tools/ci/check_copyright_config.yaml`` offers features useful for third party licenses:
|
||||
|
||||
* A different license can be defined for the files part of a third party library.
|
||||
* The check for a selected set of files can be permanently disabled. Please use this option with care and only in cases when none of the other options are suitable.
|
||||
|
||||
.. _SPDX license list: https://spdx.org/licenses
|
||||
.. _LicenseRef-[idString]: https://spdx.github.io/spdx-spec/v2.3/other-licensing-information-detected/#101-license-identifier-field
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: LicenseRef-Included
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -167,6 +167,13 @@ protocol_examples_common_component:
|
||||
- CC0-1.0
|
||||
license_for_new_files: Unlicense OR CC0-1.0
|
||||
|
||||
zigbee:
|
||||
include:
|
||||
- 'examples/zigbee/'
|
||||
allowed_licenses:
|
||||
- Apache-2.0
|
||||
- LicenseRef-Included
|
||||
|
||||
# files matching this section do not perform the check
|
||||
# file patterns starting with ! are negated, meaning files matching them won't match the section.
|
||||
ignore:
|
||||
@ -182,7 +189,6 @@ ignore:
|
||||
- components/bt/host/bluedroid/
|
||||
- '!components/bt/host/bluedroid/api/'
|
||||
- '!components/bt/host/bluedroid/btc/'
|
||||
- examples/zigbee/
|
||||
- components/esp_local_ctrl/proto-c/
|
||||
- components/esp_local_ctrl/python/
|
||||
- components/protocomm/proto-c/
|
||||
|
Loading…
Reference in New Issue
Block a user