mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-12 11:51:11 +00:00
Import patches-unapplied version 2.454 to ubuntu/artful-proposed
Imported using git-ubuntu import. Changelog parent: 6e53d32cd86faec5af29d1dd745934197b2cbdba New changelog entries: [ Steve Langasek ] * live-build/functions: mount tmpfs on /var/cache/apt and var/lib/apt, so we don't have to leave empty space in our derivative images for packages that have been downloaded/installed/removed. This normally isn't relevant for the installed system, since the root filesystem will auto-expand in place on the target disk, but lets us ship smaller images. * live-build/functions: also call 'apt-get update' after mounting the blank /var/lib/apt. * live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: call apt-get update *before* installing packages, not after. [ Robert C Jennings ] * live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint, to reverse the work done in setup_mountpoint. Lack of this function has forced users of setup_mountpoint to implement this separately and the implementations have diverged. (LP: #1716992) * live-build/ubuntu-cpc/functions: Remove umount_settle function. The was only used where teardown_mountpoint was lacking. [ Steve Langasek ] * Also adjust live-build/ubuntu-server/hooks/032-installer-squashfs.binary to use teardown_mountpoint.
This commit is contained in:
parent
6e53d32cd8
commit
efbd6fd1c6
28
debian/changelog
vendored
28
debian/changelog
vendored
@ -1,3 +1,31 @@
|
||||
livecd-rootfs (2.454) artful; urgency=medium
|
||||
|
||||
[ Steve Langasek ]
|
||||
* live-build/functions: mount tmpfs on /var/cache/apt and var/lib/apt, so
|
||||
we don't have to leave empty space in our derivative images for packages
|
||||
that have been downloaded/installed/removed. This normally isn't
|
||||
relevant for the installed system, since the root filesystem will
|
||||
auto-expand in place on the target disk, but lets us ship smaller
|
||||
images.
|
||||
* live-build/functions: also call 'apt-get update' after mounting the
|
||||
blank /var/lib/apt.
|
||||
* live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: call apt-get
|
||||
update *before* installing packages, not after.
|
||||
|
||||
[ Robert C Jennings ]
|
||||
* live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
|
||||
to reverse the work done in setup_mountpoint. Lack of this function
|
||||
has forced users of setup_mountpoint to implement this separately
|
||||
and the implementations have diverged. (LP: #1716992)
|
||||
* live-build/ubuntu-cpc/functions: Remove umount_settle function.
|
||||
The was only used where teardown_mountpoint was lacking.
|
||||
|
||||
[ Steve Langasek ]
|
||||
* Also adjust live-build/ubuntu-server/hooks/032-installer-squashfs.binary
|
||||
to use teardown_mountpoint.
|
||||
|
||||
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 12:04:48 -0700
|
||||
|
||||
livecd-rootfs (2.453) artful; urgency=medium
|
||||
|
||||
[ Chris Glass ]
|
||||
|
@ -83,11 +83,29 @@ setup_mountpoint() {
|
||||
mount proc-live -t proc "$mountpoint/proc"
|
||||
mount sysfs-live -t sysfs "$mountpoint/sys"
|
||||
mount -t tmpfs none "$mountpoint/tmp"
|
||||
mount -t tmpfs none "$mountpoint/var/lib/apt"
|
||||
mount -t tmpfs none "$mountpoint/var/cache/apt"
|
||||
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
|
||||
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
|
||||
chroot "$mountpoint" apt-get update
|
||||
|
||||
}
|
||||
|
||||
teardown_mountpoint() {
|
||||
# Reverse the operations from setup_mountpoint
|
||||
local mountpoint="$1"
|
||||
|
||||
umount "$mountpoint/var/cache/apt"
|
||||
umount "$mountpoint/var/lib/apt"
|
||||
umount "$mountpoint/tmp"
|
||||
umount "$mountpoint/sys"
|
||||
umount "$mountpoint/proc"
|
||||
umount -R "$mountpoint/dev"
|
||||
udevadm settle
|
||||
sleep 3
|
||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||
}
|
||||
|
||||
mount_partition() {
|
||||
partition="$1"
|
||||
mountpoint="$2"
|
||||
@ -131,16 +149,9 @@ EOF
|
||||
|
||||
}
|
||||
|
||||
umount_settle() {
|
||||
# Unmount device, and let it settle
|
||||
umount $1
|
||||
udevadm settle
|
||||
}
|
||||
|
||||
umount_partition() {
|
||||
local mountpoint=${1}
|
||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||
umount -R $mountpoint
|
||||
teardown_mountpoint $mountpoint
|
||||
udevadm settle
|
||||
|
||||
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
||||
|
@ -36,11 +36,7 @@ chroot binary/boot/squashfs.dir mkdir /lib/modules
|
||||
chroot binary/boot/squashfs.dir rm /usr/sbin/grub-probe
|
||||
chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
||||
|
||||
mv resolv.conf.tmp "binary/boot/squashfs.dir/etc/resolv.conf"
|
||||
umount "binary/boot/squashfs.dir/proc"
|
||||
umount "binary/boot/squashfs.dir/sys"
|
||||
umount -R "binary/boot/squashfs.dir/dev"
|
||||
umount "binary/boot/squashfs.dir/tmp"
|
||||
teardown_mountpoint binary/boot/squashfs.dir
|
||||
|
||||
squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"
|
||||
squashfs_f_manifest="${squashfs_f}.manifest"
|
||||
|
@ -62,6 +62,8 @@ install_grub() {
|
||||
efi_boot_dir="/boot/efi/EFI/BOOT"
|
||||
chroot mountpoint mkdir -p "${efi_boot_dir}"
|
||||
|
||||
chroot mountpoint apt-get -y update
|
||||
|
||||
# UEFI GRUB modules are meant to be used equally by Secure Boot and
|
||||
# non-Secure Boot systems. If you need an extra module not already
|
||||
# provided or run into "Secure Boot policy forbids loading X" problems,
|
||||
@ -106,7 +108,6 @@ install_grub() {
|
||||
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
|
||||
|
||||
chroot mountpoint apt-get -y clean
|
||||
chroot mountpoint apt-get -y update
|
||||
|
||||
rm mountpoint/tmp/device.map
|
||||
sync
|
||||
|
@ -28,11 +28,11 @@ OVERLAY_ROOT=binary/boot/overlay.dir
|
||||
|
||||
mkdir -p "$OVERLAY_ROOT"
|
||||
|
||||
setup_mountpoint binary/boot/squashfs.dir
|
||||
|
||||
# Create an installer squashfs layer
|
||||
mount_overlay "$SQUASH_ROOT/" "$OVERLAY_ROOT/" "$SQUASH_ROOT/"
|
||||
|
||||
setup_mountpoint binary/boot/squashfs.dir
|
||||
|
||||
# Prepare installer layer.
|
||||
|
||||
# Install any requirements for the installer, for things we don't want
|
||||
@ -147,17 +147,11 @@ AAHP0AEiHQ7zN0yLl7+fkYIMy64xQJqamH1Z2BFN0GWMPwTjpXpszOC+ev7Bpbg0xoldQ1tBHHxH
|
||||
J4Weia71DnXOnt8cj1VhebVMlyv7B/TGAbGwgprgmQ==
|
||||
EOF
|
||||
|
||||
mv resolv.conf.tmp "binary/boot/squashfs.dir/etc/resolv.conf"
|
||||
teardown_mountpoint "$SQUASH_ROOT"
|
||||
|
||||
# Unmount the overlay first, where it is mounted:
|
||||
# Then unmount the overlay
|
||||
umount "$SQUASH_ROOT"
|
||||
|
||||
# Then we can start unmounting the "real" root:
|
||||
umount "binary/boot/squashfs.dir/proc"
|
||||
umount "binary/boot/squashfs.dir/sys"
|
||||
umount -R "binary/boot/squashfs.dir/dev"
|
||||
umount "binary/boot/squashfs.dir/tmp"
|
||||
|
||||
squashfs_f="${PWD}/livecd.${PROJECT}.installer.squashfs"
|
||||
|
||||
(cd "$OVERLAY_ROOT/" &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user