mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-24 20:01:14 +00:00
Import patches-unapplied version 2.479 to ubuntu/bionic-proposed
Imported using git-ubuntu import. Changelog parent: 9f966299f1d8e3303a98ce3b63479afd708c16ee New changelog entries: * Purge initramfs-tools from minimized images. * Make sure to remove any initramfs that was generated in a minimized image. * divert /usr/bin/systemd-detect-virt as part of the grub diversions, so that the grub kernel postinst hook is operational when we're building in a container. LP: #1729034.
This commit is contained in:
parent
9f966299f1
commit
f7fcac1602
11
debian/changelog
vendored
11
debian/changelog
vendored
@ -1,3 +1,14 @@
|
||||
livecd-rootfs (2.479) bionic; urgency=medium
|
||||
|
||||
* Purge initramfs-tools from minimized images.
|
||||
* Make sure to remove any initramfs that was generated in a minimized
|
||||
image.
|
||||
* divert /usr/bin/systemd-detect-virt as part of the grub diversions, so
|
||||
that the grub kernel postinst hook is operational when we're building
|
||||
in a container. LP: #1729034.
|
||||
|
||||
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 31 Oct 2017 09:58:35 -0700
|
||||
|
||||
livecd-rootfs (2.478) artful; urgency=medium
|
||||
|
||||
[ Michael Hudson-Doyle ]
|
||||
|
@ -210,6 +210,27 @@ EOF
|
||||
|
||||
lb chroot "$@"
|
||||
|
||||
if [ "${SUBPROJECT:-}" = minimized ]; then
|
||||
# force removal of initramfs-tools, which we assert is not
|
||||
# required for any minimized images but is still pulled in by
|
||||
# default
|
||||
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -y purge initramfs-tools busybox-initramfs \
|
||||
busybox-static"
|
||||
# and if initramfs-tools was configured before our kernel,
|
||||
# /etc/kernel/postinst.d/initramfs-tools will have created
|
||||
# an initramfs despite the generic dpkg-divert; so remove it
|
||||
# here.
|
||||
rm -f chroot/boot/initrd.img-*
|
||||
|
||||
# temporary workaround: don't remove linux-base which
|
||||
# may have no other reverse-depends currently
|
||||
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
|
||||
apt-mark manual linux-base"
|
||||
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -y --purge autoremove"
|
||||
fi
|
||||
|
||||
if [ -f config/oem-config-preinstalled ]; then
|
||||
|
||||
# This is cargo-culted almost verbatim (with some syntax changes for
|
||||
|
@ -300,6 +300,15 @@ divert_grub() {
|
||||
chroot "$CHROOT_ROOT" dpkg-divert --local \
|
||||
--divert /etc/grub.d/30_os-prober.dpkg-divert \
|
||||
--rename /etc/grub.d/30_os-prober
|
||||
|
||||
# Divert systemd-detect-virt; /etc/kernel/postinst.d/zz-update-grub
|
||||
# no-ops if we are in a container, and the launchpad farm runs builds
|
||||
# in lxd. We therefore pretend that we're never in a container (by
|
||||
# exiting 1).
|
||||
chroot "$CHROOT_ROOT" dpkg-divert --local \
|
||||
--rename /usr/bin/systemd-detect-virt
|
||||
echo "exit 1" > "$CHROOT_ROOT"/usr/bin/systemd-detect-virt
|
||||
chmod +x "$CHROOT_ROOT"/usr/bin/systemd-detect-virt
|
||||
}
|
||||
|
||||
undivert_grub() {
|
||||
@ -312,4 +321,8 @@ undivert_grub() {
|
||||
chroot "$CHROOT_ROOT" dpkg-divert --remove --local \
|
||||
--divert /etc/grub.d/30_os-prober.dpkg-divert \
|
||||
--rename /etc/grub.d/30_os-prober
|
||||
|
||||
rm "$CHROOT_ROOT"/usr/bin/systemd-detect-virt
|
||||
chroot "$CHROOT_ROOT" dpkg-divert --remove --local \
|
||||
--rename /usr/bin/systemd-detect-virt
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user