[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1032934: live-build: Package systemd-resolved breaks name resolution, because of /etc/resolv.conf being linked to /run/systemd/resolve/stub-resolv.conf



Package: live-build
Version: 1:20230131
Severity: normal

"apt-get systemd-resolved" (i.e. including systemd-resolved in
config/package-lists/...) will overwrite existing /etc/resolv.conf
(inside chroot) with link to /run/systemd/resolve/stub-resolv.conf which
is not available, because /run is not mounted inside chroot. And
because systemd-resolved is not started while in chroot.

Since name resolution does not work anymore, retrieving package lists in
subsequent phases fail:

[2023-03-14 11:45:19] lb chroot_archives chroot remove --debug
D: Reading configuration file config/common
D: Reading configuration file config/bootstrap
D: Reading configuration file config/chroot
D: Reading configuration file config/binary
D: Reading configuration file config/source
P: Deconfiguring file /etc/apt/sources.list
D: Executing: apt-get --yes -o Acquire::Retries=5 -o APT::Color=false update
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Err:1 http://deb.debian.org/debian bookworm InRelease
  Could not resolve 'aptcacher.lan'
Err:2 http://security.debian.org bookworm-security InRelease
  Could not resolve 'aptcacher.lan'
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
  Could not resolve 'aptcacher.lan'
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Could not resolve 'aptcacher.lan'
W: Failed to fetch http://security.debian.org/dists/bookworm-security/InRelease  Could not resolve 'aptcacher.lan'
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Could not resolve 'aptcacher.lan'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Since we are now pretty much at the end of the whole lb chroot -phase,
this might not be such big deal. The image will eventually be built
anyway.

I am wondering if it would be possible to mount /run in the chroot as
/proc and /sys are mounted?

If /run is mounted and if the build host itself is using
systemd-resolved, there shouldn't be any issues.


-- Package-specific info:

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (500, 'testing-security'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (50, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-6-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages live-build depends on:
ii  debootstrap  1.0.128+nmu2

Versions of packages live-build recommends:
ii  apt-utils                       2.5.6
ii  bzip2                           1.0.8-5+b1
ii  cpio                            2.13+dfsg-7.1
ii  cryptsetup                      2:2.6.1-1
ii  file                            1:5.44-3
ii  live-boot-doc                   1:20230131
ii  live-config-doc                 11.0.3+nmu1
ii  live-manual-html [live-manual]  2:20151217.2
ii  rsync                           3.2.7-1
ii  systemd-container               252.6-1
ii  wget                            1.21.3-1+b2
ii  xz-utils                        5.4.1-0.2

Versions of packages live-build suggests:
ii  e2fsprogs  1.46.6-1
pn  mtd-utils  <none>
ii  parted     3.5-3

-- no debconf information


Reply to: