Compare commits

...

8 Commits

Author SHA1 Message Date
Philip Roche
13c53acd0e Fix d/ch formatting for 2.828.2 2023-10-27 11:41:22 +01:00
Philip Roche
df428ae77a Merge bugfix/ubuntu-cpc-LP-2036195-auto-installed-packages-lunar into ubuntu/lunar [a=philroche] [r=andrew-cloke,vorlon]
The chroot tmpfs mount should only be /var/lib/apt/lists, not /var/lib/apt; the latter breaks changes to /var/lib/apt/extended_states. LP: #2036195.

(cherry picked from commit 1deccc2edd7f139b84a6cb3d0a4dfe5ebaff50c7)

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/454058
2023-10-26 17:59:33 +01:00
Steve Langasek
cf7b3c5b36 The chroot tmpfs mount should only be /var/lib/apt/lists, not /var/lib/apt; the latter breaks changes to /var/lib/apt/extended_states. LP: #2036195.
(cherry picked from commit 1deccc2edd7f139b84a6cb3d0a4dfe5ebaff50c7)

# Conflicts:
#	debian/changelog
2023-10-26 17:41:15 +01:00
Utkarsh Gupta
af29243117 Fix d/ch to start the SRU series from 2.828 -> 2.828.1 2023-10-26 15:21:54 +01:00
Philip Roche
73d0477aa7 Merge utkarsh-lunar-sru-1996489 into ubuntu/lunar [a=utkarsh] [r=andrew-cloke,philroche]
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)

    ---

    fix: install LXD snap from stable/ubuntu-<version> 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-<version> 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)

MP: https://code.launchpad.net/~utkarsh/livecd-rootfs/+git/livecd-rootfs/+merge/452739
2023-10-26 13:34:10 +01:00
Utkarsh Gupta
22f8d6a79f Update d/ch for 2.829 release 2023-10-04 13:43:24 +05:30
Utkarsh Gupta
0c728eb1a9 fix: install LXD snap from stable/ubuntu-<version> 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-<version> 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)
2023-10-04 13:41:08 +05:30
Utkarsh Gupta
38efc28bfb 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)
2023-10-04 13:40:45 +05:30
3 changed files with 24 additions and 7 deletions

16
debian/changelog vendored
View File

@ -1,3 +1,19 @@
livecd-rootfs (2.828.2) lunar; urgency=medium
[ Steve Langasek ]
* The chroot tmpfs mount should only be /var/lib/apt/lists, not
/var/lib/apt; the latter breaks changes to /var/lib/apt/extended_states.
(LP: #2036195).
-- Phil Roche <phil.roche@canonical.com> Thu, 19 Oct 2023 17:30:20 +0100
livecd-rootfs (2.828.1) lunar; urgency=medium
* Fix unminimize to correctly list packages. (LP: #1996489)
* Install LXD snap from stable/ubuntu-<version> channel. (LP: #2036725)
-- Utkarsh Gupta <utkarsh@ubuntu.com> 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

View File

@ -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
@ -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'

View File

@ -143,7 +143,7 @@ setup_mountpoint() {
# cgroup2 mount for LP: 1944004
mount -t cgroup2 none "$mountpoint/sys/fs/cgroup"
mount -t tmpfs none "$mountpoint/tmp"
mount -t tmpfs none "$mountpoint/var/lib/apt"
mount -t tmpfs none "$mountpoint/var/lib/apt/lists"
mount -t tmpfs none "$mountpoint/var/cache/apt"
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"