summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrii Klymenko <a.klymenko@vyos.io>2026-04-23 15:59:30 +0300
committerGitHub <noreply@github.com>2026-04-23 15:59:30 +0300
commitd84d127f91186082df2a786c7e20fe2af55dfa3b (patch)
tree9b63855e5a2dea41dda9cfee4162e683d104eff2 /scripts
parent4ef1924d9a5328aaab11a4e409c8116f99cbc140 (diff)
downloadvyos-build-d84d127f91186082df2a786c7e20fe2af55dfa3b.tar.gz
vyos-build-d84d127f91186082df2a786c7e20fe2af55dfa3b.zip
T8542: Add functionality to generate SBOM file from ISO image
Apply suggestion, add validation that the Syft binary was copied with success. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index 98b49a64..507b1ea6 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -1315,10 +1315,18 @@ try:
raise Exception('Failed to mount SBOM transfer disk inside VM')
c.expect(op_mode_prompt)
- # Copy the syft binary to the transfer disk and check the version to verify it works before running the SBOM generation process
- c.sendline('sudo cp /mnt/sbom_transfer/syft /tmp/syft && sudo chmod +x /tmp/syft')
+ # Copy the syft binary from the transfer disk and verify it is available before running the SBOM generation process
+ c.sendline('test -x /mnt/sbom_transfer/syft && echo SYFT_SRC_OK || echo SYFT_SRC_FAIL')
+ i = c.expect(['SYFT_SRC_OK', 'SYFT_SRC_FAIL'])
+ if i != 0:
+ raise Exception('Syft binary is missing or not executable on the SBOM transfer disk')
c.expect(op_mode_prompt)
+ c.sendline('sudo cp /mnt/sbom_transfer/syft /tmp/syft && sudo chmod +x /tmp/syft && test -x /tmp/syft && echo SYFT_COPY_OK || echo SYFT_COPY_FAIL')
+ i = c.expect(['SYFT_COPY_OK', 'SYFT_COPY_FAIL'])
+ if i != 0:
+ raise Exception('Failed to copy Syft binary from SBOM transfer disk to /tmp/syft')
+ c.expect(op_mode_prompt)
c.sendline('TERM=dumb /tmp/syft --version')
c.expect(op_mode_prompt)
lines = c.before.decode(errors='replace').strip().splitlines()