diff --git a/live-build/auto/build b/live-build/auto/build index 9911708f..6704327e 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -430,9 +430,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 diff --git a/live-build/functions b/live-build/functions index 695344eb..99c4708e 100644 --- a/live-build/functions +++ b/live-build/functions @@ -970,13 +970,6 @@ configure_oci() { Chroot ${chroot} "chmod +x /usr/sbin/policy-rc.d" - # Inject a build stamp into the image - mkdir -p ${chroot}/etc/cloud - cat > ${chroot}/etc/cloud/build.info << EOF -serial: $serial -EOF - - # https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L54-L56 Chroot ${chroot} "dpkg-divert --local --rename --add /sbin/initctl" cp -a ${chroot}/usr/sbin/policy-rc.d ${chroot}/sbin/initctl