Skip to content

Commit

Permalink
Update manifest to include tpip category (#79)
Browse files Browse the repository at this point in the history
* fri: Update manifest to include tpip category

TPIP categories:

Category-2: Non-redistributed: Build time - where we do not
redistribute 3rd party software in source but we rely on fetching and
building that source.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>

* ci: Improve `check_listed_dependencies.py`

Currently `check_listed_dependencies.py`, only checks whether `license`
attribute is mentioned in the `manifest.yml` for all the dependencies.
Improve the script to check other mandatory attributes like
`tpip-category`, `version` and `path`.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>

---------

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
  • Loading branch information
urutva authored Jul 12, 2024
1 parent 29bc544 commit ff4c50d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 15 deletions.
24 changes: 24 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,167 +5,191 @@ description: |-
dependencies:
- name: "FreeRTOS-Kernel"
license: "MIT"
tpip-category: "category-2"
version: "V11.1.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"
path: "components/freertos_kernel/library"
- name: "arm-corstone-platform-bsp"
license: "Apache-2.0"
tpip-category: "category-2"
version: "v0.3.0"
repository:
type: "git"
url: "https://git.gitlab.arm.com/iot/open-iot-sdk/arm-corstone-platform-bsp.git"
path: "bsp/library"
- name: "trusted-firmware-m"
license: "BSD-3-Clause"
tpip-category: "category-2"
version: "TF-Mv2.1.0"
repository:
type: "git"
url: "https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git"
path: "components/security/trusted_firmware-m/library"
- name: "mbedtls"
license: "Apache-2.0"
tpip-category: "category-2"
version: "v3.6.0"
repository:
type: "git"
url: "https://github.com/Mbed-TLS/mbedtls.git"
path: "components/security/mbedtls/library"
- name: "IoT_Socket"
license: "Apache-2.0"
tpip-category: "category-2"
version: "1e15f55ae08c2169c0e4a59216e78a4906a66af8"
repository:
type: "git"
url: "https://github.com/MDK-Packs/IoT_Socket.git"
path: "components/connectivity/iot_socket/library"
- name: "AVH"
license: "Apache-2.0"
tpip-category: "category-2"
version: "ab37f6126c94fee7bbd061f77716745dfbb77592"
repository:
type: "git"
url: "https://github.com/ARM-software/AVH.git"
path: "components/connectivity/iot_vsocket/library"
- name: "freertos-pkcs11-psa"
license: "MIT"
tpip-category: "category-2"
version: "53fa27b097dd09d07781ab1a22e79273557f22b1"
repository:
type: "git"
url: "https://github.com/Linaro/freertos-pkcs11-psa.git"
path: "components/security/freertos_pkcs11_psa/library"
- name: "freertos-ota-pal-psa"
license: "MIT"
tpip-category: "category-2"
version: "08e6c6eeb978f28d873f9a12c58882b88f1b7235"
repository:
type: "git"
url: "https://github.com/Linaro/freertos-ota-pal-psa.git"
path: "components/security/freertos_ota_pal_psa/library"
- name: "coreMQTT-Agent"
license: "MIT"
tpip-category: "category-2"
version: "v1.2.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreMQTT-Agent.git"
path: "components/aws_iot/coremqtt_agent/library"
- name: "coreMQTT"
license: "MIT"
tpip-category: "category-2"
version: "v2.1.1"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreMQTT.git"
path: "components/aws_iot/coremqtt/library"
- name: "coreJSON"
license: "MIT"
tpip-category: "category-2"
version: "v3.2.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreJSON.git"
path: "components/aws_iot/corejson/library"
- name: "corePKCS11"
license: "MIT"
tpip-category: "category-2"
version: "v3.5.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/corePKCS11.git"
path: "components/aws_iot/corepkcs11/library"
- name: "coreSNTP"
license: "MIT"
tpip-category: "category-2"
version: "v1.2.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreSNTP.git"
path: "components/aws_iot/coresntp/library"
- name: "backoffAlgorithm"
license: "MIT"
tpip-category: "category-2"
version: "v1.3.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/backoffAlgorithm.git"
path: "components/connectivity/backoff_algorithm/library"
- name: "ota-for-aws-iot-embedded-sdk"
license: "MIT"
tpip-category: "category-2"
version: "v3.4.0"
repository:
type: "git"
url: "https://github.com/aws/ota-for-aws-iot-embedded-sdk.git"
path: "components/aws_iot/ota_for_aws_iot_embedded_sdk/library"
- name: "tinycbor"
license: "MIT"
tpip-category: "category-2"
version: "9924cfed3b95ad6de299ae675064430fdb886216"
repository:
type: "git"
url: "https://github.com/intel/tinycbor"
path: "components/aws_iot/tinycbor/library"
- name: "toolchains"
license: "Apache-2.0"
tpip-category: "category-2"
version: "f77e1ba2bb830f6950a88c34849cf3df9af4ad32"
repository:
type: "git"
url: "https://git.gitlab.arm.com/iot/open-iot-sdk/toolchain.git"
path: "components/tools/open_iot_sdk_toolchain/library"
- name: "FreeRTOS-Libraries-Integration-Tests"
license: "MIT"
tpip-category: "category-2"
version: "202210.01"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests"
path: "components/tools/freertos_libraries_integration_tests/library"
- name: "Unity"
license: "MIT"
tpip-category: "category-2"
version: "v2.5.2"
repository:
type: "git"
url: "https://github.com/ThrowTheSwitch/Unity.git"
path: "components/tools/unity/library"
- name: "FreeRTOS-Plus-TCP"
license: "MIT"
tpip-category: "category-2"
version: "ba4e25c350020abcb787a3a319fdf991bef70538"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git"
path: "components/connectivity/freertos_plus_tcp/library"
- name: "ml-embedded-evaluation-kit"
license: "Apache-2.0"
tpip-category: "category-2"
version: "24.05"
repository:
type: "git"
url: "https://review.mlplatform.org/ml/ethos-u/ml-embedded-evaluation-kit.git"
path: "components/ai/ml_embedded_evaluation_kit/library"
- name: "speexdsp"
license: "BSD-3-Clause"
tpip-category: "category-2"
version: "738e17905e1ca2a1fa932ddd9c2a85d089f4e845"
repository:
type: "git"
url: "https://gitlab.xiph.org/xiph/speexdsp.git"
path: "components/ai/speexdsp/library"
- name: "isp_mali-c55"
license: "BSD-3-Clause"
tpip-category: "category-2"
version: "r0p0_1.0"
repository:
type: "git"
url: "https://git.gitlab.arm.com/iot/m-class/drivers/isp_mali-c55.git"
path: "bsp/isp_mali-c55/library"
- name: "arm-2d"
license: "Apache-2.0"
tpip-category: "category-2"
version: "v1.1.5"
repository:
type: "git"
Expand Down
1 change: 1 addition & 0 deletions release_changes/202407110931.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fri: Update manifest to include tpip category
50 changes: 35 additions & 15 deletions tools/scripts/check_listed_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
#
# Copyright 2023 Arm Limited and/or its affiliates
# Copyright 2023-2024 Arm Limited and/or its affiliates
# <open-source-office@arm.com>
# SPDX-License-Identifier: MIT

Expand All @@ -14,41 +14,61 @@
def main(manifest_file: str) -> None:
"""
Perform the following check:
- All submodule entries in the manifest.yml are not missing a license attribute
- All dependency entries in the manifest.yml are not missing:
- a license attribute
- a TPIP category attribute
- a version attribute
- a path attribute
Args:
manifest_file (str): Path to the YAML manifest file.
"""
with open(manifest_file, "r") as f:
manifest_data: Dict = yaml.safe_load(f)

missing_license_in_manifest_error: bool = check_license_in_manifest(manifest_data)

if missing_license_in_manifest_error:
exit(1)
if check_the_manifest(manifest_data):
print("All dependency entries in the manifest have mandatory attributes.")
else:
print("All submodule entries have valid license and path attributes.")
exit(1)


def check_license_in_manifest(manifest_data: Dict) -> bool:
def check_the_manifest(manifest_data: Dict) -> bool:
"""
Check if all submodules listed in the manifest file have a license attribute.
Check if all dependencies listed in the manifest have mandatory attributes.
Args:
manifest_data (Dict): The parsed YAML manifest data.
Returns:
bool: True if all submodules entries have a license attribute; False otherwise.
bool: True if all dependencies listed in the manifest have mandatory
attributes; False otherwise.
"""
missing_submodules_license: bool = False
manifest_has_all_attributes: bool = True
for dependency in manifest_data["dependencies"]:
if "license" not in dependency:
print(
f"Submodule '{dependency['name']}' is missing"
f"Dependency '{dependency['name']}' is missing"
f" `license` attribute in the manifest file"
)
missing_submodules_license = True
return missing_submodules_license
manifest_has_all_attributes = False
if "tpip-category" not in dependency:
print(
f"Dependency '{dependency['name']}' is missing"
f" `tpip-category` attribute in the manifest file"
)
manifest_has_all_attributes = False
if "version" not in dependency:
print(
f"Dependency '{dependency['name']}' is missing"
f" `version` attribute in the manifest file"
)
manifest_has_all_attributes = False
if "path" not in dependency["repository"]:
print(
f"Dependency '{dependency['name']}' is missing"
f" `path` attribute in the manifest file"
)
manifest_has_all_attributes = False
return manifest_has_all_attributes


if __name__ == "__main__":
Expand Down

0 comments on commit ff4c50d

Please sign in to comment.