diff --git a/cuda_pathfinder/LICENSE b/cuda_pathfinder/LICENSE index 3b3fdce8194..f3fe76ecadf 100644 --- a/cuda_pathfinder/LICENSE +++ b/cuda_pathfinder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/toolshed/check_spdx.py b/toolshed/check_spdx.py index d4c9430673c..33276250e00 100644 --- a/toolshed/check_spdx.py +++ b/toolshed/check_spdx.py @@ -36,6 +36,19 @@ } SPDX_IGNORE_FILENAME = ".spdx-ignore" +REPOSITORY_LICENSE_CONTENTS = Path("LICENSE").read_bytes() + + +def license_files_match_repository(filepaths): + licenses_match = True + for filepath in filepaths: + license_path = Path(filepath) + if license_path.name != "LICENSE": + continue + if license_path.read_bytes() != REPOSITORY_LICENSE_CONTENTS: + print(f"PACKAGE LICENSE {filepath!r} does not match repository LICENSE") + licenses_match = False + return licenses_match def load_spdx_ignore(): @@ -203,9 +216,12 @@ def main(args): else: fix = False + returncode = 0 + if not license_files_match_repository(args): + returncode = 1 + ignore_spec = load_spdx_ignore() - returncode = 0 for filepath in args: if ignore_spec.match_file(filepath): continue