Skip to content

Drop resolv.conf so the right one is created at runtime

When virtualization is available, Debos uses systemd-nspawn to run commands in the "chroot".

systemd-nspawn automatically takes care of setting up a working /etc/resolv.conf, usually by bind mounting the "host" one.

In our case, the host is the VM managed by fakemachine, which is configured to use systemd-resolved.

The end result is that the stub /etc/resolv.conf pointing to 127.0.0.53 is copied to our rootfs and included in the generated ospack.

See also https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--resolv-conf=

In the past, ConnMan used to ship a tmpfiles.d snippet to overwrite it with a link to /var/run/connman/resolv.conf but since commit 45ccde23a90c shipped in ConnMan 1.36 the snippet has been changed to no longer overwrite existing files, causing DNS resolution to fail on our images.

By dropping /etc/resolv.conf the ConnMan tmpfiles.d snippet should work again as intended.

Edited by Emanuele Aina

Merge request reports