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.
livecd-rootfs/live-build/ubuntu/hooks/020-canary-live.binary

151 lines
4.1 KiB

#! /bin/sh
set -eux
case ${PASS:-} in
standard.live)
;;
*)
exit 0
;;
esac
case ${SUBPROJECT:-} in
canary)
;;
*)
echo "We don't run canary hooks for this project."
exit 0
;;
esac
. config/binary
. config/functions
# env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-installer-classic-2310-amd64 > config/classic-model-installer.model
cat <<EOF > config/classic-model-installer.model
type: model
authority-id: canonical
revision: 3
series: 16
brand-id: canonical
model: ubuntu-installer-classic-2310-amd64
architecture: amd64
base: core22
classic: true
distribution: ubuntu
grade: signed
snaps:
-
default-channel: latest/stable
id: amcUKQILKXHHTlmSa7NMdnXSx02dNeeT
name: core22
type: base
-
default-channel: latest/stable
id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
name: snapd
type: snapd
-
classic: true
default-channel: latest/stable/ubuntu-23.10
id: rQm0TtMOYOtEslvEXgxQDhgy1JNn38Wz
name: ubuntu-desktop-installer
type: app
-
default-channel: latest/stable
id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR
name: bare
type: base
-
default-channel: latest/stable/ubuntu-23.10
id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
name: firefox
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3
name: gnome-42-2204
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit
name: gtk-common-themes
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg
name: snap-store
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu
name: snapd-desktop-integration
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: m1eQacDdXCthEwWQrESei3Zao3d5gfJF
name: cups
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: d1yehor45vFG9GdKjmgdqbnBuKtR0Qa4
name: ghostscript-printer-app
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: 3wnSvqxn6OqPBuioytBcdnR2UBaUzvPC
name: gutenprint-printer-app
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: PPjo7KVjJvmdYUeUt9LqmKRrgmGdWPyM
name: hplip-printer-app
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: WJKWBUuCDufOFw2p24tvkbbw02plGkbd
name: ipp-usb
type: app
-
default-channel: latest/stable/ubuntu-23.10
id: 5xUmM1J4qSfki63gfpEDcrr1wU1FdP2k
name: ps-printer-app
type: app
timestamp: 2023-08-22T12:00:00.0Z
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
AcLBXAQAAQoABgUCZOTCgQAKCRDgT5vottzAEvDYD/97aa0ub3eq1zzUpMRDXY+NoHMLOON5zBgA
qLmpZq9ECZtuT0Tsyn/znlx2g15r8erzlgQtg/lS8iLIk0PqmwE/BB4ntdLQ3P56Rxz/YvkoK31B
519vOcpLlXxyVHsG4u3IjsEtPBlm4dmnzuuJodiRF4g4iXlxIQpcCkUm1gTHKof6NUlne7VwNty7
8GvinPZtoTDVc6i+VftzUAbnqtifSlvxUseDvRkZrYX44FWKfEz7qqGQVdtwmZrP/ab+nc0CA+Nz
p6pn1wBrXk4y3EGw5RWQJvY5PzE5E7fCCirUW6SWpZ15jGK7pKGtXK2TJQlgsILeVp40FhnX5+As
9EnJpCCPYn8ZkKKjL9dCvmBSaKsqC0SVPYeB+T6PG2ANEHooaALvoiSTUVCM4HnBvjMtSXJpOPE7
FzfyL9z4mKtNF82NmHc9Oms7QfuX70jQ0mgS/NDy6Te+4dhZ5QpLZzkwed/SWGmHGADPPV6Dxhcd
N5sjPPhhAJ6A2EyJQrKY3dOUt/vlu04C1TZCQwz9aQJO5hEaC3E/+ci8IVBRhDAvKJJ4iuTdO/k2
SRiShTD1s/mua3D01bN2gGoyh2DY4lFKro28by4Ci0QXSBOIVTk+GnWAOwJCnbB636PZD9Ipf29L
ri86PlIOcM1OvSROryexBE+aNuWZYBwvJIo2kMYfVw==
EOF
channel=""
if [ -n "${CHANNEL:-}" ]; then
channel="--channel $CHANNEL"
fi
reset_snapd_state chroot
env SNAPPY_STORE_NO_CDN=1 snap prepare-image \
--classic config/classic-model-installer.model $channel chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/classic-installer
rm -rf chroot/var/lib/snapd/seed
mv chroot/system-seed chroot/var/lib/snapd/seed
cat <<EOF > chroot/var/lib/snapd/modeenv
mode=run
recovery_system=classic-installer
EOF
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic
chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic ${PWD}/livecd.${PROJECT}.kernel-generic