Bug #6557
nanobsd upgrades may fail from lacking resolv.conf
100%
Description
resolv.conf may not exist or be populated in the chroot of nanobsd upgrades on 2.3.x+. pkg uses that for fetching the files, so in that case, the upgrade will fail by being unable to fetch the pkg files.
Associated revisions
Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557
Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557
Ignore cp result for cases when files are the same. Ticket #6557
Ignore cp result for cases when files are the same. Ticket #6557
History
#1
Updated by Chris Buechler over 4 years ago
The situation where they fail is where DNS Forwarder or Resolver are not bound to localhost. If resolv.conf doesn't exist, FreeBSD uses 127.0.0.1. Thanks to cjl for tracking that down.
#2
Updated by Renato Botelho over 4 years ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset 5fac13aafdc335864082fd2e3f5a843d33859fe4.
#3
Updated by Renato Botelho over 4 years ago
- Assignee set to Renato Botelho
#4
Updated by Chris Buechler over 4 years ago
- Target version changed from 2.3.1-p6 to 2.3.2
#5
Updated by Chris Buechler over 4 years ago
- Status changed from Feedback to Resolved
confirmed fixed on multiple upgrades
#6
Updated by Andrew Hotlab over 4 years ago
Sorry, but it seems not to be solved. I just upgraded from 2.3.2 to 2.3.2-p1 (NanoBSD) and the procedure still hangs on the resolv.conf problem.
I solved with the following lines:
local _resolv_conf=$(readlink -f /etc/resolv.conf)
_exec "unlink ${chroot_dir}/etc/resolv.conf" mute ignore_result
_exec "cp -f ${_resolv_conf} ${chroot_dir}/etc/resolv.conf" \
"Copying resolv.conf to upgrade partition" mute ignore_result
Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557