diff options
| author | asklymenko <a.klymenko@vyos.io> | 2026-08-14 13:04:26 +0300 |
|---|---|---|
| committer | asklymenko <a.klymenko@vyos.io> | 2026-08-14 13:04:26 +0300 |
| commit | b9c957db4e85696cb87e1c4bfad808b0e0154fb0 (patch) | |
| tree | 8e657756415ca5c90b0212070099886b988ec996 /scripts | |
| parent | 4fb76dcc4580e6bc16fb8fa89b1d0bdcd1dfee26 (diff) | |
| download | vyos-build-b9c957db4e85696cb87e1c4bfad808b0e0154fb0.tar.gz vyos-build-b9c957db4e85696cb87e1c4bfad808b0e0154fb0.zip | |
T9203: Enrich SBOM files with additional metadata
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/image-build/build-vyos-image | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index a13e1611..5a51de25 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -759,7 +759,10 @@ Pin-Priority: 600 for line in p.stdout: sys.stdout.write(line) sys.stdout.flush() - p.wait() + if p.wait() != 0: + raise ImageBuildError( + f'SBOM command failed with exit status {p.returncode}: {" ".join(unsquashfs_cmd)}' + ) # VyOS declares ID=vyos with no ID_LIKE, therefore Syft can't detect the system correctly with open(os.path.join(syft_target_dir, 'etc/os-release'), 'a') as f: @@ -794,7 +797,10 @@ Pin-Priority: 600 for line in p.stdout: sys.stdout.write(line) sys.stdout.flush() - p.wait() + if p.wait() != 0: + raise ImageBuildError( + f'SBOM command failed with exit status {p.returncode}: {" ".join(c)}' + ) # Add metadata.authors/supplier/lifecycles information to the SBOM file cdx_file = f'{base_filename}.cdx.json' |
