Merge remote-tracking branch 'philroche/bugfix/ubuntu-cpc-project-images-not-producing-all-expected-filelists-LP-2033751' into ubuntu/master

ubuntu/mantic
Steve Langasek 1 year ago
commit fdf0091580

3
debian/changelog vendored

@ -1,6 +1,9 @@
livecd-rootfs (23.10.52) UNRELEASED; urgency=medium
* fix: Sort filelists creating when building ubuntu-cpc images (LP: #2033677)
* fix: Create .filelist in ubuntu-cpc project binary hooks that do not use create_manifest shared function (LP: #2033751)
* fix: Ensure any created .filelist is symlinked with expected prefix and correct permissions
* fix: disk-image-non-cloud ubuntu-cpc build target now provides manifest and filelist
-- Philip Roche <phil.roche@ubuntu.com> Thu, 31 Aug 2023 18:20:23 +0100

@ -616,6 +616,14 @@ if [ -e "binary/$INITFS/filesystem.packages" ]; then
ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest"
chmod 644 "$PREFIX.manifest"
fi
# If a .filelist is present, use it as the filelist for the image by
# symlinking with expected name and updating permissions
if [ -e "binary/$INITFS/filesystem.filelist" ]; then
ln "binary/$INITFS/filesystem.filelist" "$PREFIX.filelist"
chmod 644 "$PREFIX.filelist"
fi
if [ -e "binary/$INITFS/filesystem.packages-remove" ]; then
# Not a typo, empty manifest-remove has a single LF in it. :/
if [ $(cat binary/$INITFS/filesystem.packages-remove | wc -c) -gt 1 ]; then

@ -75,6 +75,11 @@ make_ext4_partition "${rootfs_dev_mapper}"
mkdir mountpoint
mount "${rootfs_dev_mapper}" mountpoint
cp -a chroot/* mountpoint/
# the image has been modified from its disk-image-uefi base so the manifest and filelist should be regenerated
chroot mountpoint dpkg-query -W > binary/boot/filesystem.packages
(cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist
umount mountpoint
rmdir mountpoint

@ -431,6 +431,10 @@ EOF
rm mountpoint/tmp/device.map
umount mountpoint/boot/efi
mount
# create sorted filelist as the very last step before unmounting
(cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist
umount_partition mountpoint
rmdir mountpoint
}

@ -179,6 +179,10 @@ install_grub() {
rm mountpoint/tmp/device.map
umount -R mountpoint/boot
mount
# create sorted filelist as the very last step before unmounting
(cd mountpoint && find -xdev) | sort > binary/boot/filesystem.filelist
umount_partition mountpoint
rmdir mountpoint
}

@ -2,3 +2,5 @@ base/disk-image-uefi-non-cloud.binary
base/disk-image.binary
base/disk1-img-xz.binary
provides livecd.ubuntu-cpc.disk1.img.xz
provides livecd.ubuntu-cpc.manifest
provides livecd.ubuntu-cpc.filelist
Loading…
Cancel
Save