From 8768a8a602590a9bfb3d02d5cf8a93c850c24ea3 Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Sat, 8 Feb 2020 02:19:09 +0000 Subject: [PATCH] Imported 2.641 No reason for CPC update specified. --- debian/changelog | 7 +++++++ live-build/auto/config | 17 ++++++++++++++--- .../hooks/032-installer-squashfs.binary | 8 ++++++++ .../includes.binary/overlay/etc/cloud/cloud.cfg | 5 +++++ .../var/lib/cloud/seed/nocloud/meta-data | 0 .../var/lib/cloud/seed/nocloud/user-data | 0 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/meta-data create mode 100644 live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/user-data diff --git a/debian/changelog b/debian/changelog index b5e07c40..53be67a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.641) focal; urgency=medium + + * Configure a better nocloud datasource for subiquity cloud-init. + * Encode CHANNEL specification in the UC20 model names. + + -- Dimitri John Ledkov Fri, 07 Feb 2020 22:18:11 +0000 + livecd-rootfs (2.640) focal; urgency=medium * Although the request flavour to install is oem-20.04, it really is diff --git a/live-build/auto/config b/live-build/auto/config index 3f1dcdb6..0dcc08ff 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -365,9 +365,20 @@ case $IMAGEFORMAT in ;; *) # Ubuntu Core 20 - # XXX: Currently uc20 assertions do not support global - # channel overrides. - MODEL="ubuntu-core-20-${MODEL#pc-}" + # Currently uc20 assertions do not support global + # channel overrides, instead we have per-channel models + case $CHANNEL in + stable) + MODEL="ubuntu-core-20-${MODEL#pc-}" + ;; + candidate|beta|edge|dangerous) + MODEL="ubuntu-core-20-${MODEL#pc-}-${CHANNEL}" + ;; + *) + echo "Unknown CHANNEL ${CHANNEL} specification for ${SUITE}" + exit 1 + ;; + esac ;; esac diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 59da66d9..d4b72679 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -64,6 +64,14 @@ EOF chroot $INSTALLER_ROOT apt-get -y install lupin-casper # Install linux-firmware for kernel to upload into hardware. chroot $INSTALLER_ROOT apt-get -y install linux-firmware + +# Make sure NoCloud is last +values=$(echo get cloud-init/datasources | chroot $INSTALLER_ROOT debconf-communicate | sed 's/^0 //;s/NoCloud, //;s/None/NoCloud, None/') +printf "%s\t%s\t%s\t%s\n" \ + cloud-init cloud-init/datasources multiselect "$values" | + chroot $INSTALLER_ROOT debconf-set-selections +chroot $INSTALLER_ROOT dpkg-reconfigure --frontend=noninteractive cloud-init + if [ `dpkg --print-architecture` = s390x ]; then chroot $INSTALLER_ROOT apt-get -y install s390-tools-zkey openssh-server rm $INSTALLER_ROOT/etc/netplan/00-installer-config.yaml diff --git a/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg b/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg index f737c9e0..577ff057 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg +++ b/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg @@ -23,6 +23,9 @@ chpasswd: # This is the initial network config. # It can be overwritten by cloud-init or subiquity. network: + ## until https://bugs.launchpad.net/cloud-init/+bug/1861460 is fixed + config: disabled + ## version: 2 ethernets: all-en: @@ -34,6 +37,8 @@ network: name: "eth*" dhcp4: true +final_message: "## template: jinja\nCloud-init v. {{version}} finished at {{timestamp}}. Datasource {{datasource}}. Up {{uptime}} seconds\n\n\nWelcome to Ubuntu Server Installer!\n\nAbove you will find SSH host keys and a random password set for the `installer` user. You can use these credentials to ssh-in and complete the installation. If you provided SSH keys in the cloud-init datasource, they were also provisioned to the installer user.\n\nIf you have access to the graphical console, like TTY1 or HMC ASCII terminal you can complete the installation there too." + # Example datasource config # datasource: # Ec2: diff --git a/live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/meta-data b/live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/meta-data new file mode 100644 index 00000000..e69de29b diff --git a/live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/user-data b/live-build/ubuntu-server/includes.binary/overlay/var/lib/cloud/seed/nocloud/user-data new file mode 100644 index 00000000..e69de29b