Make module ready for source SBOM checking

This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding rules to the licenseRule.json files
- correcting the licensing given via REUSE.toml files
or in file.

A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why corrections are needed before turning the
source SBOM check on.

Task-number: QTBUG-131434
Change-Id: I3522847b08a8904d4bddd4041fba2d050fb077c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2a086b0d2e2a9a8f04df10987bb9d6b72b698f60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c0f869fd9321b85f8768ef9e0e30d6f015416a06)
This commit is contained in:
Lucie Gérard
2025-02-20 21:06:47 +00:00
committed by Qt Cherry-pick Bot
parent 46cc123c55
commit 33450b5d78
4 changed files with 49 additions and 9 deletions
+19 -6
View File
@@ -18,15 +18,29 @@ SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0"
[[annotations]]
path = ["src/compositor/shaders/**.qsb", "src/compositor/shaders/compile"]
path = ["src/compositor/shaders/**.qsb", "src/compositor/shaders/compile", "src/plugins/**.json"]
precedence = "closest"
comment = "module and plugins"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GPL-3.0-only"
[[annotations]]
path = ["**.pro", "**.qrc", "**CMakeLists.txt", ".cmake.conf", "**.yaml", "**.json",
"**.cfg", "**.pri", "**/qt_cmdline.cmake", "**.prf"]
path = ["src/plugins/**.json"]
precedence = "closest"
comment = "module and plugins"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only"
[[annotations]]
path = ["src/plugins/hardwareintegration/compositor/**.json"]
precedence = "closest"
comment = "module and plugins"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GPL-3.0-only"
[[annotations]]
path = ["**.pro", "**.qrc", "**CMakeLists.txt", ".cmake.conf", "**.yaml",
"**.cfg", "**.pri", "**/qt_cmdline.cmake", "**.prf", "coin/**.json"]
precedence = "closest"
comment = "build system"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
@@ -40,14 +54,14 @@ SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "BSD-3-Clause"
[[annotations]]
path = ["doc/src/images/**", "examples/**"]
path = ["examples/**"]
comment = "this must be after the build system table because example and snippets take precedence over build system"
precedence = "closest"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause"
[[annotations]]
path = ["**/README*", "**.qdocconf", "**.patch"]
path = ["**/doc/images/**", "**/README*", "**.qdocconf", "**.patch"]
comment = "documentation"
precedence = "closest"
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
@@ -73,4 +87,3 @@ precedence = "override"
comment = "License file."
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
+4
View File
@@ -6,6 +6,10 @@ accept_configuration:
instructions:
Build:
# to be turned on when the module source SBOM pass the license check
- type: EnvironmentVariable
variableName: VERIFY_SOURCE_SBOM
variableValue: "ON"
- !include "{{qt/qtbase}}/coin_module_build_template_v2.yaml"
Test:
@@ -3,7 +3,7 @@
<!-- a dummy extension to test for wayland-scanner tool -->
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
SPDX-License-Identifier: BSD-3-Clause
</copyright>
<interface name="wl_scanner_test" version="1">
+25 -2
View File
@@ -10,7 +10,9 @@
"Files with other endings can also be build system files"
],
"file_pattern_ending" : ["CMakeLists.txt", ".cmake", ".pro", ".pri", ".prf",
"configure", "configure.bat", "cmake.in", "plist.in", "CMakeLists.txt.in"],
"configure", "configure.bat", "cmake.in", "plist.in", "CMakeLists.txt.in",
".cmake.conf", ".gitattributes", ".gitignore", ".tag", "ci_config_linux.json",
".yaml", "BLACKLIST", ".cfg", "coin/qt-installer-package-config.json", ".qrc"],
"location" : {
"" : {
"comment" : "Default",
@@ -44,7 +46,8 @@
},
{
"comment" : "Files with the following endings are Documentation licensed.",
"file_pattern_ending" : [".qdoc", ".qdocinc" , ".qdocconf", ".txt", "README", "qt_attribution.json"],
"file_pattern_ending" : [".qdoc", ".qdocinc" , ".qdocconf", "README", "qt_attribution.json",
"REUSE.toml", "licenseRule.json", "README.md"],
"location" :{
"" : {
"comment" : "",
@@ -64,6 +67,11 @@
"file type" : "module and plugin",
"spdx" : ["LicenseRef-Qt-Commercial OR GPL-3.0-only"]
},
"dist/" : {
"comment" : "Default",
"file type" : "documentation",
"spdx" : ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"]
},
"src/" : {
"comment" : "Default",
"file type" : "module and plugin",
@@ -114,10 +122,25 @@
"file type" : "examples and snippets",
"spdx" : ["LicenseRef-Qt-Commercial OR BSD-3-Clause"]
},
"(.*|examples).*doc/images/" : {
"comment" : "Default",
"file type" : "documentation",
"spdx" : ["LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only"]
},
"config\\.tests/" : {
"comment" : "Default",
"file type" : "build system",
"spdx" : ["BSD-3-Clause"]
},
"src/extensions/.*.xml" : {
"comment" : "protocol extensions",
"file type" : "examples and snippets",
"spdx" : ["LicenseRef-Qt-Commercial OR BSD-3-Clause"]
},
"src/extensions/qt-text-input-method-unstable-v1.xml" : {
"comment" : "",
"file type" : "3rd party",
"spdx" : ["MIT"]
}
}
}