Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into canary-locale

canary-locale
Łukasz 'sil2100' Zemczak 1 year ago
commit 4fc64be673

52
debian/changelog vendored

@ -1,8 +1,56 @@
livecd-rootfs (23.10.5) UNRELEASED; urgency=medium livecd-rootfs (23.10.10) UNRELEASED; urgency=medium
* canary: enable locale support for canary layers. * canary: enable locale support for canary layers.
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 19 Jul 2023 16:36:35 +0200 -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 03 Aug 2023 12:50:29 +0200
livecd-rootfs (23.10.9) mantic; urgency=medium
* desktop, budgie: no need to include the kernel directly, it is installed
at runtime (LP: #2026225)
-- Dan Bungert <daniel.bungert@canonical.com> Wed, 02 Aug 2023 13:16:00 -0600
livecd-rootfs (23.10.8) mantic; urgency=medium
[ Heinrich Schuchardt ]
* risc-v: increase loader2 partition for VisionFive 2. EDK II is available
for the StarFive VisionFive 2 board. As it is larger than U-Boot we need
to increase the size of the loader 2 partition to accommodate it.
[ Michael Hudson-Doyle ]
* lb_chroot_layered: use rsync to make more minimal overlay layers.
(LP: #2028213)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 02 Aug 2023 13:19:29 +1200
livecd-rootfs (23.10.7) mantic; urgency=medium
* Actually fix live-build/ubuntu-cpc/hooks.d/base/disk-image.binary to not
call force_boot_without_initramfs on s390x rather than
disk-image-uefi.binary which obviously would never run on s390x.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Sun, 30 Jul 2023 09:17:52 +1200
livecd-rootfs (23.10.6) mantic; urgency=medium
* live-build/ubuntu-cpc/hooks.d/base/disk-image-*.binary: Fix invocations of
force_boot_without_initramfs to pass "mountpoint" and not "${mountpoint}"
(which actually worked on most arches for VERY BAD reasons but fails on
s390x).
* live-build/ubuntu-cpc/hooks.d/base/disk-image.binary: Do not call
force_boot_without_initramfs on s390x.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Sat, 29 Jul 2023 07:56:28 +1200
livecd-rootfs (23.10.5) mantic; urgency=medium
[ Utkarsh Gupta ]
* Use ubuntu-cloud-minimal metapackage in minimized CPC images rather than
cloud-image task which brings in snaps that are unwanted in minimized
builds.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 28 Jul 2023 11:05:44 +1200
livecd-rootfs (23.10.4) mantic; urgency=medium livecd-rootfs (23.10.4) mantic; urgency=medium

@ -791,7 +791,9 @@ case $PROJECT in
*) *)
touch config/universe-enabled touch config/universe-enabled
PASSES_TO_LAYERS="true" PASSES_TO_LAYERS="true"
KERNEL_FLAVOURS='generic-hwe-22.04' OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
KERNEL_FLAVOURS=none
BINARY_REMOVE_LINUX=false
add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages
add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages
add_task minimal.standard.live ubuntu-live add_task minimal.standard.live ubuntu-live
@ -928,7 +930,9 @@ case $PROJECT in
*) *)
# By default Ubuntu Budgie now ships the new installer. # By default Ubuntu Budgie now ships the new installer.
PASSES_TO_LAYERS="true" PASSES_TO_LAYERS="true"
KERNEL_FLAVOURS='generic-hwe-22.04' OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
KERNEL_FLAVOURS=none
BINARY_REMOVE_LINUX=false
add_task minimal minimal standard ubuntu-budgie-desktop-minimal ubuntu-budgie-desktop-minimal-default-languages add_task minimal minimal standard ubuntu-budgie-desktop-minimal ubuntu-budgie-desktop-minimal-default-languages
add_task minimal.standard ubuntu-budgie-desktop ubuntu-budgie-desktop-default-languages add_task minimal.standard ubuntu-budgie-desktop ubuntu-budgie-desktop-default-languages
add_task minimal.standard.live ubuntu-budgie-live add_task minimal.standard.live ubuntu-budgie-live
@ -1116,8 +1120,7 @@ case $PROJECT in
KERNEL_FLAVOURS=virtual KERNEL_FLAVOURS=virtual
if [ "${SUBPROJECT:-}" = minimized ]; then if [ "${SUBPROJECT:-}" = minimized ]; then
add_task install cloud-image add_package install ubuntu-cloud-minimal
add_package install sudo lxd-installer
else else
add_task install minimal standard cloud-image add_task install minimal standard cloud-image
add_package install ubuntu-minimal add_package install ubuntu-minimal
@ -1217,7 +1220,11 @@ case $PROJECT:${SUBPROJECT:-} in
BASE_SEED='wsl' BASE_SEED='wsl'
;; ;;
ubuntu-cpc:*) ubuntu-cpc:*)
BASE_SEED='server' # we don't preseed any snaps in minimized images, so no need to set
# BASE_SEED in that case.
if [ "${SUBPROJECT:-}" != minimized ]; then
BASE_SEED='server'
fi
;; ;;
ubuntu-server:live) ubuntu-server:live)
BASE_SEED='server' BASE_SEED='server'

