diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
commit | fc7be18c76af2e700641f3598c4856baeef1428e (patch) | |
tree | 11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /build/internal | |
parent | ec0e7ed6da6fb317741fd8468602949a1362eca5 (diff) | |
parent | c92cb9d3a19331916f0c274d80e67f02a62caa9b (diff) | |
download | ydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz |
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'build/internal')
-rw-r--r-- | build/internal/platform/clang_toolchain_info/ya.make | 6 | ||||
-rw-r--r-- | build/internal/scripts/gen_sbom.py | 15 | ||||
-rw-r--r-- | build/internal/scripts/link_sbom.py | 4 |
3 files changed, 19 insertions, 6 deletions
diff --git a/build/internal/platform/clang_toolchain_info/ya.make b/build/internal/platform/clang_toolchain_info/ya.make new file mode 100644 index 0000000000..2ad46b1127 --- /dev/null +++ b/build/internal/platform/clang_toolchain_info/ya.make @@ -0,0 +1,6 @@ +RESOURCES_LIBRARY() + +TOOLCHAIN(clang) +VERSION(${CLANG_VER}) + +END() diff --git a/build/internal/scripts/gen_sbom.py b/build/internal/scripts/gen_sbom.py index 2aec699931..a44a32a627 100644 --- a/build/internal/scripts/gen_sbom.py +++ b/build/internal/scripts/gen_sbom.py @@ -15,20 +15,27 @@ def deduce_name(path): def main(): parser = argparse.ArgumentParser(description='Generate single SBOM component JSON object for current third-party library') parser.add_argument('-o', '--output', type=argparse.FileType('w', encoding='UTF-8'), help='resulting SBOM component file', required=True) + parser.add_argument('--type', choices=['library', 'toolchain'], required=True) parser.add_argument('--path', type=str, help='Path to module in arcadia', required=True) parser.add_argument('--ver', type=str, help='Version of the contrib module', required=True) - parser.add_argument('--lang', type=str, help='Language of the library', required=True) + parser.add_argument('--lang', type=str, help='Language of the library') + parser.add_argument('--toolchain-name', type=str, help='Public name of the toolchain') args = parser.parse_args() res = {} - res['type'] = 'library' - res['name'] = deduce_name(args.path) res['version'] = args.ver res["properties"] = [ {'name': 'arcadia_module_subdir', 'value': args.path}, - {'name': 'language', 'value': args.lang} ] + if args.type == 'library': + res['name'] = deduce_name(args.path) + res['type'] = 'library' + res["properties"].append({'name': 'language', 'value': args.lang}) + elif args.type == 'toolchain': + res['name'] = args.toolchain_name + res['type'] = 'application' + res["tags"] = ['toolchain'] json.dump(res, args.output) args.output.close() diff --git a/build/internal/scripts/link_sbom.py b/build/internal/scripts/link_sbom.py index 3f1dd71246..91769177d5 100644 --- a/build/internal/scripts/link_sbom.py +++ b/build/internal/scripts/link_sbom.py @@ -15,9 +15,9 @@ def main(): vcs = json.load(args.vcs_info) res = {} - res['$schema'] = "http://cyclonedx.org/schema/bom-1.5.schema.json" + res['$schema'] = "http://cyclonedx.org/schema/bom-1.6.schema.json" res["bomFormat"] = "CycloneDX" - res["specVersion"] = "1.5" + res["specVersion"] = "1.6" res["version"] = 1 res["components"] = [json.load(dep) for dep in args.components] res["properties"] = [ |