Commit 3db21e8
committed
sbom: T9098: syft should run un squashfs instead of unpacked chroot
lb (live-build) binary runs binary_rootfs first, then binary_grub-efi.
binary_grub-efi temporarily installs EFI tooling and then runs:
"apt remove --auto-remove --purge --allow-remove-essential"
That cleanup is safe for the already-generated squashfs, but it mutates
build/chroot and can remove vyos-1x, breaking subsequent work that expects
chroot to remain intact for SBOM generation.
But why unpacking the squashfs?
In an ideal world we could call syft on the compressed squashfs file which is
supported. In our world, we do use a BCJ pre-filter chained with LZMA2 for
compressing the squashfs, which will increase the compression ratio without a
decompression penalty.
Difference: ~14.3 MB, ~2.7% smaller
This is unsupported by fyft which means we do need to unpack the squashfs first
before checking the files and generating the SBOM file.1 parent 5e2e9a3 commit 3db21e8
1 file changed
Lines changed: 32 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
730 | | - | |
731 | | - | |
732 | 732 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
750 | 763 | | |
751 | 764 | | |
752 | 765 | | |
| |||
0 commit comments