From b8fdff200854e5bbc6327918a2b482bd521c6122 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Fri, 27 Jan 2023 08:24:27 +0100 Subject: [PATCH] examples/zigbee: use LicenseRef-Included as SPDX-License-Identifier Examples for zigbee are using custom license, which is not present on the SPDX license list. This was discussed on !16205 and a decision was made that the examples will be put on check-copyright's ignore list. SPDX has LicenseRef-[idstring] identifier for such cases, so let's try to use it. In this particular case the LicenseRef-Included is used to express that the full license text is included in the source file. Note that the LicenseRef-Included is not part of SPDX. It's just something I used. No change is needed on the check-copyright side. Signed-off-by: Frantisek Hrbata --- .../zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.c | 4 ++-- .../zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.h | 4 ++-- examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.c | 4 ++-- examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.h | 4 ++-- .../light_sample/HA_on_off_light/main/esp_zb_light.c | 4 ++-- .../light_sample/HA_on_off_light/main/esp_zb_light.h | 4 ++-- .../light_sample/HA_on_off_light/main/light_driver.c | 4 ++-- .../light_sample/HA_on_off_light/main/light_driver.h | 4 ++-- .../light_sample/HA_on_off_switch/main/esp_zb_switch.c | 4 ++-- .../light_sample/HA_on_off_switch/main/esp_zb_switch.h | 4 ++-- .../light_sample/HA_on_off_switch/main/switch_driver.c | 4 ++-- .../light_sample/HA_on_off_switch/main/switch_driver.h | 4 ++-- tools/ci/check_copyright_config.yaml | 8 +++++++- 13 files changed, 31 insertions(+), 25 deletions(-) diff --git a/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.c b/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.c index b1c7d4a318..a1b8bbe077 100644 --- a/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.c +++ b/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.c @@ -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: diff --git a/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.h b/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.h index 06268f7620..4c22871a38 100644 --- a/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.h +++ b/examples/zigbee/esp_zigbee_gateway/main/esp_zigbee_gateway.h @@ -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: diff --git a/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.c b/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.c index fe96d9cee4..966baf32df 100644 --- a/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.c +++ b/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.c @@ -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: diff --git a/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.h b/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.h index c59bd98d81..50f708a541 100644 --- a/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.h +++ b/examples/zigbee/esp_zigbee_rcp/main/esp_zigbee_rcp.h @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.c b/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.c index d4e2a2501e..0c38d7d870 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.c +++ b/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.c @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.h b/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.h index 82c3b2bc77..e555e2ed11 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.h +++ b/examples/zigbee/light_sample/HA_on_off_light/main/esp_zb_light.h @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.c b/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.c index 2febb11093..72ff6b9e37 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.c +++ b/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.c @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.h b/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.h index 8fb07dd0d0..b9f734fdde 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.h +++ b/examples/zigbee/light_sample/HA_on_off_light/main/light_driver.h @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c index 7ec811bfd4..119b7f05fe 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.c @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.h b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.h index 98f86bf740..eeca2125b7 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.h +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/esp_zb_switch.h @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.c b/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.c index 7b2435b005..2acf388944 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.c +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.c @@ -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: diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.h b/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.h index 67d431a9bc..10d332cd6e 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.h +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/switch_driver.h @@ -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: diff --git a/tools/ci/check_copyright_config.yaml b/tools/ci/check_copyright_config.yaml index 1a3957c825..6c51f273c3 100644 --- a/tools/ci/check_copyright_config.yaml +++ b/tools/ci/check_copyright_config.yaml @@ -166,6 +166,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: @@ -181,7 +188,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/