Create a separate WSL image than CPC so it can be managed independently. Co-authored-by: Didier Roche <didrocks@ubuntu.com>jammy-iotg-bump
parent
68b26a790b
commit
80ccea8d63
@ -1,64 +0,0 @@
|
|||||||
#!/bin/bash -eux
|
|
||||||
# vi: ts=4 expandtab
|
|
||||||
#
|
|
||||||
# Generate the compressed root directory for WSL
|
|
||||||
|
|
||||||
case ${SUBPROJECT:-} in
|
|
||||||
minimized)
|
|
||||||
echo "Skipping minimized $0 build as WSL systems are designed to be interactive"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $ARCH in
|
|
||||||
amd64|arm64)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "WSL root tarballs are not generated for $ARCH."
|
|
||||||
exit 0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "${SUBARCH:-}" ]; then
|
|
||||||
echo "Skipping rootfs build for subarch flavor build"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
. config/functions
|
|
||||||
|
|
||||||
rootfs_dir=wslroot.dir
|
|
||||||
|
|
||||||
# This is the directory created by create-root-dir.binary
|
|
||||||
cp -a rootfs.dir $rootfs_dir
|
|
||||||
|
|
||||||
setup_mountpoint $rootfs_dir
|
|
||||||
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get -y -qq install ubuntu-wsl
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
|
|
||||||
|
|
||||||
# Install snap manually for now as config on cpc always assume the same base seed for every flavors
|
|
||||||
env UBUNTU_STORE_ARCH=${ARCH:-} SNAPPY_STORE_NO_CDN=1 chroot $rootfs_dir snap download --target-directory=/var/lib/snapd/snaps core20
|
|
||||||
env UBUNTU_STORE_ARCH=${ARCH:-} SNAPPY_STORE_NO_CDN=1 chroot $rootfs_dir snap download --target-directory=/var/lib/snapd/snaps gtk-common-themes
|
|
||||||
env UBUNTU_STORE_ARCH=${ARCH:-} SNAPPY_STORE_NO_CDN=1 chroot $rootfs_dir snap download --target-directory=/var/lib/snapd/snaps --channel=latest/edge ubuntu-desktop-installer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create_manifest $rootfs_dir livecd.ubuntu-cpc.wsl.rootfs.manifest
|
|
||||||
teardown_mountpoint $rootfs_dir
|
|
||||||
|
|
||||||
# remove attributes not supported by WSL's tar
|
|
||||||
if [ -d $rootfs_dir/var/log/journal ]; then
|
|
||||||
setfattr -x system.posix_acl_access $rootfs_dir/var/log/journal
|
|
||||||
setfattr -x system.posix_acl_default $rootfs_dir/var/log/journal
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The reason not using just tar .. -C $rootfs_dir . 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 $rootfs_dir
|
|
||||||
tar --xattrs --sort=name -czf ../livecd.ubuntu-cpc.wsl.rootfs.tar.gz *
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
rm -rf $rootfs_dir
|
|
@ -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
|
Loading…
Reference in new issue