From 9d973fbf0dbad3d0a8b51c38a45b64efce2fd77a Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Wed, 7 Oct 2020 19:54:18 +0000 Subject: [PATCH] Imported 2.690 No reason for CPC update specified. --- debian/changelog | 6 +++++ live-build/auto/config | 23 ++++++++++++++++++- .../099-ubuntu-image-customization.chroot | 23 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot diff --git a/debian/changelog b/debian/changelog index 1bda81f5..2beb4444 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.690) groovy; urgency=medium + + * Add initial support for the Ubuntu Desktop Raspberry Pi image. + + -- Ɓukasz 'sil2100' Zemczak Wed, 07 Oct 2020 10:49:38 +0200 + livecd-rootfs (2.689) groovy; urgency=medium * ubuntu-cpc: remove explicit install of virtualbox-guest-utils. diff --git a/live-build/auto/config b/live-build/auto/config index 89e25277..308bfd10 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -445,6 +445,11 @@ case $IMAGEFORMAT in ;; esac + if [ "$SUBPROJECT" = "desktop-preinstalled" ]; then + BRANCH="desktop" + fi + + UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${SUBPROJECT:+ --subproject \"$SUBPROJECT\"}" UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${PROPOSED:+ --with-proposed}" UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${EXTRA_PPAS:+ --extra-ppas \"$EXTRA_PPAS\"}" @@ -472,6 +477,7 @@ case $IMAGEFORMAT in # Currently the IMAGEFORMAT none format is used only for ubuntu-image # targeted image builds which, currently, only target physical devices. OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT" + PREINSTALLED=true ;; *) case $PROJECT in @@ -519,7 +525,7 @@ if [ "$PREINSTALLED" = "true" ]; then add_package live oem-config-gtk ubiquity-frontend-gtk add_package live ubiquity-slideshow-ubuntu if [ "$SUBPROJECT" = "desktop-preinstalled" ]; then - add_package live language-pack-en-base + add_package live language-pack-en-base oem-config-slideshow-ubuntu fi ;; *) @@ -597,6 +603,21 @@ case $PROJECT in remove_packages_from_seed_regexp minimal.standard desktop-default-languages '^desktop-(?!default-languages|minimal|common)[^.]+$' remove_packages_from_seed_regexp minimal.standard desktop-default-languages '' # none (if no default langpack is selected) ;; + + desktop-preinstalled) + add_task install minimal standard + if [ "$SUBARCH" = "raspi" ]; then + add_task install ubuntu-desktop-raspi + fi + # XXX: Are those actually needed? I see we use those for ubuntu-cpc, which is the project + # for existing raspi preinstalled images + OPTS="${OPTS:+$OPTS }--initramfs=none" + OPTS="${OPTS:+$OPTS }--system=normal" + OPTS="${OPTS:+$OPTS }--hdd-label=cloudimg-rootfs" + OPTS="${OPTS:+$OPTS }--ext-resize-blocks=536870912 --ext-block-size=4096" + OPTS="${OPTS:+$OPTS }--ext-fudge-factor=15" + ;; + *) LIVE_TASK='ubuntu-live' add_task install minimal standard ubuntu-desktop diff --git a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot new file mode 100644 index 00000000..1363d677 --- /dev/null +++ b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot @@ -0,0 +1,23 @@ +#!/bin/bash -ex + +. /root/config/chroot + +# Specific ubuntu-image chroot configuration goes here. +if [ "$IMAGEFORMAT" == "none" ]; then + if [ "$SUBPROJECT" == "desktop-preinstalled" ]; then + # Create files/dirs Ubiquity requires + mkdir -p /var/log/installer + touch /var/log/installer/debug + touch /var/log/syslog + chown syslog:adm /var/log/syslog + + # Create the oem user account + /usr/sbin/useradd -d /home/oem -m -N -u 29999 oem + + /usr/sbin/oem-config-prepare --quiet + touch "/var/lib/oem-config/run" + + # Make the writable partition grow + echo "LABEL=writable / ext4 defaults,x-systemd.growfs 0 0" >>/etc/fstab + fi +fi