mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-15 07:08:23 +00:00
patch create_manifest to produce an sbom when called by an ubuntu-cpc project. Patch all the ubuntu-cpc hooks and series files to include the newly generated manifests, filelists, and sboms. Generates a number of new artifacts in the builds. the snap utilized, cpc-sbom, is an open source repo and a provided via a hidden snap. there is no intention of publisizing the snap or how we generate sboms, however partners require the ability to audit if required. defensively checks if the snap is already installed, in the case of multiple hooks being called in a single build (thus sharing a build host), and only if called in an ubuntu-cpc project. (cherry picked from commit 7c7b7df89dc96169db1f255d6bba901ebb63a43c)
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -eux
|
|
# vi: ts=4 expandtab
|
|
#
|
|
# Generate VMDK files
|
|
|
|
case ${SUBPROJECT:-} in
|
|
minimized)
|
|
echo "Skipping minimized $0 build as images won't boot with linux-kvm"
|
|
exit 0
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
case $ARCH in
|
|
amd64) ;;
|
|
*) echo "VMDK images are not supported for $ARCH yet.";
|
|
exit 0;;
|
|
esac
|
|
|
|
. config/functions
|
|
|
|
vmdk_file="$PWD/livecd.ubuntu-cpc.vmdk"
|
|
|
|
if [ -e binary/boot/disk-uefi.ext4 ]; then
|
|
create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.vmdk
|
|
uefi_file="livecd.ubuntu-cpc.disk-uefi"
|
|
cp ${uefi_file}.manifest ${vmdk_file}.manifest
|
|
cp ${uefi_file}.filelist ${vmdk_file}.filelist
|
|
cp ${uefi_file}.spdx ${vmdk_file}.spdx
|
|
elif [ -f binary/boot/disk.ext4 ]; then
|
|
create_vmdk binary/boot/disk.ext4 livecd.ubuntu-cpc.vmdk
|
|
disk_file="livecd.ubuntu-cpc.disk-image"
|
|
cp ${disk_file}.manifest ${vmdk_file}.manifest
|
|
cp ${disk_file}.filelist ${vmdk_file}.filelist
|
|
cp ${disk_file}.spdx ${vmdk_file}.spdx
|
|
fi
|