#! /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 # 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 < config/classic-model-installer.model type: model authority-id: canonical revision: 2 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: 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-08-09T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn AcLBXAQAAQoABgUCZN94uAAKCRDgT5vottzAEvtpEACfnxMEKTBZPbwZxNEXA+W4zUIKLyZKNQ8J dnS4WoarMLqbAOHLPyWyHK/R5+Q9cxX1M+9SlR7oKwL/yP6eUMl/olsDMfv6+rGqg5VBLijkUSfu ZoF8Cjev3lQfuuYqSXsZHQnz3SfMdL2RpXWSd0BuHeW96MG7uGLA9NM4sz5vbY+eVZpVC0LxFfeK njAvCslALtcWChVig1IUTAPz22pEBpkQO6wEkjkccpsZLGwQSvYIpPX1HMLKvMo/LzX9Dxp/Xnlt gcvwHTRHD1NO0qgrx5eKthXbbFTigxOA8l1hkhMM7p9trTXzHUchsKCjzlx+sdT9GfEzSqJsekH5 m878xIMaP2UXhBNMZkXr8/vFxHsBdW2FMhJULNT8eyO+5C/I22/DwCFLJESqA5wA/hm8q5PH6tP2 HOzbN9mxK7Y+J37JUFrLjz76ECxf/IVktTbDrBOvk40lsomlSE9VngFKbzxVHz7wn6m+lnqy4UDt +1QJr0GlzZYhJPccqqj9skdtkBdgTe2hogty8KsERneUpJ9wtV5UuOr2DU83Plh9yFjYhl4s7XGP FjN6SMO3hL8nnoF7rANFTNMkyMl2IbyX4wfmi3pjAGubpQPDc00rc5KcwKdNwgAMB9XrvB/dEzKg v0vszO82HG1XGXT8Em6DGLDTpyn7ABl0MAnjDFmLEw== EOF channel="" if [ -n "${CHANNEL:-}" ]; then channel="--channel $CHANNEL" fi 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 rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed rm -rf chroot/system-seed/ cat < chroot/var/lib/snapd/modeenv mode=run recovery_system=classic-installer EOF # Temporary while we still use the subiquity TUI for the live system cat > chroot/usr/lib/systemd/user/subiquity-tui.service << EOF [Unit] Description=subiquity tui PartOf=graphical-session.target After=graphical-session.target # Never run in GDM Conflicts=gnome-session@gnome-login.target [Service] Type=simple ExecStart=/usr/bin/gnome-terminal --wait -- sudo sh -c 'echo waiting for snapd; snap wait system seed.loaded; sleep 5; snap run subiquity' Restart=no EOF mkdir chroot/etc/systemd/user/graphical-session.target.wants/ ln -vs /usr/lib/systemd/user/subiquity-tui.service chroot/etc/systemd/user/graphical-session.target.wants/ 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