From 38efc28bfb126f2cdc8cfaf3b8f65b573eefd8e4 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Sat, 2 Sep 2023 00:39:38 +0530 Subject: [PATCH 1/3] Fix unminimize to correctly list packages (LP: #1996489) Prior to dpkg/1.21.0, there was a bug where dpkg -V/--verify couldn't list all the correct packages correctly but with that being fix and in archive since Jammy, this works perfectly but the syntax to report the missing files have changed. It just prints 'missing' now. With that new format, we can now fix the regex to simply list the packages. With this patch, the unminimize script works flawlessly on a minimized image. (cherry picked from commit 78a98c683573a1f7983afae54e2f187eeae127c7) --- live-build/auto/build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 8c7688a5..73375b66 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -241,18 +241,18 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Reinstalling packages with system documentation in /usr/share/doc/ .." # This step processes the packages which still have missing documentation - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Restoring system translations..." # This step processes the packages which still have missing translations - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y - if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then + if dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {exit 1}'; then echo "Documentation has been restored successfully." rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp else echo "There are still files missing from /usr/share/doc/:" - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print " " $2}' + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print " " $2}' echo "You may want to try running this script again or you can remove" echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually." fi From 0c728eb1a9d6ce181e8de5c6f1d580fe9b40b7f8 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Thu, 21 Sep 2023 13:34:07 +0530 Subject: [PATCH 2/3] fix: install LXD snap from stable/ubuntu- channel (LP: #2036725) In the past, we'd directly snap install lxd which defaults to the latest/stable channel. However, whilst working on enhancing unminimize, it was observed that we install this snap from the stable/ubuntu- channel instead. This was also noted as a failure when running the CTF tests: `lxd installed from latest/stable, not stable/ubuntu-23.10` (cherry picked from commit 12a2109c223e261214747d5f98d4b8d7ee9625e3) --- live-build/auto/build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 73375b66..385ffed0 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -288,8 +288,9 @@ fi echo "Removing lxd installer package..." apt-get purge -y lxd-installer -echo "Installing lxd from snap..." -snap install lxd +. /etc/os-release +echo "Installing lxd from snap from stable/ubuntu-$VERSION_ID channel" +snap install --channel="stable/ubuntu-$VERSION_ID" lxd EOF fi cat >> chroot/usr/local/sbin/unminimize <<'EOF' From 22f8d6a79fe150e62199b1a2be57007d6a1324ab Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Wed, 4 Oct 2023 13:43:24 +0530 Subject: [PATCH 3/3] Update d/ch for 2.829 release --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index f48a7b4d..da0e67b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.829) lunar; urgency=medium + + * Fix unminimize to correctly list packages. (LP: #1996489) + * Install LXD snap from stable/ubuntu- channel. (LP: #2036725) + + -- Utkarsh Gupta Wed, 04 Oct 2023 13:42:33 +0530 + livecd-rootfs (2.828) lunar; urgency=medium * 099-ubuntu-image-customization.chroot: Remove redundant creation of oem