fix: Backporting build.info file to Jammy buildd images

/etc/cloud/build.info file is currently not present in Jammy
buildd images
This file is used to get information about the image. Hence we are
backporting this file in from Noble
This commit is contained in:
Allen Abraham 2025-09-17 10:38:43 -04:00 committed by Dan Bungert
parent 3bae190dea
commit 8f7ecf2a1b

View File

@ -463,9 +463,16 @@ serial: $BUILDSTAMP
EOF
fi
if [ "$PROJECT" = "ubuntu-oci" ]; then
if [ "${PROJECT}" = "ubuntu-base" ] || [ "${PROJECT}" = "ubuntu-oci" ]; then
if [ -n "$BUILDSTAMP" ]; then
configure_oci chroot "$BUILDSTAMP"
mkdir -p chroot/etc/cloud
cat > chroot/etc/cloud/build.info << EOF
build_name: $PROJECT:${SUBPROJECT:-}
serial: $BUILDSTAMP
EOF
if [ "$PROJECT" = "ubuntu-oci" ]; then
configure_oci chroot "$BUILDSTAMP"
fi
else
echo "The \$BUILDSTAMP variable is empty"
exit 1