summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-06-02 21:08:22 +0200
committerChristian Breunig <christian@breunig.cc>2026-06-02 21:12:02 +0200
commit30ca4c7bc0abe95d77d67eb091a5659db6535a4a (patch)
tree312e17ee0282b7e5fb93baf63c3a0bc83eaa05eb /scripts
parent13b4286dd848eb5bbe272d67d67f960390388041 (diff)
downloadvyos-build-30ca4c7bc0abe95d77d67eb091a5659db6535a4a.tar.gz
vyos-build-30ca4c7bc0abe95d77d67eb091a5659db6535a4a.zip
sbom: T8542: change result filenames to match ISO image filename
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image-build/build-vyos-image12
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.