Fix broken DNS in buildd image builds.

Instead of injecting an empty resolv.conf with an includes.chroot, we'll
inject it in late with a hook. The empty resolv.conf breaks DNS early in
the build, and causes some binary hooks to fail.
This commit is contained in:
David Krauser 2019-12-10 15:30:10 -05:00
parent 5511deae44
commit 612c731b26
5 changed files with 10 additions and 4 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
livecd-rootfs (2.632) UNRELEASED; urgency=medium
* Fix broken DNS in buildd image builds.
-- David Krauser <david.krauser@canonical.com> Tue, 10 Dec 2019 15:28:12 -0400
livecd-rootfs (2.631) focal; urgency=medium
* Add support for uc20 model assertions.

View File

@ -0,0 +1,4 @@
#!/bin/sh
set -e
chroot chroot truncate -s 0 /etc/resolv.conf

View File

@ -27,10 +27,6 @@ cleanup_linux_virtual() {
}
trap cleanup_linux_virtual EXIT
# The base buildd chroot includes an empty resolv.conf
# We don't want to include that in the bootable images
rm $mount_d/etc/resolv.conf
# Install dependencies
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
update --assume-yes