|
|
|
@ -36,6 +36,7 @@ mkdir -p config
|
|
|
|
|
cp -af /usr/share/livecd-rootfs/live-build/functions config/functions
|
|
|
|
|
cp -af /usr/share/livecd-rootfs/live-build/lb_*_layered config/
|
|
|
|
|
cp -af /usr/share/livecd-rootfs/live-build/snap-seed-parse.py config/snap-seed-parse
|
|
|
|
|
cp -af /usr/share/livecd-rootfs/live-build/expand-task config/expand-task
|
|
|
|
|
cp -af /usr/share/livecd-rootfs/live-build/squashfs-exclude-files config/
|
|
|
|
|
|
|
|
|
|
mkdir -p config/package-lists
|
|
|
|
@ -95,59 +96,47 @@ _register_pass () {
|
|
|
|
|
PASSES="$PASSES $1"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
add_pass ()
|
|
|
|
|
{
|
|
|
|
|
local pass="$1"
|
|
|
|
|
_check_immutable_passes_to_layers
|
|
|
|
|
_register_pass "$pass"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
add_task ()
|
|
|
|
|
{
|
|
|
|
|
local pass="$1"
|
|
|
|
|
shift
|
|
|
|
|
local task
|
|
|
|
|
local snap_list_file
|
|
|
|
|
local snap_list_files
|
|
|
|
|
local curseed
|
|
|
|
|
local file pkg_file snap_file task
|
|
|
|
|
|
|
|
|
|
_check_immutable_passes_to_layers
|
|
|
|
|
_register_pass "$pass"
|
|
|
|
|
|
|
|
|
|
# The removal of direct task installation support from live-build
|
|
|
|
|
# poses some problems. If the chroot has multiarch configured - for
|
|
|
|
|
# example, if we're building for amd64 - then dumpavail will show
|
|
|
|
|
# foreign-architecture packages which will have their own Task
|
|
|
|
|
# lines, but which we don't want to install. (Compare
|
|
|
|
|
# PackageContainerInterface::FromTask in apt, which restricts task
|
|
|
|
|
# expansion to the native architecture.) We therefore restrict our
|
|
|
|
|
# search to stanzas with Architecture: $ARCH or all.
|
|
|
|
|
#
|
|
|
|
|
# However, even this may not be accurate enough. At the moment I
|
|
|
|
|
# have no idea what happens if an Architecture: all package has
|
|
|
|
|
# different Task fields on different architectures. This is
|
|
|
|
|
# probably a lurking timebomb that we need to fix. In the meantime,
|
|
|
|
|
# the Architecture restriction at least saves us from abject
|
|
|
|
|
# failure.
|
|
|
|
|
#
|
|
|
|
|
# We want as well to grab the snap list for each PASS. Resolve for all
|
|
|
|
|
# given task, and deduplicate them to generate snaps for the PASS.
|
|
|
|
|
if [ ! -e config/germinate-output/structure ]; then
|
|
|
|
|
echo "add_task too soon" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
pkg_file="config/package-lists/livecd-rootfs.list.chroot_$pass"
|
|
|
|
|
|
|
|
|
|
if [ $PASSES_TO_LAYERS = "true" ]; then
|
|
|
|
|
snap_file="config/package-lists/livecd-rootfs.snaplist.chroot_$pass.full"
|
|
|
|
|
else
|
|
|
|
|
snap_file="config/seeded-snaps"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
for task; do
|
|
|
|
|
# We need a ridiculous number of backslashes to protect
|
|
|
|
|
# parentheses from eval.
|
|
|
|
|
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
|
|
|
|
|
|
|
|
|
|
curseed=$(seed_from_task ${task})
|
|
|
|
|
if [ -z "${curseed}" ]; then
|
|
|
|
|
echo "W: No seed matching task ${task}"
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
snap_list_file="config/package-lists/seed.${curseed}.snaplist.full"
|
|
|
|
|
snap_from_seed "${curseed}" $snap_list_file
|
|
|
|
|
if [ -e "$snap_list_file" ]; then
|
|
|
|
|
snap_list_files="${snap_list_files} $snap_list_file"
|
|
|
|
|
./config/expand-task config/germinate-output $FLAVOUR $task packages >> "$pkg_file"
|
|
|
|
|
./config/expand-task config/germinate-output $FLAVOUR $task snaps >> "$snap_file"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
for file in $pkg_file $snap_file; do
|
|
|
|
|
if [ -s $file ]; then
|
|
|
|
|
sort -u -o $file $file
|
|
|
|
|
else
|
|
|
|
|
rm -f $file
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
# The snap list is one line, and could be duplicated between seeds via inheritance.
|
|
|
|
|
# Uniquely sort them and store them back in one line.
|
|
|
|
|
if [ -n "${snap_list_files}" ]; then
|
|
|
|
|
cat ${snap_list_files}|xargs -n1|sort -u > "config/package-lists/livecd-rootfs.snaplist.chroot_${pass}.full"
|
|
|
|
|
rm ${snap_list_files}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
add_package ()
|
|
|
|
@ -611,35 +600,38 @@ fi
|
|
|
|
|
|
|
|
|
|
mkdir -p config/germinate-output
|
|
|
|
|
case $PROJECT in
|
|
|
|
|
edubuntu*)
|
|
|
|
|
FLAVOUR=edubuntu
|
|
|
|
|
;;
|
|
|
|
|
kubuntu*)
|
|
|
|
|
SEED=kubuntu.$SUITE
|
|
|
|
|
FLAVOUR=kubuntu
|
|
|
|
|
;;
|
|
|
|
|
xubuntu*)
|
|
|
|
|
SEED=xubuntu.$SUITE
|
|
|
|
|
FLAVOUR=xubuntu
|
|
|
|
|
;;
|
|
|
|
|
ubuntu-mate*)
|
|
|
|
|
SEED=ubuntu-mate.$SUITE
|
|
|
|
|
FLAVOUR=ubuntu-mate
|
|
|
|
|
;;
|
|
|
|
|
ubuntu-unity*)
|
|
|
|
|
SEED=ubuntu-unity.$SUITE
|
|
|
|
|
FLAVOUR=ubuntu-unity
|
|
|
|
|
;;
|
|
|
|
|
lubuntu*)
|
|
|
|
|
SEED=lubuntu.$SUITE
|
|
|
|
|
FLAVOUR=lubuntu
|
|
|
|
|
;;
|
|
|
|
|
ubuntu-budgie*)
|
|
|
|
|
SEED=ubuntu-budgie.$SUITE
|
|
|
|
|
FLAVOUR=ubuntu-budgie
|
|
|
|
|
;;
|
|
|
|
|
ubuntukylin*)
|
|
|
|
|
SEED=ubuntukylin.$SUITE
|
|
|
|
|
FLAVOUR=ubuntukylin
|
|
|
|
|
;;
|
|
|
|
|
ubuntustudio*)
|
|
|
|
|
SEED=ubuntustudio.$SUITE
|
|
|
|
|
FLAVOUR=ubuntustudio
|
|
|
|
|
;;
|
|
|
|
|
ubuntucinnamon*)
|
|
|
|
|
SEED=ubuntucinnamon.$SUITE
|
|
|
|
|
FLAVOUR=ubuntucinnamon
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
SEED=ubuntu.$SUITE
|
|
|
|
|
FLAVOUR=ubuntu
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
@ -667,7 +659,7 @@ if ! [ -e config/germinate-output/structure ]; then
|
|
|
|
|
GERMINATE_ARG="-c $(echo $COMPONENTS | sed -e's/ \+/,/g')"
|
|
|
|
|
fi
|
|
|
|
|
(cd config/germinate-output && germinate --no-rdepends --no-installer \
|
|
|
|
|
-S $SEEDMIRROR -m $MIRROR -d $SUITE -s $SEED \
|
|
|
|
|
-S $SEEDMIRROR -m $MIRROR -d $SUITE -s $FLAVOUR.$SUITE \
|
|
|
|
|
$GERMINATE_ARG -a $ARCH)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -711,6 +703,66 @@ case $PROJECT in
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
;;
|
|
|
|
|
canary)
|
|
|
|
|
PASSES_TO_LAYERS="true"
|
|
|
|
|
# the minimal layer, for minimal installs
|
|
|
|
|
add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages
|
|
|
|
|
add_package minimal cloud-init
|
|
|
|
|
# the standard layer, contains all base common packages for later layers (we're splitting out the snaps)
|
|
|
|
|
add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages
|
|
|
|
|
# the classic layer, basically only contains snaps from the standard and minimal tasks
|
|
|
|
|
add_pass minimal.standard.classic
|
|
|
|
|
if [ -e "config/package-lists/livecd-rootfs.snaplist.chroot_minimal.full" ]; then
|
|
|
|
|
cat config/package-lists/livecd-rootfs.snaplist.chroot_minimal.full >>config/package-lists/livecd-rootfs.snaplist.chroot_minimal.standard.classic.full
|
|
|
|
|
rm config/package-lists/livecd-rootfs.snaplist.chroot_minimal.full
|
|
|
|
|
fi
|
|
|
|
|
if [ -e "config/package-lists/livecd-rootfs.snaplist.chroot_minimal.standard.full" ]; then
|
|
|
|
|
cat config/package-lists/livecd-rootfs.snaplist.chroot_minimal.standard.full >>config/package-lists/livecd-rootfs.snaplist.chroot_minimal.standard.classic.full
|
|
|
|
|
rm config/package-lists/livecd-rootfs.snaplist.chroot_minimal.standard.full
|
|
|
|
|
fi
|
|
|
|
|
# the live layer, contains all packages for the live session installer
|
|
|
|
|
# TODO: we should probably add the kernel per KERNEL_FLAVOURS
|
|
|
|
|
add_package minimal.standard.live linux-generic casper lvm2 mdadm cryptsetup
|
|
|
|
|
remove_package minimal.standard.live ubiquity-frontend-gtk
|
|
|
|
|
# the enhanced-secureboot layer, contains all packages for the enhanced secureboot install
|
|
|
|
|
add_package minimal.standard.enhanced-secureboot cryptsetup
|
|
|
|
|
# now let's create the neccessary catalog files
|
|
|
|
|
# TODO: make sure that we handle locale_support: langpack correctly
|
|
|
|
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
|
|
|
|
name: "Ubuntu Desktop (minimized)"
|
|
|
|
|
description: >-
|
|
|
|
|
A minimal but usable Ubuntu Desktop.
|
|
|
|
|
id: ubuntu-desktop-minimal
|
|
|
|
|
type: fsimage-layered
|
|
|
|
|
variant: desktop
|
|
|
|
|
locale_support: none
|
|
|
|
|
EOF
|
|
|
|
|
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
|
|
|
|
name: "Ubuntu Desktop"
|
|
|
|
|
description: >-
|
|
|
|
|
A full featured Ubuntu Desktop.
|
|
|
|
|
id: ubuntu-desktop
|
|
|
|
|
type: fsimage-layered
|
|
|
|
|
variant: desktop
|
|
|
|
|
locale_support: none
|
|
|
|
|
default: yes
|
|
|
|
|
EOF
|
|
|
|
|
cat <<-EOF > config/minimal.standard.classic.catalog-in.yaml
|
|
|
|
|
id: ubuntu-desktop
|
|
|
|
|
variations:
|
|
|
|
|
classic:
|
|
|
|
|
path: minimal.standard.squashfs
|
|
|
|
|
EOF
|
|
|
|
|
cat <<-EOF > config/minimal.standard.enhanced-secureboot.catalog-in.yaml
|
|
|
|
|
id: ubuntu-desktop
|
|
|
|
|
variations:
|
|
|
|
|
enhanced-secureboot:
|
|
|
|
|
path: minimal.standard.enhanced-secureboot.squashfs
|
|
|
|
|
snapd_system_label: enhanced-secureboot-desktop
|
|
|
|
|
EOF
|
|
|
|
|
/usr/share/livecd-rootfs/checkout-translations-branch \
|
|
|
|
|
https://git.launchpad.net/subiquity po config/catalog-translations
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
touch config/universe-enabled
|
|
|
|
|
PASSES_TO_LAYERS="true"
|
|
|
|
@ -770,13 +822,12 @@ case $PROJECT in
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
edubuntu)
|
|
|
|
|
add_task install minimal standard ubuntu-desktop-minimal edubuntu-desktop-gnome
|
|
|
|
|
add_task install minimal standard edubuntu-desktop-gnome
|
|
|
|
|
LIVE_TASK='edubuntu-live'
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
ubuntucinnamon)
|
|
|
|
|
add_task install minimal standard
|
|
|
|
|
add_package install ubuntucinnamon-desktop
|
|
|
|
|
add_task install minimal standard ubuntucinnamon-desktop
|
|
|
|
|
# XXX: Adding live packages manually temporarily until we have
|
|
|
|
|
# the live task for ubuntucinnamon set up properly.
|
|
|
|
|
add_package live ubiquity-frontend-gtk
|
|
|
|
@ -838,8 +889,7 @@ case $PROJECT in
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
ubuntu-unity)
|
|
|
|
|
add_task install minimal standard
|
|
|
|
|
add_package install ubuntu-unity-desktop
|
|
|
|
|
add_task install minimal standard ubuntu-unity-desktop
|
|
|
|
|
# XXX: Adding live packages manually temporarily until we have
|
|
|
|
|
# the live task for ubuntu-unity set up properly.
|
|
|
|
|
add_package live metacity ubiquity-frontend-gtk
|
|
|
|
@ -870,8 +920,6 @@ case $PROJECT in
|
|
|
|
|
add_task ubuntu-server-minimal server-minimal
|
|
|
|
|
add_package ubuntu-server-minimal lxd-installer
|
|
|
|
|
add_task ubuntu-server-minimal.ubuntu-server minimal standard server
|
|
|
|
|
# add_task really should do this itself but for now...
|
|
|
|
|
snap_from_seed server config/package-lists/livecd-rootfs.snaplist.chroot_ubuntu-server-minimal.ubuntu-server.full
|
|
|
|
|
add_package ubuntu-server-minimal.ubuntu-server cloud-init
|
|
|
|
|
|
|
|
|
|
add_package ubuntu-server-minimal.ubuntu-server.installer linux-firmware casper openssh-server
|
|
|
|
@ -888,6 +936,9 @@ case $PROJECT in
|
|
|
|
|
intel-iot)
|
|
|
|
|
variants='intel'
|
|
|
|
|
;;
|
|
|
|
|
tegra)
|
|
|
|
|
variants='tegra'
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
# variants='ga hwe'
|
|
|
|
|
variants='ga'
|
|
|
|
@ -904,6 +955,9 @@ case $PROJECT in
|
|
|
|
|
elif [ "$variant" = "intel" ]; then
|
|
|
|
|
kernel_metapkg=linux-intel-iotg
|
|
|
|
|
flavor=intel-iotg
|
|
|
|
|
elif [ "$variant" = "tegra" ]; then
|
|
|
|
|
kernel_metapkg=linux-nvidia-tegra
|
|
|
|
|
flavor=nvidia-tegra
|
|
|
|
|
else
|
|
|
|
|
echo "bogus variant: $variant"
|
|
|
|
|
exit 1
|
|
|
|
@ -1087,31 +1141,24 @@ case $PROJECT:${SUBPROJECT:-} in
|
|
|
|
|
;;
|
|
|
|
|
xubuntu:minimal)
|
|
|
|
|
;;
|
|
|
|
|
edubuntu:*)
|
|
|
|
|
BASE_SEED='desktop-gnome'
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
BASE_SEED='desktop'
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
if [ "$PASSES_TO_LAYERS" != "true" ] && [ -n "${BASE_SEED}" ]; then
|
|
|
|
|
snap_from_seed "${BASE_SEED}" config/seeded-snaps
|
|
|
|
|
fi
|
|
|
|
|
if [ "$PROJECT:${SUBPROJECT:-}" = ubuntu-cpc:minimized ]; then
|
|
|
|
|
# We install a lxc script that installs the snap when invoked. We don't
|
|
|
|
|
# want any other snaps to come in without due consideration, so fail the
|
|
|
|
|
# build if we see such a snap.
|
|
|
|
|
for snap in `cat config/seeded-snaps`; do
|
|
|
|
|
case $snap in
|
|
|
|
|
lxd | lxd=*)
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "Unexpected seeded snap for ubuntu-cpc:minimized build: $snap"
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
# We install a lxc script that installs the snap when invoked and
|
|
|
|
|
# don't want any other snaps.
|
|
|
|
|
if [ -s config/seeded-snaps ]; then
|
|
|
|
|
echo "Unexpected seeded snaps for ubuntu-cpc:minimized build:"
|
|
|
|
|
cat config/seeded-snaps
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Truncate but don't delete to a) prevent any snaps from being seeded,
|
|
|
|
|
# while at the same time b) triggering initialization of assertions.
|
|
|
|
|
# Create an empty file to trigger initialization of assertions.
|
|
|
|
|
truncate --size 0 config/seeded-snaps
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -1156,6 +1203,11 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in
|
|
|
|
|
add_package install linux-firmware-raspi pi-bluetooth u-boot-rpi u-boot-tools
|
|
|
|
|
BINARY_REMOVE_LINUX=false
|
|
|
|
|
;;
|
|
|
|
|
arm64+tegra)
|
|
|
|
|
# Common configuration for all NVIDIA Tegra image variants (server,
|
|
|
|
|
# desktop etc.)
|
|
|
|
|
KERNEL_FLAVOURS="nvidia-$SUBARCH"
|
|
|
|
|
;;
|
|
|
|
|
riscv*+*)
|
|
|
|
|
if [ "${SUBARCH:-}" = "licheerv" ]; then
|
|
|
|
|
# The wifi driver of the licheerv is an out-of-tree driver packaged
|
|
|
|
@ -1169,7 +1221,7 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
case $PROJECT:${SUBPROJECT:-} in
|
|
|
|
|
ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*)
|
|
|
|
|
ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*|ubuntu:canary)
|
|
|
|
|
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
|
|
|
|
|
KERNEL_FLAVOURS=none
|
|
|
|
|
BINARY_REMOVE_LINUX=false
|
|
|
|
@ -1395,6 +1447,14 @@ deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-proposed $LB_PARENT_ARCHIVE_AREAS
|
|
|
|
|
EOF
|
|
|
|
|
cp -a config/archives/proposed.list.chroot \
|
|
|
|
|
config/archives/proposed.list.binary
|
|
|
|
|
|
|
|
|
|
mkdir -p config/chroot_apt/
|
|
|
|
|
cat > config/chroot_apt/proposed.pref <<EOF
|
|
|
|
|
# override for NotAutomatic: yes
|
|
|
|
|
Package: *
|
|
|
|
|
Pin: release a=*-proposed
|
|
|
|
|
Pin-Priority: 500
|
|
|
|
|
EOF
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
case $PROJECT:${SUBPROJECT:-} in
|
|
|
|
@ -1413,7 +1473,7 @@ EOF
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*|ubuntu-mini-iso:*)
|
|
|
|
|
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu:canary)
|
|
|
|
|
# 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
|
|
|
|
|