#! /bin/sh set -eux case ${PASS:-} in minimal.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 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/canary-23.10 id: rQm0TtMOYOtEslvEXgxQDhgy1JNn38Wz name: ubuntu-desktop-installer type: app timestamp: 2023-07-18T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn AcLBXAQAAQoABgUCZLa6iQAKCRDgT5vottzAEh+hEACxb8nNg/2yznOanHsCY69miFDHvxLf2AGB qeE+XJ9pyN05/JkvrDhODL0DCknFuvgo5kl+FhrS+mPdviytc3Ppm3kHSnPuwfzuO4t8PM1mRMOZ 8djtgzbStKAzwKyYiK/pon4/Wtu1+6/tTp8Ji/pH12aRoFBub6mtQD81hC/xVxdcKz8KvzGsD5co H1TLfhKACVQJHZp7ErShkB6Ka6nVQy1c8/4sDPadKb2mqraIVMJmmHlYAHMfGl6f1dElheAjWXmz 0Roz4fh4lvjM0GmYTlsmhEj10F0pdwY/C2jB+6VFBJEZax65mRjs6Jaqxa150a26sOVFcMkS0ifO pkB+KHrnilJ0/PyXZCoQcL65wTBEnfI0X/nzhvuE+9dXz5EUlusWeMvEhJ4QNOacCPARSd76M7QB gUhMrz4Vf68V6tlfbXxgoEJFoVJo4i7gymMPnZDg0uAGQFYK+SSVEO/VtLDQvwRBU80IdA0kaIsn afaqwYP8ACNPWpTztVYd/X6mvpdDz8MsW9pAEmJ4EN6JWcEu4ii5qXlzLK3s3HaCS5XNj+TpPEU+ 9Nh9ePmCfE+KxR0cgfTbxP3KerYSd/xQHxgMLcMAGq20+1i/FmksKD6cSNYJRoqwTPwP+D9p42wF 3qGR3KEYbIij4hk/fZMCNzUEWt41OLLUVKm81oOixg== 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