diff --git a/debian/changelog b/debian/changelog index 13a538c1..bde87076 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.760) jammy; urgency=medium + + [ Jean-Baptiste Lallement ] + [ Didier Roche ] + * Create a separate WSL image than CPC so it can be managed independently. + + -- Jean-Baptiste Lallement Mon, 14 Mar 2022 11:30:41 +0100 + livecd-rootfs (2.759) jammy; urgency=medium * Optionally (when ALLOW_CORE_SNAP env var is set) allow to install core diff --git a/live-build/auto/build b/live-build/auto/build index 8fdd359f..7621de65 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -155,7 +155,7 @@ Expire-Date: 0 lb bootstrap "$@" case $PROJECT:${SUBPROJECT:-} in - ubuntu-server:*|ubuntu-cpc:*|ubuntu:desktop-preinstalled) + ubuntu-server:*|ubuntu-cpc:*|ubuntu:desktop-preinstalled|ubuntu-wsl:*) # Set locale to C.UTF-8 by default. We should # probably do this for all images early in the # 18.10 cycle but for now just do it for diff --git a/live-build/auto/config b/live-build/auto/config index 477ae96e..bf3e6947 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -331,7 +331,7 @@ _get_live_passes () if [ -z "${IMAGEFORMAT:-}" ]; then case $PROJECT:${SUBPROJECT:-} in - ubuntu-cpc:*|ubuntu:desktop-preinstalled) + ubuntu-cpc:*|ubuntu:desktop-preinstalled|ubuntu-wsl:*) case $SUBARCH in raspi|intel-iot) IMAGEFORMAT=ubuntu-image @@ -548,6 +548,8 @@ case $IMAGEFORMAT in case $PROJECT in ubuntu-server) ;; + ubuntu-wsl) + ;; ubuntu) if [ "$SUBPROJECT" != "canary" ]; then add_package live casper @@ -584,7 +586,7 @@ if [ "$PREINSTALLED" = "true" ]; then ubuntu-server) add_package live oem-config-debconf ubiquity-frontend-debconf ;; - ubuntu-base|ubuntu-oci|ubuntu-cpc) + ubuntu-base|ubuntu-oci|ubuntu-cpc|ubuntu-wsl) ;; ubuntu) add_package live oem-config-gtk ubiquity-frontend-gtk @@ -892,6 +894,13 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" ;; + ubuntu-wsl) + add_task install minimal standard ubuntu-wsl + OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" + KERNEL_FLAVOURS=none + BINARY_REMOVE_LINUX=false + ;; + ubuntu-cpc) KERNEL_FLAVOURS=virtual @@ -989,6 +998,9 @@ case $PROJECT:${SUBPROJECT:-} in ubuntu:*|kubuntu*:*|lubuntu*:*|xubuntu*:*|ubuntu-mate*:*|ubuntustudio*:*|ubuntukylin*:*|ubuntu-budgie*:*) BASE_SEED='desktop' ;; + ubuntu-wsl:*) + BASE_SEED='wsl' + ;; ubuntu-cpc:*) BASE_SEED='server' ;; @@ -1151,7 +1163,7 @@ if [ "${IMAGE_HAS_HARDCODED_PASSWORD:-}" = "1" ]; then fi case $PROJECT in - ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci) + ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci|ubuntu-wsl) # ubuntu-cpc gets this added in 025-create-groups.chroot, and we do # not want this group in projects that are effectively just chroots ;; @@ -1310,7 +1322,7 @@ EOF fi ;; - ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled) + ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*) # 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-wsl/hooks/99-tar.binary b/live-build/ubuntu-wsl/hooks/99-tar.binary new file mode 100755 index 00000000..c6a5e562 --- /dev/null +++ b/live-build/ubuntu-wsl/hooks/99-tar.binary @@ -0,0 +1,24 @@ +#!/bin/bash -eux +# vi: ts=4 expandtab +# +# Generate the compressed root directory for WSL manually. +# Type "plain" unfortunately does not execute lb_binary_* helpers. + +case $ARCH in + amd64|arm64) + ;; + *) + echo "WSL root tarballs are not generated for $ARCH." + exit 0;; +esac + +# The reason not using just tar .. -C chroot . is that using '.' was found +# not working once and checking if using the simpler command is safe needs +# verification of the app installation on all Windows 10 builds we support +# with WSL. +cd chroot +tar --xattrs --sort=name -czf ../livecd.ubuntu-wsl.rootfs.tar.gz * +cd .. + +# Remove initial ext4-formatted fs +rm -f binary/boot/filesystem.ext4