livecd-rootfs/live-build/ubuntu/hooks/020-ubuntu-enhanced-sb.binary
Dan Bungert c1d898ed2c desktop: update tpmfde model for pc-kernel channel
* Updated model to move pc-kernel to channel 25.04/stable
* Move model from heredoc to a file
2025-03-13 11:03:10 -06:00

40 lines
1.0 KiB
Bash
Executable File

#! /bin/sh
set -eux
case ${PASS:-} in
minimal.standard.enhanced-secureboot)
;;
minimal.enhanced-secureboot)
;;
*)
exit 0
;;
esac
if [ -n "${SUBPROJECT:-}" ]; then
echo "We don't run Ubuntu Desktop hooks for this project."
exit 0
fi
. config/binary
. config/functions
# env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-classic-2410-amd64 > config/classic-model.model
model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64.model
channel=""
if [ -n "${CHANNEL:-}" ]; then
channel="--channel $CHANNEL"
fi
reset_snapd_state chroot
# Set UBUNTU_STORE_COHORT_KEY="+" to force prepare-image to fetch the latest
# snap versions regardless of phasing status
env SNAPPY_STORE_NO_CDN=1 UBUNTU_STORE_COHORT_KEY="+" snap prepare-image \
--classic $model $channel chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop
rm -rf chroot/var/lib/snapd/seed
mv chroot/system-seed chroot/var/lib/snapd/seed