@ -107,57 +107,6 @@ lb_chroot_includes () {
cd "${OLDPWD}" cd "${OLDPWD}"
} }
reduce_pass_size () {
# Remove duplicated files between parent and current pass
# Note the empty directories created in a child pass are not removed
local pass=$1
local parent="$(get_parent_pass $pass)"
$(is_root_layer $pass) && return
pass_dir="overlay.${pass}"
parent_pass_dir="overlay.${parent}"
local list_pass=$(mktemp)
local list_parent=$(mktemp)
(cd $pass_dir && find . ! -type d -printf "%h/%f|%s|%y|%U|%G|%m\n"|sort > $list_pass)
(cd $parent_pass_dir && find . ! -type d -printf "%h/%f|%s|%y|%U|%G|%m\n"|sort > $list_parent)
# Only iterate on common files with same type, owner, permission and size
comm -12 $list_pass $list_parent|cut -d'|' -f1|while read f; do
# If file contents are different, keep it
if ! diff --brief --no-dereference "$pass_dir/$f" "$parent_pass_dir/$f" >/dev/null; then
continue
fi
p="$(dirname "$f")"
while [ "$p" != . ]; do
# As explained in the overlayfs documentation
# https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html#whiteouts-and-opaque-directories
# an xattr of trusted.overlay.opaque indicates an 'opaque' directory
# that was deleted from the overlay. Removing files from within the
# directory, even if identical with one in the lower layer, will result
# in it going missing from the combined filesystem.
#
# It would be possible to be more clever, e.g. if the two directories
# are still similar, we could the delete the attribute and convert any
# still-needed deletions to whiteouts but it doesn't seem worth it in
# the cases seen so far.
if [ -n "$(getfattr -n trusted.overlay.opaque -h --only-values -- "$pass_dir/$p" 2>/dev/null)" ]; then
Echo_message "reduce_pass_size: '%s' would be removed from overlay but for trusted.overlay.opaque on '%s'" "$f" "$p"
continue 2
fi
p="$(dirname "$p")"
done
# Files are strictly identical between the 2 passes (only mod or access times differs). No need for unused delta.
Echo_message "reduce_pass_size: '%s' is strictly identical between %s and %s. Removing." "$f" "$pass" "$parent"
rm "$pass_dir/$f"
done
rm $list_pass
rm $list_parent
}
create_chroot_pass () { create_chroot_pass () {
local pass=$1 local pass=$1
shift 1 # restore ${*} shift 1 # restore ${*}
@ -182,8 +131,8 @@ create_chroot_pass () {
mkdir -p "$overlay_dir/" mkdir -p "$overlay_dir/"
lowerdirs=$(get_lowerdirs_for_pass $pass) lowerdirs=$(get_lowerdirs_for_pass $pass)
if [ -n "$lowerdirs" ]; then if [ -n "$lowerdirs" ]; then
mkdir -p chroot/ mkdir -p chroot "${overlay_dir}-initial"
mount_overlay "$lowerdirs" "$overlay_dir" chroot/ mount_overlay "$lowerdirs" "${overlay_dir}-initial" chroot/
else else
ln -s "$overlay_dir/" chroot ln -s "$overlay_dir/" chroot
fi fi
@ -319,13 +268,22 @@ create_chroot_pass () {
lb chroot_devpts remove ${*} lb chroot_devpts remove ${*}
if [ -n "$lowerdirs" ]; then if [ -n "$lowerdirs" ]; then
umount chroot # Although the current chroot was created as an overlay over
rmdir chroot # the previous layer, many operations can result in redundant
# files in the upperdir. Rather than trying to minimize the
# overlay by hand, we rsync the chroot into a fresh overlay,
# rely on rsyncs ability to avoid redundant file operations,
# and take _that_ overlay's upperdir as the content of the
# layer.
mkdir chroot-2
mount_overlay "$lowerdirs" "$overlay_dir" chroot-2/
rsync -aXHAS --del chroot/ chroot-2/
umount chroot chroot-2
rmdir chroot chroot-2
rm -rf ${overlay_dir}-initial
else else
rm chroot rm chroot
fi fi
reduce_pass_size $pass
} }
if [ ! -d chroot.bootstrap/ ]; then if [ ! -d chroot.bootstrap/ ]; then

@ -139,15 +139,15 @@ create_partitions() {
--new=13:4096:8191 \ --new=13:4096:8191 \
--typecode=13:2E54B353-1271-4842-806F-E436D6AF6985 \ --typecode=13:2E54B353-1271-4842-806F-E436D6AF6985 \
--change-name=13:loader1 \ --change-name=13:loader1 \
--new=2:8192:16383 \ --new=2:8192:40959 \
--typecode=2:7a097280-70d2-44bc-886c-ff5ffbb7b098 \ --typecode=2:7a097280-70d2-44bc-886c-ff5ffbb7b098 \
--change-name=2:loader2 \ --change-name=2:loader2 \
--new=12:16384:24575 \ --new=12:40960:49151 \
--change-name=12:CIDATA \ --change-name=12:CIDATA \
--new=15:24576:229375 \ --new=15:49152:253951 \
--typecode=15:ef00 \ --typecode=15:ef00 \
--change-name=15:ESP \ --change-name=15:ESP \
--new=1:229376: \ --new=1:253952: \
--attributes=1:set:2 --attributes=1:set:2
else else
# preinstalled server, currently FU540 # preinstalled server, currently FU540
@ -408,7 +408,7 @@ EOF
# Use initrdless boot for minimal images # Use initrdless boot for minimal images
if [ "${SUBPROJECT:-}" = "minimized" ]; then if [ "${SUBPROJECT:-}" = "minimized" ]; then
force_boot_without_initramfs ${mountpoint} force_boot_without_initramfs mountpoint
fi fi
# This call to rewrite the debian package manifest is added here to capture # This call to rewrite the debian package manifest is added here to capture

@ -128,7 +128,7 @@ install_grub() {
# Use initrdless boot for minimal images # Use initrdless boot for minimal images
if [ "${SUBPROJECT:-}" = "minimized" ]; then if [ "${SUBPROJECT:-}" = "minimized" ]; then
force_boot_without_initramfs ${mountpoint} force_boot_without_initramfs mountpoint
fi fi
# This call to rewrite the debian package manifest is added here to capture # This call to rewrite the debian package manifest is added here to capture

@ -129,11 +129,11 @@ if [ "${should_install_grub}" -eq 1 ]; then
undivert_grub mountpoint undivert_grub mountpoint
rm mountpoint/tmp/device.map rm mountpoint/tmp/device.map
fi
# Use initrdless boot for minimal images # Use initrdless boot for minimal images
if [ "${SUBPROJECT:-}" = "minimized" ]; then if [ "${SUBPROJECT:-}" = "minimized" ]; then
force_boot_without_initramfs ${mountpoint} force_boot_without_initramfs mountpoint
fi
fi fi
if [ "$ARCH" = "s390x" ]; then if [ "$ARCH" = "s390x" ]; then

@ -91,37 +91,6 @@ if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; the
rm "${rootd}/boot/initrd.img" rm "${rootd}/boot/initrd.img"
fi fi
# Recommends of ubuntu-server that should not be included in cloud images by
# default
# unfortunately because we are currently installing ubuntu-server as a task,
# all of the recursive dependencies are marked as manually installed and are
# not subject to autoremoval. There is discussion of us stopping the use of
# tasks in livecd-rootfs but in the meantime, we have to also explicitly
# remove the packages providing the services
_xchroot "$rootd" env DEBIAN_FRONTEND=noninteractive \
apt-get -y autoremove --purge fwupd modemmanager udisks2
if [ "${SUBPROJECT:-}" = minimized ]; then
# Remove various packages that we don't want in the minimized images.
# Some of these are tools that don't make sense by default
# non-interactively; some are libraries whose reverse-dependencies
# will have already been removed; open-vm-tools, it's a bug that this
# is in the common cloud seed because this should only be included
# in VMWare guest images, and we know none of the minimized images
# are targeted at VMWare.
_xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
apt-mark auto '^lib.*' '^python*' vim-runtime 2>/dev/null
# FIXME: iso-codes is a dep of software-properties and shouldn't be
_xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
apt-get -y autoremove --purge iso-codes xauth pastebinit \
plymouth open-vm-tools git git-man shared-mime-info vim vim-common \
console-setup ncurses-term tmux screen policykit-1 \
xdg-user-dirs less publicsuffix run-one apport-symptoms \
ubuntu-cloudimage-keyring file
_xchroot "${rootd}" apt clean
fi
#### END COMMON ARCH FUNCTIONS #### END COMMON ARCH FUNCTIONS

Loading…
Cancel
Save