diff --git a/debian/changelog b/debian/changelog index 190ab7e8..ab27a8bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.810) lunar; urgency=medium + + * Add ubuntu-mini-iso build project. + + -- Dan Bungert Mon, 06 Mar 2023 08:17:11 -0700 + livecd-rootfs (2.809) lunar; urgency=medium * Do not use the ubuntucinnamon-desktop task for cinnamon builds, it doesn't diff --git a/debian/control b/debian/control index d1d6ee66..ee6ed31a 100644 --- a/debian/control +++ b/debian/control @@ -40,6 +40,7 @@ Depends: ${misc:Depends}, u-boot-tools [armhf arm64], ubuntu-image [!i386 !riscv64], python3-vmdkstream [amd64 i386], + xorriso, xz-utils, zerofree Breaks: ubuntu-defaults-builder (<< 0.32) diff --git a/live-build/auto/config b/live-build/auto/config index 54510c73..a281291c 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -342,7 +342,7 @@ if [ -z "${IMAGEFORMAT:-}" ]; then ;; esac ;; - ubuntu-server:live) + ubuntu-server:live|ubuntu-mini-iso:) IMAGEFORMAT=plain ;; esac @@ -377,6 +377,8 @@ case $IMAGEFORMAT in ubuntu-server:live) touch config/universe-enabled ;; + ubuntu-mini-iso:) + ;; *) PREINSTALLED=true ;; @@ -591,7 +593,7 @@ if [ "$PREINSTALLED" = "true" ]; then ubuntu-server) add_package live oem-config-debconf ubiquity-frontend-debconf ;; - ubuntu-base|ubuntu-oci|ubuntu-cpc|ubuntu-wsl) + ubuntu-base|ubuntu-oci|ubuntu-cpc|ubuntu-wsl|ubuntu-mini-iso) ;; ubuntu) add_package live oem-config-gtk ubiquity-frontend-gtk @@ -655,7 +657,7 @@ case $PROJECT in esac case $PROJECT in - ubuntu-server) + ubuntu-server|ubuntu-mini-iso) COMPONENTS='main' ;; kubuntu|kubuntu-dvd|kubuntu-plasma5|edubuntu|ubuntu-gnome|ubuntu-budgie|ubuntukylin|ubuntucinnamon) @@ -938,6 +940,25 @@ case $PROJECT in PREINSTALL_POOL_SEEDS='server-ship' ;; + ubuntu-mini-iso) + OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" + + OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" + KERNEL_FLAVOURS=none + BINARY_REMOVE_LINUX=false + + add_package install mini-iso-tools openssl ca-certificates isc-dhcp-client linux-generic + case $ARCH in + amd64) + add_package install cd-boot-images-amd64 + ;; + *) + echo "unexpected architecture for $PROJECT: '$ARCH'" + exit 1 + ;; + esac + ;; + ubuntu-base) OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" ;; @@ -1064,7 +1085,7 @@ case $PROJECT:${SUBPROJECT:-} in ubuntu-server:live) BASE_SEED='server' ;; - ubuntu-base:*|ubuntu-core:*) + ubuntu-base:*|ubuntu-core:*|ubuntu-mini-iso:) ;; ubuntu-oci:*) ;; @@ -1237,7 +1258,7 @@ if [ "${IMAGE_HAS_HARDCODED_PASSWORD:-}" = "1" ]; then fi case $PROJECT in - ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci|ubuntu-wsl) + ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci|ubuntu-wsl|ubuntu-mini-iso) # ubuntu-cpc gets this added in 025-create-groups.chroot, and we do # not want this group in projects that are effectively just chroots ;; @@ -1396,7 +1417,7 @@ EOF fi ;; - ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*) + ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*|ubuntu-mini-iso:*) # Ensure that most things e.g. includes.chroot are copied as is for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do case $entry in diff --git a/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary b/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary new file mode 100755 index 00000000..6e857f9c --- /dev/null +++ b/live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary @@ -0,0 +1,77 @@ +#!/bin/sh + +set -eu + +case $ARCH in + amd64) + ;; + *) + exit 0 + ;; +esac + +KERNEL=chroot/boot/vmlinuz +INITRD=chroot/boot/initrd.img + +mkdir -p "chroot/etc/initramfs-tools/conf.d" +cat > chroot/etc/initramfs-tools/conf.d/casperize.conf < ubuntu-mini-iso/amd64/tree/boot/grub/grub.cfg < ubuntu-mini-iso/$ARCH/tree/.disk/cd_type < ubuntu-mini-iso/$ARCH/tree/.disk/info <