mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-10-25 14:04:06 +00:00
* Replace "snap download" with tool that uses snap store's coherence feature
This is important for parallel image builds to ensure all pre-seeded snaps
have the same versions across image variants.
* Inject a proxy into the build providing a snapshot view of the package repo.
When the REPO_SNAPSHOT_STAMP variable is set, the auto/build script will attempt
to launch a transparent HTTP proxy on port 8080, and insert an iptables rule to
redirect all outgoing HTTP requests to this proxy.
The proxy, contained in the `magic-proxy` Python script, examines each request
and silently overrides those pointing to InRelease files or files that are
listed in InRelease files. It will instead provide the contents of the requested
file as it was at REPO_SNAPSHOT_STAMP, by downloading the corresponding asset
"by hash".
* Use series files with dependency handling to generate hook symlinks dynamically
This patch currently only applies to the "ubuntu-cpc" project.
More and more logic has been going into the hook scripts to decide
under which conditions they should run or not. As we are moving
to parallelized builds of image sets, this will get even more
complicated. Base hooks will have to know which image sets they
belong to and modification of the dependency chain between scripts
will become more complicated and prone to errors, as the number of
image sets grows.
This patch introduces explicit ordering and dependency handling for
scripts through the use of `series` files and an explicit syntax
for dependency specification.
57 lines
1.4 KiB
Bash
Executable File
57 lines
1.4 KiB
Bash
Executable File
#!/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 binary/boot/filesystem.dir/ $rootfs_dir
|
|
|
|
setup_mountpoint $rootfs_dir
|
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get -y -qq install ubuntu-wsl
|
|
|
|
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 for 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
|