diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-05-02 10:36:53 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-05-02 19:34:56 +0000 |
commit | 70d110e071f64b72895af2d02160ff01cb8fe66b (patch) | |
tree | 2b8a6cb83e48b68fb4fde9da2b10c0aff798fdd6 /tests/prebuild | |
parent | 4338f48072cad29d5207895a5cc0696529ed93a9 (diff) |
tst_license.pl: Exclude 3rdparty directories for CI too
tst_license.pl has two ways of compiling file lists:
- git ls-files for git repos
- find otherwise
The CI works on source archives, not git repos.
Commit 58abc488767a0a0d7e79a67a393ab89ada635b00 tried to exclude all
3rdparty files but did so only for the git repo case.
tst_license.pl already checked for 3rdparty files and classified them as
"optional". Those files are checked for valid licenses if they contain
something that looks like a license. This is now problematic for
porting to SPDX, because there are 3rdparty files with an SPDX license
identifier but without a copyright tag. This combination is illegal in
terms of the REUSE specification, and we must exclude those files.
Now, we classify 3rdparty files as "excluded" instead of "optional",
regardless of working on a git repo or source archive.
Change-Id: Ie6f4f3e2ede39de2f3872ae588fe960323d15122
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e4edaa1aaa3e3dbb5e17bd4e049dd3bb94ddb5f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/prebuild')
-rwxr-xr-x | tests/prebuild/license/tst_licenses.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/prebuild/license/tst_licenses.pl b/tests/prebuild/license/tst_licenses.pl index 0ba59552..8eba6f71 100755 --- a/tests/prebuild/license/tst_licenses.pl +++ b/tests/prebuild/license/tst_licenses.pl @@ -100,6 +100,9 @@ my %excludedFiles = ( "all" => [ # Do not scan the header templates themselves qr{^header\.[\w-]*$}, + # Third-party license headers are handled upstream + qr{/3rdparty/}, + qr{^3rdparty/}, ], "qtwayland" => [ # XML files for protocol (the license checker fails to @@ -142,9 +145,6 @@ my %optionalFiles = ( qr{^tests/}, # change logs qr{^dist/}, - # Third-party files are not expected to have a Qt license - qr{/3rdparty/}, - qr{^3rdparty/}, # Don't look at git's metadata qr{^\.git/}, # These are qt5 third-party files. @@ -797,7 +797,7 @@ sub run return; } - my @allFiles = grep(!/\/3rdparty\//,`git ls-files`); + my @allFiles = `git ls-files`; if ($? != 0) { fail("There was a problem running 'git ls-files' on the repository"); |