diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-06-02 21:08:22 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-06-02 21:12:02 +0200 |
| commit | 30ca4c7bc0abe95d77d67eb091a5659db6535a4a (patch) | |
| tree | 312e17ee0282b7e5fb93baf63c3a0bc83eaa05eb /scripts | |
| parent | 13b4286dd848eb5bbe272d67d67f960390388041 (diff) | |
| download | vyos-build-30ca4c7bc0abe95d77d67eb091a5659db6535a4a.tar.gz vyos-build-30ca4c7bc0abe95d77d67eb091a5659db6535a4a.zip | |
sbom: T8542: change result filenames to match ISO image filename
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/image-build/build-vyos-image | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index 2b52061f..79431eb1 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -729,23 +729,25 @@ Pin-Priority: 600 # Now create SBOM syft_target_dir = 'chroot' syft_base_path = os.getcwd() + f'/{syft_target_dir}' + base_filename = iso_file.rstrip('.iso') cmd = [['syft', syft_target_dir, '--source-name', 'VyOS', '--source-version', version, - '-o', f'cyclonedx-json=vyos-{version}.cdx.json', - '-o', f'spdx-json=vyos-{version}.spdx.json']] + '-o', f'cyclonedx-json={base_filename}.cdx.json', + '-o', f'spdx-json={base_filename}.spdx.json']] # syft bug for CycloneDX https://github.com/anchore/syft/issues/4592#issuecomment-4567247328 - cmd.append(['sed', '-i', '-e', f's@{syft_base_path}@@g', f'vyos-{version}.cdx.json']) - cmd.append(['sed', '-i', '-e', f's@{syft_base_path}@//@g', f'vyos-{version}.spdx.json']) + cmd.append(['sed', '-i', '-e', f's@{syft_base_path}@@g', f'{base_filename}.cdx.json']) + cmd.append(['sed', '-i', '-e', f's@{syft_base_path}@//@g', f'{base_filename}.spdx.json']) for c in cmd: - print(c) with subprocess.Popen(c, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1) as p: for line in p.stdout: sys.stdout.write(line) sys.stdout.flush() p.wait() + print("I: Finished SBOM generation") + # If the flavor has `image_format = "iso"`, then the work is done. # If not, build additional flavors from the ISO. |
