You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.2 KiB
121 lines
3.2 KiB
#! /bin/sh
|
|
|
|
set -eux
|
|
|
|
case ${PASS:-} in
|
|
minimal.standard.enhanced-secureboot)
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
case ${SUBPROJECT:-} in
|
|
canary)
|
|
;;
|
|
*)
|
|
echo "We don't run canary hooks for this project."
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
. config/binary
|
|
|
|
# env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-classic-2304-amd64 > config/classic-model.model
|
|
cat <<EOF > config/classic-model.model
|
|
type: model
|
|
authority-id: canonical
|
|
series: 16
|
|
brand-id: canonical
|
|
model: ubuntu-classic-2304-amd64
|
|
architecture: amd64
|
|
base: core22
|
|
classic: true
|
|
distribution: ubuntu
|
|
grade: signed
|
|
snaps:
|
|
-
|
|
default-channel: classic-23.04/stable
|
|
id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH
|
|
name: pc
|
|
type: gadget
|
|
-
|
|
default-channel: 24-hwe/stable
|
|
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
|
|
name: pc-kernel
|
|
type: kernel
|
|
-
|
|
default-channel: latest/stable
|
|
id: amcUKQILKXHHTlmSa7NMdnXSx02dNeeT
|
|
name: core22
|
|
type: base
|
|
-
|
|
default-channel: latest/stable
|
|
id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
|
|
name: snapd
|
|
type: snapd
|
|
-
|
|
default-channel: latest/stable
|
|
id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q
|
|
name: core20
|
|
type: base
|
|
-
|
|
default-channel: latest/stable
|
|
id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR
|
|
name: bare
|
|
type: base
|
|
-
|
|
default-channel: latest/stable
|
|
id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
|
|
name: firefox
|
|
type: app
|
|
-
|
|
default-channel: latest/stable
|
|
id: rw36mkAjdIKl13dzfwyxP87cejpyIcct
|
|
name: gnome-3-38-2004
|
|
type: app
|
|
-
|
|
default-channel: latest/stable
|
|
id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3
|
|
name: gnome-42-2204
|
|
type: app
|
|
-
|
|
default-channel: latest/stable
|
|
id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit
|
|
name: gtk-common-themes
|
|
type: app
|
|
-
|
|
default-channel: latest/stable
|
|
id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg
|
|
name: snap-store
|
|
type: app
|
|
-
|
|
default-channel: latest/stable
|
|
id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu
|
|
name: snapd-desktop-integration
|
|
type: app
|
|
timestamp: 2023-03-19T12:00:00.0Z
|
|
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
|
|
|
|
AcLBXAQAAQoABgUCZC4CDgAKCRDgT5vottzAEiFvEACU9KsUFmAcShhpIz+NRGVP6d1Z+bW1FcUf
|
|
Cxl2UParnXR7Kv12htnw5u837MZjI3gG8kti2L2SxRcg/fy3iJLkTRBEaR/q6rY4O0fkasJUKxHh
|
|
z6xx2jaNhsUqnplU5gba9xmmaI5AQp4yf1ktF71HAeM4OzUFrCkjXNTbf7xfkKENxuAOfsPetu5c
|
|
6Xc8UtQymtYnjsyvtaLNoXl9vVN59nqk/sxWkwJRtYrFX+Fjt1R/ft4Fo1U7x/OeUX1qpFHSEgnR
|
|
NPxzJQ0uzaCamXY1qu1iq6R925eah22auOQM2m/CTzOMdI3IuRAqnLsrk9HpGXz2gWKLS/UEfAlr
|
|
OMOoV64DHnQ6k8pwjiYt4K9zNxNKK1MB9hnUBOWYb69pgqoQ2djo6codlxknANN4g3zsUH8KDHb8
|
|
9wNEu7WuYS8JIDpdrNGB5XKo+N5+WswfqX0Oh1mtPMw+DqIA8GkxJFC452Afv7+VDQUZs5wIe7OX
|
|
oQ5Q/u5X7WyKpqTdRi0J4/Eq61HidYOOW26Vc8MNArn1u0eabZBtHrxMOHCxu0hmsLHaXQSBljdr
|
|
Ekm0W8qT4AT0GSk5CY8kx+UvCn6FLxMuv8xjWoX3OLcQx31yO6Uy6c2LN6nSlovDghKP5V1KvlKl
|
|
WiXM9CPKCZv/Es3uOp/ke0wWL7v0MZhzUJ+QhOtTNg==
|
|
EOF
|
|
|
|
channel=""
|
|
if [ -n "${CHANNEL:-}" ]; then
|
|
channel="--channel $CHANNEL"
|
|
fi
|
|
env SNAPPY_STORE_NO_CDN=1 snap prepare-image \
|
|
--classic config/classic-model.model $channel chroot
|
|
mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop
|
|
rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed
|
|
rm -rf chroot/system-seed/
|