Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-99108: Update and check HACL* version information (GH-117295) #117302

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Misc/sbom.spdx.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Tools/build/generate_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ def check_sbom_packages(sbom_data: dict[str, typing.Any]) -> None:
),
)

# HACL* specifies its expected rev in a refresh script.
if package["name"] == "hacl-star":
hacl_refresh_sh = (CPYTHON_ROOT_DIR / "Modules/_hacl/refresh.sh").read_text()
hacl_expected_rev_match = re.search(
r"expected_hacl_star_rev=([0-9a-f]{40})",
hacl_refresh_sh
)
hacl_expected_rev = hacl_expected_rev_match and hacl_expected_rev_match.group(1)

error_if(
hacl_expected_rev != version,
"HACL* SBOM version doesn't match value in 'Modules/_hacl/refresh.sh'"
)

# License must be on the approved list for SPDX.
license_concluded = package["licenseConcluded"]
error_if(
Expand Down
Loading