Skip to content

Commit 2e36912

Browse files
committed
Add SBOM generation support
1 parent b8411b9 commit 2e36912

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4664
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ subprojects/AdbWinApi-*/
1717
subprojects/libusb-*/
1818
subprojects/boringssl-*/
1919
subprojects/pcre2-*/
20+
SBOM_scripts/**/__pycache__/

SBOM_scripts/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SBOM generation
2+
This directory includes a small independent Python project used for generating SBOMs.
3+
4+
All Python source files in this directory do not have any external dependencies except for Python standard library.
5+
6+
The SBOM generation mechanism has four entrypoint scripts:
7+
8+
```
9+
alpine_cross.py
10+
alpine_native.py
11+
macos.py
12+
windows.py
13+
```
14+
15+
They all share a set of base arguments. Individual scripts then add OS-specific arguments.
16+
17+
These scripts are not called by the build system, they have to be called manually after the build process completes. This is necessary because the SBOM scripts require access to Meson's `depmf.json` dependency manifest file, which is generated during `meson install`.
18+
19+
One exception is `save_args.py`, which is a helper script called by Meson (if enabled by `-Dgenerate_sbom_data=true`) which provides additional info about the build environment to the SBOM scripts.
20+
21+
Code in this directory is linted with [ruff](ruff), formatted with [black --preview](black) and type checked with [mypy](mypy). Lint rules for ruff are included in [`pyproject.toml`](pyproject.toml).
22+
23+
All subdirectories/packages in this directory are meant to be OS-independent. All OS-dependent functionality is usually contained in the entrypoint scripts themselves.
24+
25+
Each subdirectory/package includes a README describing the purpose of it.
26+
27+
[ruff]: https://docs.astral.sh/ruff/
28+
[black]: https://black.readthedocs.io/
29+
[mypy]: https://mypy-lang.org/

SBOM_scripts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)